diff --git a/api/warehouse/warehose.js b/api/warehouse/warehose.js index 86f8d73..37e0724 100644 --- a/api/warehouse/warehose.js +++ b/api/warehouse/warehose.js @@ -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) { diff --git a/pages/index/index.vue b/pages/index/index.vue index 9f5cad7..87717d4 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -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' } diff --git a/pages/outWarehouse/outWarehouse.vue b/pages/outWarehouse/outWarehouse.vue index 30c307b..795dd0d 100644 --- a/pages/outWarehouse/outWarehouse.vue +++ b/pages/outWarehouse/outWarehouse.vue @@ -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({