Browse Source

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

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

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

@ -250,6 +250,13 @@
},
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;
@ -263,8 +270,7 @@
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch &&
return r.batch == batch &&
r.fromLocationCode == result.fromLocationCode&&
r.isRecommend==false
})
@ -273,7 +279,7 @@
itemCode:itemCode,
packingNumber:packingNumber,
batch:batch,
handleQty:detail.qty<Number(result.balance.qty)?detail.qty:Number(result.balance.qty),
handleQty:Number(result.label.qty),
qty:detail.qty,
fromLocationCode:locationCode,
inventoryStatus:inventoryStatus,
@ -290,8 +296,9 @@
this.calcHandleQty();
} else {
if (itemDetail.scaned) {
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
.fromLocationCode + "】已经扫描")
itemDetail.handleQty = calc.add(itemDetail.handleQty ,Number(result.label.qty));
// this.showErrorMessage("" + packingNumber + "," + batch + "" + result
// .fromLocationCode + "")
}
}
}
@ -299,6 +306,56 @@
this.showMessage(e.message)
}
},
setData(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.packingNumber == packingNumber &&
r.batch == batch &&
r.fromLocationCode == result.fromLocationCode&&
r.isRecommend==false
})
if (itemDetail == undefined) {
var newAdd = {
itemCode:itemCode,
packingNumber:packingNumber,
batch:batch,
handleQty:detail.qty<Number(result.balance.qty)?detail.qty:Number(result.balance.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) {
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
.fromLocationCode + "】已经扫描")
}
}
}
} catch (e) {
this.showMessage(e.message)
}
},
commit() {
var scanCount=0;

Loading…
Cancel
Save