Commit 3beab62e by linjinhong

fix:podcn待发货单打面单添加日志消息,排查打印面单问题

parent 64ed1a8b
......@@ -484,11 +484,14 @@ async function barcodeInput() {
barcode.value = ''
isLock.value = true
console.log('noObj', noObj.value)
/* 如果存在未提交数据,先提交再拉新包裹 */
const keys = Object.keys(noObj.value)
if (keys.length) {
const pending = noObj.value[+keys[0]]
console.log('pending', pending)
await submitInspection(pending, async () => {
await inputActive()
await getPackingData(code)
......@@ -498,6 +501,7 @@ async function barcodeInput() {
await inputActive()
await getPackingData(code)
}
isLock.value = false
}
async function submitInspection(objs?: OrderData, callback?: () => void) {
const result = objs ? objs : testingData.value
......@@ -586,15 +590,15 @@ async function printFile(data: OrderData) {
}
function printOrderOne(item: OrderData): Promise<void> {
return new Promise((resolve) => {
/* 已有文件路径 / 数据 → 直接打印 */
if (item.filePath || item.fileData) {
props.printOrder(item, (v) => {
// item.printStatus = v
console.log('printOrder', v)
resolve()
})
return
}
// /* 已有文件路径 / 数据 → 直接打印 */
// if (item.filePath || item.fileData) {
// props.printOrder(item, (v) => {
// // item.printStatus = v
// console.log('printOrder', v)
// resolve()
// })
// return
// }
/* 无文件 → 先拉取再打印 */
const loading = ElLoading.service({ background: 'rgba(0,0,0,.3)' })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment