Browse Source

YT-585计划外出入库,pda扫箱签,带出所有库存数量,不是箱签数量,应带出箱签数量

intex_online20241111
zhang_li 3 weeks ago
parent
commit
e6cc5cb565
  1. 57
      src/pages/unPlanned/job/issueJobDetail.vue

57
src/pages/unPlanned/job/issueJobDetail.vue

@ -250,6 +250,63 @@
}, },
getScanResult(result) { getScanResult(result) {
if(import.meta.env.VITE_MANAGE_MODEL == 'BY_BATCH'){
this.setDataBatch(result)
}else{
this.setData(result)
}
},
setDataBatch(result){
try {
var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch;
var qty = result.balance.qty;
var itemCode = result.balance.itemCode;
var locationCode = result.balance.locationCode;
var inventoryStatus = result.balance.inventoryStatus;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.subList.find(r => {
return r.batch == batch &&
r.fromLocationCode == result.fromLocationCode&&
r.isRecommend==false
})
if (itemDetail == undefined) {
var newAdd = {
itemCode:itemCode,
packingNumber:packingNumber,
batch:batch,
handleQty:Number(result.label.qty),
qty:detail.qty,
fromLocationCode:locationCode,
inventoryStatus:inventoryStatus,
toInventoryStatus:inventoryStatus,
balance:result.balance,
isRecommend:false,
isNewAdd:"newAdd"
}
newAdd.balance.balanceQty = Number(result.balance.qty);
newAdd.balance.packQty = Number(result.package.packQty)
newAdd.balance.packUnit = result.package.packUnit
newAdd.scaned = true;
detail.subList.push(newAdd)
this.calcHandleQty();
} else {
if (itemDetail.scaned) {
itemDetail.handleQty = calc.add(itemDetail.handleQty ,Number(result.label.qty));
// this.showErrorMessage("" + packingNumber + "," + batch + "" + result
// .fromLocationCode + "")
}
}
}
} catch (e) {
this.showMessage(e.message)
}
},
setData(result){
try { try {
var packingNumber = result.balance.packingNumber; var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch; var batch = result.balance.batch;

Loading…
Cancel
Save