|
|
@@ -10,7 +10,6 @@
|
|
|
width="80%"
|
|
|
resizable
|
|
|
:maxable="true"
|
|
|
-
|
|
|
>
|
|
|
<ele-pro-table
|
|
|
:needPage="false"
|
|
|
@@ -18,7 +17,7 @@
|
|
|
:datasource="[form]"
|
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
|
- 剩余样品总数:{{ form.remainingSampleCount }}{{ form.measureUnit }}
|
|
|
+ 样品总数:{{ form.workSampleCount }}{{ form.measureUnit }}
|
|
|
</template>
|
|
|
<template v-slot:craftFiles="{ row }">
|
|
|
<el-link type="primary" :underline="false" @click="craftFiles(row)"
|
|
|
@@ -84,11 +83,12 @@
|
|
|
"
|
|
|
>
|
|
|
<span>
|
|
|
- 当前检测剩余样品数:{{ getSampleQuantityCount
|
|
|
+ 当前检测剩余样品数:{{ form.sampleQuantity
|
|
|
}}{{ form.measureUnit }}</span
|
|
|
>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
+ v-if="type != 'detail'"
|
|
|
@click="handleOneKeyQualified"
|
|
|
style="margin-right: 10px"
|
|
|
>
|
|
|
@@ -647,6 +647,8 @@
|
|
|
minWidth: 180,
|
|
|
prop: 'sampleQuantity',
|
|
|
slot: 'sampleQuantity',
|
|
|
+ headerSlot: 'isRequired',
|
|
|
+
|
|
|
align: 'center',
|
|
|
label: '样品数',
|
|
|
showOverflowTooltip: true
|
|
|
@@ -745,14 +747,7 @@
|
|
|
];
|
|
|
},
|
|
|
getSampleQuantityCount() {
|
|
|
- return (
|
|
|
- (this.form.sampleQuantity * 100 -
|
|
|
- (this.form.lossNumber * 100 || 0) -
|
|
|
- (this.form.lossNumberUnqualified * 100 || 0) -
|
|
|
- (this.form.retainedSampleQuantity * 100 || 0) -
|
|
|
- (this.form.retainedSampleUnqualified * 100 || 0)) /
|
|
|
- 100
|
|
|
- );
|
|
|
+ return this.form.sampleQuantity;
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -789,21 +784,16 @@
|
|
|
...row,
|
|
|
batchNo: this.form.batchNo,
|
|
|
qualityWorkOrderId: this.form.qualityWorkOrderId,
|
|
|
- getSampleQuantityCount:
|
|
|
- this.getSampleQuantityCount +
|
|
|
- Number(row.lossNumber) +
|
|
|
- Number(row.lossNumberUnqualified) +
|
|
|
- Number(row.retainedSampleQuantity) +
|
|
|
- Number(row.retainedSampleUnqualified)
|
|
|
+ getSampleQuantityCount: this.form.sampleQuantity
|
|
|
},
|
|
|
type
|
|
|
);
|
|
|
},
|
|
|
experimentReportDone(data) {
|
|
|
- console.log(data)
|
|
|
+ console.log(data);
|
|
|
let index = this.tableData.findIndex((item) => item.id == data.id);
|
|
|
this.$set(this.tableData, index, data);
|
|
|
- console.log(this.tableData)
|
|
|
+ console.log(this.tableData);
|
|
|
|
|
|
// this.initData();
|
|
|
},
|
|
|
@@ -819,8 +809,9 @@
|
|
|
this.title = '检测项受托单';
|
|
|
}
|
|
|
if (type == 'report') {
|
|
|
- let data = { ...row,...workData };
|
|
|
- data.sampleQuantity = row.sampleQuantity || data.remainingSampleCount;
|
|
|
+ let data = { ...row, ...workData };
|
|
|
+ console.log(data, workData);
|
|
|
+ data.sampleQuantity = row.sampleQuantity || data.workSampleCount;
|
|
|
data.sampleNoQualifiedNumber = row.sampleNoQualifiedNumber || 0;
|
|
|
data.sampleQualifiedNumber =
|
|
|
row.sampleQualifiedNumber ||
|
|
|
@@ -839,11 +830,11 @@
|
|
|
item.executionMethod || 1
|
|
|
);
|
|
|
});
|
|
|
- if (row.sampleQuantity) {
|
|
|
- this.form.remainingSampleCount =
|
|
|
- Number(row.sampleQuantity) +
|
|
|
- Number(this.form.remainingSampleCount);
|
|
|
- }
|
|
|
+ // if (row.sampleQuantity) {
|
|
|
+ // this.form.remainingSampleCount =
|
|
|
+ // Number(row.sampleQuantity) +
|
|
|
+ // Number(this.form.remainingSampleCount);
|
|
|
+ // }
|
|
|
} else {
|
|
|
this.$set(this, 'form', JSON.parse(JSON.stringify(workData)));
|
|
|
this.$set(
|
|
|
@@ -860,10 +851,10 @@
|
|
|
);
|
|
|
|
|
|
this.tableData = JSON.parse(JSON.stringify(list));
|
|
|
- if (this.form.qualityWorkOrderId) {
|
|
|
- this.form.remainingSampleCount =
|
|
|
- this.form.sampleQuantity + this.form.remainingSampleCount;
|
|
|
- }
|
|
|
+ // if (this.form.qualityWorkOrderId) {
|
|
|
+ // this.form.remainingSampleCount =
|
|
|
+ // this.form.sampleQuantity + this.form.remainingSampleCount;
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
this.visible = true;
|
|
|
@@ -877,8 +868,8 @@
|
|
|
if (this.form.sampleQuantity < 0) {
|
|
|
this.form.sampleQuantity = 0;
|
|
|
}
|
|
|
- if (this.form.sampleQuantity > this.form.remainingSampleCount) {
|
|
|
- this.form.sampleQuantity = this.form.remainingSampleCount;
|
|
|
+ if (this.form.sampleQuantity > this.form.workSampleCount) {
|
|
|
+ this.form.sampleQuantity = this.form.workSampleCount;
|
|
|
}
|
|
|
if (
|
|
|
this.form.sampleQuantity <
|