fix:光芯玻纤检验时合格B类单拎出来

This commit is contained in:
shijing 2025-04-25 11:32:17 +08:00
parent a9f1159003
commit 6d23a57746
1 changed files with 20 additions and 2 deletions

View File

@ -142,7 +142,7 @@
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item :label="mgroupMtype==10?'合格数':'入库数'"> <el-form-item :label="mgroupMtype==10?'合格数':'入库数'">
<el-input-number <el-input-number
v-model="form.count_ok" v-model="form.count_ok_full"
:min="0" :min="0"
:disabled="true" :disabled="true"
class="width-100" class="width-100"
@ -150,6 +150,17 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="合格B类数量">
<el-input-number
v-model="count_ok_b"
:min="0"
class="width-100"
:disabled="true"
controls-position="right"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="不合格数量"> <el-form-item label="不合格数量">
<el-input-number <el-input-number
@ -164,7 +175,7 @@
</el-row> </el-row>
<!-- 不合格项不良项统计 --> <!-- 不合格项不良项统计 -->
<el-row v-if="qct_defects.length>0&&mgroupMtype==10"> <el-row v-if="qct_defects.length>0&&mgroupMtype==10">
<el-col>不良统计最大不合格数<span style="color:red">{{max_defect_rate}}</span>,超过0.5则整层不合格</el-col> <el-col v-if="mgroupName=='黑化'||mgroupName=='退火'">不良统计最大不合格数<span style="color:red">{{max_defect_rate}}</span>,超过0.5则整层不合格</el-col>
<el-col :md="12" :sm="24" v-for="item in qct_defects" :key="item.id"> <el-col :md="12" :sm="24" v-for="item in qct_defects" :key="item.id">
<el-form-item :label="item.defect_name"> <el-form-item :label="item.defect_name">
<el-input-number <el-input-number
@ -292,11 +303,13 @@ export default {
batch: null, batch: null,
count_real: 0, count_real: 0,
count_ok: 0, count_ok: 0,
count_ok_full:0,
count_notok: 0, count_notok: 0,
mlogbdefect:[], mlogbdefect:[],
mlogbindefect:[], mlogbindefect:[],
test_user_name:"" test_user_name:""
}, },
count_ok_b:0,
// //
rules: { rules: {
batch: [ batch: [
@ -399,6 +412,7 @@ export default {
that.form.count_real =Number(data.count_real); that.form.count_real =Number(data.count_real);
that.form.count_ok= Number(data.count_ok); that.form.count_ok= Number(data.count_ok);
that.form.count_notok= Number(data.count_notok); that.form.count_notok= Number(data.count_notok);
that.count_ok_b = that.form.count_ok- Number(data.count_ok_full);
// //
if(that.mgroupMtype==20){ if(that.mgroupMtype==20){
if(data.count_json_wx.ok_num&&data.count_json_wx.ok_num!==null){ if(data.count_json_wx.ok_num&&data.count_json_wx.ok_num!==null){
@ -433,12 +447,16 @@ export default {
countChange() { countChange() {
let that = this; let that = this;
that.form.count_notok = 0; that.form.count_notok = 0;
that.count_ok_b = 0;
that.qct_defects.forEach(item => { that.qct_defects.forEach(item => {
if(item.defect_okcate==30){ if(item.defect_okcate==30){
that.form.count_notok += that.defectform[item.defect_name]; that.form.count_notok += that.defectform[item.defect_name];
}else if(item.defect_okcate==20){
that.count_ok_b += that.defectform[item.defect_name];
} }
}) })
that.form.count_ok = that.form.count_real - that.form.count_notok; that.form.count_ok = that.form.count_real - that.form.count_notok;
that.form.count_ok_full = that.form.count_real - that.form.count_notok-that.count_ok_b;
}, },
notokChanges(){ notokChanges(){
let that = this; let that = this;