|
@ -225,7 +225,7 @@ |
|
|
//根据零件号和箱码获取采购信息 |
|
|
//根据零件号和箱码获取采购信息 |
|
|
let purchaseDetail = await getPurchaseDetailAsync(balanceItem.itemCode, balanceItem |
|
|
let purchaseDetail = await getPurchaseDetailAsync(balanceItem.itemCode, balanceItem |
|
|
.packingCode); |
|
|
.packingCode); |
|
|
debugger; |
|
|
debugger; |
|
|
if (purchaseDetail.error) { |
|
|
if (purchaseDetail.error) { |
|
|
that.showScanMessage(purchaseDetail.error.message); |
|
|
that.showScanMessage(purchaseDetail.error.message); |
|
|
} else { |
|
|
} else { |
|
@ -238,7 +238,7 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
createBalanceItem(balanceItem, purchaseDetail) { |
|
|
createBalanceItem(balanceItem, purchaseDetail) { |
|
|
|
|
|
|
|
|
let locationErpCode = purchaseDetail.recommendErpCode; |
|
|
let locationErpCode = purchaseDetail.recommendErpCode; |
|
|
if (this.itemList.length == 0) { |
|
|
if (this.itemList.length == 0) { |
|
|
this.recommendErpLocationCode = locationErpCode; |
|
|
this.recommendErpLocationCode = locationErpCode; |
|
@ -305,7 +305,7 @@ |
|
|
|
|
|
|
|
|
// label.worker = localStorage.userName; |
|
|
// label.worker = localStorage.userName; |
|
|
|
|
|
|
|
|
//============================================ |
|
|
//============================================ |
|
|
label.locationCode = balanceItem.locationCode; |
|
|
label.locationCode = balanceItem.locationCode; |
|
|
label.qty = balanceItem.qty; |
|
|
label.qty = balanceItem.qty; |
|
|
label.stdPackQty = purchaseDetail.stdPackQty; |
|
|
label.stdPackQty = purchaseDetail.stdPackQty; |
|
@ -353,7 +353,7 @@ |
|
|
label.handledLot = balanceItem.lot; |
|
|
label.handledLot = balanceItem.lot; |
|
|
label.handledToLocationCode = balanceItem.locationCode; |
|
|
label.handledToLocationCode = balanceItem.locationCode; |
|
|
label.handledToLocationArea = balanceItem.locationArea; |
|
|
label.handledToLocationArea = balanceItem.locationArea; |
|
|
label.handledToLocationGroup = balanceItem.locationGroup; |
|
|
label.handledToLocationGroup = balanceItem.locationGroup; |
|
|
label.handledToLocationErpCode = balanceItem.locationErpCode; |
|
|
label.handledToLocationErpCode = balanceItem.locationErpCode; |
|
|
label.handledToWarehouseCode = balanceItem.warehouseCode; |
|
|
label.handledToWarehouseCode = balanceItem.warehouseCode; |
|
|
label.handledQty = balanceItem.qty; |
|
|
label.handledQty = balanceItem.qty; |
|
@ -373,9 +373,9 @@ |
|
|
async selectedBalanceItem(balanceItem) { |
|
|
async selectedBalanceItem(balanceItem) { |
|
|
let purchaseDetail = await getPurchaseDetailAsync(balanceItem.itemCode, balanceItem |
|
|
let purchaseDetail = await getPurchaseDetailAsync(balanceItem.itemCode, balanceItem |
|
|
.packingCode); |
|
|
.packingCode); |
|
|
|
|
|
|
|
|
if (purchaseDetail != null) { |
|
|
if (purchaseDetail != null) { |
|
|
this.createBalanceItem(balanceItem,purchaseDetail); |
|
|
this.createBalanceItem(balanceItem, purchaseDetail); |
|
|
} else { |
|
|
} else { |
|
|
this.showScanMessage('未查到零件【' + balanceItem.itemCode + '】的采购信息'); |
|
|
this.showScanMessage('未查到零件【' + balanceItem.itemCode + '】的采购信息'); |
|
|
} |
|
|
} |
|
@ -439,38 +439,22 @@ |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
let item = { |
|
|
let item = { |
|
|
// company: localStorage.company, |
|
|
|
|
|
number: "", |
|
|
number: "", |
|
|
worker: localStorage.userName, |
|
|
worker: localStorage.userName, |
|
|
// warehouseCode: localStorage.warehouseCode, |
|
|
jobNumber: "", |
|
|
jobNumber: "validation errors", |
|
|
|
|
|
details: [] |
|
|
details: [] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
that.itemList.forEach(i => { |
|
|
that.itemList.forEach(i => { |
|
|
i.labelList.forEach(r => { |
|
|
i.labelList.forEach(r => { |
|
|
// r.toContainerCode = r.fromContainerCode, |
|
|
r.toLocationCode = this.location.code; |
|
|
// r.toStatus = r.fromStatus, |
|
|
r.toLocationGroup = this.location.locationGroupCode; |
|
|
// r.toPackingCode = r.fromPackingCode, |
|
|
r.toLocationArea = this.location.areaCode; |
|
|
// r.toWarehouseCode = r.fromWarehouseCode, |
|
|
r.toLocationErpCode = this.location.erpLocationCode; |
|
|
// r.toLot = r.fromLot, |
|
|
item.details.push(r); |
|
|
// r.toLocationCode = that.location.code, |
|
|
|
|
|
// r.toLocationGroup = that.location.locationGroupCode, |
|
|
|
|
|
// r.toLocationArea = that.location.areaCode, |
|
|
|
|
|
// r.toLocationErpCode = that.location.erpLocationCode, |
|
|
|
|
|
|
|
|
|
|
|
// r.worker = localStorage.userName, |
|
|
|
|
|
|
|
|
|
|
|
r.toLocationCode = this.location.code; |
|
|
|
|
|
r.toLocationGroup = this.location.locationGroupCode; |
|
|
|
|
|
r.toLocationArea = this.location.areaCode; |
|
|
|
|
|
r.toLocationErpCode = this.location.erpLocationCode; |
|
|
|
|
|
|
|
|
|
|
|
item.details.push(r); |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
let params = JSON.stringify(item); |
|
|
let params = JSON.stringify(item); |
|
|
console.log("采购上架", params) |
|
|
|
|
|
purchasePutaway(params) |
|
|
purchasePutaway(params) |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
that.showCommitSuccess(); |
|
|
that.showCommitSuccess(); |
|
|