优化会员支付,已会员价结算

This commit is contained in:
gyq
2025-03-19 18:29:46 +08:00
parent a101cc4fb7
commit 87e8976353
11 changed files with 177 additions and 70 deletions

View File

@@ -24,23 +24,25 @@ export const usePrint = defineStore("print", {
// 获取本地打印机
ipcRenderer.send("getPrintList");
ipcRenderer.on("printList", (event, arg) => {
// localPrintList.value = arg;
// console.log(localPrintList.value);
this.localDevices = arg;
});
// 获取已添加的打印机
const res = await printerList();
this.deviceNoteList = res.records.filter(
(item) => item.status && item.subType == "cash"
);
this.deviceLableList = res.records.filter(
(item) => item.status && item.subType == "label"
);
console.log("打印队列初始化成功", {
deviceNoteList: this.deviceNoteList,
deviceLableList: this.deviceLableList,
});
try {
// 获取已添加的打印机
const res = await printerList();
this.deviceNoteList = res.records.filter(
(item) => item.status && item.subType == "cash"
);
this.deviceLableList = res.records.filter(
(item) => item.status && item.subType == "label"
);
console.log("打印队列初始化成功", {
deviceNoteList: this.deviceNoteList,
deviceLableList: this.deviceLableList,
});
} catch (error) {
console.error("获取已添加的打印机列表失败", error);
}
},
// 检查本地打印机是否能正常使用
checkLocalPrint(address) {