入库,出库添加检查接口,需要与后端对应
This commit is contained in:
@@ -130,35 +130,52 @@ export default {
|
||||
this.newMaterialList = [];
|
||||
} else if (type === 2) {
|
||||
const checkData = {
|
||||
originalCode: data.originalCode
|
||||
production_packcode: data.originalCode,
|
||||
location:this.warehouseInfo.location,
|
||||
isStrict:true,
|
||||
};
|
||||
WarehoseApi.isExistedWarehouse(checkData).then((res) => {
|
||||
if (res.code !== 200 || res.data) {
|
||||
WarehoseApi.checkWarehousing(checkData).then(res=>{
|
||||
if (res.code === 200 && res.data) {
|
||||
this.newMaterialList.push(data);
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '货物录入异常,已在其他库录入!',
|
||||
content: '不可入库:' + res.msg,
|
||||
showCancel: false,
|
||||
confirmText: '确定'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 此时扫描的是箱号
|
||||
// 当前录入的箱号是否在同一批次录入过
|
||||
// 曾经是否扫过
|
||||
if (this.newMaterialList.length > 0) {
|
||||
for (let item of this.newMaterialList) {
|
||||
if (item.patchCode === data.patchCode) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '此货物已录入过',
|
||||
showCancel: false,
|
||||
confirmText: '确定'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.newMaterialList.push(data);
|
||||
})
|
||||
// const checkData = {
|
||||
// originalCode: data.originalCode
|
||||
// };
|
||||
// WarehoseApi.isExistedWarehouse(checkData).then((res) => {
|
||||
// if (res.code !== 200 || res.data) {
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '货物录入异常,已在其他库录入!',
|
||||
// showCancel: false,
|
||||
// confirmText: '确定'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// // 此时扫描的是箱号
|
||||
// // 当前录入的箱号是否在同一批次录入过
|
||||
// // 曾经是否扫过
|
||||
// if (this.newMaterialList.length > 0) {
|
||||
// for (let item of this.newMaterialList) {
|
||||
// if (item.patchCode === data.patchCode) {
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '此货物已录入过',
|
||||
// showCancel: false,
|
||||
// confirmText: '确定'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user