|
@ -44,8 +44,7 @@ |
|
|
<view v-if="operation=='receipt'" class="uni-flex u-col-center space-between padding_10"> |
|
|
<view v-if="operation=='receipt'" class="uni-flex u-col-center space-between padding_10"> |
|
|
<view> |
|
|
<view> |
|
|
<locationCompare ref="locationCompare" title="收货库位" :recommendLocationCode="jobToLocationCode" |
|
|
<locationCompare ref="locationCompare" title="收货库位" :recommendLocationCode="jobToLocationCode" |
|
|
@getLocation='scanLocationCode' |
|
|
@getLocation='scanLocationCode' :locationAreaTypeList="toLocationAreaTypeList"> |
|
|
:locationAreaTypeList="toLocationAreaTypeList"> |
|
|
|
|
|
</locationCompare> |
|
|
</locationCompare> |
|
|
</view> |
|
|
</view> |
|
|
<view> |
|
|
<view> |
|
@ -265,7 +264,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
var itemCode = result.label.itemCode; |
|
|
var itemCode = result.label.itemCode; |
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
@ -284,10 +282,11 @@ |
|
|
} else { |
|
|
} else { |
|
|
itemDetail.forEach(item => { |
|
|
itemDetail.forEach(item => { |
|
|
item.scaned = true; |
|
|
item.scaned = true; |
|
|
|
|
|
itemDetail.scaneDate = new Date(); |
|
|
item.handleQty = item.qty; |
|
|
item.handleQty = item.qty; |
|
|
item.toLocationCode = this.toLocationCode; |
|
|
item.toLocationCode = this.toLocationCode; |
|
|
}) |
|
|
}) |
|
|
this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序 |
|
|
this.detailSource[0].subList.sort(compareAsc('scaneDate')); //按扫描信息排序 |
|
|
calcHandleQty(this.detailSource); |
|
|
calcHandleQty(this.detailSource); |
|
|
this.continueScan() |
|
|
this.continueScan() |
|
|
this.$forceUpdate() |
|
|
this.$forceUpdate() |
|
@ -306,9 +305,13 @@ |
|
|
batch); |
|
|
batch); |
|
|
if (itemDetail == undefined) { |
|
|
if (itemDetail == undefined) { |
|
|
var isExit; |
|
|
var isExit; |
|
|
for (let subItem of detail.subList) { |
|
|
let subItem; |
|
|
|
|
|
let index = -1; |
|
|
|
|
|
for (subItem of detail.subList) { |
|
|
var item; |
|
|
var item; |
|
|
for (let pack of subItem.packList) { |
|
|
for (var i = 0; i < subItem.packList.length; i++) { |
|
|
|
|
|
let pack = subItem.packList[i]; |
|
|
|
|
|
index = i; |
|
|
if (pack.packingNumber == packingNumber && |
|
|
if (pack.packingNumber == packingNumber && |
|
|
pack.batch == batch) { |
|
|
pack.batch == batch) { |
|
|
item = pack; |
|
|
item = pack; |
|
@ -316,18 +319,26 @@ |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (item != undefined) { |
|
|
// for (let pack of subItem.packList) { |
|
|
subItem.scaned = true |
|
|
// if (pack.packingNumber == packingNumber && |
|
|
subItem.handleQty = 0; |
|
|
// pack.batch == batch) { |
|
|
item = undefined |
|
|
// item = pack; |
|
|
} |
|
|
// isExit = pack; |
|
|
|
|
|
// break; |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// if (item != undefined) { |
|
|
|
|
|
// subItem.scaned = true |
|
|
|
|
|
// subItem.handleQty = 0; |
|
|
|
|
|
// item = undefined |
|
|
|
|
|
// } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (isExit == undefined) { |
|
|
if (isExit == undefined) { |
|
|
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") |
|
|
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") |
|
|
} else { |
|
|
} else { |
|
|
if (isExit.scaned) { |
|
|
if (isExit.scaned) { |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描"); |
|
|
} else { |
|
|
} else { |
|
|
isExit.scaned = true |
|
|
isExit.scaned = true |
|
|
isExit.handleQty = Number(result.label.qty); |
|
|
isExit.handleQty = Number(result.label.qty); |
|
@ -349,12 +360,14 @@ |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
} else { |
|
|
} else { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序 |
|
|
itemDetail.scaneDate = new Date(); |
|
|
|
|
|
this.detailSource[0].subList.sort(compareAsc('scaneDate')); //按扫描信息排序 |
|
|
itemDetail.handleQty = Number(result.label.qty); |
|
|
itemDetail.handleQty = Number(result.label.qty); |
|
|
itemDetail.toLocationCode = this.toLocationCode; |
|
|
itemDetail.toLocationCode = this.toLocationCode; |
|
|
itemDetail.labelQty = Number(result.label.qty); |
|
|
itemDetail.labelQty = Number(result.label.qty); |
|
|
itemDetail.packList.forEach(pac => { |
|
|
itemDetail.packList.forEach(pac => { |
|
|
pac.scaned = true |
|
|
pac.scaned = true |
|
|
|
|
|
itemDetail.scaneDate = new Date(); |
|
|
pac.handleQty = Number(pac.qty); |
|
|
pac.handleQty = Number(pac.qty); |
|
|
pac.toLocationCode = this.toLocationCode; |
|
|
pac.toLocationCode = this.toLocationCode; |
|
|
}) |
|
|
}) |
|
|