deliver Hongfa Laundry M1 desktop release

This commit is contained in:
manpengan
2026-04-23 16:50:24 +08:00
parent 20595a7545
commit 7deea00495
66 changed files with 19586 additions and 69 deletions

12
src/main/ipc/printer.ts Normal file
View File

@@ -0,0 +1,12 @@
import { IdSchema } from "../../shared/schemas";
import { OrderService } from "../services/orderService";
import { PrinterService } from "../services/printerService";
import { registerIpcHandler } from "./helpers";
export function registerPrinterIpc(): void {
registerIpcHandler("printer:printReceipt", IdSchema, async (orderId) => {
const order = await OrderService.findById(orderId);
if (!order) throw new Error("订单不存在");
return await PrinterService.printReceipt(order);
});
}