|
@@ -28,6 +28,7 @@
|
|
|
@changeNumber="changeNumber"
|
|
@changeNumber="changeNumber"
|
|
|
@quantityAssignment="quantityAssignment"
|
|
@quantityAssignment="quantityAssignment"
|
|
|
@changeInspectionStandardsModel="changeInspectionStandardsModel"
|
|
@changeInspectionStandardsModel="changeInspectionStandardsModel"
|
|
|
|
|
+ @quantityCalculation="quantityCalculation"
|
|
|
></base-info>
|
|
></base-info>
|
|
|
<header-title title="样品信息"></header-title>
|
|
<header-title title="样品信息"></header-title>
|
|
|
<el-form label-width="110px">
|
|
<el-form label-width="110px">
|
|
@@ -110,6 +111,7 @@
|
|
|
@getConditionType="getConditionType"
|
|
@getConditionType="getConditionType"
|
|
|
@countQualityResults="countQualityResults"
|
|
@countQualityResults="countQualityResults"
|
|
|
@setSchemeList="setSchemeList"
|
|
@setSchemeList="setSchemeList"
|
|
|
|
|
+ @sampleListChange="sampleListChange"
|
|
|
/>
|
|
/>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
|
@@ -293,6 +295,10 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ //合格与不合格数变化处理逻辑
|
|
|
|
|
+ quantityCalculation(val) {
|
|
|
|
|
+ this.$refs.tabsRef.setSampleList(val, this.form.total);
|
|
|
|
|
+ },
|
|
|
setInspectionResults(list) {
|
|
setInspectionResults(list) {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
let qualityResults = this.form.qualityResults;
|
|
let qualityResults = this.form.qualityResults;
|
|
@@ -1254,8 +1260,12 @@
|
|
|
this.schemeList.toolList
|
|
this.schemeList.toolList
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
|
|
+ sampleListChange(sampleList) {
|
|
|
|
|
+ this.sampleList = sampleList;
|
|
|
|
|
+ },
|
|
|
inputWeight(row, index) {
|
|
inputWeight(row, index) {
|
|
|
// 计算所有样本的总重量
|
|
// 计算所有样本的总重量
|
|
|
|
|
+ console.log(this.sampleList);
|
|
|
const pNum = this.sampleList.reduce((sum, item) => {
|
|
const pNum = this.sampleList.reduce((sum, item) => {
|
|
|
return sum + Number(item.weight || 0);
|
|
return sum + Number(item.weight || 0);
|
|
|
}, 0);
|
|
}, 0);
|
|
@@ -1417,6 +1427,12 @@
|
|
|
});
|
|
});
|
|
|
if (index != null) {
|
|
if (index != null) {
|
|
|
this.$set(this.sampleList, index, list[0]);
|
|
this.$set(this.sampleList, index, list[0]);
|
|
|
|
|
+ // this.$set(this.sampleList, index, list[0]);
|
|
|
|
|
+ if (this.form.qualityMode == 1 && this.form.isUnpack == 2) {
|
|
|
|
|
+ this.activeName = '2';
|
|
|
|
|
+ this.countQualityResults();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
// this.$set(this.sampleList, null, list);
|
|
// this.$set(this.sampleList, null, list);
|
|
|
this.sampleList = list;
|
|
this.sampleList = list;
|
|
@@ -1425,8 +1441,8 @@
|
|
|
this.activeName = '2';
|
|
this.activeName = '2';
|
|
|
// *** 选完批量质检调用
|
|
// *** 选完批量质检调用
|
|
|
// this.countQualityResults();
|
|
// this.countQualityResults();
|
|
|
- console.log('质检没有 2');
|
|
|
|
|
this.$refs.baseInfoRefs.quantityCalculation('noQualifiedNumber');
|
|
this.$refs.baseInfoRefs.quantityCalculation('noQualifiedNumber');
|
|
|
|
|
+ console.log('质检没有 2');
|
|
|
},
|
|
},
|
|
|
// 批量质检
|
|
// 批量质检
|
|
|
batchQuality(index, row, type) {
|
|
batchQuality(index, row, type) {
|