From 40f44fc78e1df31c93766a4ee67805e06d655188 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 3 Oct 2023 13:01:31 +0800 Subject: [PATCH] =?UTF-8?q?promotion=EF=BC=9A=E4=BC=98=E5=8C=96=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=8A=B5=E7=9A=84=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/promotion/coupon/formatter.ts | 2 +- src/views/mall/promotion/coupon/index.vue | 16 +++++--- .../mall/promotion/coupon/template/index.vue | 39 +++++++++---------- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/views/mall/promotion/coupon/formatter.ts b/src/views/mall/promotion/coupon/formatter.ts index 2b0ba7c6..f00138a6 100644 --- a/src/views/mall/promotion/coupon/formatter.ts +++ b/src/views/mall/promotion/coupon/formatter.ts @@ -9,7 +9,7 @@ export const discountFormat = (row: CouponTemplateVO) => { return `¥${floatToFixed2(row.discountPrice)}` } if (row.discountType === PromotionDiscountTypeEnum.PERCENT.type) { - return `${row.discountPrice}%` + return `${row.discountPercent}%` } return '未知【' + row.discountType + '】' } diff --git a/src/views/mall/promotion/coupon/index.vue b/src/views/mall/promotion/coupon/index.vue index 9f81edf2..6108a75d 100755 --- a/src/views/mall/promotion/coupon/index.vue +++ b/src/views/mall/promotion/coupon/index.vue @@ -19,7 +19,7 @@ @keyup="handleQuery" /> - + - - - - + + + + + + @@ -109,6 +114,7 @@ import { deleteCoupon, getCouponPage } from '@/api/mall/promotion/coupon/coupon' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' +import { discountFormat } from '@/views/mall/promotion/coupon/formatter' defineOptions({ name: 'PromotionCoupon' }) diff --git a/src/views/mall/promotion/coupon/template/index.vue b/src/views/mall/promotion/coupon/template/index.vue index ad0077ce..cd7cad40 100755 --- a/src/views/mall/promotion/coupon/template/index.vue +++ b/src/views/mall/promotion/coupon/template/index.vue @@ -19,7 +19,7 @@ @keyup="handleQuery" /> - + 新增 - - 会员优惠劵 - @@ -86,17 +78,29 @@ - - + + + + + + + + -