Browse Source

打印数据bug

hella_online_20240829
zhang_li 3 months ago
parent
commit
ce63c3983d
  1. 26
      src/pages/purchaseReceipt/job/receiptDetail.vue

26
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -459,14 +459,15 @@
title: "提交成功,将跳转到打印页面", title: "提交成功,将跳转到打印页面",
mask: true mask: true
}); });
// //
let timerCount = 0 let timerCount = 0
const timer1 = setInterval(async ()=>{ const timer1 = setInterval(async ()=>{
if(timerCount == 10){ if(timerCount == 15){
clearInterval(timer1) clearInterval(timer1)
uni.showLoading({ uni.showToast({
title: "跳转打印页面失败", title: "跳转打印页面失败",
mask: true icon: "none"
}); });
return; return;
} }
@ -474,22 +475,21 @@
filters: [{ filters: [{
column: "purchaseReceiptRecordNumber", column: "purchaseReceiptRecordNumber",
action: "in", action: "in",
value: res.data value: res.data.number
}], }],
pageNo: 1, pageNo: 1,
pageSize: 1000, pageSize: 1000,
}).then(res=>{ }).then(res1=>{
timerCount = timerCount + 1 timerCount = timerCount + 1
console.log(11111) if(res1.data && res1.data.list&&res1.data.list.length&&(res1.data.total >= res.data.detailCount)){
if(res.data && res.data.list&&res.data.list.length){
uni.hideLoading() uni.hideLoading()
clearInterval(timer1) clearInterval(timer1)
const dataParams = { const dataParams = {
toLocationCode: res.data.list[0].toLocationCode, toLocationCode: res1.data.list[0].toLocationCode,
number: res.data.list[0].number, number: res1.data.list[0].number,
creator: res.data.list[0].creator, creator: res1.data.list[0].creator,
createTime: res.data.list[0].createTime, createTime: res1.data.list[0].createTime,
ids : res.data.list.map(item=>item.masterId).join(',') ids : res1.data.list.map(item=>item.masterId).join(',')
} }
console.log(dataParams) console.log(dataParams)
uni.navigateTo({ uni.navigateTo({
@ -497,7 +497,7 @@
}) })
} }
}) })
},1000) },2000)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")

Loading…
Cancel
Save