From 366b97d958614424c8d3a2a9783d416b7657ce0f Mon Sep 17 00:00:00 2001 From: aaron <> Date: Tue, 25 Feb 2025 22:30:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BC=98=E6=83=A0=E5=88=B8?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/BasicLayout.vue | 36 +- src/router/index.js | 12 + src/views/coupon/ActivityList.vue | 591 ++++++++++++++++++++++++++++++ src/views/coupon/TemplateList.vue | 356 ++++++++++++++++++ 4 files changed, 993 insertions(+), 2 deletions(-) create mode 100644 src/views/coupon/ActivityList.vue create mode 100644 src/views/coupon/TemplateList.vue diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 0012dd7..051dc54 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -69,6 +69,19 @@ + + + + + 优惠券管理 + + 优惠券模板 + + + 优惠券活动 + + + @@ -147,7 +160,8 @@ import { ShopOutlined, SettingOutlined, ShoppingOutlined, - MoneyCollectOutlined + MoneyCollectOutlined, + GiftOutlined } from '@ant-design/icons-vue' import { useRouter } from 'vue-router' @@ -164,7 +178,8 @@ export default defineComponent({ ShopOutlined, SettingOutlined, ShoppingOutlined, - MoneyCollectOutlined + MoneyCollectOutlined, + GiftOutlined }, setup() { const router = useRouter() @@ -262,6 +277,23 @@ export default defineComponent({ } ] }, + { + key: 'coupon', + icon: () => h(GiftOutlined), + title: '优惠券管理', + children: [ + { + key: 'coupon-template', + title: '优惠券模板', + path: '/coupon/template/list' + }, + { + key: 'coupon-activity', + title: '优惠券活动', + path: '/coupon/activity/list' + } + ] + }, { key: 'merchant', icon: () => h(ShopOutlined), diff --git a/src/router/index.js b/src/router/index.js index 18834c2..5e4e279 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -34,6 +34,18 @@ const routes = [ component: () => import('../views/community/CommunityList.vue'), meta: { title: '小区列表' } }, + { + path: '/coupon/template/list', + name: 'CouponTemplateList', + component: () => import('../views/coupon/TemplateList.vue'), + meta: { title: '优惠券模板' } + }, + { + path: '/coupon/activity/list', + name: 'CouponActivityList', + component: () => import('../views/coupon/ActivityList.vue'), + meta: { title: '优惠券活动' } + }, { path: '/community/building', name: 'BuildingList', diff --git a/src/views/coupon/ActivityList.vue b/src/views/coupon/ActivityList.vue new file mode 100644 index 0000000..1268a12 --- /dev/null +++ b/src/views/coupon/ActivityList.vue @@ -0,0 +1,591 @@ + + + + + 优惠券活动 + + 新建活动 + + + + + + + + {{ record.is_active ? '进行中' : '已结束' }} + + + + {{ formatDateTime(record.start_time) }} + {{ formatDateTime(record.end_time) }} + + + {{ record.daily_start_time }} + {{ record.daily_end_time }} + + + {{ formatDateTime(record.create_time) }} + + + + 编辑 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ record.amount }}元 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/coupon/TemplateList.vue b/src/views/coupon/TemplateList.vue new file mode 100644 index 0000000..54f8080 --- /dev/null +++ b/src/views/coupon/TemplateList.vue @@ -0,0 +1,356 @@ + + + + + 优惠券模板 + + 新建模板 + + + + + + + {{ record.amount > 0 ? `${record.amount}元` : '-' }} + + + + {{ getCouponTypeText(record.coupon_type) }} + + + + {{ formatDateTime(record.create_time) }} + + + + 编辑 + + + + + + + + + + + + + + + 现金券 + 商品兑换券 + + + + + + + + + + + + + + + \ No newline at end of file