From a02712ca9509fe2bbac0c5028cc9303a1a32deee Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 23 Aug 2024 18:28:37 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E3=80=91=E5=95=86=E5=9F=8E=EF=BC=9A=E6=BB=A1=E5=87=8F=E9=80=81?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/promotion/reward/rewardActivity.ts | 7 ++++--- src/views/mall/promotion/rewardActivity/RewardForm.vue | 1 + .../promotion/rewardActivity/components/RewardRule.vue | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/api/mall/promotion/reward/rewardActivity.ts b/src/api/mall/promotion/reward/rewardActivity.ts index af7390dc..f3cc999f 100644 --- a/src/api/mall/promotion/reward/rewardActivity.ts +++ b/src/api/mall/promotion/reward/rewardActivity.ts @@ -9,10 +9,11 @@ export interface RewardActivityVO { remark?: string conditionType?: number productScope?: number - productScopeValues?: number[] // 商品范围:值为 品类编号列表 或 商品编号列表 ,用于提交 - productCategoryIds?: number[] // 仅用于表单,不提交 - productSpuIds?: number[] // 仅用于表单,不提交 rules: RewardRule[] + // 如下仅用于表单,不提交 + productScopeValues?: number[] // 商品范围:值为品类编号列表、商品编号列表 + productCategoryIds?: number[] + productSpuIds?: number[] } // 优惠规则 diff --git a/src/views/mall/promotion/rewardActivity/RewardForm.vue b/src/views/mall/promotion/rewardActivity/RewardForm.vue index 46ad2ff1..7be3a53f 100644 --- a/src/views/mall/promotion/rewardActivity/RewardForm.vue +++ b/src/views/mall/promotion/rewardActivity/RewardForm.vue @@ -169,6 +169,7 @@ const getProductScope = async () => { formData.value.productSpuIds = formData.value.productScopeValues break case PromotionProductScopeEnum.CATEGORY.scope: + // TODO @puhui999:可以直接 await nextTick() 呀。 await nextTick(() => { let productCategoryIds = formData.value.productScopeValues as any if (Array.isArray(productCategoryIds) && productCategoryIds.length > 0) { diff --git a/src/views/mall/promotion/rewardActivity/components/RewardRule.vue b/src/views/mall/promotion/rewardActivity/components/RewardRule.vue index 2d3f37e9..861115a9 100644 --- a/src/views/mall/promotion/rewardActivity/components/RewardRule.vue +++ b/src/views/mall/promotion/rewardActivity/components/RewardRule.vue @@ -19,6 +19,7 @@ placeholder="" type="number" /> + {{ PromotionConditionTypeEnum.PRICE.type === formData.conditionType ? '元' : '件' }} @@ -26,6 +27,7 @@ 订单金额优惠 减 + ()