入库,出库,调拨,出入库明细 4个模块增加已经添加过的产品不可以再次选择
3个文件已修改
41 ■■■■■ 已修改文件
src/components/makepager/CommonFormTableView.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/TableCommonView.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/commonDialog/SelectCommonDialog.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/CommonFormTableView.vue
@@ -570,10 +570,19 @@
  computed: {},
  watch: {
    productTableList() {
      this.tableList = this.productTableList
      // this.showcol = this.productTableList.showcol
      this.getTableInfo()
    }
  },
  methods: {
    getTableInfo(){
      this.tableList = this.productTableList
      if (this.tableList.tableData.length === 1 && this.tableList.tableData[0].name === "") {
        this.isRecalculate = false
      } else {
        this.isRecalculate = true
      }
    },
    // 产品名称
    async getProductList() {
      await getProductList({
src/components/makepager/TableCommonView.vue
@@ -22,7 +22,7 @@
      :summary-method="getSummaries"
      :show-summary="showSummary"
    >
      <el-table-column v-if="tableList.selectBox" type="selection" width="40"> </el-table-column>
      <el-table-column v-if="tableList.selectBox" type="selection" width="40" :selectable="selectable"> </el-table-column>
      <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"> </el-table-column>
      <el-table-column
        v-for="(item, i) in tableList.tableColumn"
@@ -151,6 +151,15 @@
    showSummary: {
      type: Boolean,
      default: false
    },
    // 列表不可选的数据
    selectBoxList: {
      type: Array,
      default: () => []
    },
    name:{
      type:String,
      default:''
    }
  },
  data() {
@@ -254,6 +263,18 @@
        })
        return sums
      }
    },
    selectable(row) {
      let prop='id'
      if(this.name=='product'){
        prop='productId'
      }
      let list = this.selectBoxList.map((item) => item[prop])
      if (list.findIndex((v) => v == row.id) == -1) {
        return true
      } else {
        return false
      }
    }
  }
}
src/views/other/commonDialog/SelectCommonDialog.vue
@@ -24,6 +24,8 @@
          :loading="loading"
          :table-list="tableList"
          :select-box="editCommonConfig.isSelectBox"
          :selectBoxList="selectBoxList"
          name="product"
          @selCommonClick="selNameClick"
          @selTableCol="selTableCol"
          @getSelectArray="getSelectArray"
@@ -69,6 +71,11 @@
          tableInfomation: []
        }
      }
    },
    // 不可选的数据
    selectBoxList: {
      type: Array,
      default: () => []
    }
  },
  components: {},