更新没有usb打印机时调用云打印机
This commit is contained in:
@@ -46,17 +46,25 @@ const orderInfo = ref({})
|
||||
async function printEwmHandle() {
|
||||
try {
|
||||
printEwmLoading.value = true
|
||||
printStore.printInvoice({
|
||||
url: ewmInfo.value.wechat_url
|
||||
})
|
||||
// const res = await syjprintqrcode({
|
||||
// id: ewmInfo.value.id
|
||||
// })
|
||||
ElMessage.success('打印成功')
|
||||
showEwmDialog.value = false
|
||||
setTimeout(() => {
|
||||
printEwmLoading.value = false
|
||||
}, 1000)
|
||||
if (printStore.deviceNoteList.length) {
|
||||
printStore.printInvoice({
|
||||
url: ewmInfo.value.wechat_url
|
||||
})
|
||||
ElMessage.success('打印成功')
|
||||
showEwmDialog.value = false
|
||||
setTimeout(() => {
|
||||
printEwmLoading.value = false
|
||||
}, 1000)
|
||||
} else {
|
||||
const res = await syjprintqrcode({
|
||||
id: ewmInfo.value.id
|
||||
})
|
||||
ElMessage.success('打印成功')
|
||||
showEwmDialog.value = false
|
||||
setTimeout(() => {
|
||||
printEwmLoading.value = false
|
||||
}, 1000)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
printEwmLoading.value = false
|
||||
|
||||
Reference in New Issue
Block a user