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