fix:玻纤若输出物料检测时没有带的检测表,此时需要根据输出物料查询其绑定的检测表(防止中投产后加入新工序)
This commit is contained in:
parent
35235ba788
commit
acf701bf6a
|
|
@ -580,7 +580,11 @@ export default {
|
||||||
if(that.mode == 'outs'&&qct!==''&&qct!==null){//输出
|
if(that.mode == 'outs'&&qct!==''&&qct!==null){//输出
|
||||||
that.getdefects();
|
that.getdefects();
|
||||||
}else{
|
}else{
|
||||||
that.getList();
|
that.$API.qm.qct.getQct.req({ material: that.material_out,type:'out',tag:'process' }).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
that.testdefectss(res);
|
||||||
|
})
|
||||||
|
// that.getList();
|
||||||
}
|
}
|
||||||
that.visible = true;
|
that.visible = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -677,41 +681,45 @@ export default {
|
||||||
if(that.qct!==''){
|
if(that.qct!==''){
|
||||||
that.$API.qm.qct.item.req(that.qct).then((res) => {
|
that.$API.qm.qct.item.req(that.qct).then((res) => {
|
||||||
that.qct_defects = [];
|
that.qct_defects = [];
|
||||||
res.qct_defects.forEach((item) => {
|
that.testdefectss(res);
|
||||||
that.addTemplate[item.defect_name] = false;
|
|
||||||
let obj = Object.assign({}, item);
|
|
||||||
obj.canEdit = that.processType=='20'?false:true;
|
|
||||||
that.qct_defects.push(obj);
|
|
||||||
})
|
|
||||||
that.qct_defects_origin = that.qct_defects;
|
|
||||||
that.qct_testitems = [];
|
|
||||||
res.qct_testitems.forEach((item2) => {
|
|
||||||
if(item2.testitem_type!=='20'){
|
|
||||||
let obj2 = Object.assign({}, item2);
|
|
||||||
obj2.value = '';
|
|
||||||
obj2.canEdit = that.processType=='20'?false:true;
|
|
||||||
|
|
||||||
obj2.addto_wpr = item2.addto_wpr;
|
|
||||||
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
|
|
||||||
obj2.value = null;
|
|
||||||
that.addTemplate[item2.testitem_name] = null;
|
|
||||||
}
|
|
||||||
if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){
|
|
||||||
let str = obj2.testitem_choices.replace(/'/g, '"');
|
|
||||||
let arr = JSON.parse(str);
|
|
||||||
obj2.testitem_choices = arr;
|
|
||||||
that.addTemplate[item2.testitem_name] = null;
|
|
||||||
}
|
|
||||||
that.qct_testitems.push(obj2);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
that.qct_testitems_origin = that.qct_testitems;
|
|
||||||
that.getList();
|
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
that.getList();
|
that.getList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
testdefectss(res){
|
||||||
|
let that = this;
|
||||||
|
res.qct_defects.forEach((item) => {
|
||||||
|
that.addTemplate[item.defect_name] = false;
|
||||||
|
let obj = Object.assign({}, item);
|
||||||
|
obj.canEdit = that.processType=='20'?false:true;
|
||||||
|
that.qct_defects.push(obj);
|
||||||
|
})
|
||||||
|
that.qct_defects_origin = that.qct_defects;
|
||||||
|
that.qct_testitems = [];
|
||||||
|
res.qct_testitems.forEach((item2) => {
|
||||||
|
if(item2.testitem_type!=='20'){
|
||||||
|
let obj2 = Object.assign({}, item2);
|
||||||
|
obj2.value = '';
|
||||||
|
obj2.canEdit = that.processType=='20'?false:true;
|
||||||
|
|
||||||
|
obj2.addto_wpr = item2.addto_wpr;
|
||||||
|
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
|
||||||
|
obj2.value = null;
|
||||||
|
that.addTemplate[item2.testitem_name] = null;
|
||||||
|
}
|
||||||
|
if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){
|
||||||
|
let str = obj2.testitem_choices.replace(/'/g, '"');
|
||||||
|
let arr = JSON.parse(str);
|
||||||
|
obj2.testitem_choices = arr;
|
||||||
|
that.addTemplate[item2.testitem_name] = null;
|
||||||
|
}
|
||||||
|
that.qct_testitems.push(obj2);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.qct_testitems_origin = that.qct_testitems;
|
||||||
|
that.getList();
|
||||||
|
},
|
||||||
getOptions(){
|
getOptions(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.wpr.list.req({wm:that.wm,page:0,query:"{id,number}"}).then((res) => {
|
that.$API.wpm.wpr.list.req({wm:that.wm,page:0,query:"{id,number}"}).then((res) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue