|
|
@@ -132,7 +132,7 @@
|
|
|
:selection.sync="selection"
|
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
|
- 累计请样数量:{{ workSampleQuantity }}{{ sampleList[0]?.measureUnit }}
|
|
|
+ 累计请样数量:{{ workSampleQuantity }}{{ sampleList[0]?.measureUnit||form.measureUnit }}
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
<header-title title="请样信息"> </header-title>
|
|
|
@@ -645,6 +645,7 @@
|
|
|
});
|
|
|
},
|
|
|
async init(row) {
|
|
|
+ let isPackingUnit = false;
|
|
|
let data = await samplingRecordsPage({
|
|
|
qualityWorkOrderId: row.id
|
|
|
});
|
|
|
@@ -666,10 +667,15 @@
|
|
|
|
|
|
if (!list1?.length) {
|
|
|
this.form.isFirstSampling = 1;
|
|
|
+ isPackingUnit = true;
|
|
|
+ if (this.form.conditionType == 1) {
|
|
|
+ this.$set(this.form, 'packingUnit', '111');
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$set(this.form, 'unit', list1[0].unit);
|
|
|
+ this.$set(this.form, 'measureUnit', list1[0].measureUnit);
|
|
|
}
|
|
|
- await this.datasource(list1[0]?.unit);
|
|
|
+ await this.datasource(list1[0]?.unit, isPackingUnit);
|
|
|
await this.queryQualityTempleContent(
|
|
|
!list1.length && row.qualityMode == 1
|
|
|
);
|
|
|
@@ -740,7 +746,7 @@
|
|
|
changeParent(row) {
|
|
|
this.init(row);
|
|
|
},
|
|
|
- async datasource(unit) {
|
|
|
+ async datasource(unit, isPackingUnit) {
|
|
|
const res = await queryQualityInventory({
|
|
|
qualityWorkerId: this.form.qualityWorkOrderId,
|
|
|
pageNum: 1,
|
|
|
@@ -770,6 +776,9 @@
|
|
|
listArr.find((item) => unit == item.conversionUnit)?.id
|
|
|
);
|
|
|
}
|
|
|
+ if (isPackingUnit) {
|
|
|
+ this.$set(this.form, 'unit', res.list[0]?.measureUnit);
|
|
|
+ }
|
|
|
this.form.pleaseUnit = res.list[0]?.measureUnit;
|
|
|
res.list.map((el) => {
|
|
|
el.weightProportion = el.weight
|