From 2503653d288829ec9ff59581318883298669e13e Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 6 Aug 2025 16:50:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=8E=BB=E7=BA=A4=E4=BA=A4=E6=8E=A5?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/handover_form.vue | 64 +++++++++++++++--------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index 34cccef7..7beb48b5 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -358,8 +358,8 @@ export default { if(that.type==20||that.type==50){ that.form.recive_mgroup = that.mgroupId; } - // type=10 物料交接 物料都可交接,接收工段有限制 - // type=20 物料返工 不合格品交接,接收工段为该工艺流程中的工段 + // type=10 正常交接 物料都可交接,接收工段有限制 + // type=20 返工交接 不合格品交接,接收工段为该工艺流程中的工段 // type=30 物料检验 合格品交接,检验部接收 // type=40 废品入库 不合格品交接,接收工段固定为废品库 // type=50 改版 灵活无限制 @@ -371,23 +371,19 @@ export default { that.getUserList(); } //获取交送物料 - if((that.type==20&&that.mgroupName!=='废品库')||that.type==40){ - console.log('that.mgroupName',that.mgroupName); - if(that.mgroupName=='成品内外初检'||that.mgroupName=='成品内质复检'||that.mgroupName=='成品性能检测'||that.mgroupName=='成品尺寸检测'||that.mgroupName=='成品外观复检一'||that.mgroupName=='成品外观复检二'){ - that.getMaterialOkFangong(); - }else{ - that.getMaterialNotok(); - } - - }else if(that.type==20&&that.mgroupName=='废品库'){ - that.getMaterialFP(); - }else{ + if(that.type==10||that.type==50){//正常交接 that.getMaterial(); + }else if(that.type==20){//返工交接 + if(that.mgroupName=='废品库'){ + that.getMaterialFP(); + }else{ + that.getMaterialOkFangong(); + } + }else if(that.type==40){//废品入库 + that.getMaterialNotok(); + }else if(that.type==60){ + } - if(that.type==30){ - that.getDeptOptions(); - } - that.getMgroupOptions(); }, methods: { @@ -436,8 +432,8 @@ export default { let that = this; var req = { page: 0, - // state:10, - mgroupx:that.mgroupId + tag:'done', + mgroup:that.mgroupId }; if(that.type!==50){ req.state = 10; @@ -454,9 +450,9 @@ export default { let that = this; that.materialOptions = []; var req = { - mgroupx: that.mgroupId, + mgroup: that.mgroupId, page: 0, - state__in:'20,34' + state:20 }; this.$API.wpm.wmaterial.list.req(req).then((res) => { that.materialOptions = res.filter(item=>{ @@ -479,12 +475,14 @@ export default { }) }); }, + //获取该工段的可返工物料 getMaterialOkFangong(){ let that = this; that.materialOptions = []; var obj = { page: 0, tag:'done', + state__in:'20,34', mgroup: that.mgroupId, }; that.$API.wpm.wmaterial.list.req(obj).then((res) => { @@ -589,17 +587,19 @@ export default { return that.selectItems.indexOf(item.id)>-1; }); let materialId = data[0].material; - let params = { - material: materialId, - type: that.type, - }; - that.$API.wpm.handover.mgroups.req(params).then((res) => { - that.mgroupOptions = res; - if(res.length==1){ - that.form.recive_mgroup = res[0].id; - that.getUserList2(); - } - }) + if(that.type==50){}else{ + let params = { + material: materialId, + type: that.type, + }; + that.$API.wpm.handover.mgroups.req(params).then((res) => { + that.mgroupOptions = res; + if(res.length==1){ + that.form.recive_mgroup = res[0].id; + that.getUserList2(); + } + }) + } data.forEach((item,index)=>{ item.wm = item.id; item.count = item.count_canhandover;