From c7bd84f8ab93967ce42c27251438584ac86623b5 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 14 Aug 2024 10:29:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BA=A4=E6=8E=A5=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/handover.vue | 9 ++-- src/views/wpm_gx/handover_form.vue | 70 ++++++++++++++++++++---------- 2 files changed, 52 insertions(+), 27 deletions(-) diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue index 16cf8479..da7f6493 100644 --- a/src/views/wpm_gx/handover.vue +++ b/src/views/wpm_gx/handover.vue @@ -248,15 +248,13 @@ export default { }, mounted() { let that = this; - if(that.mgroupName=="size"){ - // that.params.type=30; + if(that.mgroupName=="size"){//尺寸检验 that.params.material__process__name="一次超洗"; that.apiObj = that.$API.wpm.handover.list; - }else if(that.mgroupName=="facade"){ - // that.params.type=30; + }else if(that.mgroupName=="facade"){//外观检验 that.params.material__process__name="二次超洗"; that.apiObj = that.$API.wpm.handover.list; - }else{ + }else{//工段交接 that.printer_name = localStorage.getItem("printer_name"); that.$API.mtm.mgroup.list .req({ page: 0, search: that.mgroupName }) @@ -265,6 +263,7 @@ export default { that.$message.error("获取工段错误"); return; } + that.$TOOL.data.set('gx_deptID',res[0].belong_dept) that.mgroupId = res[0].id; that.processId = res[0].process; that.processCate = res[0].process_cate; diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue index e438445e..e191fbc8 100644 --- a/src/views/wpm_gx/handover_form.vue +++ b/src/views/wpm_gx/handover_form.vue @@ -75,6 +75,7 @@ v-model="form.send_user" placeholder="交送人" clearable + filterable style="width: 100%" > { + that.userList = res; + }); + }else{ + that.deptID = that.$TOOL.data.get('gx_deptID'); + that.getUserList(); + } + that.getMaterial(); + that.getDeptOptions(); + that.getMgroupOptions(); }, methods: { //获取部门列表 @@ -284,20 +298,23 @@ export default { 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="二次超洗"; - }else{ - if (this.type == 10) { - req.notok_sign__isnull = 1; - } else if (this.type == 20) { - req.notok_sign__isnull = 0;} - else if (this.type == 30) { - req.notok_sign__isnull = 1; - } } + // else{ + // if (this.type == 10) { + // req.notok_sign__isnull = 1; + // } else if (this.type == 20) { + // req.notok_sign__isnull = 0; + // }else if (this.type == 30) { + // req.notok_sign__isnull = 1; + // } + // } this.$API.wpm.wmaterial.list .req(req) @@ -309,7 +326,7 @@ export default { getUserList() { let that = this; this.$API.system.user.list - .req({ mgroup: that.mgroupId, page: 0 }) + .req({ depts: that.deptID, page: 0 }) .then((res) => { that.userList = res; }); @@ -317,11 +334,17 @@ export default { //获取接收工段人员 getUserList2() { let that = this; - this.$API.system.user.list - .req({ mgroup: that.form.recive_mgroup, page: 0 }) + let deptID = ''; + this.mgroupOptions.forEach(item => { + if(item.id==that.form.recive_mgroup){ + deptID = item.belong_dept; + } + this.$API.system.user.list + .req({ depts: deptID, page: 0 }) .then((res) => { that.userList2 = res; }); + }); }, //获取接收部门人员 getUserList3() { @@ -383,8 +406,11 @@ export default { //表单注入数据 setData(data) { Object.assign(this.form, data); - this.getUserList2(); - that.form.recive_dept(); + if(data.type==30){ + this.getUserList3(); + }else{ + this.getUserList2(); + } }, //设置过滤项 setFilters(filters) {