diff --git a/src/views/mes/reportWork/index.vue b/src/views/mes/reportWork/index.vue
index 09adb6a..641cd1c 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 0b46c52..64050ae 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;
},
}