1.手机扫码下单打印标签

2.PC桌面端下单打印标签
3.无需打开叫号窗口扫码叫号取餐
This commit is contained in:
gyq
2024-06-22 17:29:34 +08:00
parent 44495c3ee7
commit 328b512411
13 changed files with 212 additions and 50 deletions

View File

@@ -318,8 +318,10 @@ function checkLabelPrint(props) {
let sum = 0
props.skuInfos.map(item => {
for (let i = 0; i < item.num; i++) {
sum++
if (pids.some(el => el == item.categoryId)) {
for (let i = 0; i < item.num; i++) {
sum++
}
}
})
@@ -350,9 +352,11 @@ const printLabel = lodash.throttle(function (list) {
if (!checkLocalPrint(printLabelList.value[0].config.deviceName)) {
ElMessage.error("本地打印机无法使用,请检查打印机是否正确连接");
} else {
list.map(item => {
ipcRenderer.send('printerTagSync', JSON.stringify(item))
})
for (let i = 0; i <= list.length - 1; i++) {
setTimeout(() => {
ipcRenderer.send('printerTagSync', JSON.stringify(list[i]))
}, i * 1000)
}
}
}, 1500, { leading: true, trailing: false })