|
@ -14,9 +14,9 @@ |
|
|
@change="switchChange"></u-switch> |
|
|
@change="switchChange"></u-switch> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="" v-if ="operation=='reject'"> |
|
|
<view class="" v-if="operation=='reject'"> |
|
|
<uni-section title="拒收原因" type="line"> |
|
|
<uni-section title="拒收原因" type="line"> |
|
|
<uni-easyinput v-model="reasonText" placeholder="请输入拒收原因" ></uni-easyinput> |
|
|
<uni-easyinput v-model="reasonText" placeholder="请输入拒收原因"></uni-easyinput> |
|
|
</uni-section> |
|
|
</uni-section> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
@ -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> |
|
@ -79,7 +78,7 @@ |
|
|
goHome, |
|
|
goHome, |
|
|
getCurrDateTime, |
|
|
getCurrDateTime, |
|
|
getPackingNumberAndBatch, |
|
|
getPackingNumberAndBatch, |
|
|
compareAsc, |
|
|
compareDesc, |
|
|
navigateBack, |
|
|
navigateBack, |
|
|
getSwitchInfoByCode |
|
|
getSwitchInfoByCode |
|
|
} from '@/common/basic.js'; |
|
|
} from '@/common/basic.js'; |
|
@ -143,8 +142,8 @@ |
|
|
operation: '', |
|
|
operation: '', |
|
|
scanMessage: '', |
|
|
scanMessage: '', |
|
|
status: '', |
|
|
status: '', |
|
|
switchCode:"", |
|
|
switchCode: "", |
|
|
isCheckLocation: 'purchaseReceiptLocationCodeValidate',//校验收货库位 |
|
|
isCheckLocation: 'purchaseReceiptLocationCodeValidate', //校验收货库位 |
|
|
reasonText: "", |
|
|
reasonText: "", |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
@ -155,7 +154,7 @@ |
|
|
this.scanMessage = option.scanMessage; |
|
|
this.scanMessage = option.scanMessage; |
|
|
this.operation = option.operation; |
|
|
this.operation = option.operation; |
|
|
this.status = option.status; |
|
|
this.status = option.status; |
|
|
this.switchCode = "purchasereceiptPrintPDA"//pda打印 |
|
|
this.switchCode = "purchasereceiptPrintPDA" //pda打印 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
@ -249,7 +248,7 @@ |
|
|
} |
|
|
} |
|
|
that.isAllReceived = false; |
|
|
that.isAllReceived = false; |
|
|
//如果箱码扫描自动扫描,ASN不自动扫描 |
|
|
//如果箱码扫描自动扫描,ASN不自动扫描 |
|
|
if(this.scanMessage){ |
|
|
if (this.scanMessage) { |
|
|
this.$refs.scanPopup.simulateScan(this.scanMessage); |
|
|
this.$refs.scanPopup.simulateScan(this.scanMessage); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -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,17 +282,19 @@ |
|
|
} else { |
|
|
} else { |
|
|
itemDetail.forEach(item => { |
|
|
itemDetail.forEach(item => { |
|
|
item.scaned = true; |
|
|
item.scaned = true; |
|
|
|
|
|
itemDetail.scanDate = 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')); //按扫描信息排序 |
|
|
|
|
|
calcHandleQty(this.detailSource); |
|
|
calcHandleQty(this.detailSource); |
|
|
|
|
|
this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序 |
|
|
this.continueScan() |
|
|
this.continueScan() |
|
|
this.$forceUpdate() |
|
|
this.$forceUpdate() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else if (result.label.labelType == "PurchaseLabel") { |
|
|
} else if (result.label.labelType == "PurchaseLabel") { |
|
|
var packingNumber = result.label.packingNumber; |
|
|
var packingNumber = result.package.number; |
|
|
|
|
|
var parentpackingNumber = result.package.parentNumber; |
|
|
var batch = result.label.batch; |
|
|
var batch = result.label.batch; |
|
|
var qty = result.label.qty; |
|
|
var qty = result.label.qty; |
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
@ -305,39 +305,35 @@ |
|
|
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == |
|
|
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == |
|
|
batch); |
|
|
batch); |
|
|
if (itemDetail == undefined) { |
|
|
if (itemDetail == undefined) { |
|
|
var isExit; |
|
|
itemDetail = detail.subList.find(r => r.packingNumber == parentpackingNumber && r.batch == |
|
|
for (let subItem of detail.subList) { |
|
|
batch); |
|
|
var item; |
|
|
|
|
|
for (let pack of subItem.packList) { |
|
|
|
|
|
if (pack.packingNumber == packingNumber && |
|
|
|
|
|
pack.batch == batch) { |
|
|
|
|
|
item = pack; |
|
|
|
|
|
isExit = pack; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (item != undefined) { |
|
|
|
|
|
subItem.scaned = true |
|
|
|
|
|
subItem.handleQty = 0; |
|
|
|
|
|
item = undefined |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (isExit == undefined) { |
|
|
if (itemDetail == undefined) { |
|
|
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") |
|
|
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") |
|
|
} else { |
|
|
} else { |
|
|
if ( isExit.scaned) { |
|
|
var pack = itemDetail.packList.find(p => p.packingNumber == packingNumber && |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
p.batch == batch) |
|
|
|
|
|
if (pack == undefined) { |
|
|
|
|
|
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") |
|
|
|
|
|
} else { |
|
|
|
|
|
if (pack.scaned) { |
|
|
|
|
|
pack.scanDate = new Date(); |
|
|
|
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描"); |
|
|
} else { |
|
|
} else { |
|
|
isExit.scaned = true |
|
|
pack.scaned = true |
|
|
isExit.handleQty = Number(result.label.qty); |
|
|
pack.scanDate = new Date(); |
|
|
isExit.toLocationCode = this.toLocationCode; |
|
|
pack.handleQty = Number(result.label.qty); |
|
|
isExit.labelQty = Number(result.label.qty); |
|
|
pack.toLocationCode = this.toLocationCode; |
|
|
|
|
|
pack.labelQty = Number(result.label.qty); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
calcTreeHandleQty(this.detailSource); |
|
|
calcTreeHandleQty(this.detailSource); |
|
|
|
|
|
itemDetail.packList.sort(compareDesc('scanDate')); //按扫描信息排序 |
|
|
this.$forceUpdate() |
|
|
this.$forceUpdate() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
|
|
|
//扫描的是外包装,将包装集合全部扫描 |
|
|
var scanedLength = 0; |
|
|
var scanedLength = 0; |
|
|
itemDetail.packList.forEach(res => { |
|
|
itemDetail.packList.forEach(res => { |
|
|
if (res.scaned) { |
|
|
if (res.scaned) { |
|
@ -346,21 +342,23 @@ |
|
|
}) |
|
|
}) |
|
|
if (itemDetail.scaned && scanedLength == itemDetail |
|
|
if (itemDetail.scaned && scanedLength == itemDetail |
|
|
.packList.length) { |
|
|
.packList.length) { |
|
|
|
|
|
isExit.scanDate = new Date(); |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
} else { |
|
|
} else { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序 |
|
|
itemDetail.scanDate = new Date(); |
|
|
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 |
|
|
|
|
|
pac.scanDate = new Date(); |
|
|
pac.handleQty = Number(pac.qty); |
|
|
pac.handleQty = Number(pac.qty); |
|
|
pac.toLocationCode = this.toLocationCode; |
|
|
pac.toLocationCode = this.toLocationCode; |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
calcTreeHandleQty(this.detailSource); |
|
|
calcTreeHandleQty(this.detailSource); |
|
|
var test = this.detailSource |
|
|
this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序 |
|
|
this.continueScan() |
|
|
this.continueScan() |
|
|
this.$forceUpdate() |
|
|
this.$forceUpdate() |
|
|
} |
|
|
} |
|
@ -445,7 +443,7 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
reject() { |
|
|
reject() { |
|
|
if(!this.reasonText){ |
|
|
if (!this.reasonText) { |
|
|
this.showMessage("请输入拒收原因") |
|
|
this.showMessage("请输入拒收原因") |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|