From 714e18e1685da261b676e69c6a62cb3fb4fdaf24 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 12 Sep 2024 10:43:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=A3=80=E9=AA=8C=E9=83=A8=E4=BA=A4?= =?UTF-8?q?=E6=8E=A5=E7=89=A9=E6=96=99=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/handover_form.vue | 42 +++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue index f90e5f62..46a6e9d8 100644 --- a/src/views/wpm_gx/handover_form.vue +++ b/src/views/wpm_gx/handover_form.vue @@ -281,7 +281,6 @@ export default { let day = date.getDate(); that.form.handle_date = year + "-" + month + "-" + day; that.form.send_mgroup = that.mgroupId; - console.log('mgroupName',that.mgroupName) if(that.mgroupName=="size"||that.mgroupName=="facade"){//检验部交接 that.$API.system.user.list .req({ page: 0, posts__code__contains: "check" }) @@ -321,18 +320,45 @@ export default { getMaterial() { let that = this; var req = { - mgroupx: that.mgroupId, page: 0, notok_sign__isnull : 1, count_xtest__isnull:1 }; if(that.mgroupName=="size"){ - req.material__process__name="一次超洗"; - }else if(that.mgroupName=="facade"){ - req.material__process__name="二次超洗"; - } + that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => { + if(res.length>0){ + req.belong_dept=res[0].id; + this.$API.wpm.wmaterial.list.req(req).then((res) => { + let arr = []; + res.forEach(item=>{ + let obj = {}; + Object.assign(obj,item); + obj.label = item.batch; + arr.push(obj); + }) + that.materialOptions = arr; + }); + } + }) + }else if(that.mgroupName=="facade"){ + that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => { + if(res.length>0){ + req.belong_dept=res[0].id; + this.$API.wpm.wmaterial.list.req(req).then((res) => { + let arr = []; + res.forEach(item=>{ + let obj = {}; + Object.assign(obj,item); + obj.label = item.batch; + arr.push(obj); + }) + that.materialOptions = arr; + }); + } + }) + }else{ + req.mgroupx = that.mgroupId; this.$API.wpm.wmaterial.list.req(req).then((res) => { - // that.materialOptions = res; let arr = []; res.forEach(item=>{ let obj = {}; @@ -342,6 +368,8 @@ export default { }) that.materialOptions = arr; }); + } + }, //获取车间不合格物料 getMaterialNotok() {