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