diff --git a/src/views/mall/promotion/coupon/formatter.ts b/src/views/mall/promotion/coupon/formatter.ts
index f00138a6..56b11402 100644
--- a/src/views/mall/promotion/coupon/formatter.ts
+++ b/src/views/mall/promotion/coupon/formatter.ts
@@ -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
}
diff --git a/src/views/mall/promotion/coupon/template/CouponTemplateForm.vue b/src/views/mall/promotion/coupon/template/CouponTemplateForm.vue
index 28e15c72..58a88126 100644
--- a/src/views/mall/promotion/coupon/template/CouponTemplateForm.vue
+++ b/src/views/mall/promotion/coupon/template/CouponTemplateForm.vue
@@ -115,6 +115,7 @@
直接领取
指定发放
+ 新人卷
@@ -309,7 +310,9 @@ const submitForm = async () => {
validEndTime:
formData.value.validTimes && formData.value.validTimes.length === 2
? formData.value.validTimes[1]
- : undefined
+ : undefined,
+ totalCount: formData.value.takeType === 1 ? formData.value.totalCount : -1,
+ takeLimitCount: formData.value.takeType === 1 ? formData.value.takeLimitCount : -1
} as unknown as CouponTemplateApi.CouponTemplateVO
// 设置商品范围
diff --git a/src/views/mall/promotion/coupon/template/index.vue b/src/views/mall/promotion/coupon/template/index.vue
index 657ceada..bc121ead 100755
--- a/src/views/mall/promotion/coupon/template/index.vue
+++ b/src/views/mall/promotion/coupon/template/index.vue
@@ -109,7 +109,12 @@
prop="validityType"
width="185"
/>
-
+