Browse Source

修改按计划完工错误提示

hella_online_20240823
lijuncheng 5 months ago
parent
commit
a6591401f7
  1. 21
      src/pages/fg/receiptByPlan.vue

21
src/pages/fg/receiptByPlan.vue

@ -489,6 +489,8 @@
let _this = this let _this = this
batchPrintingLable(number).then(resLable => { batchPrintingLable(number).then(resLable => {
console.log('batchPrintingLable', resLable) console.log('batchPrintingLable', resLable)
uni.hideLoading()
if(resLable.data){
const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712` const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712`
const webData = { const webData = {
token: storage.getStorage(storage.constant.token), token: storage.getStorage(storage.constant.token),
@ -497,7 +499,11 @@
uni.navigateTo({ uni.navigateTo({
url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}` url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}`
}); });
}else {
_this.showErrorMessage(number+"批量打印标签 H5失败")
}
}).catch(error => { }).catch(error => {
uni.hideLoading()
_this.showErrorMessage(error) _this.showErrorMessage(error)
}) })
}, },
@ -520,13 +526,28 @@
_this.showErrorMessage('包装号不能为空!') _this.showErrorMessage('包装号不能为空!')
return return
} }
uni.showLoading({
title:"正在获取打印信息",
mask:true
})
getBalanceToPackage({ getBalanceToPackage({
packingNumber: packingNumber.join(',') packingNumber: packingNumber.join(',')
}).then(res => { }).then(res => {
console.log('PC打印', res) console.log('PC打印', res)
if(res.data&&res.data.number){
_this.getH5BatchPrintingLable(res.data.number) _this.getH5BatchPrintingLable(res.data.number)
}else {
uni.hideLoading()
var hint =""
packingNumber.forEach(item=>{
hint+=item
})
hint+"根据库存余额获取包装信息"
_this.showErrorMessage(hint)
}
}).catch(error => { }).catch(error => {
uni.hideLoading()
_this.showErrorMessage(error) _this.showErrorMessage(error)
}) })
// #endif // #endif

Loading…
Cancel
Save