fix:交接记录人员
This commit is contained in:
parent
6f0c9b57bd
commit
c7bd84f8ab
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
let deptID = '';
|
||||
this.mgroupOptions.forEach(item => {
|
||||
if(item.id==that.form.recive_mgroup){
|
||||
deptID = item.belong_dept;
|
||||
}
|
||||
this.$API.system.user.list
|
||||
.req({ mgroup: that.form.recive_mgroup, page: 0 })
|
||||
.req({ depts: deptID, page: 0 })
|
||||
.then((res) => {
|
||||
that.userList2 = res;
|
||||
});
|
||||
});
|
||||
},
|
||||
//获取接收部门人员
|
||||
getUserList3() {
|
||||
|
@ -383,8 +406,11 @@ export default {
|
|||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form, data);
|
||||
if(data.type==30){
|
||||
this.getUserList3();
|
||||
}else{
|
||||
this.getUserList2();
|
||||
that.form.recive_dept();
|
||||
}
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
|
|
Loading…
Reference in New Issue