提交
This commit is contained in:
1 parent
b74d483682
commit
dd1acdc787
50 files changed
+636156
-7218
No files matched your search
@@ -130,6 +130,24 @@ export function getPlanProductActualQuantity(product: {
|
||||
return String(qty)
|
||||
}
|
||||
|
||||
/** 列表「入库数量」列 */
|
||||
export function getPlanProductInboundQuantity(product: {
|
||||
inboundQty?: number | string | null
|
||||
}) {
|
||||
const qty = product.inboundQty
|
||||
if (qty === undefined || qty === null || qty === '') return '—'
|
||||
return String(qty)
|
||||
}
|
||||
|
||||
/** 列表「出库数量」列 */
|
||||
export function getPlanProductOutboundQuantity(product: {
|
||||
outboundQty?: number | string | null
|
||||
}) {
|
||||
const qty = product.outboundQty
|
||||
if (qty === undefined || qty === null || qty === '') return '—'
|
||||
return String(qty)
|
||||
}
|
||||
|
||||
export function formatPlanProductListText(
|
||||
product: {
|
||||
productName?: string
|
||||
@@ -306,20 +324,18 @@ export function getPlPlanTypeLabel(type?: string) {
|
||||
/** 打印单据下拉项:入库单 / 送(提)货单 / 分装单 */
|
||||
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 const PL_PRINT_SLIP_COMMANDS: PlPrintSlipCommand[] = ['inbound', 'delivery', 'subpack']
|
||||
|
||||
export function getPrintableSlipCommands(_planType?: string): PlPrintSlipCommand[] {
|
||||
return PL_PRINT_SLIP_COMMANDS
|
||||
}
|
||||
|
||||
export function canPrintSlipCommand(planType: string | undefined, command: PlPrintSlipCommand) {
|
||||
return getPrintableSlipCommands(planType).includes(command)
|
||||
export function canPrintSlipCommand(
|
||||
_planType: string | undefined,
|
||||
_command: PlPrintSlipCommand
|
||||
) {
|
||||
return true
|
||||
}
|
||||
|
||||
export type PlPlanTypeTab = 'all' | 'inbound' | 'outbound' | 'direct'
|
||||
|
||||
Reference in new issue
Block a user