|
@@ -13,7 +13,8 @@
|
|
|
:scheme-list="schemeList" :loading="loading" :form="form" @handleSelectionChange="handleSelectionChange1"
|
|
:scheme-list="schemeList" :loading="loading" :form="form" @handleSelectionChange="handleSelectionChange1"
|
|
|
@batch-quality="batchQuality" @batch-dispose="batchDispose" @handleDetail="handleDetail"
|
|
@batch-quality="batchQuality" @batch-dispose="batchDispose" @handleDetail="handleDetail"
|
|
|
@inputWeight="inputWeight" @handleDispose="handleDispose" @changeSamUnit="changeSamUnit"
|
|
@inputWeight="inputWeight" @handleDispose="handleDispose" @changeSamUnit="changeSamUnit"
|
|
|
- @handleSample1="handleSample1" @handleSampleSubmit="handleSampleSubmit" @getConditionType="getConditionType"/>
|
|
|
|
|
|
|
+ @handleSample1="handleSample1" @handleSampleSubmit="handleSampleSubmit" @getConditionType="getConditionType"
|
|
|
|
|
+ @countQualityResults="countQualityResults"/>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
|
|
<sampleListDialog ref="detailRef" @handleConfirm="handleConfirm" @handleDispose="handleDispose"></sampleListDialog>
|
|
<sampleListDialog ref="detailRef" @handleConfirm="handleConfirm" @handleDispose="handleDispose"></sampleListDialog>
|
|
@@ -106,7 +107,7 @@ export default {
|
|
|
SampleListbyReportList: [],
|
|
SampleListbyReportList: [],
|
|
|
qualityTimeStart: '',
|
|
qualityTimeStart: '',
|
|
|
isReportProcessProduce: false,
|
|
isReportProcessProduce: false,
|
|
|
-
|
|
|
|
|
|
|
+ addStatus: [],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -136,11 +137,11 @@ export default {
|
|
|
this.$refs.tabsRef.tabsConditionType(null)
|
|
this.$refs.tabsRef.tabsConditionType(null)
|
|
|
|
|
|
|
|
this.form.qualityMode = val;
|
|
this.form.qualityMode = val;
|
|
|
- const sData = this.$refs.tabsRef.$refs.sourceTable.getData()
|
|
|
|
|
//检验方式 全检
|
|
//检验方式 全检
|
|
|
if (this.form.qualityMode == 1) {
|
|
if (this.form.qualityMode == 1) {
|
|
|
this.activeName = '2';
|
|
this.activeName = '2';
|
|
|
this.form.sampleNumber = ''
|
|
this.form.sampleNumber = ''
|
|
|
|
|
+ const sData = this.$refs.tabsRef.$refs.sourceTable.getData()
|
|
|
if (sData.length == 0) {
|
|
if (sData.length == 0) {
|
|
|
for (let i = 0; i < sData.length; i++) {
|
|
for (let i = 0; i < sData.length; i++) {
|
|
|
this.$set(sData[i], 'qualityStatus', 2)
|
|
this.$set(sData[i], 'qualityStatus', 2)
|
|
@@ -148,7 +149,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
console.log(this.$refs.tabsRef.$refs.sourceTable.getData(), 'packingList')
|
|
console.log(this.$refs.tabsRef.$refs.sourceTable.getData(), 'packingList')
|
|
|
this.getProSamList(sData)
|
|
this.getProSamList(sData)
|
|
|
-
|
|
|
|
|
} else {
|
|
} else {
|
|
|
this.activeName = '1';
|
|
this.activeName = '1';
|
|
|
if (!flag) {
|
|
if (!flag) {
|
|
@@ -219,7 +219,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- this.sampleList = list;
|
|
|
|
|
|
|
+ // this.sampleList = list;
|
|
|
|
|
+ this.sampleList = this.addStatus
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
//输入取样数量
|
|
//输入取样数量
|
|
@@ -576,9 +577,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
console.log(addStatus, '样品清单12123123')
|
|
console.log(addStatus, '样品清单12123123')
|
|
|
-
|
|
|
|
|
if (addStatus.length > 0) {
|
|
if (addStatus.length > 0) {
|
|
|
this.sampleList = addStatus;
|
|
this.sampleList = addStatus;
|
|
|
|
|
+ this.addStatus = addStatus;
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
this.getProSamList(this.packingList)
|
|
this.getProSamList(this.packingList)
|
|
|
}
|
|
}
|
|
@@ -905,7 +907,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
this.sampleList = result;
|
|
this.sampleList = result;
|
|
|
- this.sampleNumber = this.sampleList.length;
|
|
|
|
|
|
|
+ this.form.sampleNumber = this.sampleList.length;
|
|
|
},
|
|
},
|
|
|
validateWeight(measureQ, sampleCount) {
|
|
validateWeight(measureQ, sampleCount) {
|
|
|
let totalMaxPossible = 0;
|
|
let totalMaxPossible = 0;
|
|
@@ -993,6 +995,17 @@ export default {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
this.sampleNumber = this.sampleList.length;
|
|
this.sampleNumber = this.sampleList.length;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ //计算合格率
|
|
|
|
|
+ countQualityResults() {
|
|
|
|
|
+ let sampleList = this.sampleList; //样品清单
|
|
|
|
|
+ let sampleNumber = this.form.total; //样品总数
|
|
|
|
|
+ let qualifiedNumber = sampleList.filter(item => item.qualityResults == 1 || item.qualityResults == 3).length;
|
|
|
|
|
+ let noQualifiedNumber = sampleList.filter(item => item.qualityResults == 2 ).length;
|
|
|
|
|
+ let qualificationRate = ( qualifiedNumber / sampleNumber).toFixed(4) * 100; //合格率
|
|
|
|
|
+ let noQualificationRate = (noQualifiedNumber / sampleNumber).toFixed(4) * 100; //不合格率
|
|
|
|
|
+ this.$refs.baseInfoRefs.updateQualificationRate(qualifiedNumber,noQualifiedNumber,qualificationRate, noQualificationRate);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|