From d7963ff62bbacb55a54ba91971360bc3f2851140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com> Date: Tue, 12 Nov 2024 19:44:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20putaway\job=20scrap\job=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=BF=AE=E6=94=B9=20Vue2=E5=8D=87=E7=BA=A7Vue3=2010/2?= =?UTF-8?q?5-11-11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/putaway/job/putawayDetail.vue | 12 +- src/pages/putaway/job/putawayJob.vue | 3 +- src/pages/scrap/job/scrapJobDetail.vue | 185 +++++++++++++++++++++++- 3 files changed, 185 insertions(+), 15 deletions(-) diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue index 4c3abd5f..26b3e518 100644 --- a/src/pages/putaway/job/putawayDetail.vue +++ b/src/pages/putaway/job/putawayDetail.vue @@ -52,7 +52,9 @@ import { ref, getCurrentInstance, nextTick } from 'vue' import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' import { getManagementPrecisions } from '@/common/balance.js' - +import { + calc +} from '@/common/calc' import { getPutawayJobDetail, putawayJobSubmit, takePutawayJob, cancleTakePutawayJob, getSwitchByCode } from '@/api/request2.js' import { goHome, getCurrDateTime, getPackingNumberAndBatch, navigateBack, compareAsc, getSwitchInfoByCode } from '@/common/basic.js' @@ -226,7 +228,7 @@ const continueScan = () => { } } const updateData = () => { - // calcTreeHandleQty(detailSource.value) + calcTreeHandleQty(detailSource.value) } // 模拟扫描功能 const openScanPopupSimulate = (message) => { @@ -329,7 +331,7 @@ const getScanResult = (result,managementPrecision) => { if (isExit == undefined) { showErrorMessage(`箱码【${packingNumber}】,批次【${batch}】库位【${result.fromLocationCode}】不在列表中`) } else if (!isExit.cancleScanedHiht && isExit.scaned) { - showMessage(`箱码【${packingNumber}】已经扫描`) + isExit.handleQty = calc.add(Number(result.label.qty),isExit.handleQty) } else { isExit.scaned = true let qty = 0 @@ -353,7 +355,7 @@ const getScanResult = (result,managementPrecision) => { }) itemDetail.fromInventoryStatus = result.balance.inventoryStatus if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList.length) { - showMessage(`箱码【${packingNumber}】已经扫描`) + itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty) } else { itemDetail.scaned = true @@ -365,9 +367,9 @@ const getScanResult = (result,managementPrecision) => { pac.handleQty = Number(pac.qty) pac.toLocationCode = toLocationCode.value }) - calcTreeHandleQty(detailSource.value) continueScan() } + calcTreeHandleQty(detailSource.value) } } } diff --git a/src/pages/putaway/job/putawayJob.vue b/src/pages/putaway/job/putawayJob.vue index f6e3241c..3840f66c 100644 --- a/src/pages/putaway/job/putawayJob.vue +++ b/src/pages/putaway/job/putawayJob.vue @@ -139,11 +139,10 @@ const getList = (type) => { uni.hideLoading() if (type === 'refresh') { uni.stopPullDownRefresh() - if(manageModel.value!='BY_BATCH'){ + if(manageModel != 'BY_BATCH'){ openScanPopup() } } - const { list } = res.data totalCount.value = res.data.total updateTitle(`${title.value}(${totalCount.value})`) diff --git a/src/pages/scrap/job/scrapJobDetail.vue b/src/pages/scrap/job/scrapJobDetail.vue index d813a805..a11fd4f1 100644 --- a/src/pages/scrap/job/scrapJobDetail.vue +++ b/src/pages/scrap/job/scrapJobDetail.vue @@ -1,7 +1,7 @@