From e9263c3828c09070120433d291ed343831305120 Mon Sep 17 00:00:00 2001 From: HIsheR Date: Fri, 16 Oct 2026 15:52:12 +0800 Subject: [PATCH 01/13] =?UTF-8?q?feat(warehouse):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=80=89=E5=BA=AB=E6=A8=99=E7=B1=A4=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 版本驗收後追加的需求,直接併入既有版本分支 7.2.0.4,不新開版本號 --- src/modules/warehouse-label.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/modules/warehouse-label.ts diff --git a/src/modules/warehouse-label.ts b/src/modules/warehouse-label.ts new file mode 100644 index 0000000..f4b9004 --- /dev/null +++ b/src/modules/warehouse-label.ts @@ -0,0 +1,17 @@ +/** + * 倉庫標籤模組(沙盤推演示意) + * 屬於 7.2.0.4 版本驗收後追加的需求,不新開版本號 + */ + +/** 倉庫標籤設定 */ +export interface WarehouseLabel { + /** 倉庫識別碼 */ + warehouseId: string; + /** 標籤顯示名稱 */ + label: string; + /** 標籤顏色代碼,如 #4a9eea */ + color: string; +} + +/** 依倉庫查詢標籤設定 */ +export const getLabel = (warehouseId: string): WarehouseLabel | null => null; From be693bbc66acc2ffaac50ea06d075528e4242189 Mon Sep 17 00:00:00 2001 From: HIsheR Date: Fri, 16 Oct 2026 15:52:24 +0800 Subject: [PATCH 02/13] =?UTF-8?q?docs(release):=20=E8=A3=9C=E5=AF=AB=207.2?= =?UTF-8?q?.0.4=20=E8=BF=BD=E5=8A=A0=E9=9C=80=E6=B1=82=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=A5=E8=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 沿用既有版本號,追加節不覆寫既有節次 --- .ai/history/release-notes.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.ai/history/release-notes.md b/.ai/history/release-notes.md index 6dc3ecd..38dd783 100644 --- a/.ai/history/release-notes.md +++ b/.ai/history/release-notes.md @@ -24,3 +24,11 @@ - 匯出服務改用獨立匯出域名 - 影響範圍:`src/modules/print-sequence.ts` 與 `src/main.ts` 的匯出端點參數;匯出端點與主分支的例外參數調整落在同一行,併入主分支時需逐側比對(不可盲目採用單側);不涉及後端同步 - 公告短文:本版新增列印序號自動遞增,並將匯出服務切換至獨立域名,出單列印與匯出更穩定。 + +## 7.2.0.4 追加(未新增版本號|推送日期:2026-10-16) + +- 版本分支名:7.2.0.4(沿用既有版本號,追加需求直接併入;不切新版本分支) +- 更新項清單: + - 新增倉庫標籤設定,可依倉庫查詢標籤名稱與顏色 +- 影響範圍:`src/modules/warehouse-label.ts`;本次為版本驗收後追加,影響範圍限於倉庫標籤顯示;不涉及後端同步、無破壞性變更 +- 公告短文:本版追加倉庫標籤設定,倉庫名稱與顏色可依設定顯示。 From cd78d5c8e136073e88295081c082b46d21fa2869 Mon Sep 17 00:00:00 2001 From: dev-b Date: Fri, 16 Oct 2026 15:52:58 +0800 Subject: [PATCH 03/13] =?UTF-8?q?feat(receipt):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=A5=A8=E6=93=9A=E6=89=B9=E9=87=8F=E5=88=97=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 由第二開發者開發,暫推遠端以便與第一開發者共享協作 --- src/modules/receipt-batch-print.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/modules/receipt-batch-print.ts diff --git a/src/modules/receipt-batch-print.ts b/src/modules/receipt-batch-print.ts new file mode 100644 index 0000000..8751782 --- /dev/null +++ b/src/modules/receipt-batch-print.ts @@ -0,0 +1,20 @@ +/** + * 票據批量列印模組(沙盤推演示意) + * 由第二開發者在共享功能分支 feature/receipt-batch-print 上開發 + */ + +/** 單筆批量列印工作 */ +export interface BatchPrintJob { + /** 使用的票據模板識別碼 */ + templateId: string; + /** 目標倉庫識別碼 */ + warehouseId: string; +} + +/** + * 建立批量列印工作清單 + * @param templateId - 票據模板識別碼 + * @param warehouseIds - 目標倉庫識別碼清單 + * @returns 逐倉庫展開的列印工作 + */ +export const createBatchJobs = (templateId: string, warehouseIds: string[]): BatchPrintJob[] => warehouseIds.map((id) => ({ templateId, warehouseId: id })); From c0874a127f8c6da969d7396faaf7d22f9200d392 Mon Sep 17 00:00:00 2001 From: HIsheR Date: Fri, 16 Oct 2026 15:53:23 +0800 Subject: [PATCH 04/13] =?UTF-8?q?feat(receipt):=20=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=88=97=E5=8D=B0=E5=B7=A5=E4=BD=9C=E4=BE=9D=E5=80=89=E5=BA=AB?= =?UTF-8?q?=E4=BB=A3=E7=A2=BC=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第一開發者接續第二開發者的共享分支 --- src/modules/receipt-batch-print.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/receipt-batch-print.ts b/src/modules/receipt-batch-print.ts index 8751782..49fd20c 100644 --- a/src/modules/receipt-batch-print.ts +++ b/src/modules/receipt-batch-print.ts @@ -15,6 +15,6 @@ export interface BatchPrintJob { * 建立批量列印工作清單 * @param templateId - 票據模板識別碼 * @param warehouseIds - 目標倉庫識別碼清單 - * @returns 逐倉庫展開的列印工作 + * @returns 逐倉庫展開的列印工作(依倉庫代碼排序) */ -export const createBatchJobs = (templateId: string, warehouseIds: string[]): BatchPrintJob[] => warehouseIds.map((id) => ({ templateId, warehouseId: id })); +export const createBatchJobs = (templateId: string, warehouseIds: string[]): BatchPrintJob[] => [...warehouseIds].sort().map((id) => ({ templateId, warehouseId: id })); From e2f8f5619a314f72b7cae31486ed405ae311093a Mon Sep 17 00:00:00 2001 From: dev-b Date: Fri, 16 Oct 2026 15:53:40 +0800 Subject: [PATCH 05/13] =?UTF-8?q?feat(receipt):=20=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=88=97=E5=8D=B0=E6=BF=BE=E9=99=A4=E7=A9=BA=E5=80=89=E5=BA=AB?= =?UTF-8?q?=E4=BB=A3=E7=A2=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第二開發者本地提交,尚未推遠端 --- src/modules/receipt-batch-print.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/receipt-batch-print.ts b/src/modules/receipt-batch-print.ts index 8751782..cb9e9e8 100644 --- a/src/modules/receipt-batch-print.ts +++ b/src/modules/receipt-batch-print.ts @@ -15,6 +15,6 @@ export interface BatchPrintJob { * 建立批量列印工作清單 * @param templateId - 票據模板識別碼 * @param warehouseIds - 目標倉庫識別碼清單 - * @returns 逐倉庫展開的列印工作 + * @returns 逐倉庫展開的列印工作(濾除空倉庫代碼) */ -export const createBatchJobs = (templateId: string, warehouseIds: string[]): BatchPrintJob[] => warehouseIds.map((id) => ({ templateId, warehouseId: id })); +export const createBatchJobs = (templateId: string, warehouseIds: string[]): BatchPrintJob[] => warehouseIds.filter((id) => id !== "").map((id) => ({ templateId, warehouseId: id })); From 4aa66ca865d9ff1995460c2f8a53e100dcc30760 Mon Sep 17 00:00:00 2001 From: dev-b Date: Fri, 16 Oct 2026 15:54:43 +0800 Subject: [PATCH 06/13] =?UTF-8?q?docs(release):=20=E8=A3=9C=E5=AF=AB=207.2?= =?UTF-8?q?.0.4=20=E8=BF=BD=E5=8A=A0=E9=9C=80=E6=B1=82=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=A5=E8=AA=8C=EF=BC=88=E5=8D=94=E4=BD=9C=E8=80=85=20B?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 推送前完成,內容與本次提交一致 --- .ai/history/release-notes.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.ai/history/release-notes.md b/.ai/history/release-notes.md index 38dd783..bb88c6c 100644 --- a/.ai/history/release-notes.md +++ b/.ai/history/release-notes.md @@ -32,3 +32,12 @@ - 新增倉庫標籤設定,可依倉庫查詢標籤名稱與顏色 - 影響範圍:`src/modules/warehouse-label.ts`;本次為版本驗收後追加,影響範圍限於倉庫標籤顯示;不涉及後端同步、無破壞性變更 - 公告短文:本版追加倉庫標籤設定,倉庫名稱與顏色可依設定顯示。 + +## 7.2.0.4 追加(協作者 B|推送日期:2026-10-16) + +- 版本分支名:7.2.0.4(沿用既有版本號;本次由第二位開發者在共享功能分支上完成後併入) +- 更新項清單: + - 新增票據批量列印,可依模板與倉庫清單展開列印工作 + - 批量列印濾除空倉庫代碼,並依倉庫代碼排序 +- 影響範圍:`src/modules/receipt-batch-print.ts`;共享功能分支曾暫推遠端供協作,驗收後隨即刪除遠端分支;不涉及後端同步、無破壞性變更 +- 公告短文:本版追加票據批量列印,可一次依多個倉庫展開列印工作。 From edf5cf6d366f6cd5cbe053d8e321f2360dadbb02 Mon Sep 17 00:00:00 2001 From: HIsheR Date: Fri, 16 Oct 2026 15:55:56 +0800 Subject: [PATCH 07/13] =?UTF-8?q?feat(receipt):=20=E7=A5=A8=E6=93=9A?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=96=B0=E5=A2=9E=E9=A0=81=E5=B0=BE=E6=96=87?= =?UTF-8?q?=E5=AD=97=E6=AC=84=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 同時收緊標題欄位的必填語意說明 --- src/modules/receipt-template.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/receipt-template.ts b/src/modules/receipt-template.ts index 8c4db1f..2da1254 100644 --- a/src/modules/receipt-template.ts +++ b/src/modules/receipt-template.ts @@ -11,8 +11,10 @@ export interface ReceiptTemplate { templateId: string; /** 版型:熱感紙或 A4 */ layout: ReceiptLayout; - /** 模板標題,顯示於票據頂部 */ + /** 模板標題,顯示於票據頂部(熱感紙版型必填) */ headerText: string; + /** 票據頁尾文字,顯示於票據底部 */ + footerText: string; } /** 依版型查詢可用模板 */ From 1dd7efd1b0ab9036f293a7f4c973111784f4bd8e Mon Sep 17 00:00:00 2001 From: HIsheR Date: Fri, 16 Oct 2026 15:56:14 +0800 Subject: [PATCH 08/13] =?UTF-8?q?feat(receipt):=20=E7=A5=A8=E6=93=9A?= =?UTF-8?q?=E6=A8=99=E9=A1=8C=E6=94=B9=E7=82=BA=E5=8F=AF=E9=81=B8=E4=B8=A6?= =?UTF-8?q?=E5=B8=B6=E5=85=A5=E9=96=80=E5=BA=97=E5=90=8D=E7=A8=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 與另一功能分支同時改動同一欄位說明 --- src/modules/receipt-template.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/receipt-template.ts b/src/modules/receipt-template.ts index 8c4db1f..a3ef75a 100644 --- a/src/modules/receipt-template.ts +++ b/src/modules/receipt-template.ts @@ -11,8 +11,8 @@ export interface ReceiptTemplate { templateId: string; /** 版型:熱感紙或 A4 */ layout: ReceiptLayout; - /** 模板標題,顯示於票據頂部 */ - headerText: string; + /** 模板標題,顯示於票據頂部(留空則帶入門店名稱) */ + headerText?: string; } /** 依版型查詢可用模板 */ From 5520767f2e9662b459525d6bae0ef1e4a12406b0 Mon Sep 17 00:00:00 2001 From: HIsheR Date: Fri, 16 Oct 2026 15:56:59 +0800 Subject: [PATCH 09/13] =?UTF-8?q?feat(stock-count):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=9B=A4=E9=BB=9E=E5=B7=AE=E7=95=B0=E5=A0=B1=E8=A1=A8=E5=BD=99?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 前置功能分支 F1,供後續匯出功能依賴 --- src/modules/stock-count.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/modules/stock-count.ts b/src/modules/stock-count.ts index a5f7444..ab86ed8 100644 --- a/src/modules/stock-count.ts +++ b/src/modules/stock-count.ts @@ -18,3 +18,18 @@ export interface StockCountDiff { * @returns 實盤減帳面的差異值 */ export const diffQty = (diff: StockCountDiff): number => diff.countedQty - diff.bookQty; + +/** 盤點差異報表列 */ +export interface StockCountReportRow { + /** 物料識別碼 */ + materialId: string; + /** 該物料的差異量 */ + diff: number; +} + +/** + * 依盤點資料彙整差異報表 + * @param diffs - 盤點差異清單 + * @returns 逐物料的差異報表列 + */ +export const buildReport = (diffs: StockCountDiff[]): StockCountReportRow[] => diffs.map((diff) => ({ materialId: diff.materialId, diff: diffQty(diff) })); From fef87731bd2630f952c10b638b00af635d3e8ecd Mon Sep 17 00:00:00 2001 From: HIsheR Date: Fri, 16 Oct 2026 15:57:17 +0800 Subject: [PATCH 10/13] =?UTF-8?q?feat(stock-count):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=B7=AE=E7=95=B0=E5=A0=B1=E8=A1=A8=20CSV=20=E5=8C=AF=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit F2 依賴前置功能分支 F1 的報表列型別 --- src/modules/stock-count.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/stock-count.ts b/src/modules/stock-count.ts index ab86ed8..8207b89 100644 --- a/src/modules/stock-count.ts +++ b/src/modules/stock-count.ts @@ -33,3 +33,10 @@ export interface StockCountReportRow { * @returns 逐物料的差異報表列 */ export const buildReport = (diffs: StockCountDiff[]): StockCountReportRow[] => diffs.map((diff) => ({ materialId: diff.materialId, diff: diffQty(diff) })); + +/** + * 將差異報表列轉為 CSV 字串(依賴 F1 的報表列型別) + * @param rows - 差異報表列 + * @returns 以換行分隔的 CSV 內容 + */ +export const toCsv = (rows: StockCountReportRow[]): string => rows.map((row) => `${row.materialId},${row.diff}`).join("\n"); From 81482928e39547d1e0b1000239c59c0bed13da48 Mon Sep 17 00:00:00 2001 From: HIsheR Date: Fri, 16 Oct 2026 15:57:53 +0800 Subject: [PATCH 11/13] =?UTF-8?q?docs(release):=20=E8=A3=9C=E5=AF=AB=207.2?= =?UTF-8?q?.0.4=20=E8=BF=BD=E5=8A=A0=E9=9C=80=E6=B1=82=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=A5=E8=AA=8C=EF=BC=88=E4=BA=A4=E5=8F=89=E8=88=87=E4=BE=9D?= =?UTF-8?q?=E8=B3=B4=E5=89=8D=E7=BD=AE=E6=89=B9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 本地先寫日誌,尚未推送 --- .ai/history/release-notes.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.ai/history/release-notes.md b/.ai/history/release-notes.md index bb88c6c..98782eb 100644 --- a/.ai/history/release-notes.md +++ b/.ai/history/release-notes.md @@ -41,3 +41,14 @@ - 批量列印濾除空倉庫代碼,並依倉庫代碼排序 - 影響範圍:`src/modules/receipt-batch-print.ts`;共享功能分支曾暫推遠端供協作,驗收後隨即刪除遠端分支;不涉及後端同步、無破壞性變更 - 公告短文:本版追加票據批量列印,可一次依多個倉庫展開列印工作。 + +## 7.2.0.4 追加(交叉與依賴前置批|推送日期:2026-10-16) + +- 版本分支名:7.2.0.4(沿用既有版本號;本批含交叉功能分支與依賴前置功能) +- 更新項清單: + - 票據模板新增頁尾文字欄位 + - 票據標題改為可選,留空時帶入門店名稱(熱感紙版型仍需有值) + - 盤點差異報表彙整(前置功能) + - 盤點差異報表 CSV 匯出(依賴前述報表彙整) +- 影響範圍:`src/modules/receipt-template.ts`、`src/modules/stock-count.ts`;兩個票據模板功能分支交叉改動同一欄位,合併時逐側比對並折中兩側語意;CSV 匯出必須在前置報表併入版本分支後才可併入,順序顛倒會把未驗收的前置功能一併帶入;不涉及後端同步 +- 公告短文:本版追加票據頁尾與標題預設規則,並提供盤點差異報表與 CSV 匯出。 From 0cf57038bf8091244f42b63375ead148ac07e453 Mon Sep 17 00:00:00 2001 From: dev-b Date: Fri, 16 Oct 2026 15:58:13 +0800 Subject: [PATCH 12/13] =?UTF-8?q?feat(warehouse):=20=E8=A3=9C=E4=B8=8A?= =?UTF-8?q?=E5=80=89=E5=BA=AB=E6=A8=99=E7=B1=A4=E9=A0=90=E8=A8=AD=E9=A1=8F?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第二位開發者補強第一位開發者建立的文件 --- src/modules/warehouse-label.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/warehouse-label.ts b/src/modules/warehouse-label.ts index f4b9004..fb2f1d2 100644 --- a/src/modules/warehouse-label.ts +++ b/src/modules/warehouse-label.ts @@ -13,5 +13,8 @@ export interface WarehouseLabel { color: string; } +/** 預設標籤顏色(未設定顏色時使用) */ +export const DEFAULT_LABEL_COLOR = "#4a9eea"; + /** 依倉庫查詢標籤設定 */ export const getLabel = (warehouseId: string): WarehouseLabel | null => null; From 7af31e093c887876f37918f833212a7cd9259eef Mon Sep 17 00:00:00 2001 From: dev-b Date: Fri, 16 Oct 2026 15:58:14 +0800 Subject: [PATCH 13/13] =?UTF-8?q?docs(release):=20=E8=A3=9C=E5=AF=AB=207.2?= =?UTF-8?q?.0.4=20=E8=BF=BD=E5=8A=A0=E9=9C=80=E6=B1=82=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=A5=E8=AA=8C=EF=BC=88=E5=8D=94=E4=BD=9C=E8=80=85=20B?= =?UTF-8?q?=E3=83=BB=E7=AC=AC=E4=BA=8C=E6=89=B9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 推送前完成 --- .ai/history/release-notes.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.ai/history/release-notes.md b/.ai/history/release-notes.md index bb88c6c..30dec62 100644 --- a/.ai/history/release-notes.md +++ b/.ai/history/release-notes.md @@ -41,3 +41,11 @@ - 批量列印濾除空倉庫代碼,並依倉庫代碼排序 - 影響範圍:`src/modules/receipt-batch-print.ts`;共享功能分支曾暫推遠端供協作,驗收後隨即刪除遠端分支;不涉及後端同步、無破壞性變更 - 公告短文:本版追加票據批量列印,可一次依多個倉庫展開列印工作。 + +## 7.2.0.4 追加(協作者 B・第二批|推送日期:2026-10-16) + +- 版本分支名:7.2.0.4(沿用既有版本號;本次推送發生在第一開發者合併進行中,兩人的日誌節互為交叉) +- 更新項清單: + - 倉庫標籤補上預設顏色常數,未設定顏色時使用 +- 影響範圍:`src/modules/warehouse-label.ts`(原由第一開發者建立,本次由第二位開發者補強);不涉及後端同步、無破壞性變更 +- 公告短文:本版補上倉庫標籤的預設顏色,未設定時不再顯示為空。