|
@@ -664,7 +664,10 @@
|
|
|
let data = await samplingRecordsPage({
|
|
let data = await samplingRecordsPage({
|
|
|
qualityWorkOrderId: row.id
|
|
qualityWorkOrderId: row.id
|
|
|
});
|
|
});
|
|
|
- let list = data.list.filter((item) => item.status === 0);
|
|
|
|
|
|
|
+ let list = data.list.filter(
|
|
|
|
|
+ (item) => item.status === 0 || item.status === 4
|
|
|
|
|
+ );
|
|
|
|
|
+ let list1 = data.list.filter((item) => item.status != 3);
|
|
|
if (list?.length) {
|
|
if (list?.length) {
|
|
|
this.getById(list[0].id);
|
|
this.getById(list[0].id);
|
|
|
this.type = 'edit';
|
|
this.type = 'edit';
|
|
@@ -677,14 +680,14 @@
|
|
|
this.form.qualityWorkOrderName = row.name;
|
|
this.form.qualityWorkOrderName = row.name;
|
|
|
this.workSampleQuantity = Number(row.sampleQuantity) || 0;
|
|
this.workSampleQuantity = Number(row.sampleQuantity) || 0;
|
|
|
|
|
|
|
|
- if (!data?.list.length) {
|
|
|
|
|
|
|
+ if (!list1?.length) {
|
|
|
this.form.isFirstSampling = 1;
|
|
this.form.isFirstSampling = 1;
|
|
|
} else {
|
|
} else {
|
|
|
- this.$set(this.form, 'unit', data?.list[0].unit);
|
|
|
|
|
|
|
+ this.$set(this.form, 'unit', list1[0].unit);
|
|
|
}
|
|
}
|
|
|
- await this.datasource(data?.list[0]?.unit);
|
|
|
|
|
|
|
+ await this.datasource(list1[0]?.unit);
|
|
|
await this.queryQualityTempleContent(
|
|
await this.queryQualityTempleContent(
|
|
|
- !data?.list.length && row.qualityMode == 1
|
|
|
|
|
|
|
+ !list1.length && row.qualityMode == 1
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|