|
@ -12,13 +12,9 @@ |
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<comReceiptDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent" |
|
|
|
|
|
@remove="updateData" @updateData="updateData" |
|
|
|
|
|
:locationAreaTypeList='toLocationAreaTypeList' v-if="managementType=='BY_BATCH'"> |
|
|
|
|
|
</comReceiptDetailCardBatch> |
|
|
|
|
|
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent" |
|
|
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent" |
|
|
@remove="updateData" @updateData="updateData" |
|
|
@remove="updateData" @updateData="updateData" |
|
|
:locationAreaTypeList='toLocationAreaTypeList' v-else> |
|
|
:locationAreaTypeList='toLocationAreaTypeList'> |
|
|
</com-receipt-detail-card> |
|
|
</com-receipt-detail-card> |
|
|
</view> |
|
|
</view> |
|
|
<view class='split_line'></view> |
|
|
<view class='split_line'></view> |
|
@ -70,12 +66,15 @@ |
|
|
calcHandleQty, |
|
|
calcHandleQty, |
|
|
getScanCount |
|
|
getScanCount |
|
|
} from '@/common/detail.js'; |
|
|
} from '@/common/detail.js'; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
calc |
|
|
|
|
|
} from '@/common/calc.js'; |
|
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
import locationCompare from '@/mycomponents/location/locationCompare.vue' |
|
|
import locationCompare from '@/mycomponents/location/locationCompare.vue' |
|
|
import comReceiptDetailCard from '@/pages/unPlanned/coms/comReceiptDetailCard.vue' |
|
|
import comReceiptDetailCard from '@/pages/unPlanned/coms/comReceiptDetailCard.vue' |
|
|
import comReceiptDetailCardBatch from '@/pages/unPlanned/coms/comReceiptDetailCardBatch.vue' |
|
|
|
|
|
import jobTop from '@/mycomponents/job/jobTop.vue' |
|
|
import jobTop from '@/mycomponents/job/jobTop.vue' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
@ -84,7 +83,6 @@ |
|
|
winScanButton, |
|
|
winScanButton, |
|
|
winScanPack, |
|
|
winScanPack, |
|
|
comReceiptDetailCard, |
|
|
comReceiptDetailCard, |
|
|
comReceiptDetailCardBatch, |
|
|
|
|
|
locationCompare, |
|
|
locationCompare, |
|
|
jobTop |
|
|
jobTop |
|
|
}, |
|
|
}, |
|
@ -229,6 +227,14 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
|
|
|
if(import.meta.env.VITE_MANAGE_MODEL == 'BY_BATCH'){ |
|
|
|
|
|
this.setDataBatch(result) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.setData(result) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
setDataBatch(result){ |
|
|
try { |
|
|
try { |
|
|
var packingNumber = result.label.packingNumber; |
|
|
var packingNumber = result.label.packingNumber; |
|
|
var batch = result.label.batch; |
|
|
var batch = result.label.batch; |
|
@ -238,7 +244,42 @@ |
|
|
if (detail == undefined) { |
|
|
if (detail == undefined) { |
|
|
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") |
|
|
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
var itemDetail = detail.subList.find(r => r.batch == batch); |
|
|
|
|
|
if (itemDetail == undefined) { |
|
|
|
|
|
this.showErrorMessage("批次【" + batch + "】" + "不在列表中") |
|
|
|
|
|
} else { |
|
|
|
|
|
if (itemDetail.scaned) { |
|
|
|
|
|
// this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】" + "已经扫描") |
|
|
|
|
|
itemDetail.handleQty = calc.add(itemDetail.handleQty ,Number(result.label.qty)); |
|
|
|
|
|
} else { |
|
|
|
|
|
itemDetail.scaned = true; |
|
|
|
|
|
itemDetail.handleQty = Number(result.label.qty); |
|
|
|
|
|
itemDetail.toLocationCode = this.toLocationCode ? this.toLocationCode : itemDetail |
|
|
|
|
|
.toLocationCode; |
|
|
|
|
|
itemDetail.packQty = result.package.packQty |
|
|
|
|
|
itemDetail.labelQty = Number(result.label.qty); |
|
|
|
|
|
this.continueScan() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
calcHandleQty(this.detailSource); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
this.showErrorMessage(e.message) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
setData(result){ |
|
|
|
|
|
try { |
|
|
|
|
|
var packingNumber = result.label.packingNumber; |
|
|
|
|
|
var batch = result.label.batch; |
|
|
|
|
|
var qty = result.label.qty; |
|
|
|
|
|
var itemCode = result.label.itemCode; |
|
|
|
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
|
|
|
|
if (detail == undefined) { |
|
|
|
|
|
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") |
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); |
|
|
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); |
|
|
if (itemDetail == undefined) { |
|
|
if (itemDetail == undefined) { |
|
|
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】" + "不在列表中") |
|
|
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】" + "不在列表中") |
|
@ -257,12 +298,11 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
this.showErrorMessage(e.message) |
|
|
this.showErrorMessage(e.message) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
commit() { |
|
|
commit() { |
|
|
this.scanCount = getScanCount(this.subList); |
|
|
this.scanCount = getScanCount(this.subList); |
|
|
if (this.scanCount == 0) { |
|
|
if (this.scanCount == 0) { |
|
@ -326,6 +366,7 @@ |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
|
itemCodes.push(item.itemCode) |
|
|
itemCodes.push(item.itemCode) |
|
|
}) |
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
getManagementPrecisions(itemCodes, this.toLocationCode, res => { |
|
|
getManagementPrecisions(itemCodes, this.toLocationCode, res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|