diff --git a/src/api/mall/promotion/reward/rewardActivity.ts b/src/api/mall/promotion/reward/rewardActivity.ts
index f3cc999f..c45ba893 100644
--- a/src/api/mall/promotion/reward/rewardActivity.ts
+++ b/src/api/mall/promotion/reward/rewardActivity.ts
@@ -21,11 +21,10 @@ export interface RewardRule {
limit?: number
discountPrice?: number
freeDelivery?: boolean
- givePoint?: boolean
- point?: number
- giveCoupon?: boolean
- couponIds?: number[]
- couponCounts?: number[]
+ point: number
+ giveCoupons?: {
+ [key: number]: number
+ }
}
// 新增满减送活动
diff --git a/src/views/mall/promotion/coupon/components/CouponSelect.vue b/src/views/mall/promotion/coupon/components/CouponSelect.vue
index c7dc3b86..e5ac86a2 100644
--- a/src/views/mall/promotion/coupon/components/CouponSelect.vue
+++ b/src/views/mall/promotion/coupon/components/CouponSelect.vue
@@ -33,32 +33,6 @@
/>
-
-
-
-
-
-
-
-
@@ -118,13 +92,6 @@
-
()
const emit = defineEmits<{
(e: 'update:multipleSelection', v: CouponTemplateApi.CouponTemplateVO[]): void
@@ -170,10 +137,8 @@ const queryParams = reactive({
pageNo: 1,
pageSize: 10,
name: null,
- status: null,
discountType: null,
- type: null,
- createTime: []
+ canTakeTypes: null
})
const queryFormRef = ref() // 搜索的表单
const selectedCouponList = ref([]) // 选择的数据
@@ -183,6 +148,7 @@ const getList = async () => {
loading.value = true
try {
// 执行查询
+ queryParams.canTakeTypes = [props.takeType] as any
const data = await CouponTemplateApi.getCouponTemplatePage(queryParams)
list.value = data.list
total.value = data.total
diff --git a/src/views/mall/promotion/rewardActivity/RewardForm.vue b/src/views/mall/promotion/rewardActivity/RewardForm.vue
index 6556a156..852fb976 100644
--- a/src/views/mall/promotion/rewardActivity/RewardForm.vue
+++ b/src/views/mall/promotion/rewardActivity/RewardForm.vue
@@ -17,6 +17,7 @@
:start-placeholder="t('common.startTimeText')"
range-separator="-"
type="datetimerange"
+ value-format="x"
/>
@@ -146,6 +147,7 @@ const submitForm = async () => {
// 时间段转换
data.startTime = data.startAndEndTime![0]
data.endTime = data.startAndEndTime![1]
+ delete data.startAndEndTime
// 规则元转分
data.rules.forEach((item) => {
item.discountPrice = yuanToFen(item.discountPrice || 0)
diff --git a/src/views/mall/promotion/rewardActivity/components/RewardRule.vue b/src/views/mall/promotion/rewardActivity/components/RewardRule.vue
index a4bb8542..d365dace 100644
--- a/src/views/mall/promotion/rewardActivity/components/RewardRule.vue
+++ b/src/views/mall/promotion/rewardActivity/components/RewardRule.vue
@@ -47,13 +47,7 @@
送积分:
-
-
+
送
+
+ 当赠送积分为 0 时,表示不赠送积分
+
送优惠券:
-
-
+
@@ -120,11 +107,7 @@ const addRule = () => {
limit: 0,
discountPrice: 0,
freeDelivery: false,
- givePoint: false,
- point: 0,
- giveCoupon: false,
- couponIds: [],
- couponCounts: []
+ point: 0
})
}
@@ -134,14 +117,6 @@ const setRuleCoupon = () => {
return
}
- // 情况一:不赠送优惠券
- formData.value.rules.forEach((rule) => {
- if (!rule.giveCoupon) {
- rule.couponIds = []
- rule.couponCounts = []
- }
- })
- // 情况二:赠送优惠券
rewardRuleCouponSelectRef.value?.forEach((item) => item.setGiveCouponList())
}
diff --git a/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponSelect.vue b/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponSelect.vue
index fba04e81..e629b32c 100644
--- a/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponSelect.vue
+++ b/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponSelect.vue
@@ -1,6 +1,8 @@
添加优惠卷
-
+
+ 当没有选择优惠券时,表示不赠送优惠券
+
-
+