|
|
@@ -72,7 +72,7 @@ export default {
|
|
|
sampleNumber: '',
|
|
|
imgUrl: [],
|
|
|
qualityTimeStart: '',
|
|
|
- qualityTimeEnd: ''
|
|
|
+ qualityTimeEnd: '',
|
|
|
};
|
|
|
};
|
|
|
return {
|
|
|
@@ -151,11 +151,20 @@ export default {
|
|
|
console.log(count, newMeasureQuantity, newWeight)
|
|
|
delete oldItem.id;
|
|
|
|
|
|
+ // 遍历新数组设置 qualityResults 默认值
|
|
|
+ this.schemeList.forEach(item => {
|
|
|
+ if (typeof item === 'object' && item !== null) {
|
|
|
+ item.qualityResults = 1; // 设置默认值
|
|
|
+ }
|
|
|
+ delete item.id;
|
|
|
+ });
|
|
|
+ oldItem.qualitySampleTemplateList = JSON.parse(JSON.stringify(this.schemeList));
|
|
|
for (let i = 0; i < count; i++) {
|
|
|
ProductSampleList.push({
|
|
|
...oldItem,
|
|
|
measureQuantity: newMeasureQuantity,
|
|
|
- weight: newWeight
|
|
|
+ weight: newWeight,
|
|
|
+ qualitySampleTemplateList:JSON.parse(JSON.stringify(this.schemeList))
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -246,6 +255,14 @@ export default {
|
|
|
for (let i = 0; i < selection.length; i++) {
|
|
|
console.log(selection[i], 'selection[i]')
|
|
|
this.$set(selection[i], 'qualityStatus', 2)
|
|
|
+ // 遍历新数组设置 qualityResults 默认值
|
|
|
+ this.schemeList.forEach(item => {
|
|
|
+ if (typeof item === 'object' && item !== null) {
|
|
|
+ item.qualityResults = 1; // 设置默认值
|
|
|
+ }
|
|
|
+ delete item.id;
|
|
|
+ });
|
|
|
+ this.$set(selection[i], 'qualitySampleTemplateList', JSON.parse(JSON.stringify(this.schemeList)))
|
|
|
}
|
|
|
}
|
|
|
this.sampleList = selection;
|
|
|
@@ -299,8 +316,9 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
await this.queryQualityInventory()
|
|
|
- await this.queryQualitySamplContent()
|
|
|
await this.queryQualityTempleContent()
|
|
|
+ await this.queryQualitySamplContent()
|
|
|
+
|
|
|
},
|
|
|
async queryQualityInventory() {
|
|
|
let res = await queryQualityInventory({ qualityWorkerId: this.$route.query.id });
|