fix:交接记录人员

This commit is contained in:
shijing 2024-08-14 10:29:15 +08:00
parent 6f0c9b57bd
commit c7bd84f8ab
2 changed files with 52 additions and 27 deletions

View File

@ -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;

View File

@ -75,6 +75,7 @@
v-model="form.send_user"
placeholder="交送人"
clearable
filterable
style="width: 100%"
>
<el-option
@ -128,6 +129,7 @@
v-model="form.recive_user"
placeholder="接收人"
clearable
filterable
style="width: 100%"
>
<el-option
@ -236,6 +238,7 @@ export default {
},
],
},
deptID:'',
userList: [],
userList2: [],
deptOptions:[],
@ -247,19 +250,30 @@ export default {
};
},
mounted() {
this.form.type = this.type;
let materialObj = this.$TOOL.data.get("MATERIAL_OBJECT");
this.materialObj = materialObj;
let that = this;
that.form.type = that.type;
let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
that.materialObj = materialObj;
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
this.form.handle_date = year + "-" + month + "-" + day;
this.form.send_mgroup = this.mgroupId;
this.getMaterial();
this.getUserList();
this.getDeptOptions();
this.getMgroupOptions();
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" })
.then((res) => {
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) {