|
@ -79,7 +79,8 @@ |
|
|
getBalancesByFilterAsync, |
|
|
getBalancesByFilterAsync, |
|
|
getPurchaseDetailAsync, |
|
|
getPurchaseDetailAsync, |
|
|
purchasePutaway, |
|
|
purchasePutaway, |
|
|
getPurchasePutawayAsyncDetail |
|
|
getPurchasePutawayAsyncDetail, |
|
|
|
|
|
getPurchaseDetailAsyncNew |
|
|
} from '@/api/index.js'; |
|
|
} from '@/api/index.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -241,9 +242,27 @@ |
|
|
that.showScanMessage('箱码【' + packingCode + '】在【待检库】未查询到库存状态为【合格】的库存信息'); |
|
|
that.showScanMessage('箱码【' + packingCode + '】在【待检库】未查询到库存状态为【合格】的库存信息'); |
|
|
} else if (balanceRes.totalCount === 1) { |
|
|
} else if (balanceRes.totalCount === 1) { |
|
|
let balanceItem = balanceRes.items[0]; |
|
|
let balanceItem = balanceRes.items[0]; |
|
|
|
|
|
//获取采购订单信息和原箱码 |
|
|
|
|
|
let infoList = await getPurchaseDetailAsyncNew(balanceItem |
|
|
|
|
|
.packingCode) |
|
|
|
|
|
if (infoList) { |
|
|
|
|
|
var fromTopPackingCode="" |
|
|
|
|
|
for (var i = 0; i < infoList.length; i++) { |
|
|
|
|
|
if(infoList[i].fromPackingCode==balanceItem.packingCode){ |
|
|
|
|
|
fromTopPackingCode=infoList[i].fromTopPackingCode |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.poNumber = infoList[0].purchaseInfo_PoNumber |
|
|
|
|
|
this.showPopList=[] |
|
|
|
|
|
infoList.forEach(res=>{ |
|
|
|
|
|
this.showPopList.push(res.fromTopPackingCode) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//根据零件号和箱码获取采购信息 |
|
|
//根据零件号和箱码获取采购信息 |
|
|
let purchaseDetail = await getPurchaseDetailAsync(balanceItem.itemCode, balanceItem |
|
|
let purchaseDetail = await getPurchaseDetailAsync(balanceItem.itemCode, fromTopPackingCode); |
|
|
.packingCode); |
|
|
|
|
|
if (purchaseDetail.error) { |
|
|
if (purchaseDetail.error) { |
|
|
that.showScanMessage(purchaseDetail.error.message); |
|
|
that.showScanMessage(purchaseDetail.error.message); |
|
|
} else { |
|
|
} else { |
|
@ -260,14 +279,16 @@ |
|
|
let locationErpCode = purchaseDetail.recommendErpCode; |
|
|
let locationErpCode = purchaseDetail.recommendErpCode; |
|
|
if (this.itemList.length == 0) { |
|
|
if (this.itemList.length == 0) { |
|
|
this.recommendErpLocationCode = locationErpCode; |
|
|
this.recommendErpLocationCode = locationErpCode; |
|
|
this.checkData(balanceItem, purchaseDetail) |
|
|
// this.checkData(balanceItem, purchaseDetail) |
|
|
|
|
|
this.createItem(balanceItem, purchaseDetail); |
|
|
} else { |
|
|
} else { |
|
|
if (this.recommendErpLocationCode != locationErpCode) { |
|
|
if (this.recommendErpLocationCode != locationErpCode) { |
|
|
this.showScanMessage('当前零件的ERP储位是【' + locationErpCode + '】与【' + this |
|
|
this.showScanMessage('当前零件的ERP储位是【' + locationErpCode + '】与【' + this |
|
|
.recommendErpLocationCode + |
|
|
.recommendErpLocationCode + |
|
|
'】不是同一ERP储位,请重新扫描'); |
|
|
'】不是同一ERP储位,请重新扫描'); |
|
|
} else { |
|
|
} else { |
|
|
this.checkData(balanceItem, purchaseDetail) |
|
|
this.createItem(balanceItem, purchaseDetail); |
|
|
|
|
|
// this.checkData(balanceItem, purchaseDetail) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -500,8 +521,8 @@ |
|
|
number: "", |
|
|
number: "", |
|
|
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, |
|
|
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, |
|
|
jobNumber: "", |
|
|
jobNumber: "", |
|
|
supplierCode:"", |
|
|
supplierCode: "", |
|
|
asnNumber:"", |
|
|
asnNumber: "", |
|
|
details: [] |
|
|
details: [] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -606,4 +627,4 @@ |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
</style> |
|
|
</style> |