From 50f5d7deb296ad493e5815ab38f433f599b4df6a Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Thu, 29 Jan 2026 11:40:26 +0800
Subject: [PATCH] =?UTF-8?q?feat:h5=E9=A2=86=E5=8F=96=E9=A3=9F=E5=A0=82?=
=?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 2 +-
src/views/act/act-coupon-record/index.vue | 126 ++++++++++------------
src/views/act/act-coupon/index.vue | 9 +-
3 files changed, 63 insertions(+), 74 deletions(-)
diff --git a/package.json b/package.json
index 42327a2..8b784df 100644
--- a/package.json
+++ b/package.json
@@ -119,4 +119,4 @@
"type": "git",
"url": "https://gitee.com/log4j/pig"
}
-}
+}
\ No newline at end of file
diff --git a/src/views/act/act-coupon-record/index.vue b/src/views/act/act-coupon-record/index.vue
index 9967b13..c0f0a9a 100644
--- a/src/views/act/act-coupon-record/index.vue
+++ b/src/views/act/act-coupon-record/index.vue
@@ -3,21 +3,15 @@
-
-
+
+
-
-
-
-
+
+
-
-
-
-
-
-
-
+
+
查询
@@ -27,59 +21,71 @@
-
- 新 增
-
删除
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ Number(row.faceValue) }}%
+ ¥{{ displayPrice(row.faceValue) }}
+
+
+
+
+ {{ row.minPoint === '0' || row.minPoint === 0 ? '无门槛' : '满¥' +
+ displayPrice(row.minPoint) }}
+
+
+
-
+
-
-
+
+
-
+
+ {{ row.startTime }}
+ 至
+ {{ row.endTime }}
+
-
-
- {{ Number(row.faceValue) }}%
- ¥{{ formatFenToYuan(row.faceValue) }}
-
+
+
+
+
+
+ ¥{{ displayPrice(row.useAmount) }}
+
-
-
- {{ row.minPoint === '0' || row.minPoint === 0 ? '无门槛' : '满¥' +
- formatFenToYuan(row.minPoint) }}
-
-
-
-
-
-
-
- ¥{{ formatFenToYuan(row.useAmount) }}
-
-
+
+
+
删除
@@ -116,10 +122,14 @@
import { BasicTableProps, useTable } from "/@/hooks/table";
import * as actCouponRecordApi from '/@/api/act/act-coupon-record'
import { useMessage, useMessageBox } from "/@/hooks/message";
+import { displayPrice } from "/@/utils/formatMoney"
+import { useDict } from "/@/hooks/dict"
+
// 引入组件
// 定义查询字典
-
+const { act_coupon_type, act_coupon_record_status }
+ = useDict("act_coupon_type", "act_coupon_record_status")
// 定义变量内容
// 搜索变量
@@ -181,24 +191,6 @@ const handleDelete = async (ids: string[]) => {
}
};
-const coupon_type = [
- { label: '满减券', value: '1', elTagType: 'primary' },
- { label: '折扣券', value: '2', elTagType: 'success' },
- { label: '立减券', value: '3', elTagType: 'warning' },
- { label: '兑换券', value: '4', elTagType: 'info' }
-]
-const record_status = [
- { label: '未使用', value: '0', elTagType: 'info' },
- { label: '已使用', value: '1', elTagType: 'success' },
- { label: '已过期', value: '2', elTagType: 'warning' },
- { label: '已作废', value: '3', elTagType: 'danger' }
-]
-
-function formatFenToYuan(val: number | string) {
- const n = Number(val)
- if (isNaN(n)) return val as any
- return (n / 100).toFixed(2)
-}
const extendVisible = ref(false)
const extendForm = reactive({ id: '', currentEnd: '', newEnd: '' })
diff --git a/src/views/act/act-coupon/index.vue b/src/views/act/act-coupon/index.vue
index 22bb82d..37f1422 100644
--- a/src/views/act/act-coupon/index.vue
+++ b/src/views/act/act-coupon/index.vue
@@ -24,16 +24,13 @@
v-auth="'wallet_actCoupon_add'">
新 增
-
- 发放
-
删除
-
+
+