fix:加工前不良关联检验表
This commit is contained in:
parent
9b6e9cc438
commit
f890ca086d
|
|
@ -171,6 +171,17 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-for="item in qct_defects" :key="item.id">
|
||||||
|
<el-form-item :label="item.defect_name">
|
||||||
|
<el-input-number
|
||||||
|
v-model="defectform[item.defect_name]"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
|
@ -209,7 +220,12 @@
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 50px" v-else>
|
<div style="padding-left: 50px" v-else>
|
||||||
<el-descriptions :column="4">
|
<el-descriptions :column="4" v-if="props.row.mlogbdefect.length>0">
|
||||||
|
<el-descriptions-item v-for="item in props.row.mlogbdefect" :label="item.defect_name" :key="item.id">
|
||||||
|
{{item.count}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions :column="4" v-else>
|
||||||
<el-descriptions-item label="划伤">{{
|
<el-descriptions-item label="划伤">{{
|
||||||
props.row.count_n_hs
|
props.row.count_n_hs
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
|
@ -494,7 +510,9 @@ export default {
|
||||||
4: "已完成",
|
4: "已完成",
|
||||||
5: "已关闭",
|
5: "已关闭",
|
||||||
},
|
},
|
||||||
|
defectform:{},
|
||||||
fileList:[],
|
fileList:[],
|
||||||
|
qct_defects:[],
|
||||||
tableDataWm:[],
|
tableDataWm:[],
|
||||||
test_file:'',
|
test_file:'',
|
||||||
deptId: "",
|
deptId: "",
|
||||||
|
|
@ -563,7 +581,30 @@ export default {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getdefects(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.qm.qct.list.req({qctmat__material:that.mlogItem.material_in,page:0,tags:'process'}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.$API.qm.qct.item.req(res[0].id).then((res) => {
|
||||||
|
res.qct_defects.forEach((item) => {
|
||||||
|
that.defectform[item.defect_name] = 0;
|
||||||
|
})
|
||||||
|
that.qct_defects=res.qct_defects;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
countChange() {
|
||||||
|
let that = this;
|
||||||
|
that.saveInForm.count_pn_jgqbl = 0;
|
||||||
|
that.qct_defects.forEach(item => {
|
||||||
|
if(item.defect_okcate==30){
|
||||||
|
that.saveInForm.count_pn_jgqbl += that.defectform[item.defect_name];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
setData(data) {
|
setData(data) {
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
|
|
@ -588,6 +629,7 @@ export default {
|
||||||
//自检
|
//自检
|
||||||
table_in_edit(row) {
|
table_in_edit(row) {
|
||||||
this.saveInForm = row;
|
this.saveInForm = row;
|
||||||
|
this.getdefects();
|
||||||
this.saveInDialog = true;
|
this.saveInDialog = true;
|
||||||
},
|
},
|
||||||
//提交自检
|
//提交自检
|
||||||
|
|
@ -597,8 +639,18 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
let count_pn_jgqbl = 0,mlogbdefect=[];
|
||||||
|
that.qct_defects.forEach(item => {
|
||||||
|
count_pn_jgqbl += that.defectform[item.defect_name] ;
|
||||||
|
let obj = {};
|
||||||
|
obj.defect = item.defect;
|
||||||
|
obj.count = that.defectform[item.defect_name];
|
||||||
|
obj.mlogb = that.saveInForm.id;
|
||||||
|
mlogbdefect.push(obj);
|
||||||
|
})
|
||||||
obj.count_use = that.saveInForm.count_use;
|
obj.count_use = that.saveInForm.count_use;
|
||||||
obj.count_pn_jgqbl = that.saveInForm.count_pn_jgqbl;
|
obj.mlogbdefect = mlogbdefect;
|
||||||
|
obj.count_pn_jgqbl = count_pn_jgqbl;
|
||||||
that.$API.wpm.mlogb.updateIn
|
that.$API.wpm.mlogb.updateIn
|
||||||
.req(that.saveInForm.id, obj)
|
.req(that.saveInForm.id, obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue