fix:玻纤交接人员筛选修正
This commit is contained in:
parent
d0509a8a4a
commit
64e6e2edb7
|
@ -359,18 +359,23 @@ export default {
|
|||
let day = date.getDate();
|
||||
that.form.handle_date = year + "-" + month + "-" + day;
|
||||
that.form.send_mgroup = that.mgroupId;
|
||||
// type=10 物料交接 物料都可交接,接收工段有限制
|
||||
// type=20 物料返工 不合格品交接,接收工段为该工艺流程中的工段
|
||||
// type=30 物料检验 合格品交接,检验部接收
|
||||
// type=40 废品入库 不合格品交接,接收工段固定为废品库
|
||||
// type=50 改版 灵活无限制
|
||||
//获取当前工段/部门交送人
|
||||
if(that.mgroupName=="size"||that.mgroupName=="facade"){//检验部交接
|
||||
that.$API.system.user.list
|
||||
.req({ page: 0, posts__code__contains: "check" })
|
||||
.then((res) => {
|
||||
that.userList = res;
|
||||
});
|
||||
that.$API.system.user.list.req({ page: 0, posts__code__contains: "check" }).then((res) => {
|
||||
that.userList = res;
|
||||
});
|
||||
}else if(that.type==20&&that.mgroupName=='废品库'){//废品交接
|
||||
that.getCkUserList();
|
||||
}else{
|
||||
that.deptID = that.$TOOL.data.get('gx_deptID');
|
||||
that.getUserList();
|
||||
}
|
||||
//获取交送物料
|
||||
if((that.type==20&&that.mgroupName!=='废品库')||that.type==40){
|
||||
that.getMaterialNotok();
|
||||
}else if(that.type==20&&that.mgroupName=='废品库'){
|
||||
|
@ -378,7 +383,10 @@ export default {
|
|||
}else{
|
||||
that.getMaterial();
|
||||
}
|
||||
that.getDeptOptions();
|
||||
if(that.type==30){
|
||||
that.getDeptOptions();
|
||||
}
|
||||
|
||||
that.getMgroupOptions();
|
||||
},
|
||||
methods: {
|
||||
|
@ -395,11 +403,9 @@ export default {
|
|||
},
|
||||
//获取部门列表
|
||||
getDeptOptions() {
|
||||
this.$API.system.dept.list
|
||||
.req({ page: 0, type: "dept" })
|
||||
.then((res) => {
|
||||
this.deptOptions = res;
|
||||
});
|
||||
this.$API.system.dept.list.req({ page: 0, type: "dept" }).then((res) => {
|
||||
this.deptOptions = res;
|
||||
});
|
||||
},
|
||||
//获取工段列表
|
||||
getMgroupOptions() {
|
||||
|
@ -486,14 +492,14 @@ export default {
|
|||
let that = this;
|
||||
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) => {
|
||||
this.$API.system.user.list.req({ depts: 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) => {
|
||||
this.$API.system.user.list.req({ depts: item.belong_dept, page: 0 }).then((res) => {
|
||||
that.userList2 = res;
|
||||
});
|
||||
}
|
||||
|
@ -503,11 +509,9 @@ export default {
|
|||
//获取接收部门人员
|
||||
getUserList3() {
|
||||
let that = this;
|
||||
this.$API.system.user.list
|
||||
.req({ depts: that.form.recive_dept, page: 0 })
|
||||
.then((res) => {
|
||||
that.userList2 = res;
|
||||
});
|
||||
this.$API.system.user.list.req({ depts: that.form.recive_dept, page: 0 }).then((res) => {
|
||||
that.userList2 = res;
|
||||
});
|
||||
},
|
||||
addMaterial(){
|
||||
this.addShow = true;
|
||||
|
@ -621,7 +625,7 @@ export default {
|
|||
if(data.type==30){
|
||||
this.getUserList3();
|
||||
}else{
|
||||
this.$API.system.user.list.req({ belong_dept: data.recive_dept, page: 0 }).then((res) => {
|
||||
this.$API.system.user.list.req({ depts: data.recive_dept, page: 0 }).then((res) => {
|
||||
that.userList2 = res;
|
||||
});
|
||||
setTimeout(() => {
|
||||
|
|
Loading…
Reference in New Issue