feat(pl): 按单据类型限制打印项并调整送(提)货单布局

按入库/出库/直销限制可打印单据;送(提)货单信息区改为一行布局,物料表增加单据编号列,并修正条款列宽与类型多选不换行。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-07-26 21:05:11 +08:00
1 parent 1e2e8ab0fc
commit 70bdd820ce
4 files changed
+367 -191

No files matched your search

+19
View File
@@ -184,6 +184,25 @@ export function getPlPlanTypeLabel(type?: string) {
return type ? map[type] || type : '—'
}
/** 打印单据下拉项:入库单 / 送(提)货单 / 分装单 */
export type PlPrintSlipCommand = 'inbound' | 'delivery' | 'subpack'
/**
* 按运输计划单据类型返回可打印的单据命令。
* - inbound:仅入库单
* - outbound:送(提)货单、分装单
* - direct / 其他:不可打印
*/
export function getPrintableSlipCommands(planType?: string): PlPrintSlipCommand[] {
if (planType === 'inbound') return ['inbound']
if (planType === 'outbound') return ['delivery', 'subpack']
return []
}
export function canPrintSlipCommand(planType: string | undefined, command: PlPrintSlipCommand) {
return getPrintableSlipCommands(planType).includes(command)
}
export type PlPlanTypeTab = 'all' | 'inbound' | 'outbound' | 'direct'
export const PL_PLAN_TYPE_TABS: { label: string; name: PlPlanTypeTab }[] = [