小票全部采用本地usb打印
This commit is contained in:
@@ -25,6 +25,8 @@ import { ElMessage } from 'element-plus'
|
||||
import { reactive, ref } from 'vue'
|
||||
import { issuedby, carsubinvoicing, syjprintqrcode } from '@/api/invoice.js'
|
||||
import { useUser } from "@/store/user.js";
|
||||
import { usePrint } from "@/store/print.js";
|
||||
const printStore = usePrint();
|
||||
const store = useUser();
|
||||
|
||||
const emits = defineEmits(['loadComplete', 'success'])
|
||||
@@ -44,12 +46,17 @@ const orderInfo = ref({})
|
||||
async function printEwmHandle() {
|
||||
try {
|
||||
printEwmLoading.value = true
|
||||
const res = await syjprintqrcode({
|
||||
id: ewmInfo.value.id
|
||||
printStore.printInvoice({
|
||||
url: ewmInfo.value.wechat_url
|
||||
})
|
||||
// const res = await syjprintqrcode({
|
||||
// id: ewmInfo.value.id
|
||||
// })
|
||||
ElMessage.success('打印成功')
|
||||
showEwmDialog.value = false
|
||||
printEwmLoading.value = false
|
||||
setTimeout(() => {
|
||||
printEwmLoading.value = false
|
||||
}, 1000)
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
printEwmLoading.value = false
|
||||
|
||||
Reference in New Issue
Block a user