From 870a1c44e87b4b13f5ecb6cac118f88a447d3909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=97=B4=E8=B4=A7?= <252048765@qq.com> Date: Sat, 14 Sep 2024 20:29:38 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E3=80=90=E6=B7=BB=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E4=BC=98=E6=83=A0=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../discountActivity/discountActivity.data.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/views/mall/promotion/discountActivity/discountActivity.data.ts b/src/views/mall/promotion/discountActivity/discountActivity.data.ts index a4c93ffb..d79dcab7 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', From fbed29100f97324d4d2c661c59776d3156753609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=97=B4=E8=B4=A7?= <252048765@qq.com> Date: Sat, 14 Sep 2024 20:30:16 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E3=80=90BUG=E3=80=91=E6=BB=A1=E5=87=8F?= =?UTF-8?q?=E6=BB=A1=E8=B6=B3=E5=A4=9A=E5=B0=91=E5=85=83=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=85=83=E8=BD=AC=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/promotion/rewardActivity/RewardForm.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/mall/promotion/rewardActivity/RewardForm.vue b/src/views/mall/promotion/rewardActivity/RewardForm.vue index 9a48d857..0f61c00e 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) }) formData.value = data @@ -150,6 +151,7 @@ const submitForm = async () => { delete data.startAndEndTime // 规则元转分 data.rules.forEach((item) => { + item.limit = yuanToFen(item.limit || 0) item.discountPrice = yuanToFen(item.discountPrice || 0) }) // 设置商品范围 From 4d25dda7fdc950c03f074d34fb5c9e29411957fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=97=B4=E8=B4=A7?= <252048765@qq.com> Date: Sun, 15 Sep 2024 16:27:12 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E6=BB=A1=E5=87=8F=E9=80=81=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B4=BB=E5=8A=A8=E8=8C=83=E5=9B=B4=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E3=80=81=E4=BF=AE=E6=94=B9=E7=8A=B6=E6=80=81=E4=B8=BA?= =?UTF-8?q?COMMON=5FSTATUS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/promotion/reward/rewardActivity.ts | 12 ++++++------ src/views/mall/promotion/rewardActivity/index.vue | 7 ++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/api/mall/promotion/reward/rewardActivity.ts b/src/api/mall/promotion/reward/rewardActivity.ts index 7d426953..e9f95ed8 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/views/mall/promotion/rewardActivity/index.vue b/src/views/mall/promotion/rewardActivity/index.vue index 95f63fb9..544420e1 100644 --- a/src/views/mall/promotion/rewardActivity/index.vue +++ b/src/views/mall/promotion/rewardActivity/index.vue @@ -27,7 +27,7 @@ placeholder="请选择活动状态" > + + + Date: Sun, 15 Sep 2024 16:31:23 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91=E4=BC=98=E5=8C=96=E9=99=90=E6=97=B6=E6=BB=A1?= =?UTF-8?q?=E5=87=8F=E7=9A=84=E9=87=91=E9=A2=9D=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E4=B8=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/promotion/discountActivity/DiscountActivityForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/mall/promotion/discountActivity/DiscountActivityForm.vue b/src/views/mall/promotion/discountActivity/DiscountActivityForm.vue index 2f2b441b..ac25eea8 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 From c697824b09e4e525ac4d24112f635feab8492a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=97=B4=E8=B4=A7?= <252048765@qq.com> Date: Sun, 15 Sep 2024 16:33:55 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=95=86=E5=93=81=E7=AE=80=E4=BB=8B=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A3=85=E4=BF=AE=E4=B8=BB=E9=A1=B5=E5=95=86?= =?UTF-8?q?=E5=93=81=E4=BB=B7=E6=A0=BC=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DiyEditor/components/mobile/ProductCard/index.vue | 2 +- src/views/mall/product/spu/form/InfoForm.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/DiyEditor/components/mobile/ProductCard/index.vue b/src/components/DiyEditor/components/mobile/ProductCard/index.vue index 78ad84f3..25f8cb87 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) }} From fc0de84d782e6a32ed01cc8d3d643d7c905664ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=97=B4=E8=B4=A7?= <252048765@qq.com> Date: Sun, 15 Sep 2024 16:36:05 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=A3=85=E4=BF=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BC=98=E6=83=A0=E5=88=B8=E5=8F=AA=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=9B=B4=E6=8E=A5=E9=A2=86=E5=8F=96=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/promotion/coupon/components/CouponSelect.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/mall/promotion/coupon/components/CouponSelect.vue b/src/views/mall/promotion/coupon/components/CouponSelect.vue index e5ac86a2..b568fa1c 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([]) // 选择的数据 From f086b9c32b172016341126f9fa54e120b89c4ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=97=B4=E8=B4=A7?= <252048765@qq.com> Date: Sun, 15 Sep 2024 16:37:35 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E5=8F=91=E6=94=BE=E4=BC=98=E6=83=A0=E5=88=B8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/promotion/coupon/formatter.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/mall/promotion/coupon/formatter.ts b/src/views/mall/promotion/coupon/formatter.ts index 56b11402..d7382e69 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} 张/人` + } // 格式化【有效期限】