diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue
index 0ed3beaf..34a19998 100644
--- a/src/views/wpm_bx/handover_form.vue
+++ b/src/views/wpm_bx/handover_form.vue
@@ -26,20 +26,6 @@
/>
-
-
@@ -484,8 +415,6 @@ export default {
that.getCkUserList();//废品库接收人
}else if(that.type==30){
this.getUserList3();
- }else{
- this.getUserList2();
}
});
},
@@ -555,14 +484,21 @@ export default {
//获取接收工段人员
getUserList2() {
let that = this;
- this.mgroupOptions.forEach(item => {
- if(item.id==that.form.recive_mgroup){
- let deptID = item.belong_dept;
- this.$API.system.user.list.req({ belong_dept: deptID, page: 0 }).then((res) => {
+ if(that.mode=="add"){
+ that.$API.mtm.mgroup.item.req(that.form.recive_mgroup).then((res) => {
+ this.$API.system.user.list.req({ belong_dept: res.belong_dept, page: 0 }).then((res) => {
that.userList2 = res;
});
- }
- });
+ })
+ }else{
+ this.mgroupOptions.forEach(item => {
+ if(item.id==that.form.recive_mgroup){
+ this.$API.system.user.list.req({ belong_dept: item.belong_dept, page: 0 }).then((res) => {
+ that.userList2 = res;
+ });
+ }
+ });
+ }
},
//获取接收部门人员
getUserList3() {
@@ -679,12 +615,27 @@ export default {
},
//表单注入数据
setData(data) {
+ let that = this;
this.totalCount = data.count?data.count:data.handoverb.count;
Object.assign(this.form, data);
if(data.type==30){
this.getUserList3();
}else{
- this.getUserList2();
+ this.$API.system.user.list.req({ belong_dept: data.recive_dept, page: 0 }).then((res) => {
+ that.userList2 = res;
+ });
+ setTimeout(() => {
+ let arr =that.userList2.filter((item) => {
+ return item.id == data.recive_user
+ })
+ if(arr.length>0){}else{
+ let obj = {};
+ obj.id = data.recive_user;
+ obj.name = data.recive_user_name;
+ that.userList2.push(obj);
+ }
+ },500)
+
}
if(data.new_batch!==''&&data.new_batch!==undefined&&data.new_batch!==null){
this.change_batch = true;