From 46bcb0c92039868674c6c9512b853b84510f4601 Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Mon, 23 Dec 2024 18:14:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E5=87=BA=E5=BA=93bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/picking/outbound/code-outScan.vue | 11 +++-------- src/pages/picking/outbound/code-outbound.vue | 17 +++++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/pages/picking/outbound/code-outScan.vue b/src/pages/picking/outbound/code-outScan.vue index a56af06..458ea62 100644 --- a/src/pages/picking/outbound/code-outScan.vue +++ b/src/pages/picking/outbound/code-outScan.vue @@ -110,15 +110,10 @@ const scanStart = () => { onlyFromCamera: true, scanType: ['qrCode', 'pdf417'], success: (res) => { - console.log('扫码结果:' + res.result) - queryCodeParams.value.maCode = res.result - }, - fail: (err) => { - // uni.showToast({ - // title: '取消', - // icon: 'none' - // }); + console.log('扫码结果:' + res.result) + queryCodeParams.value.maCode = res.result.split("qrcode=")[1] }, + fail: (err) => {}, }) // var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") diff --git a/src/pages/picking/outbound/code-outbound.vue b/src/pages/picking/outbound/code-outbound.vue index b87a742..8c235b2 100644 --- a/src/pages/picking/outbound/code-outbound.vue +++ b/src/pages/picking/outbound/code-outbound.vue @@ -234,14 +234,15 @@ const boxOutBound = async () => { } } +const maxNum = ref(0) // 计算出库最大数量 -const maxNum = computed(() => { - // 1. 先通过预领数量和已领数量计算剩余待出库数量 - const waitNum = queryParams.value.preNum - queryParams.value.alNum - codeNum.value +// const maxNum = computed(() => { +// // 1. 先通过预领数量和已领数量计算剩余待出库数量 +// const waitNum = queryParams.value.preNum - queryParams.value.alNum - // 2. 判断库存数量是否大于待出库数量 如大于则取待出库数量 如小于则取库存书看了 - return total.value > waitNum ? waitNum : total.value -}) +// // 2. 判断库存数量是否大于待出库数量 如大于则取待出库数量 如小于则取库存书看了 +// return total.value > waitNum ? waitNum : total.value +// }) // 获取编码列表 const getCodeDeviceListData = async () => { @@ -370,10 +371,10 @@ onLoad((options) => { uni.$on('onUpdate', (num) => { console.log('监听事件', num) codeNum.value = num + }) - console.log('options', options.queryParams) queryParams.value = JSON.parse(options.queryParams) - console.log('22222222', queryParams.value) + maxNum.value = queryParams.value.preNum - queryParams.value.alNum queryCodeParams.value.typeId = queryParams.value.typeId getCodeDeviceListData() })