【功能修复】商城:指定发卷、新人卷,支持无限发放的兜底

This commit is contained in:
YunaiV
2024-09-11 20:55:38 +08:00
parent 8d116599b1
commit 9d0e77b624
3 changed files with 22 additions and 2 deletions

View File

@@ -33,8 +33,19 @@ export const validityTypeFormat = (row: CouponTemplateVO) => {
return '未知【' + row.validityType + '】'
}
// 格式化【totalCount】
export const totalCountFormat = (row: CouponTemplateVO) => {
if (row.totalCount === -1) {
return '不限制'
}
return row.totalCount
}
// 格式化【剩余数量】
export const remainedCountFormat = (row: CouponTemplateVO) => {
if (row.totalCount === -1) {
return '不限制'
}
return row.totalCount - row.takeCount
}