zuozhengqing
2023-11-22 3b2fc427d0b25bd606c261b9d8b6b8a727a0e37b
src/components/makepager/CommonFormTableView.vue
@@ -113,6 +113,7 @@
              :prop="'tableData.' + scope.$index + '.' + item.prop"
              :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]"
            >
            <!-- 采购管理 -->
              <template v-if="item.multiply">
                <el-input-number
                  :disabled="item.disabled"
@@ -188,6 +189,7 @@
      type: Object,
      default: () => {
        return {
          tableProductList:[],
          disabled:false,
          tableData: [], // 接口返回数据
          tableColumn: [
@@ -226,7 +228,8 @@
        title: "",
        infomation: {}
      },
      productIndex: 0
      productIndex: 0,
      tableProductLists:[],
    }
  },
  created() {
@@ -237,7 +240,7 @@
  watch: {
    productTableList() {
      this.tableList = this.productTableList
    }
    },
  },
  methods: {
    // 产品名称
@@ -247,9 +250,10 @@
        page: 1,
        pageSize: 100
      }).then((res) => {
        if (res.data.code === 200) {
          if (res.data.data.list && res.data.data.list.length > 0) {
            this.productList = res.data.data.list
        if (res.code === 200) {
          if (res.data.list && res.data.list.length > 0) {
            this.productList = res.data.list
            this.tableProductLists = res.data.list
          }
        }
      })
@@ -349,8 +353,6 @@
      this.$emit("addProductClick")
    },
    commonInputChange(val, prop, row) {
      console.log(val, prop)
      console.log(row)
      this.$emit("inputContent", val, prop, row)
    },
    // 清空
@@ -359,7 +361,7 @@
    },
    // 选择产品名称相关方法
    querySearchAsync(queryString, cb) {
      var restaurants = this.productList
      var restaurants = this.tableProductLists
      var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants
      cb(results)
    },
@@ -370,7 +372,6 @@
    },
    handleSelectClient(item, prop, row) {
      // this.clientId = item.id
      console.log(item, prop, row)
      this.tableList.tableData.map((ite) => {
        if (ite.name === item.name) {
          ite.ID = row.ID