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() { mounted() {
let that = this; let that = this;
if(that.mgroupName=="size"){ if(that.mgroupName=="size"){//
// that.params.type=30;
that.params.material__process__name="一次超洗"; that.params.material__process__name="一次超洗";
that.apiObj = that.$API.wpm.handover.list; that.apiObj = that.$API.wpm.handover.list;
}else if(that.mgroupName=="facade"){ }else if(that.mgroupName=="facade"){//
// that.params.type=30;
that.params.material__process__name="二次超洗"; that.params.material__process__name="二次超洗";
that.apiObj = that.$API.wpm.handover.list; that.apiObj = that.$API.wpm.handover.list;
}else{ }else{//
that.printer_name = localStorage.getItem("printer_name"); that.printer_name = localStorage.getItem("printer_name");
that.$API.mtm.mgroup.list that.$API.mtm.mgroup.list
.req({ page: 0, search: that.mgroupName }) .req({ page: 0, search: that.mgroupName })
@ -265,6 +263,7 @@ export default {
that.$message.error("获取工段错误"); that.$message.error("获取工段错误");
return; return;
} }
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
that.mgroupId = res[0].id; that.mgroupId = res[0].id;
that.processId = res[0].process; that.processId = res[0].process;
that.processCate = res[0].process_cate; that.processCate = res[0].process_cate;

View File

@ -75,6 +75,7 @@
v-model="form.send_user" v-model="form.send_user"
placeholder="交送人" placeholder="交送人"
clearable clearable
filterable
style="width: 100%" style="width: 100%"
> >
<el-option <el-option
@ -128,6 +129,7 @@
v-model="form.recive_user" v-model="form.recive_user"
placeholder="接收人" placeholder="接收人"
clearable clearable
filterable
style="width: 100%" style="width: 100%"
> >
<el-option <el-option
@ -236,6 +238,7 @@ export default {
}, },
], ],
}, },
deptID:'',
userList: [], userList: [],
userList2: [], userList2: [],
deptOptions:[], deptOptions:[],
@ -247,19 +250,30 @@ export default {
}; };
}, },
mounted() { mounted() {
this.form.type = this.type; let that = this;
let materialObj = this.$TOOL.data.get("MATERIAL_OBJECT"); that.form.type = that.type;
this.materialObj = materialObj; let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
that.materialObj = materialObj;
let date = new Date(); let date = new Date();
let year = date.getFullYear(); let year = date.getFullYear();
let month = date.getMonth() + 1; let month = date.getMonth() + 1;
let day = date.getDate(); let day = date.getDate();
this.form.handle_date = year + "-" + month + "-" + day; that.form.handle_date = year + "-" + month + "-" + day;
this.form.send_mgroup = this.mgroupId; that.form.send_mgroup = that.mgroupId;
this.getMaterial(); console.log('mgroupName',that.mgroupName)
this.getUserList(); if(that.mgroupName=="size"||that.mgroupName=="facade"){//
this.getDeptOptions(); that.$API.system.user.list
this.getMgroupOptions(); .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: { methods: {
// //
@ -284,20 +298,23 @@ export default {
var req = { var req = {
mgroupx: that.mgroupId, mgroupx: that.mgroupId,
page: 0, page: 0,
notok_sign__isnull : 1,
count_xtest__isnull:1
}; };
if(that.mgroupName=="size"){ if(that.mgroupName=="size"){
req.material__process__name="一次超洗"; req.material__process__name="一次超洗";
}else if(that.mgroupName=="facade"){ }else if(that.mgroupName=="facade"){
req.material__process__name="二次超洗"; 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 this.$API.wpm.wmaterial.list
.req(req) .req(req)
@ -309,7 +326,7 @@ export default {
getUserList() { getUserList() {
let that = this; let that = this;
this.$API.system.user.list this.$API.system.user.list
.req({ mgroup: that.mgroupId, page: 0 }) .req({ depts: that.deptID, page: 0 })
.then((res) => { .then((res) => {
that.userList = res; that.userList = res;
}); });
@ -317,11 +334,17 @@ export default {
// //
getUserList2() { getUserList2() {
let that = this; let that = this;
this.$API.system.user.list let deptID = '';
.req({ mgroup: that.form.recive_mgroup, page: 0 }) 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) => { .then((res) => {
that.userList2 = res; that.userList2 = res;
}); });
});
}, },
// //
getUserList3() { getUserList3() {
@ -383,8 +406,11 @@ export default {
// //
setData(data) { setData(data) {
Object.assign(this.form, data); Object.assign(this.form, data);
this.getUserList2(); if(data.type==30){
that.form.recive_dept(); this.getUserList3();
}else{
this.getUserList2();
}
}, },
// //
setFilters(filters) { setFilters(filters) {