From b4435563d5048aeffc864b2ab6b7b397793be369 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 26 Mar 2024 09:24:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=B7=A5=E5=A2=9E=E5=8A=A0remark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/reportWork/index.vue | 22 ++++++++++++++++----- src/views/mes/reportWork/selectMaterial.vue | 8 +++++--- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/views/mes/reportWork/index.vue b/src/views/mes/reportWork/index.vue index 09adb6ae..641cd1c5 100644 --- a/src/views/mes/reportWork/index.vue +++ b/src/views/mes/reportWork/index.vue @@ -473,6 +473,7 @@ @select-all="allReportSelection" :summary-method="getSummaries" show-summary + :ref = "tableIndex+index" > @@ -575,7 +576,7 @@
- 新增物料 + 新增物料
@@ -934,7 +935,8 @@ export default { ], }, consumeList : [], - cwarehouseList:[] + cwarehouseList:[], + tableIndex: 'tableIndex' }; }, created() { @@ -1573,7 +1575,7 @@ export default { }, //物料损耗表格--新增 - addConsumeTableRow(rows){ + addConsumeTableRow(rows,index){ this.consumeList = rows; if(rows.length==0){ this.$modal.msgError(`上位机尚未填写损耗,不允许提前新增`); @@ -1581,10 +1583,10 @@ export default { } this.$refs.itemSelectNewPrepare.showFlag = true; - this.$refs.itemSelectNewPrepare.init(rows[0].workorderCode,this.selectRow[0].workorderCode); + this.$refs.itemSelectNewPrepare.init(rows[0].workorderCode,this.selectRow[0].workorderCode,index); }, //物料损耗表格--新增确认 - onSelectNewPrepare(obj) { + onSelectNewPrepare(obj,tableIndx) { let sr = this.selectRow[0] for(let i=0;i { + let dynamicRef = 'tableIndex'+tableIndx; + console.log(dynamicRef) + this.$refs[dynamicRef].toggleRowSelection(row, true); + + }); + **/ } } }, + //添加备注 addRemarksblur(table,remark,index){ table.forEach(item=>{ item.remark = remark; diff --git a/src/views/mes/reportWork/selectMaterial.vue b/src/views/mes/reportWork/selectMaterial.vue index 0b46c52f..64050aec 100644 --- a/src/views/mes/reportWork/selectMaterial.vue +++ b/src/views/mes/reportWork/selectMaterial.vue @@ -114,7 +114,8 @@ export default { workorderCode:'', parentOrder:'' }, - selectionRows:[] + selectionRows:[], + tableIndex:'' }; }, created() { @@ -128,10 +129,11 @@ export default { return cellValue.slice(7,18); //返回值 } }, - init(workorderCode,parentOrder){ + init(workorderCode,parentOrder,tableIndex){ this.workorderCode = workorderCode; this.queryParams.workorderCode = this.workorderCode; this.queryParams.parentOrder = parentOrder; + this.tableIndex = tableIndex; this.getList(); }, /** 查询表格列表*/ @@ -176,7 +178,7 @@ export default { obj.workorderCode = this.workorderCode; }); - this.$emit('onSelected', this.selectionRows); + this.$emit('onSelected', this.selectionRows,this.tableIndex); this.showFlag = false; }, }