fix CustomerPackageDetail.vue style

This commit is contained in:
Timi
2026-09-02 00:57:35 +08:00
parent 3713539c85
commit f430f8ecd4
8 changed files with 381 additions and 203 deletions
+15
View File
@@ -5,6 +5,7 @@ import type {
DeliveryStatus,
FundOperationType,
FundRecordStatus,
GaoCustomerPackage,
PackageConfigStatus,
PaymentStatus,
RefundStatus
@@ -117,6 +118,20 @@ export function getPackageItemAvailableQuantity(item: CustomerPackageItem): stri
return getPackageQuantityText(item.availableQuantity);
}
/** 判断套餐是否存在可用于发放的已核销收款。免费套餐可直接发放。 */
export function canCreatePackageDelivery(customerPackage?: Pick<GaoCustomerPackage, "saleAmount" | "paidAmount">): boolean {
const saleAmount = customerPackage?.saleAmount || 0;
const paidAmount = customerPackage?.paidAmount || 0;
return saleAmount === 0 || 0 < paidAmount;
}
/** 判断未付清套餐的发放操作是否必须由店长执行。 */
export function isStoreManagerRequiredForPackageDelivery(customerPackage?: Pick<GaoCustomerPackage, "saleAmount" | "paidAmount">): boolean {
const saleAmount = customerPackage?.saleAmount || 0;
const paidAmount = customerPackage?.paidAmount || 0;
return 0 < paidAmount && paidAmount < saleAmount;
}
function toQuantityParts(value: number | string): { value: bigint; scale: number } | undefined {
const normalized = normalizePackageQuantity(value);
if (!normalized) {