fix:玻纤交接调整
This commit is contained in:
parent
e3c085beec
commit
2503653d28
|
@ -358,8 +358,8 @@ export default {
|
||||||
if(that.type==20||that.type==50){
|
if(that.type==20||that.type==50){
|
||||||
that.form.recive_mgroup = that.mgroupId;
|
that.form.recive_mgroup = that.mgroupId;
|
||||||
}
|
}
|
||||||
// type=10 物料交接 物料都可交接,接收工段有限制
|
// type=10 正常交接 物料都可交接,接收工段有限制
|
||||||
// type=20 物料返工 不合格品交接,接收工段为该工艺流程中的工段
|
// type=20 返工交接 不合格品交接,接收工段为该工艺流程中的工段
|
||||||
// type=30 物料检验 合格品交接,检验部接收
|
// type=30 物料检验 合格品交接,检验部接收
|
||||||
// type=40 废品入库 不合格品交接,接收工段固定为废品库
|
// type=40 废品入库 不合格品交接,接收工段固定为废品库
|
||||||
// type=50 改版 灵活无限制
|
// type=50 改版 灵活无限制
|
||||||
|
@ -371,23 +371,19 @@ export default {
|
||||||
that.getUserList();
|
that.getUserList();
|
||||||
}
|
}
|
||||||
//获取交送物料
|
//获取交送物料
|
||||||
if((that.type==20&&that.mgroupName!=='废品库')||that.type==40){
|
if(that.type==10||that.type==50){//正常交接
|
||||||
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{
|
|
||||||
that.getMaterial();
|
that.getMaterial();
|
||||||
|
}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){
|
||||||
|
|
||||||
}
|
}
|
||||||
if(that.type==30){
|
|
||||||
that.getDeptOptions();
|
|
||||||
}
|
|
||||||
|
|
||||||
that.getMgroupOptions();
|
that.getMgroupOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -436,8 +432,8 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
var req = {
|
var req = {
|
||||||
page: 0,
|
page: 0,
|
||||||
// state:10,
|
tag:'done',
|
||||||
mgroupx:that.mgroupId
|
mgroup:that.mgroupId
|
||||||
};
|
};
|
||||||
if(that.type!==50){
|
if(that.type!==50){
|
||||||
req.state = 10;
|
req.state = 10;
|
||||||
|
@ -454,9 +450,9 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.materialOptions = [];
|
that.materialOptions = [];
|
||||||
var req = {
|
var req = {
|
||||||
mgroupx: that.mgroupId,
|
mgroup: that.mgroupId,
|
||||||
page: 0,
|
page: 0,
|
||||||
state__in:'20,34'
|
state:20
|
||||||
};
|
};
|
||||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
that.materialOptions = res.filter(item=>{
|
that.materialOptions = res.filter(item=>{
|
||||||
|
@ -479,12 +475,14 @@ export default {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//获取该工段的可返工物料
|
||||||
getMaterialOkFangong(){
|
getMaterialOkFangong(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.materialOptions = [];
|
that.materialOptions = [];
|
||||||
var obj = {
|
var obj = {
|
||||||
page: 0,
|
page: 0,
|
||||||
tag:'done',
|
tag:'done',
|
||||||
|
state__in:'20,34',
|
||||||
mgroup: that.mgroupId,
|
mgroup: that.mgroupId,
|
||||||
};
|
};
|
||||||
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||||
|
@ -589,17 +587,19 @@ export default {
|
||||||
return that.selectItems.indexOf(item.id)>-1;
|
return that.selectItems.indexOf(item.id)>-1;
|
||||||
});
|
});
|
||||||
let materialId = data[0].material;
|
let materialId = data[0].material;
|
||||||
let params = {
|
if(that.type==50){}else{
|
||||||
material: materialId,
|
let params = {
|
||||||
type: that.type,
|
material: materialId,
|
||||||
};
|
type: that.type,
|
||||||
that.$API.wpm.handover.mgroups.req(params).then((res) => {
|
};
|
||||||
that.mgroupOptions = res;
|
that.$API.wpm.handover.mgroups.req(params).then((res) => {
|
||||||
if(res.length==1){
|
that.mgroupOptions = res;
|
||||||
that.form.recive_mgroup = res[0].id;
|
if(res.length==1){
|
||||||
that.getUserList2();
|
that.form.recive_mgroup = res[0].id;
|
||||||
}
|
that.getUserList2();
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
data.forEach((item,index)=>{
|
data.forEach((item,index)=>{
|
||||||
item.wm = item.id;
|
item.wm = item.id;
|
||||||
item.count = item.count_canhandover;
|
item.count = item.count_canhandover;
|
||||||
|
|
Loading…
Reference in New Issue