fix:光芯fmlog层日志缺陷项完善
This commit is contained in:
parent
136e7dc763
commit
e30f3645f8
|
@ -147,6 +147,12 @@ export default {
|
|||
return await http.delete(`${config.API_URL}/qm/qct/${id}/`);
|
||||
},
|
||||
},
|
||||
getQct: {
|
||||
name: "获取检验模板",
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/qm/qct/get_qct/`, data);
|
||||
},
|
||||
},
|
||||
},
|
||||
//检验表检测缺陷项
|
||||
qctdefect:{
|
||||
|
|
|
@ -262,7 +262,7 @@
|
|||
<el-col :span=12>
|
||||
<el-col>加工前不良</el-col>
|
||||
<el-row style="width: 98%;">
|
||||
<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_indefects" :key="item.id">
|
||||
<el-form-item :label="item.defect_name">
|
||||
<el-input-number
|
||||
v-model="defectinform[item.defect_name]"
|
||||
|
@ -388,6 +388,7 @@ export default {
|
|||
options: [],
|
||||
testitems:[],
|
||||
qct_defects:[],
|
||||
qct_indefects:[],
|
||||
teamOptions:[],
|
||||
routeOptions: [],
|
||||
supplierOptions: [],
|
||||
|
@ -452,18 +453,29 @@ export default {
|
|||
},
|
||||
getdefects(){
|
||||
let that = this;
|
||||
that.$API.qm.qct.list.req({qctmat__material: that.material_out,page: 0,tags:'process'}).then((res) => {
|
||||
if(res.length>0){
|
||||
that.qct = res[0].id;
|
||||
that.$API.qm.qct.item.req(res[0].id).then((res) => {
|
||||
res.qct_defects.forEach((item) => {
|
||||
that.defectform[item.defect_name] = 0;
|
||||
that.defectinform[item.defect_name] = 0;
|
||||
})
|
||||
that.qct_defects=res.qct_defects;
|
||||
})
|
||||
}
|
||||
// material_in
|
||||
that.$API.qm.qct.getQct.req({material: that.material_in,tag:'process'}).then((res) => {
|
||||
res.qct_defects.forEach((item) => {
|
||||
that.defectinform[item.defect_name] = 0;
|
||||
})
|
||||
that.qct_indefects=res.qct_defects;
|
||||
})
|
||||
//material_out
|
||||
that.$API.qm.qct.getQct.req({material: that.material_out,tag:'process'}).then((res) => {
|
||||
res.qct_defects.forEach((item) => {
|
||||
that.defectform[item.defect_name] = 0;
|
||||
})
|
||||
that.qct_defects=res.qct_defects;
|
||||
})
|
||||
// if(that.mlogbItem.qct!==null){
|
||||
// that.$API.qm.qct.item.req(that.mlogbItem.qct).then((res) => {
|
||||
// res.qct_defects.forEach((item) => {
|
||||
// that.defectform[item.defect_name] = that.defectform[item.defect_name]?that.defectform[item.defect_name]:0;
|
||||
// })
|
||||
// that.max_defect_rate =Number(res.max_defect_rate);
|
||||
// that.qct_defects=res.qct_defects;
|
||||
// })
|
||||
// }
|
||||
},
|
||||
getEquipment() {
|
||||
let that = this;
|
||||
|
@ -588,7 +600,7 @@ export default {
|
|||
countinChange(){
|
||||
let that = this;
|
||||
that.form.count_pn_jgqbl = 0;
|
||||
that.qct_defects.forEach(item => {
|
||||
that.qct_indefects.forEach(item => {
|
||||
that.form.count_pn_jgqbl += that.defectinform[item.defect_name];
|
||||
})
|
||||
that.form.count_real = that.form.count_use - that.form.count_pn_jgqbl;
|
||||
|
|
Loading…
Reference in New Issue