入库,出库添加检查接口,需要与后端对应
This commit is contained in:
@@ -76,9 +76,9 @@ export default {
|
||||
},
|
||||
// 新录入货物信息
|
||||
newMaterialList: [],
|
||||
|
||||
|
||||
//工单计划
|
||||
outOrderPlan:[],
|
||||
outOrderPlan: [],
|
||||
// 1-仓库扫码 2-货物扫码 3-出货单扫码
|
||||
searchType: 3
|
||||
};
|
||||
@@ -130,7 +130,22 @@ export default {
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const checkData = {
|
||||
production_packcode: data.originalCode,
|
||||
shipment_num: this.outInfo.shipmentNum
|
||||
};
|
||||
WarehoseApi.checkProductionOut(checkData).then((res) => {
|
||||
if (res.code === 200 && res.data) {
|
||||
this.newMaterialList.push(data);
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '不可出库:' + res.msg,
|
||||
showCancel: false,
|
||||
confirmText: '确定'
|
||||
});
|
||||
}
|
||||
});
|
||||
// 此时扫描的是箱号
|
||||
// TODO 检查扫描的箱号零件号是否在此工单下
|
||||
// let flag = false;
|
||||
@@ -156,7 +171,6 @@ export default {
|
||||
// return;
|
||||
// }
|
||||
// TODO 箱出库,并关联到此出库单下
|
||||
this.newMaterialList.push(data);
|
||||
}
|
||||
},
|
||||
// 货物出库
|
||||
@@ -191,8 +205,8 @@ export default {
|
||||
shipmentNum: this.outInfo.shipmentNum,
|
||||
patchCode: [this.newMaterialList[0].patchCode]
|
||||
};
|
||||
WarehoseApi.doMaterialOut(data).then(res=>{
|
||||
if(res.code !== 200){
|
||||
WarehoseApi.doMaterialOut(data).then((res) => {
|
||||
if (res.code !== 200) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '出库异常',
|
||||
@@ -208,8 +222,7 @@ export default {
|
||||
confirmText: '确认'
|
||||
});
|
||||
this.newMaterialList = [];
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -228,8 +241,8 @@ export default {
|
||||
const data = {
|
||||
shipmentNum: this.outInfo.shipmentNum
|
||||
};
|
||||
WarehoseApi.doOverOutorderplan(data).then(res=>{
|
||||
if(res.code === 200){
|
||||
WarehoseApi.doOverOutorderplan(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '此出库单已完成',
|
||||
@@ -237,7 +250,7 @@ export default {
|
||||
confirmText: '确认'
|
||||
});
|
||||
this.clear();
|
||||
}else{
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '出库单完成异常!',
|
||||
@@ -245,8 +258,7 @@ export default {
|
||||
confirmText: '确认'
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user