出库限制解除

This commit is contained in:
赵正易
2024-03-27 15:35:05 +08:00
parent 3b6c59a44e
commit 9387549718
3 changed files with 31 additions and 35 deletions

View File

@@ -9,6 +9,14 @@ export function getProductLocationInfo(params) {
params
})
}
// 判断可否入库(code = 200 data = true-可入库 false-不可入库msg显示不可入库原因 )
export function checkWarehousing(params) {
return request({
url: '/mes/wm/entrywarehouse/checkWarehousing',
method: 'get',
params
})
}
// 根据库位获取已存在货物
export function getOldPackagelist(params) {

View File

@@ -29,6 +29,7 @@ export default {
{ name: '移库', icon: 'cart-filled' },
{ name: '退库', icon: 'undo-filled' },
{ name: '拼箱', icon: 'folder-add-filled' },
{ name: '拆箱', icon: 'folder-add-filled' },
{ name: '货物查看', icon: 'eye-filled' },
{ name: '入库记录', icon: 'list' },
{ name: '出库记录', icon: 'list' }

View File

@@ -113,24 +113,12 @@ export default {
this.outOrderPlan = JSON.parse(JSON.stringify(this.clearData.outOrderPlan));
this.searchType = 3;
},
// 获取工单计划
getOutOrderPlan(data){
const query = {
shipment_num:data.shipmentNum
}
WarehoseApi.generateOutorderplan(query).then(res=>{
if(res.code === 200){
this.outOrderPlan = res.data;
}
})
},
// 扫码信息录入
handleGetInfo(data, type) {
if (type === 3) {
// 出货单扫完后是扫箱号
this.searchType = 2;
this.outInfo = data;
this.getOutOrderPlan(data);
this.newMaterialList = [];
} else if (type === 2) {
if (this.newMaterialList.length > 0) {
@@ -145,28 +133,28 @@ export default {
// 此时扫描的是箱号
// TODO 检查扫描的箱号零件号是否在此工单下
let flag = false;
let list = JSON.parse(JSON.stringify(this.outOrderPlan));
for(let item of list){
// 扫描箱的工单号与计划中的批次号对比,数字是否在其中
if(!item.Patchcode){
continue;
}
if(item.Patchcode.includes(data.workoderID)){
flag = true;
break;
}
}
if(!flag){
// 此箱号不在计划内
uni.showModal({
title: '提示',
content: '当前货物不在出库单计划内,请扫其他货物!',
showCancel: false,
confirmText: '确定'
});
return;
}
// let flag = false;
// let list = JSON.parse(JSON.stringify(this.outOrderPlan));
// for(let item of list){
// // 扫描箱的工单号与计划中的批次号对比,数字是否在其中
// if(!item.Patchcode){
// continue;
// }
// if(item.Patchcode.includes(data.workoderID)){
// flag = true;
// break;
// }
// }
// if(!flag){
// // 此箱号不在计划内
// uni.showModal({
// title: '提示',
// content: '当前货物不在出库单计划内,请扫其他货物!',
// showCancel: false,
// confirmText: '确定'
// });
// return;
// }
// TODO 箱出库,并关联到此出库单下
this.newMaterialList.push(data);
}
@@ -203,7 +191,6 @@ export default {
shipmentNum: this.outInfo.shipmentNum,
patchCode: [this.newMaterialList[0].patchCode]
};
console.log(data);
WarehoseApi.doMaterialOut(data).then(res=>{
if(res.code !== 200){
uni.showModal({