1.手机扫码下单打印标签
2.PC桌面端下单打印标签 3.无需打开叫号窗口扫码叫号取餐
This commit is contained in:
@@ -179,8 +179,10 @@ function checkLabelPrint(props) {
|
||||
let sum = 0
|
||||
|
||||
props.carts.map(item => {
|
||||
for (let i = 0; i < item.number; i++) {
|
||||
sum++
|
||||
if (pids.some(el => el == item.categoryId)) {
|
||||
for (let i = 0; i < item.number; i++) {
|
||||
sum++
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -212,9 +214,11 @@ const printLabel = (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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,11 +240,11 @@ async function printHandle() {
|
||||
printTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
||||
};
|
||||
checkLabelPrint(data)
|
||||
if (!checkLocalPrint(printList.value[0].config.deviceName)) {
|
||||
ElMessage.error("本地打印机无法使用,请检查打印机是否正确连接3");
|
||||
} else {
|
||||
ipcRenderer.send("printerInfoSync", JSON.stringify(data));
|
||||
}
|
||||
// if (!checkLocalPrint(printList.value[0].config.deviceName)) {
|
||||
// ElMessage.error("本地小票打印机无法使用,请检查打印机是否正确连接3");
|
||||
// } else {
|
||||
// ipcRenderer.send("printerInfoSync", JSON.stringify(data));
|
||||
// }
|
||||
} else {
|
||||
// ElMessage.error("您还没有添加本地打印设备,将使用网络打印");
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user