优化小票打印

This commit is contained in:
gyq
2024-07-31 18:14:23 +08:00
parent 49cabfed21
commit f393299f0f
11 changed files with 88 additions and 161 deletions

View File

@@ -178,12 +178,12 @@ const printData = reactive({
}
],
amount: '30.00',
remark: '',
remark: '给我多放点辣椒,谢谢老板',
orderInfo: {
masterId: '#002',
orderNo: '202404021023542223445'
},
deviceName: form.value.config.deviceName,
deviceName: '',
createdAt: '2024-04-02 10:15',
printTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
});
@@ -203,8 +203,9 @@ function printHandle() {
return;
}
printDataLoading.value = true
printData.deviceName = form.value.config.deviceName
printData.printTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
printStore.pushReceiptData(printData)
printStore.pushReceiptData(printData, false)
setTimeout(() => {
printDataLoading.value = false
}, 1500)

View File

@@ -125,6 +125,7 @@ const printHandle = _.throttle(async function () {
const data = {
shop_name: store.userInfo.shopName,
loginAccount: store.userInfo.loginAccount,
isBefore: true,
carts: props.cart,
amount: props.amount,
remark: props.remark,

View File

@@ -212,10 +212,12 @@ const exit = async () => {
data = await handoverData({
id: infoData.value.id
})
data.printTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
data.printShop = isPrint.value
printStore.printWork(data)
// return
await loginlogout({
status: 1
})