更新没有usb打印机时调用云打印机

This commit is contained in:
gyq
2024-08-02 17:54:52 +08:00
parent f8c5c9bf59
commit ac469cbc32
7 changed files with 323 additions and 178 deletions

View File

@@ -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