From 8c071dafbc0bbb3322332e8ad4b545b33dc617da Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 30 Jul 2025 15:55:33 +0800 Subject: [PATCH] FIX --- src/views/wpm_gx/check_form.vue | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) 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() {