From a6591401f7f2ed6a9386a23abefabdfb75711b40 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 23 Aug 2024 10:16:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=89=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=AE=8C=E5=B7=A5=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/fg/receiptByPlan.vue | 37 ++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/pages/fg/receiptByPlan.vue b/src/pages/fg/receiptByPlan.vue index 7d509303..3e93c9cc 100644 --- a/src/pages/fg/receiptByPlan.vue +++ b/src/pages/fg/receiptByPlan.vue @@ -489,15 +489,21 @@ let _this = this batchPrintingLable(number).then(resLable => { console.log('batchPrintingLable', resLable) - const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712` - const webData = { - token: storage.getStorage(storage.constant.token), - asn_number: resLable.data + uni.hideLoading() + if(resLable.data){ + const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712` + const webData = { + token: storage.getStorage(storage.constant.token), + asn_number: resLable.data + } + uni.navigateTo({ + url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}` + }); + }else { + _this.showErrorMessage(number+"批量打印标签 H5失败") } - uni.navigateTo({ - url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}` - }); }).catch(error => { + uni.hideLoading() _this.showErrorMessage(error) }) }, @@ -520,13 +526,28 @@ _this.showErrorMessage('包装号不能为空!') return } + uni.showLoading({ + title:"正在获取打印信息", + mask:true + }) getBalanceToPackage({ packingNumber: packingNumber.join(',') }).then(res => { console.log('PC打印', res) - _this.getH5BatchPrintingLable(res.data.number) + if(res.data&&res.data.number){ + _this.getH5BatchPrintingLable(res.data.number) + }else { + uni.hideLoading() + var hint ="" + packingNumber.forEach(item=>{ + hint+=item + }) + hint+"根据库存余额获取包装信息" + _this.showErrorMessage(hint) + } }).catch(error => { + uni.hideLoading() _this.showErrorMessage(error) }) // #endif