Skip to content

Commit f086b9c

Browse files
committed
修复指定发放优惠券显示
1 parent fc0de84 commit f086b9c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/views/mall/promotion/coupon/formatter.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ export const discountFormat = (row: CouponTemplateVO) => {
1616

1717
// 格式化【领取上限】
1818
export const takeLimitCountFormat = (row: CouponTemplateVO) => {
19-
if (row.takeLimitCount === -1) {
20-
return '无领取限制'
19+
if(row.takeLimitCount){
20+
if (row.takeLimitCount === -1) {
21+
return '无领取限制'
22+
}
23+
return `${row.takeLimitCount} 张/人`
24+
}else{
25+
return ' '
2126
}
22-
return `${row.takeLimitCount} 张/人`
27+
2328
}
2429

2530
// 格式化【有效期限】

0 commit comments

Comments
 (0)