front/src/utils/customerStatus.ts
zzh 76d8b473b6 feat: 查价下单加固、待排货 UI 与 EnableStatus 对齐
查价参考价提示与可选尺寸;下单尺寸必填及查价带入;待排货状态展示;货物属性/启用状态工具化及相关页面更新。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 19:00:56 +08:00

16 lines
427 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/** 客户状态 CustomerStatus:0=None,1=Disabled,2=Normal,3=Frozen */
export const CUSTOMER_STATUS = {
none: 0,
disabled: 1,
normal: 2,
frozen: 3,
} as const
export function isCustomerStatusNormal(value: unknown): boolean {
return Number(value) === CUSTOMER_STATUS.normal
}
export function toCustomerStatus(enabled: boolean): number {
return enabled ? CUSTOMER_STATUS.normal : CUSTOMER_STATUS.disabled
}