update customer package
This commit is contained in:
+1
-13
@@ -1,8 +1,4 @@
|
||||
import type {
|
||||
CustomerPackageItem,
|
||||
CustomerPackageStatus,
|
||||
PackageConfigStatus
|
||||
} from "@/types/Package";
|
||||
import type { PackageConfigStatus } from "@/types/Package";
|
||||
import type { FundOperationType, FundRecordStatus } from "@/types/SalesOrder";
|
||||
|
||||
/** 生成套餐业务幂等请求号。每次新操作必须重新生成。 */
|
||||
@@ -80,10 +76,6 @@ export function getPackageConfigStatusText(status?: PackageConfigStatus): string
|
||||
return ({ DRAFT: "草稿", ACTIVE: "启用", INACTIVE: "停用" } as Record<string, string>)[status || ""] || "未知";
|
||||
}
|
||||
|
||||
export function getCustomerPackageStatusText(status?: CustomerPackageStatus): string {
|
||||
return ({ ACTIVE: "进行中", FULFILLED: "已履约", CANCELLED: "已取消" } as Record<string, string>)[status || ""] || "未知";
|
||||
}
|
||||
|
||||
export function getFundOperationText(type?: FundOperationType): string {
|
||||
return ({ RECEIVE: "线下收款", REFUND: "退款", CONFIRM_NO_REFUND: "确认无需退款", REVOKE: "资金冲正" } as Record<string, string>)[type || ""] || "未知";
|
||||
}
|
||||
@@ -92,10 +84,6 @@ export function getFundStatusText(status?: FundRecordStatus): string {
|
||||
return ({ PENDING: "待核销", VERIFIED: "已核销", REJECTED: "已拒绝", CANCELLED: "已撤销" } as Record<string, string>)[status || ""] || "未知";
|
||||
}
|
||||
|
||||
export function getPackageItemAvailableQuantity(item: CustomerPackageItem): string {
|
||||
return getPackageQuantityText(item.availableQuantity);
|
||||
}
|
||||
|
||||
function toQuantityParts(value: number | string): { value: bigint; scale: number } | undefined {
|
||||
const normalized = normalizePackageQuantity(value);
|
||||
if (!normalized) {
|
||||
|
||||
Reference in New Issue
Block a user