feat:【mall 商城】优惠劵-领取记录(100% antd)

This commit is contained in:
YunaiV
2025-10-16 23:04:33 +08:00
parent 1394688364
commit 47a6a7284c
3 changed files with 41 additions and 43 deletions

View File

@@ -6,7 +6,7 @@ import {
} from '@vben/constants';
import { floatToFixed2, formatDate } from '@vben/utils';
// 格式化【优惠金额/折扣】
/** 格式化【优惠金额/折扣】 */
export function discountFormat(row: MallCouponTemplateApi.CouponTemplate) {
if (row.discountType === PromotionDiscountTypeEnum.PRICE.type) {
return `¥${floatToFixed2(row.discountPrice)}`;
@@ -17,7 +17,7 @@ export function discountFormat(row: MallCouponTemplateApi.CouponTemplate) {
return `未知【${row.discountType}`;
}
// 格式化【领取上限】
/** 格式化【领取上限】 */
export function takeLimitCountFormat(
row: MallCouponTemplateApi.CouponTemplate,
) {
@@ -31,7 +31,7 @@ export function takeLimitCountFormat(
}
}
// 格式化【有效期限】
/** 格式化【有效期限】 */
export function validityTypeFormat(row: MallCouponTemplateApi.CouponTemplate) {
if (row.validityType === CouponTemplateValidityTypeEnum.DATE.type) {
return `${formatDate(row.validStartTime)}${formatDate(row.validEndTime)}`;
@@ -42,7 +42,7 @@ export function validityTypeFormat(row: MallCouponTemplateApi.CouponTemplate) {
return `未知【${row.validityType}`;
}
// 格式化【totalCount】
/** 格式化【totalCount】 */
export function totalCountFormat(row: MallCouponTemplateApi.CouponTemplate) {
if (row.totalCount === -1) {
return '不限制';
@@ -50,7 +50,7 @@ export function totalCountFormat(row: MallCouponTemplateApi.CouponTemplate) {
return row.totalCount;
}
// 格式化【剩余数量】
/** 格式化【剩余数量】 */
export function remainedCountFormat(row: MallCouponTemplateApi.CouponTemplate) {
if (row.totalCount === -1) {
return '不限制';
@@ -58,7 +58,7 @@ export function remainedCountFormat(row: MallCouponTemplateApi.CouponTemplate) {
return row.totalCount - row.takeCount;
}
// 格式化【最低消费】
/** 格式化【最低消费】 */
export function usePriceFormat(row: MallCouponTemplateApi.CouponTemplate) {
return `¥${floatToFixed2(row.usePrice)}`;
}