fix:检验部交接物料查询

This commit is contained in:
shijing 2024-09-12 10:43:46 +08:00
parent 4382057684
commit 714e18e168
1 changed files with 35 additions and 7 deletions

View File

@ -281,7 +281,6 @@ export default {
let day = date.getDate();
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" })
@ -321,18 +320,45 @@ export default {
getMaterial() {
let that = this;
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="二次超洗";
}
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
if(res.length>0){
req.belong_dept=res[0].id;
this.$API.wpm.wmaterial.list.req(req).then((res) => {
let arr = [];
res.forEach(item=>{
let obj = {};
Object.assign(obj,item);
obj.label = item.batch;
arr.push(obj);
})
that.materialOptions = arr;
});
}
})
}else if(that.mgroupName=="facade"){
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
if(res.length>0){
req.belong_dept=res[0].id;
this.$API.wpm.wmaterial.list.req(req).then((res) => {
let arr = [];
res.forEach(item=>{
let obj = {};
Object.assign(obj,item);
obj.label = item.batch;
arr.push(obj);
})
that.materialOptions = arr;
});
}
})
}else{
req.mgroupx = that.mgroupId;
this.$API.wpm.wmaterial.list.req(req).then((res) => {
// that.materialOptions = res;
let arr = [];
res.forEach(item=>{
let obj = {};
@ -342,6 +368,8 @@ export default {
})
that.materialOptions = arr;
});
}
},
//
getMaterialNotok() {