查价参考价提示与可选尺寸;下单尺寸必填及查价带入;待排货状态展示;货物属性/启用状态工具化及相关页面更新。 Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
427 B
TypeScript
16 lines
427 B
TypeScript
/** 客户状态 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
|
||
}
|