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