入库,出库,调拨,出入库明细 4个模块增加已经添加过的产品不可以再次选择
| | |
| | | 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({ |
| | |
| | | :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" |
| | |
| | | showSummary: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | // 列表不可选的数据 |
| | | selectBoxList: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | name:{ |
| | | type:String, |
| | | default:'' |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | }) |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | :loading="loading" |
| | | :table-list="tableList" |
| | | :select-box="editCommonConfig.isSelectBox" |
| | | :selectBoxList="selectBoxList" |
| | | name="product" |
| | | @selCommonClick="selNameClick" |
| | | @selTableCol="selTableCol" |
| | | @getSelectArray="getSelectArray" |
| | |
| | | tableInfomation: [] |
| | | } |
| | | } |
| | | }, |
| | | // 不可选的数据 |
| | | selectBoxList: { |
| | | type: Array, |
| | | default: () => [] |
| | | } |
| | | }, |
| | | components: {}, |