From 9a07a158f670586927f77b90cb0bf9d95ca30919 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 10 Apr 2025 17:05:36 +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_gx/handover_form.vue | 37 +++++++++++++++++------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue index aa207c7d..d43e9b1f 100644 --- a/src/views/wpm_gx/handover_form.vue +++ b/src/views/wpm_gx/handover_form.vue @@ -332,7 +332,9 @@ export default { } if(that.type==40||that.type==20){ that.getMgroupOptions(); - }else{} + }else{ + that.getMgroupOptions(); + } }, methods: { //获取工段列表 @@ -456,13 +458,17 @@ export default { getUserList2() { let that = this; 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; - }); - } + if(that.form.recive_dept&&that.form.recive_dept!==''&&that.form.recive_dept!==null){ + deptID = that.form.recive_dept; + }else{ + that.mgroupOptions.forEach(item => { + if(item.id==that.form.recive_mgroup){ + deptID = item.belong_dept; + } + }); + } + that.$API.system.user.list.req({ depts: deptID, page: 0 }).then((res) => { + that.userList2 = res; }); }, //获取接收部门人员 @@ -485,16 +491,16 @@ export default { open(mode = "add",data,mtype) { this.mode = mode; this.mtype = mtype; - if(typeof(data)=='string'){ - if(data!==''){ + if(data!==''&&data!==null&&data!==undefined){ + if(typeof(data)=='string'){ this.codeText = data.replace(" ",""); this.codeTextChange(this.codeText) + }else{ + this.form.handoverb = data; + data.forEach(item=>{ + this.totalCount += item.count_cando; + }) } - }else{ - this.form.handoverb = data; - data.forEach(item=>{ - this.totalCount += item.count_cando; - }) } if(mtype==30){//合批 this.change_batch = true; @@ -571,7 +577,6 @@ export default { //表单注入数据 setData(data) { Object.assign(this.form, data); - console.log('this.form',this.form); if(data.type==30){ this.getUserList3(); }else{