|
@@ -144,6 +144,7 @@
|
|
|
"
|
|
"
|
|
|
:item="objData"
|
|
:item="objData"
|
|
|
:list="objData.semiProductList"
|
|
:list="objData.semiProductList"
|
|
|
|
|
+ ref="jobReftg"
|
|
|
:equipmentList="objData.equipmentList"
|
|
:equipmentList="objData.equipmentList"
|
|
|
@countNumPl="countNumPl"
|
|
@countNumPl="countNumPl"
|
|
|
>
|
|
>
|
|
@@ -1360,7 +1361,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
//批量报工合格不合格重量统计
|
|
//批量报工合格不合格重量统计
|
|
|
countNumPl(list, index) {
|
|
countNumPl(list, index) {
|
|
|
- console.log("11111122222333", list);
|
|
|
|
|
//合格总数
|
|
//合格总数
|
|
|
let formedNumCount = 0;
|
|
let formedNumCount = 0;
|
|
|
//合格总重量
|
|
//合格总重量
|
|
@@ -1390,6 +1390,7 @@ export default {
|
|
|
notFormedWeightCount + Number(nw.allReportWeight || 0);
|
|
notFormedWeightCount + Number(nw.allReportWeight || 0);
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
this.$set(this.objData.workReportInfo, "formedNum", formedNumCount); //合格总数
|
|
this.$set(this.objData.workReportInfo, "formedNum", formedNumCount); //合格总数
|
|
|
this.$set(this.objData.workReportInfo, "formedWeight", formedWeightCount); //合格总重量
|
|
this.$set(this.objData.workReportInfo, "formedWeight", formedWeightCount); //合格总重量
|
|
|
this.$set(this.objData.workReportInfo, "notFormedNum", notFormedNumCount); //不合格总数
|
|
this.$set(this.objData.workReportInfo, "notFormedNum", notFormedNumCount); //不合格总数
|
|
@@ -1398,14 +1399,32 @@ export default {
|
|
|
"notFormedWeight",
|
|
"notFormedWeight",
|
|
|
notFormedWeightCount
|
|
notFormedWeightCount
|
|
|
); //不合格总重量
|
|
); //不合格总重量
|
|
|
- this.$refs.jobReftg.formedTotal(
|
|
|
|
|
- formedNumCount,
|
|
|
|
|
- formedWeightCount,
|
|
|
|
|
- notFormedNumCount,
|
|
|
|
|
- notFormedWeightCount
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ // this.$refs.jobReftg.formedTotal(
|
|
|
|
|
+ // formedNumCount,
|
|
|
|
|
+ // formedWeightCount,
|
|
|
|
|
+ // notFormedNumCount,
|
|
|
|
|
+ // notFormedWeightCount
|
|
|
|
|
+ // );
|
|
|
|
|
+ // console.log("777777777777777", this.objData);
|
|
|
|
|
+ this.objData = this.deepCopy(this.objData);
|
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ deepCopy(obj, hash = new WeakMap()) {
|
|
|
|
|
+ if (obj === null) return null;
|
|
|
|
|
+ if (obj instanceof Date) return new Date(obj);
|
|
|
|
|
+ if (obj instanceof RegExp) return new RegExp(obj);
|
|
|
|
|
+ if (typeof obj !== "object" && typeof obj !== "function") return obj;
|
|
|
|
|
+ if (hash.has(obj)) return hash.get(obj);
|
|
|
|
|
+
|
|
|
|
|
+ const result = Array.isArray(obj) ? [] : {};
|
|
|
|
|
+ hash.set(obj, result);
|
|
|
|
|
+
|
|
|
|
|
+ return Object.keys(obj).reduce((acc, key) => {
|
|
|
|
|
+ acc[key] = this.deepCopy(obj[key], hash);
|
|
|
|
|
+ return acc;
|
|
|
|
|
+ }, result);
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|