diff --git a/src/views/wpm_gx/check_form.vue b/src/views/wpm_gx/check_form.vue index 2c2117c1..c652a521 100644 --- a/src/views/wpm_gx/check_form.vue +++ b/src/views/wpm_gx/check_form.vue @@ -269,17 +269,24 @@ export default { }, getdefects(){ let that = this; - that.$API.qm.qct.list.req({page: 0, qctmat__material: that.itemObj.material,tags:'inm'}).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.form[item.defect_name] = 0; - }) - that.qct_defects=res.qct_defects; - }) - } + that.$API.qm.qct.getQct.req({ material: that.itemObj.material,type:'out',tag:'process' }).then((res) => { + console.log(res) + res.qct_defects.forEach((item) => { + that.form[item.defect_name] = 0; + }) + that.qct_defects=res.qct_defects; }) + // that.$API.qm.qct.get.req({page: 0, qctmat__material: that.itemObj.material,tags:'inm'}).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.form[item.defect_name] = 0; + // }) + // that.qct_defects=res.qct_defects; + // }) + // } + // }) }, //渲染工单提交按钮 getInit() {