diff --git a/src/views/mes/reportWork/index.vue b/src/views/mes/reportWork/index.vue index 2ea2656..b582c18 100644 --- a/src/views/mes/reportWork/index.vue +++ b/src/views/mes/reportWork/index.vue @@ -1348,7 +1348,8 @@ export default { pConsumeSelection(selection) { const allRows = this.pConsumeRows.concat(selection) this.pConsumeRows = allRows.reduce((acc, cur) => { - const hasDuplicate = acc.some(item => item.materialCode === cur.materialCode); + const hasDuplicate = acc.some(item => item.materialCode === cur.materialCode + && item.workorderCode === cur.workorderCode); if (!hasDuplicate) { acc.push(cur); } @@ -1359,6 +1360,7 @@ export default { this.sConsumeRows = selection; }, submitConsume() { + this.loading = true; this.consumeRows = this.pConsumeRows; if ( this.consumeRows==0) { @@ -1371,6 +1373,7 @@ export default { this.openConsume = false; this.reset(); this.getList(); + this.loading = false; }); }, /** 导出按钮操作 */