merge(receipt): 略過停用倉庫併入版本分支 7.2.0.4
交叉衝突逐側比對:保留 B 的份數參數與 A 的停用倉庫過濾
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* @Author: HIsheR shawn1440982358@163.com
|
||||
* @Date: 2026-10-16 15:53:11
|
||||
* @LastEditTime: 2026-10-16 16:03:50
|
||||
* @Description:
|
||||
*/
|
||||
/**
|
||||
* 票據批量列印模組(沙盤推演示意)
|
||||
* 由第二位開發者在其本地功能分支開發;功能分支不推遠端
|
||||
@@ -16,6 +22,7 @@ export interface BatchPrintJob {
|
||||
* @param templateId - 票據模板識別碼
|
||||
* @param warehouseIds - 目標倉庫識別碼清單
|
||||
* @param copies - 每個倉庫的列印份數,預設 1 份
|
||||
* @returns 逐倉庫展開的列印工作(先濾除空倉庫代碼,再依倉庫代碼排序)
|
||||
* @param disabledIds - 已停用倉庫識別碼清單,命中者不列入列印
|
||||
* @returns 逐倉庫展開的列印工作(先濾除空倉庫代碼與停用倉庫,再依倉庫代碼排序,並展開指定份數)
|
||||
*/
|
||||
export const createBatchJobs = (templateId: string, warehouseIds: string[], copies = 1): BatchPrintJob[] => warehouseIds.filter((id) => id !== "").sort().flatMap((id) => Array.from({ length: copies }, () => ({ templateId, warehouseId: id })));
|
||||
export const createBatchJobs = (templateId: string, warehouseIds: string[], copies = 1, disabledIds: string[] = []): BatchPrintJob[] => warehouseIds.filter((id) => id !== "" && !disabledIds.includes(id)).sort().flatMap((id) => Array.from({ length: copies }, () => ({ templateId, warehouseId: id })));
|
||||
|
||||
Reference in New Issue
Block a user