From 4b7e57e67d51631662625b1f62ee788693edc82f Mon Sep 17 00:00:00 2001 From: owen Date: Sat, 30 Sep 2023 15:50:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E8=AF=A6=E6=83=85=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=9A=E5=91=98=E7=A7=AF=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/user/index.ts | 10 ++ src/views/member/user/UpdatePointForm.vue | 128 ++++++++++++++++++ .../member/user/components/growth-list.vue | 14 -- src/views/member/user/index.vue | 97 ++++++++++--- 4 files changed, 213 insertions(+), 36 deletions(-) create mode 100644 src/views/member/user/UpdatePointForm.vue delete mode 100644 src/views/member/user/components/growth-list.vue diff --git a/src/api/member/user/index.ts b/src/api/member/user/index.ts index 4d60988c..e38206a8 100644 --- a/src/api/member/user/index.ts +++ b/src/api/member/user/index.ts @@ -41,3 +41,13 @@ export const updateUser = async (data: UserVO) => { export const updateUserLevel = async (data: any) => { return await request.put({ url: `/member/user/update-level`, data }) } + +// 修改会员用户积分 +export const updateUserPoint = async (data: any) => { + return await request.put({ url: `/member/user/update-point`, data }) +} + +// 修改会员用户余额 +export const updateUserBalance = async (data: any) => { + return await request.put({ url: `/member/user/update-balance`, data }) +} diff --git a/src/views/member/user/UpdatePointForm.vue b/src/views/member/user/UpdatePointForm.vue new file mode 100644 index 00000000..967ebe03 --- /dev/null +++ b/src/views/member/user/UpdatePointForm.vue @@ -0,0 +1,128 @@ + + diff --git a/src/views/member/user/components/growth-list.vue b/src/views/member/user/components/growth-list.vue deleted file mode 100644 index 51fe72af..00000000 --- a/src/views/member/user/components/growth-list.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/src/views/member/user/index.vue b/src/views/member/user/index.vue index 10ff8863..0ea47570 100644 --- a/src/views/member/user/index.vue +++ b/src/views/member/user/index.vue @@ -117,28 +117,56 @@ :formatter="dateFormatter" width="180px" /> - + @@ -155,6 +183,8 @@ + + @@ -166,8 +196,10 @@ import UserForm from './UserForm.vue' import MemberTagSelect from '@/views/member/tag/components/MemberTagSelect.vue' import MemberLevelSelect from '@/views/member/level/components/MemberLevelSelect.vue' import MemberGroupSelect from '@/views/member/group/components/MemberGroupSelect.vue' -import UpdateLevelForm from '@/views/member/user/UpdateLevelForm.vue' +import UpdateLevelForm from './UpdateLevelForm.vue' +import UpdatePointForm from './UpdatePointForm.vue' import CouponSendForm from '@/views/mall/promotion/coupon/components/CouponSendForm.vue' +import { checkPermi } from '@/utils/permission' defineOptions({ name: 'MemberUser' }) @@ -189,6 +221,7 @@ const queryParams = reactive({ }) const queryFormRef = ref() // 搜索的表单 const updateLevelFormRef = ref() // 修改会员等级表单 +const updatePointFormRef = ref() // 修改会员积分表单 const selectedIds = ref([]) // 表格的选中 ID 数组 /** 查询列表 */ @@ -242,6 +275,26 @@ const openCoupon = () => { couponSendFormRef.value.open(selectedIds.value) } +/** 操作分发 */ +const handleCommand = (command: string, row: UserApi.UserVO) => { + switch (command) { + case 'handleUpdate': + openForm('update', row.id) + break + case 'handleUpdateLevel': + updateLevelFormRef.value.open(row.id) + break + case 'handleUpdatePoint': + updatePointFormRef.value.open(row.id) + break + case 'handleUpdateBlance': + // todo @jason:增加一个【修改余额】 + break + default: + break + } +} + /** 初始化 **/ onMounted(() => { getList()