fix:玻纤交接调整

This commit is contained in:
shijing 2025-08-06 16:50:12 +08:00
parent e3c085beec
commit 2503653d28
1 changed files with 32 additions and 32 deletions

View File

@ -358,8 +358,8 @@ export default {
if(that.type==20||that.type==50){
that.form.recive_mgroup = that.mgroupId;
}
// type=10
// type=20
// type=10
// type=20
// type=30
// type=40
// type=50
@ -371,23 +371,19 @@ export default {
that.getUserList();
}
//
if((that.type==20&&that.mgroupName!=='废品库')||that.type==40){
console.log('that.mgroupName',that.mgroupName);
if(that.mgroupName=='成品内外初检'||that.mgroupName=='成品内质复检'||that.mgroupName=='成品性能检测'||that.mgroupName=='成品尺寸检测'||that.mgroupName=='成品外观复检一'||that.mgroupName=='成品外观复检二'){
that.getMaterialOkFangong();
}else{
that.getMaterialNotok();
}
}else if(that.type==20&&that.mgroupName=='废品库'){
that.getMaterialFP();
}else{
if(that.type==10||that.type==50){//
that.getMaterial();
}
if(that.type==30){
that.getDeptOptions();
}
}else if(that.type==20){//
if(that.mgroupName=='废品库'){
that.getMaterialFP();
}else{
that.getMaterialOkFangong();
}
}else if(that.type==40){//
that.getMaterialNotok();
}else if(that.type==60){
}
that.getMgroupOptions();
},
methods: {
@ -436,8 +432,8 @@ export default {
let that = this;
var req = {
page: 0,
// state:10,
mgroupx:that.mgroupId
tag:'done',
mgroup:that.mgroupId
};
if(that.type!==50){
req.state = 10;
@ -454,9 +450,9 @@ export default {
let that = this;
that.materialOptions = [];
var req = {
mgroupx: that.mgroupId,
mgroup: that.mgroupId,
page: 0,
state__in:'20,34'
state:20
};
this.$API.wpm.wmaterial.list.req(req).then((res) => {
that.materialOptions = res.filter(item=>{
@ -479,12 +475,14 @@ export default {
})
});
},
//
getMaterialOkFangong(){
let that = this;
that.materialOptions = [];
var obj = {
page: 0,
tag:'done',
state__in:'20,34',
mgroup: that.mgroupId,
};
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
@ -589,17 +587,19 @@ export default {
return that.selectItems.indexOf(item.id)>-1;
});
let materialId = data[0].material;
let params = {
material: materialId,
type: that.type,
};
that.$API.wpm.handover.mgroups.req(params).then((res) => {
that.mgroupOptions = res;
if(res.length==1){
that.form.recive_mgroup = res[0].id;
that.getUserList2();
}
})
if(that.type==50){}else{
let params = {
material: materialId,
type: that.type,
};
that.$API.wpm.handover.mgroups.req(params).then((res) => {
that.mgroupOptions = res;
if(res.length==1){
that.form.recive_mgroup = res[0].id;
that.getUserList2();
}
})
}
data.forEach((item,index)=>{
item.wm = item.id;
item.count = item.count_canhandover;