diff --git a/src/api/mall/promotion/reward/rewardActivity.ts b/src/api/mall/promotion/reward/rewardActivity.ts
index 7d426953aa8d56dc70d9d5beaaea74850667adca..e9f95ed808f4ad51f104f5d9b166a26619147f01 100644
--- a/src/api/mall/promotion/reward/rewardActivity.ts
+++ b/src/api/mall/promotion/reward/rewardActivity.ts
@@ -47,12 +47,12 @@ export const getReward = async (id: number) => {
return await request.get({ url: '/promotion/reward-activity/get?id=' + id })
}
-// 关闭拼团活动
-export const closeRewardActivity = async (id: number) => {
- return await request.put({ url: '/promotion/reward-activity/close?id=' + id })
-}
-
-// 删除限时折扣活动
+// 删除满减送活动
export const deleteRewardActivity = async (id: number) => {
return await request.delete({ url: '/promotion/reward-activity/delete?id=' + id })
}
+
+// 关闭满减送活动
+export const closeRewardActivity = async (id: number) => {
+ return await request.put({ url: '/promotion/reward-activity/close?id=' + id })
+}
diff --git a/src/components/DiyEditor/components/mobile/ProductCard/index.vue b/src/components/DiyEditor/components/mobile/ProductCard/index.vue
index 78ad84f35935d639dc96a1fc2f65ac59728a103a..25f8cb87a28ad9c076e9ce1899889c1b617df830 100644
--- a/src/components/DiyEditor/components/mobile/ProductCard/index.vue
+++ b/src/components/DiyEditor/components/mobile/ProductCard/index.vue
@@ -67,7 +67,7 @@
class="text-16px"
:style="{ color: property.fields.price.color }"
>
- ¥{{ fenToYuan(spu.price) }}
+ ¥{{ fenToYuan(spu.price as any) }}
diff --git a/src/views/mall/promotion/coupon/components/CouponSelect.vue b/src/views/mall/promotion/coupon/components/CouponSelect.vue
index e5ac86a2bbd0ef0244235b98f18fefed286557d4..b568fa1c68698fe97e680403394e055e1d7a7187 100644
--- a/src/views/mall/promotion/coupon/components/CouponSelect.vue
+++ b/src/views/mall/promotion/coupon/components/CouponSelect.vue
@@ -138,7 +138,7 @@ const queryParams = reactive({
pageSize: 10,
name: null,
discountType: null,
- canTakeTypes: null
+ canTakeTypes:[1]//只获得直接领取的券
})
const queryFormRef = ref() // 搜索的表单
const selectedCouponList = ref([]) // 选择的数据
diff --git a/src/views/mall/promotion/coupon/formatter.ts b/src/views/mall/promotion/coupon/formatter.ts
index 56b114020f85b4f68cfd4fb31c58d423c194a4cb..d7382e69907ecc3d3855c6b62daf4ea0d4872997 100644
--- a/src/views/mall/promotion/coupon/formatter.ts
+++ b/src/views/mall/promotion/coupon/formatter.ts
@@ -16,10 +16,15 @@ export const discountFormat = (row: CouponTemplateVO) => {
// 格式化【领取上限】
export const takeLimitCountFormat = (row: CouponTemplateVO) => {
- if (row.takeLimitCount === -1) {
- return '无领取限制'
+ if(row.takeLimitCount){
+ if (row.takeLimitCount === -1) {
+ return '无领取限制'
+ }
+ return `${row.takeLimitCount} 张/人`
+ }else{
+ return ' '
}
- return `${row.takeLimitCount} 张/人`
+
}
// 格式化【有效期限】
diff --git a/src/views/mall/promotion/discountActivity/DiscountActivityForm.vue b/src/views/mall/promotion/discountActivity/DiscountActivityForm.vue
index 2f2b441b9c58e5995a7377e74a2f7f482e40eb2c..ac25eea82d37088a41e7d63e89ee8561338235c5 100644
--- a/src/views/mall/promotion/discountActivity/DiscountActivityForm.vue
+++ b/src/views/mall/promotion/discountActivity/DiscountActivityForm.vue
@@ -193,7 +193,7 @@ const submitForm = async () => {
const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig'))
products.forEach((item: DiscountActivityApi.DiscountProductVO) => {
item.discountPercent = convertToInteger(item.discountPercent)
- item.discountPrice = convertToInteger(item.discountPrice)
+ item.discountPrice = convertToInteger(yuanToFen(item.discountPrice))
})
const data = cloneDeep(formRef.value.formModel) as DiscountActivityApi.DiscountActivityVO
data.products = products
diff --git a/src/views/mall/promotion/discountActivity/discountActivity.data.ts b/src/views/mall/promotion/discountActivity/discountActivity.data.ts
index a4c93ffb5ec0b276c03ece58459ff488a0417729..d79dcab71b2aed87bf88459b3aa312c902c40957 100644
--- a/src/views/mall/promotion/discountActivity/discountActivity.data.ts
+++ b/src/views/mall/promotion/discountActivity/discountActivity.data.ts
@@ -72,6 +72,17 @@ const crudSchemas = reactive([
width: 120
}
},
+ {
+ label: '优惠类型',
+ field: 'discountType',
+ dictType: DICT_TYPE.PROMOTION_DISCOUNT_TYPE,
+ dictClass: 'number',
+ isSearch: true,
+ form: {
+ component: 'Radio',
+ value: 1
+ }
+ },
{
label: '活动商品',
field: 'spuId',
diff --git a/src/views/mall/promotion/rewardActivity/RewardForm.vue b/src/views/mall/promotion/rewardActivity/RewardForm.vue
index 64a2dd4a63ead6d85031f9cff11cbab7bdfb7de6..889fce985bb12787df3dea72828db5ed235f404b 100644
--- a/src/views/mall/promotion/rewardActivity/RewardForm.vue
+++ b/src/views/mall/promotion/rewardActivity/RewardForm.vue
@@ -118,6 +118,7 @@ const open = async (type: string, id?: number) => {
data.startAndEndTime = [data.startTime, data.endTime]
// 规则分转元
data.rules?.forEach((item: any) => {
+ item.limit = fenToYuan(item.limit || 0)
item.discountPrice = fenToYuan(item.discountPrice || 0)
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
item.limit = fenToYuan(item.limit || 0)
@@ -153,6 +154,7 @@ const submitForm = async () => {
delete data.startAndEndTime
// 规则元转分
data.rules.forEach((item) => {
+ item.limit = yuanToFen(item.limit || 0)
item.discountPrice = yuanToFen(item.discountPrice || 0)
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
item.limit = yuanToFen(item.limit || 0)
diff --git a/src/views/mall/promotion/rewardActivity/index.vue b/src/views/mall/promotion/rewardActivity/index.vue
index 95f63fb948dcd2d2e644fe9f652c47f2737ad99a..544420e17652f5dc567ae32d358c2cef4a5247bf 100644
--- a/src/views/mall/promotion/rewardActivity/index.vue
+++ b/src/views/mall/promotion/rewardActivity/index.vue
@@ -27,7 +27,7 @@
placeholder="请选择活动状态"
>
+
+
+
+
+