报工组件修改

master
zhaoxiaolin 8 months ago
parent 741a339634
commit af4f3734f9

@ -1348,7 +1348,8 @@ export default {
pConsumeSelection(selection) { pConsumeSelection(selection) {
const allRows = this.pConsumeRows.concat(selection) const allRows = this.pConsumeRows.concat(selection)
this.pConsumeRows = allRows.reduce((acc, cur) => { 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) { if (!hasDuplicate) {
acc.push(cur); acc.push(cur);
} }
@ -1359,6 +1360,7 @@ export default {
this.sConsumeRows = selection; this.sConsumeRows = selection;
}, },
submitConsume() { submitConsume() {
this.loading = true;
this.consumeRows = this.pConsumeRows; this.consumeRows = this.pConsumeRows;
if ( this.consumeRows==0) { if ( this.consumeRows==0) {
@ -1371,6 +1373,7 @@ export default {
this.openConsume = false; this.openConsume = false;
this.reset(); this.reset();
this.getList(); this.getList();
this.loading = false;
}); });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */

Loading…
Cancel
Save