fix:玻纤交接调整
This commit is contained in:
parent
e3c085beec
commit
2503653d28
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue