@@ -209,7 +220,12 @@
-
+
+
+ {{item.count}}
+
+
+
{{
props.row.count_n_hs
}}
@@ -494,7 +510,9 @@ export default {
4: "已完成",
5: "已关闭",
},
+ defectform:{},
fileList:[],
+ qct_defects:[],
tableDataWm:[],
test_file:'',
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) {
Object.assign(this.form, data);
@@ -588,6 +629,7 @@ export default {
//自检
table_in_edit(row) {
this.saveInForm = row;
+ this.getdefects();
this.saveInDialog = true;
},
//提交自检
@@ -597,8 +639,18 @@ export default {
if (valid) {
that.isSaveing = true;
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_pn_jgqbl = that.saveInForm.count_pn_jgqbl;
+ obj.mlogbdefect = mlogbdefect;
+ obj.count_pn_jgqbl = count_pn_jgqbl;
that.$API.wpm.mlogb.updateIn
.req(that.saveInForm.id, obj)
.then((res) => {