zuozhengqing
2023-11-18 65bc5629504c5e138d8540cdf9b0eb3796842d4a
src/components/makepager/CommonFormTableView.vue
@@ -39,6 +39,7 @@
              :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]"
            >
              <el-input
                :disabled="item.disabled"
                v-model.trim="scope.row[item.prop]"
                maxlength="50"
                size="mini"
@@ -49,9 +50,10 @@
                "
              ></el-input>
            </el-form-item>
            <el-form-item v-else-if="item.productName" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop">
            <el-form-item  v-else-if="item.productName" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop">
              <div class="custom-name">
                <el-autocomplete
                  :disabled="item.disabled"
                  v-model="scope.row[item.prop]"
                  :fetch-suggestions="querySearchAsync"
                  value-key="name"
@@ -63,13 +65,13 @@
                    }
                  "
                ></el-autocomplete>
                <div class="common-select-btn" @click="selClientClick(scope.row, item.prop, scope)">
                  <i class="el-icon-circle-plus-outline" title="选择"></i>
                <div v-if="!item.disabled" class="common-select-btn" @click="selClientClick(scope.row, item.prop, scope)">
                  <i  class="el-icon-circle-plus-outline" title="选择"></i>
                </div>
                <div class="common-select-btn" @click="clearupClient(scope.row, scope)">
                <div v-if="!item.disabled" class="common-select-btn" @click="clearupClient(scope.row, scope)">
                  <i class="el-icon-remove-outline" title="清除"></i>
                </div>
                <div class="common-select-btn" v-if="scope.$index != 0" @click="deleteClient(scope.row, scope)">
                <div class="common-select-btn" v-if="scope.$index != 0||!item.disabled" @click="deleteClient(scope.row, scope)">
                  <i class="el-icon-delete" title="删除"></i>
                </div>
              </div>
@@ -91,6 +93,7 @@
              :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]"
            >
              <el-input-number
                :disabled="item.disabled"
                v-model="scope.row[item.prop]"
                placeholder=""
                :min="0"
@@ -112,9 +115,9 @@
            >
              <template v-if="item.multiply">
                <el-input-number
                  :disabled="item.disabled"
                  :value="scope.row[showSummary.multiply[0]] * scope.row[showSummary.multiply[1]]"
                  placeholder=""
                  :disabled="item.disabled"
                  :min="0"
                  :precision="2"
                  :controls="false"
@@ -129,6 +132,7 @@
              </template>
              <template v-else>
                <el-input-number
                  :disabled="item.disabled"
                  v-model="scope.row[item.prop]"
                  placeholder=""
                  :min="0"
@@ -152,8 +156,8 @@
      </el-table>
    </el-form>
    <div v-if="!detailEnter" style="margin: 10px">
      <el-button size="small" type="primary" @click="add">新增</el-button>
      <el-button size="small" type="primary" @click="empty">清空</el-button>
      <el-button :disabled="tableList.disabled" size="small" type="primary" @click="add">新增</el-button>
      <el-button :disabled="tableList.disabled" size="small" type="primary" @click="empty">清空</el-button>
    </div>
    <!-- 产品名称 -->
    <SelectCommonDialog
@@ -184,6 +188,8 @@
      type: Object,
      default: () => {
        return {
          tableProductList:[],
          disabled:false,
          tableData: [], // 接口返回数据
          tableColumn: [
            // table表单
@@ -232,7 +238,7 @@
  watch: {
    productTableList() {
      this.tableList = this.productTableList
    }
    },
  },
  methods: {
    // 产品名称
@@ -354,7 +360,7 @@
    },
    // 选择产品名称相关方法
    querySearchAsync(queryString, cb) {
      var restaurants = this.productList
      var restaurants = this.productTableList.tableProductList
      var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants
      cb(results)
    },