From 46fd154e3a77189b9ad748e57e13ab7f2b6aae93 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 3 Sep 2023 01:44:22 +0800 Subject: [PATCH 01/33] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=92=8C=E5=94=AE=E5=90=8E=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=B1=95=E7=A4=BA=E6=A0=B7=E5=BC=8F=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/order/index.ts | 3 +- src/utils/dict.ts | 20 +++-- .../mall/trade/afterSale/detail/index.vue | 78 +++++++++++++++++-- src/views/mall/trade/order/detail/index.vue | 74 +++++++++++++++++- 4 files changed, 161 insertions(+), 14 deletions(-) diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index d4a22944..b2e4001e 100644 --- a/src/api/mall/trade/order/index.ts +++ b/src/api/mall/trade/order/index.ts @@ -51,12 +51,13 @@ export interface OrderVO { avatar?: string } // 订单操作日志 - orderLog: orderLog[] + orderLog?: orderLog[] } export interface orderLog { content?: string createTime?: Date + userType?: number } export interface OrderItemRespVO { diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 6b163628..661d83a1 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -60,13 +60,20 @@ export const getBoolDictOptions = (dictType: string) => { return dictOption } -export const getDictObj = (dictType: string, value: any) => { +/** + * 获取指定字典类型的指定值对应的字典对象 + * @param dictType 字典类型 + * @param value 字典值 + * @return DictDataType 字典对象 + */ +export const getDictObj = (dictType: string, value: any): DictDataType | undefined => { const dictOptions: DictDataType[] = getDictOptions(dictType) - dictOptions.forEach((dict: DictDataType) => { - if (dict.value === value.toString()) { + console.log(dictOptions) + for (const dict of dictOptions) { + if (dict.value === value + '') { return dict } - }) + } } /** @@ -74,12 +81,13 @@ export const getDictObj = (dictType: string, value: any) => { * * @param dictType 字典类型 * @param value 字典数据的值 + * @return 字典名称 */ -export const getDictLabel = (dictType: string, value: any) => { +export const getDictLabel = (dictType: string, value: any): string => { const dictOptions: DictDataType[] = getDictOptions(dictType) const dictLabel = ref('') dictOptions.forEach((dict: DictDataType) => { - if (dict.value === value) { + if (dict.value === value + '') { dictLabel.value = dict.label } }) diff --git a/src/views/mall/trade/afterSale/detail/index.vue b/src/views/mall/trade/afterSale/detail/index.vue index 190a4b33..fa4d0f91 100644 --- a/src/views/mall/trade/afterSale/detail/index.vue +++ b/src/views/mall/trade/afterSale/detail/index.vue @@ -131,9 +131,7 @@ :timestamp="formatDate(saleLog.createTime)" placement="top" > - - 用户类型: - +
售后状态(之前): 操作明细:{{ saleLog.content }} - +
+ @@ -160,7 +166,7 @@ From fe6cf7ce98d475039aedf296c426e164d53e6220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=AE=E6=A2=A6?= Date: Mon, 4 Sep 2023 15:02:41 +0800 Subject: [PATCH 04/33] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E4=B8=8B=E6=88=90=E9=95=BF=E5=80=BC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/experience-record/index.ts | 42 +++++ src/utils/dict.ts | 2 +- .../user/detail/UserExperienceRecord.vue | 162 ++++++++++++++++++ src/views/member/user/detail/index.vue | 5 +- 4 files changed, 209 insertions(+), 2 deletions(-) create mode 100644 src/api/member/experience-record/index.ts create mode 100644 src/views/member/user/detail/UserExperienceRecord.vue diff --git a/src/api/member/experience-record/index.ts b/src/api/member/experience-record/index.ts new file mode 100644 index 00000000..07f839d3 --- /dev/null +++ b/src/api/member/experience-record/index.ts @@ -0,0 +1,42 @@ +import request from '@/config/axios' + +export interface ExperienceRecordVO { + id: number + userId: number + bizId: string + bizType: number + title: string + description: string + experience: number + totalExperience: number +} + +// 查询会员经验记录列表 +export const getExperienceRecordPage = async (params) => { + return await request.get({ url: `/member/experience-record/page`, params }) +} + +// 查询会员经验记录详情 +export const getExperienceRecord = async (id: number) => { + return await request.get({ url: `/member/experience-record/get?id=` + id }) +} + +// 新增会员经验记录 +export const createExperienceRecord = async (data: ExperienceRecordVO) => { + return await request.post({ url: `/member/experience-record/create`, data }) +} + +// 修改会员经验记录 +export const updateExperienceRecord = async (data: ExperienceRecordVO) => { + return await request.put({ url: `/member/experience-record/update`, data }) +} + +// 删除会员经验记录 +export const deleteExperienceRecord = async (id: number) => { + return await request.delete({ url: `/member/experience-record/delete?id=` + id }) +} + +// 导出会员经验记录 Excel +export const exportExperienceRecord = async (params) => { + return await request.download({ url: `/member/experience-record/export-excel`, params }) +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 6b163628..e1bdbd0e 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -143,7 +143,7 @@ export enum DICT_TYPE { // ========== MALL - 会员模块 ========== MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型 - + MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型 // ========== MALL - 商品模块 ========== PRODUCT_UNIT = 'product_unit', // 商品单位 PRODUCT_SPU_STATUS = 'product_spu_status', //商品状态 diff --git a/src/views/member/user/detail/UserExperienceRecord.vue b/src/views/member/user/detail/UserExperienceRecord.vue new file mode 100644 index 00000000..55de8969 --- /dev/null +++ b/src/views/member/user/detail/UserExperienceRecord.vue @@ -0,0 +1,162 @@ + + + diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue index 3c329a5b..622d5d4b 100644 --- a/src/views/member/user/detail/index.vue +++ b/src/views/member/user/detail/index.vue @@ -36,7 +36,9 @@ - 成长值(WIP) + + 余额(WIP) @@ -62,6 +64,7 @@ import UserAccountInfo from './UserAccountInfo.vue' import UserAddressList from './UserAddressList.vue' import UserPointList from './UserPointList.vue' import UserSignList from './UserSignList.vue' +import UserExperienceRecord from './UserExperienceRecord.vue' import { CardTitle } from '@/components/Card/index' defineOptions({ name: 'MemberDetail' }) From 2318f176a60a88994e5d2139753a134e5af4e220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=AE=E6=A2=A6?= Date: Tue, 5 Sep 2023 10:15:12 +0800 Subject: [PATCH 05/33] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E4=B8=8B=E8=AE=A2=E5=8D=95=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/member/user/detail/UserOrder.vue | 387 +++++++++++++++++++++ src/views/member/user/detail/index.vue | 7 +- 2 files changed, 392 insertions(+), 2 deletions(-) create mode 100644 src/views/member/user/detail/UserOrder.vue diff --git a/src/views/member/user/detail/UserOrder.vue b/src/views/member/user/detail/UserOrder.vue new file mode 100644 index 00000000..a4529dd2 --- /dev/null +++ b/src/views/member/user/detail/UserOrder.vue @@ -0,0 +1,387 @@ + + + diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue index 622d5d4b..b0967ae5 100644 --- a/src/views/member/user/detail/index.vue +++ b/src/views/member/user/detail/index.vue @@ -36,14 +36,16 @@ - + 余额(WIP) - 订单管理(WIP) + + + 售后管理(WIP) 收藏记录(WIP) 优惠劵(WIP) @@ -66,6 +68,7 @@ import UserPointList from './UserPointList.vue' import UserSignList from './UserSignList.vue' import UserExperienceRecord from './UserExperienceRecord.vue' import { CardTitle } from '@/components/Card/index' +import UserOrder from '@/views/member/user/detail/UserOrder.vue' defineOptions({ name: 'MemberDetail' }) From 35664d1f3296712e741b4f7e93830c4fdd76e799 Mon Sep 17 00:00:00 2001 From: owen Date: Tue, 5 Sep 2023 22:31:35 +0800 Subject: [PATCH 06/33] =?UTF-8?q?trade:=20=E5=A2=9E=E5=8A=A0=E4=BA=A4?= =?UTF-8?q?=E6=98=93=E4=B8=AD=E5=BF=83=E9=85=8D=E7=BD=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/config/index.ts | 24 +++ src/api/member/point/config/index.ts | 10 -- src/views/mall/trade/config/index.vue | 209 ++++++++++++++++++++++++ src/views/member/point/config/index.vue | 131 +-------------- 4 files changed, 235 insertions(+), 139 deletions(-) create mode 100644 src/api/mall/trade/config/index.ts create mode 100644 src/views/mall/trade/config/index.vue diff --git a/src/api/mall/trade/config/index.ts b/src/api/mall/trade/config/index.ts new file mode 100644 index 00000000..3a1771d8 --- /dev/null +++ b/src/api/mall/trade/config/index.ts @@ -0,0 +1,24 @@ +import request from '@/config/axios' + +export interface ConfigVO { + brokerageEnabled: boolean + brokerageEnabledCondition: number + brokerageBindMode: number + brokeragePostUrls: string + brokerageFirstPercent: number + brokerageSecondPercent: number + brokerageWithdrawMinPrice: number + brokerageBankNames: string + brokerageFrozenDays: number + brokerageWithdrawType: string +} + +// 查询交易中心配置详情 +export const getTradeConfig = async () => { + return await request.get({ url: `/trade/config/get` }) +} + +// 保存交易中心配置 +export const saveTradeConfig = async (data: ConfigVO) => { + return await request.put({ url: `/trade/config/save`, data }) +} diff --git a/src/api/member/point/config/index.ts b/src/api/member/point/config/index.ts index 9fbd0447..9a3c4c48 100644 --- a/src/api/member/point/config/index.ts +++ b/src/api/member/point/config/index.ts @@ -6,16 +6,6 @@ export interface ConfigVO { tradeDeductUnitPrice: number tradeDeductMaxPrice: number tradeGivePoint: number - brokerageEnabled: boolean - brokerageEnabledCondition: number - brokerageBindMode: number - brokeragePostUrls: string[] - brokerageFirstPercent: number - brokerageSecondPercent: number - brokerageWithdrawMinPrice: number - brokerageBankNames: number[] - brokerageFrozenDays: number - brokerageWithdrawType: number[] } // 查询积分设置详情 diff --git a/src/views/mall/trade/config/index.vue b/src/views/mall/trade/config/index.vue new file mode 100644 index 00000000..7ffe4091 --- /dev/null +++ b/src/views/mall/trade/config/index.vue @@ -0,0 +1,209 @@ + + + diff --git a/src/views/member/point/config/index.vue b/src/views/member/point/config/index.vue index bd0fe733..ed000537 100644 --- a/src/views/member/point/config/index.vue +++ b/src/views/member/point/config/index.vue @@ -13,7 +13,7 @@ - + 下单积分是否抵用订单金额 @@ -46,111 +46,6 @@ - - - - 商城是否开启分销模式 - - - - - {{ dict.label }} - - - - 人人分销:每个用户都可以成为推广员 - - - 指定分销:仅可在后台手动设置推广员 - - - - - - {{ dict.label }} - - - - 没有推广人:只要用户没有推广人,随时都可以绑定推广关系 - - - 新用户:只有新用户注册时或首次进入系统时才可以绑定推广关系 - - - - - - 个人中心分销海报图片,建议尺寸600x1000 - - - - - - 订单交易成功后给推广人返佣的百分比 - - - - - - 订单交易成功后给推广人的推荐人返佣的百分比 - - - - - - 防止用户退款,佣金被提现了,所以需要设置佣金冻结时间,单位:天 - - - - - - 用户提现最低金额限制,单位:元 - - - - - - {{ dict.label }} - - - 商城开通提现的付款方式 - - - - - - 商城开通提现的银行列表 - - @@ -161,8 +56,6 @@ - - From 2ed5d12be8c01bf8ed280086ef5b870f82553966 Mon Sep 17 00:00:00 2001 From: owen Date: Wed, 6 Sep 2023 00:33:59 +0800 Subject: [PATCH 07/33] =?UTF-8?q?trade:=20=E5=88=86=E9=94=80=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E4=BB=8E=20member=20=E6=A8=A1=E5=9D=97=20=E8=BD=AC?= =?UTF-8?q?=E7=A7=BB=E5=88=B0=20trade=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/{member => mall/trade}/brokerage/record/index.ts | 4 ++-- src/views/{member => mall/trade}/brokerage/record/index.vue | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename src/api/{member => mall/trade}/brokerage/record/index.ts (66%) rename src/views/{member => mall/trade}/brokerage/record/index.vue (95%) diff --git a/src/api/member/brokerage/record/index.ts b/src/api/mall/trade/brokerage/record/index.ts similarity index 66% rename from src/api/member/brokerage/record/index.ts rename to src/api/mall/trade/brokerage/record/index.ts index 33b6ab18..88a9f886 100644 --- a/src/api/member/brokerage/record/index.ts +++ b/src/api/mall/trade/brokerage/record/index.ts @@ -1,11 +1,11 @@ import request from '@/config/axios' // 查询佣金记录列表 -export const getMemberBrokerageRecordPage = async (params: any) => { +export const getBrokerageRecordPage = async (params: any) => { return await request.get({ url: `/member/member-brokerage-record/page`, params }) } // 查询佣金记录详情 -export const getMemberBrokerageRecord = async (id: number) => { +export const getBrokerageRecord = async (id: number) => { return await request.get({ url: `/member/member-brokerage-record/get?id=` + id }) } diff --git a/src/views/member/brokerage/record/index.vue b/src/views/mall/trade/brokerage/record/index.vue similarity index 95% rename from src/views/member/brokerage/record/index.vue rename to src/views/mall/trade/brokerage/record/index.vue index f9c8400a..0e62a778 100644 --- a/src/views/member/brokerage/record/index.vue +++ b/src/views/mall/trade/brokerage/record/index.vue @@ -107,9 +107,9 @@ From 726331541222c7822695b88f709a7db8f1df9d10 Mon Sep 17 00:00:00 2001 From: owen Date: Fri, 8 Sep 2023 22:51:04 +0800 Subject: [PATCH 12/33] =?UTF-8?q?trade:=20=E4=BC=98=E5=8C=96=E5=88=86?= =?UTF-8?q?=E9=94=80=E7=94=A8=E6=88=B7=E7=BB=91=E5=AE=9A=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=E3=80=81=E7=BB=91=E5=AE=9A=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/brokerage/user/index.ts | 4 ++-- src/views/mall/trade/brokerage/user/index.vue | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/api/mall/trade/brokerage/user/index.ts b/src/api/mall/trade/brokerage/user/index.ts index ec46e9a8..736cf6e7 100644 --- a/src/api/mall/trade/brokerage/user/index.ts +++ b/src/api/mall/trade/brokerage/user/index.ts @@ -2,8 +2,8 @@ import request from '@/config/axios' export interface BrokerageUserVO { id: number - brokerageUserId: number - brokerageBindTime: Date + bindUserId: number + bindUserTime: Date brokerageEnabled: boolean brokerageTime: Date brokeragePrice: number diff --git a/src/views/mall/trade/brokerage/user/index.vue b/src/views/mall/trade/brokerage/user/index.vue index 70a97676..37e17a3d 100644 --- a/src/views/mall/trade/brokerage/user/index.vue +++ b/src/views/mall/trade/brokerage/user/index.vue @@ -8,9 +8,9 @@ :inline="true" label-width="85px" > - + - + @@ -179,7 +179,7 @@ const list = ref([]) // 列表的数据 const queryParams = reactive({ pageNo: 1, pageSize: 10, - brokerageUserId: null, + bindUserId: null, brokerageEnabled: null, createTime: [] }) From e9d5027e72d86c308b766d08936e15d4217301c1 Mon Sep 17 00:00:00 2001 From: owen Date: Fri, 8 Sep 2023 23:10:04 +0800 Subject: [PATCH 13/33] =?UTF-8?q?trade:=20=E4=BC=98=E5=8C=96=E5=88=86?= =?UTF-8?q?=E9=94=80=E7=94=A8=E6=88=B7=E4=BD=A3=E9=87=91=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/brokerage/user/index.ts | 4 ++-- src/views/mall/trade/brokerage/user/index.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/mall/trade/brokerage/user/index.ts b/src/api/mall/trade/brokerage/user/index.ts index 736cf6e7..95f3a6a1 100644 --- a/src/api/mall/trade/brokerage/user/index.ts +++ b/src/api/mall/trade/brokerage/user/index.ts @@ -6,8 +6,8 @@ export interface BrokerageUserVO { bindUserTime: Date brokerageEnabled: boolean brokerageTime: Date - brokeragePrice: number - frozenBrokeragePrice: number + price: number + frozenPrice: number } // 查询分销用户列表 diff --git a/src/views/mall/trade/brokerage/user/index.vue b/src/views/mall/trade/brokerage/user/index.vue index 37e17a3d..f2459e64 100644 --- a/src/views/mall/trade/brokerage/user/index.vue +++ b/src/views/mall/trade/brokerage/user/index.vue @@ -76,11 +76,11 @@ /> - + From dbb87e385038eacfa3b4a2ce7dd6f9c42dbb0c6f Mon Sep 17 00:00:00 2001 From: owen Date: Fri, 8 Sep 2023 23:58:45 +0800 Subject: [PATCH 14/33] =?UTF-8?q?trade:=20=E5=88=86=E9=94=80=E5=91=98?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E4=BD=A3=E9=87=91=E5=AD=97=E6=AE=B5=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/formatter.ts | 12 ++++++++++++ src/views/mall/trade/brokerage/user/index.vue | 19 +++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/utils/formatter.ts diff --git a/src/utils/formatter.ts b/src/utils/formatter.ts new file mode 100644 index 00000000..7c6e39ff --- /dev/null +++ b/src/utils/formatter.ts @@ -0,0 +1,12 @@ +import { fenToYuan } from '@/utils' +import { TableColumnCtx } from 'element-plus' + +// 格式化金额【分转元】 +export const fenToYuanFormat = ( + row: any, + column: TableColumnCtx, + cellValue: any, + index: number +) => { + return `¥${fenToYuan(cellValue)}` +} diff --git a/src/views/mall/trade/brokerage/user/index.vue b/src/views/mall/trade/brokerage/user/index.vue index f2459e64..db59c52d 100644 --- a/src/views/mall/trade/brokerage/user/index.vue +++ b/src/views/mall/trade/brokerage/user/index.vue @@ -73,15 +73,29 @@ align="center" prop="brokerageOrderPrice" min-width="110px" + :formatter="fenToYuanFormat" + /> + - - + diff --git a/src/views/mall/trade/brokerage/withdraw/index.vue b/src/views/mall/trade/brokerage/withdraw/index.vue new file mode 100644 index 00000000..89323f93 --- /dev/null +++ b/src/views/mall/trade/brokerage/withdraw/index.vue @@ -0,0 +1,264 @@ + + + From 21c67b1b75a965ad1de726f2c5760b69eb50858d Mon Sep 17 00:00:00 2001 From: owen Date: Fri, 22 Sep 2023 22:51:45 +0800 Subject: [PATCH 32/33] =?UTF-8?q?Trade:=20=E5=AE=8C=E5=96=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 2 +- .../mall/trade/brokerage/withdraw/index.vue | 10 +++--- src/views/mall/trade/config/index.vue | 36 ++++++++++++++++++- 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 52b705b8..aa948594 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -168,7 +168,7 @@ export enum DICT_TYPE { BROKERAGE_ENABLED_CONDITION = 'brokerage_enabled_condition', // 分佣模式 BROKERAGE_BIND_MODE = 'brokerage_bind_mode', // 分销关系绑定模式 BROKERAGE_BANK_NAME = 'brokerage_bank_name', // 佣金提现银行 - BROKERAGE_WITHDRAW_TYPE = 'brokerage_withdraw_type', // 佣金冻结时间 + BROKERAGE_WITHDRAW_TYPE = 'brokerage_withdraw_type', // 佣金提现类型 BROKERAGE_RECORD_BIZ_TYPE = 'brokerage_record_biz_type', // 佣金业务类型 BROKERAGE_RECORD_STATUS = 'brokerage_record_status', // 佣金状态 BROKERAGE_WITHDRAW_STATUS = 'brokerage_withdraw_status', // 佣金提现状态 diff --git a/src/views/mall/trade/brokerage/withdraw/index.vue b/src/views/mall/trade/brokerage/withdraw/index.vue index 89323f93..535387e9 100644 --- a/src/views/mall/trade/brokerage/withdraw/index.vue +++ b/src/views/mall/trade/brokerage/withdraw/index.vue @@ -102,11 +102,11 @@