merge(receipt): 批量列印併入版本分支 7.2.0.4(未新增版本號)
This commit is contained in:
@@ -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.filter((id) => id !== "").sort().map((id) => ({ templateId, warehouseId: id }));
|
||||||
Reference in New Issue
Block a user