fix:coding#834

This commit is contained in:
shijing 2025-05-22 11:06:17 +08:00
parent d6b15093e5
commit d1c1fe27b3
1 changed files with 20 additions and 23 deletions

View File

@ -361,11 +361,7 @@ export default {
// 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;
});
}else if(that.type==20&&that.mgroupName=='废品库'){//
if(that.type==20&&that.mgroupName=='废品库'){//
that.getCkUserList();
}else{
that.deptID = that.$TOOL.data.get('gx_deptID');
@ -571,6 +567,9 @@ export default {
};
that.$API.wpm.handover.mgroups.req(params).then((res) => {
that.mgroupOptions = res;
if(res.length==1){
that.form.recive_mgroup = res[0].id;
}
})
data.forEach((item,index)=>{
item.wm = item.id;
@ -716,19 +715,26 @@ export default {
this.$API.cm.labelmat.item.req(id).then((res) => {
let arr = [];
if(that.form.handoverb&&that.form.handoverb.length>0){
arr = that.form.handoverb.filter((item) => {
return item.batch == res.batch&&item.state==res.state;
that.form.handoverb.forEach((item) => {
if(item.batch == res.batch&&item.state==res.state){
arr.push(item);
}
})
}
if(arr.length>0){
that.wm_in = "";
that.$message.error("该批次已存在")
}else{
let hasArr = [];
that.materialOptions.forEach((item) => {
if(item.batch == res.batch){
hasArr.push(item);
let params = {material: item.material,type: that.type};
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
that.mgroupOptions = res0;
if(res0.length==1){
that.form.recive_mgroup = res0[0].id;
}
})
let obj = {};
obj.wm = item.id;
@ -738,6 +744,7 @@ export default {
}
obj.count_cando = item.count;
obj.count = item.count;
obj.state = res.state;
obj.handoverbw = [];
that.$API.wpm.wpr.list.req({wm:item.id,page:0}).then((res) => {
let handoverbw = [];
@ -749,19 +756,14 @@ export default {
handoverbw.push(obj1);
})
obj.handoverbw = handoverbw;
if(that.form.handoverb&&that.form.handoverb.length>0){
that.form.handoverb.push(obj);
}else{
// that.form.handoverb = [];
that.form.handoverb.push(obj);
}
that.form.handoverb.push(obj);
that.wm_in = "";
})
}else{
that.$message.error("该批次不存在")
that.wm_in = "";
}
}
})
if(hasArr.length>0){}else{
that.$message.error("该批次不存在")
}
}
})
}else{//wprnumber
@ -792,12 +794,7 @@ export default {
}
obj2.count_cando = arr[0].count;
obj2.count = arr[0].count;
if(that.form.handoverb&&that.form.handoverb.length>0){
that.form.handoverb.push(obj2);
}else{
// that.form.handoverb = [];
that.form.handoverb.push(obj2);
}
that.form.handoverb.push(obj2);
that.wm_in = "";
}
}else{//