|
|
@@ -825,6 +825,22 @@
|
|
|
// this.initData();
|
|
|
},
|
|
|
|
|
|
+ //当 qms_defaultDisposalType 为 true 时,损耗数自动同步合格/不合格数
|
|
|
+ syncLossNumber(row, index) {
|
|
|
+ if (!this.qms_defaultDisposalType) return;
|
|
|
+ this.$set(
|
|
|
+ this.tableData[index],
|
|
|
+ 'lossNumber',
|
|
|
+ Number(row.qualifiedQuantity) || 0
|
|
|
+ );
|
|
|
+ this.$set(
|
|
|
+ this.tableData[index],
|
|
|
+ 'lossNumberUnqualified',
|
|
|
+ Number(row.noQualifiedQuantity) || 0
|
|
|
+ );
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
+
|
|
|
async open({ workData, row, list }, type, pageName) {
|
|
|
this.tableData = [];
|
|
|
this.pageName = pageName;
|
|
|
@@ -884,6 +900,13 @@
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
+ //当 qms_defaultDisposalType 为 true 时,初始化时同步损耗数
|
|
|
+ if (this.qms_defaultDisposalType) {
|
|
|
+ this.tableData.forEach((item, index) => {
|
|
|
+ this.syncLossNumber(item, index);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
this.visible = true;
|
|
|
},
|
|
|
handleOneKeyQualified() {
|
|
|
@@ -978,6 +1001,8 @@
|
|
|
if (type == 'noQualifiedQuantity' && item[type] > 0) {
|
|
|
this.$set(this.tableData[index], 'qualityResults', 2);
|
|
|
}
|
|
|
+ //当 qms_defaultDisposalType 为 true 时,损耗数自动同步合格/不合格数
|
|
|
+ this.syncLossNumber(item, index);
|
|
|
}
|
|
|
//损耗数
|
|
|
if (type == 'lossNumber' || type == 'lossNumberUnqualified') {
|
|
|
@@ -1016,6 +1041,8 @@
|
|
|
this.isQualifiedQuantity(row, index, 'noQualifiedQuantity');
|
|
|
}
|
|
|
}
|
|
|
+ //当 qms_defaultDisposalType 为 true 时,损耗数自动同步合格/不合格数
|
|
|
+ this.syncLossNumber(row, index);
|
|
|
}
|
|
|
},
|
|
|
watch: {
|