From f81fdd9610f904dcbc0a8d253d3b528297524310 Mon Sep 17 00:00:00 2001 From: HIsheR Date: Fri, 16 Oct 2026 15:43:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(receipt):=20=E6=96=B0=E5=A2=9E=E7=A5=A8?= =?UTF-8?q?=E6=93=9A=E6=A8=A1=E6=9D=BF=E6=A8=A1=E7=B5=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 提供熱感紙與 A4 版型模板查詢,並同步模組註冊表 --- .ai/module-registry.md | 1 + src/modules/receipt-template.ts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/modules/receipt-template.ts diff --git a/.ai/module-registry.md b/.ai/module-registry.md index dc6d311..b034651 100644 --- a/.ai/module-registry.md +++ b/.ai/module-registry.md @@ -6,3 +6,4 @@ | --- | --- | --- | | cash-sale | src/modules/cash-sale.ts | 已註冊 | | pickup-point | src/modules/pickup-point.ts | 已註冊 | +| receipt-template | src/modules/receipt-template.ts | 已註冊 | diff --git a/src/modules/receipt-template.ts b/src/modules/receipt-template.ts new file mode 100644 index 0000000..8c4db1f --- /dev/null +++ b/src/modules/receipt-template.ts @@ -0,0 +1,19 @@ +/** + * 票據模板模組(沙盤推演示意) + */ + +/** 票據版型識別碼 */ +export type ReceiptLayout = "thermal" | "a4"; + +/** 票據模板設定 */ +export interface ReceiptTemplate { + /** 模板唯一識別碼 */ + templateId: string; + /** 版型:熱感紙或 A4 */ + layout: ReceiptLayout; + /** 模板標題,顯示於票據頂部 */ + headerText: string; +} + +/** 依版型查詢可用模板 */ +export const listTemplates = (layout: ReceiptLayout): ReceiptTemplate[] => [];