From 854acf6e703c238056bd7a91a2f1f117ef5d5eea Mon Sep 17 00:00:00 2001 From: owen Date: Tue, 19 Sep 2023 22:03:28 +0800 Subject: [PATCH] =?UTF-8?q?trade:=20=E5=88=86=E9=94=80=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=20-=20=E4=BD=A3=E9=87=91=E6=8F=90=E7=8E=B0=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/trade/brokerage/withdraw/index.ts | 39 +++ src/utils/constants.ts | 46 +++ src/utils/dict.ts | 1 + .../withdraw/BrokerageWithdrawRejectForm.vue | 73 +++++ .../mall/trade/brokerage/withdraw/index.vue | 264 ++++++++++++++++++ 5 files changed, 423 insertions(+) create mode 100644 src/api/mall/trade/brokerage/withdraw/index.ts create mode 100644 src/views/mall/trade/brokerage/withdraw/BrokerageWithdrawRejectForm.vue create mode 100644 src/views/mall/trade/brokerage/withdraw/index.vue diff --git a/src/api/mall/trade/brokerage/withdraw/index.ts b/src/api/mall/trade/brokerage/withdraw/index.ts new file mode 100644 index 00000000..c93286a9 --- /dev/null +++ b/src/api/mall/trade/brokerage/withdraw/index.ts @@ -0,0 +1,39 @@ +import request from '@/config/axios' + +export interface BrokerageWithdrawVO { + id: number + userId: number + price: number + feePrice: number + totalPrice: number + type: number + name: string + accountNo: string + bankName: string + bankAddress: string + accountQrCodeUrl: string + status: number + auditReason: string + auditTime: Date + remark: string +} + +// 查询佣金提现列表 +export const getBrokerageWithdrawPage = async (params: any) => { + return await request.get({ url: `/trade/brokerage-withdraw/page`, params }) +} + +// 查询佣金提现详情 +export const getBrokerageWithdraw = async (id: number) => { + return await request.get({ url: `/trade/brokerage-withdraw/get?id=` + id }) +} + +// 佣金提现 - 通过申请 +export const approveBrokerageWithdraw = async (id: number) => { + return await request.put({ url: `/trade/brokerage-withdraw/approve?id=` + id }) +} + +// 审核佣金提现 - 驳回申请 +export const rejectBrokerageWithdraw = async (data: BrokerageWithdrawVO) => { + return await request.put({ url: `/trade/brokerage-withdraw/reject`, data }) +} diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 898ba563..6f3ded5c 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -312,3 +312,49 @@ export const BrokerageRecordBizTypeEnum = { name: '提现申请' } } +/** + * 佣金提现状态枚举 + */ +export const BrokerageWithdrawStatusEnum = { + AUDITING: { + status: 0, + name: '审核中' + }, + AUDIT_SUCCESS: { + status: 10, + name: '审核通过' + }, + AUDIT_FAIL: { + status: 20, + name: '审核不通过' + }, + WITHDRAW_SUCCESS: { + status: 11, + name: '提现成功' + }, + WITHDRAW_FAIL: { + status: 21, + name: '提现失败' + } +} +/** + * 佣金提现类型枚举 + */ +export const BrokerageWithdrawTypeEnum = { + WALLET: { + type: 1, + name: '钱包' + }, + BANK: { + type: 2, + name: '银行卡' + }, + WECHAT: { + type: 3, + name: '微信' + }, + ALIPAY: { + type: 4, + name: '支付宝' + } +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 0f77d0d5..52b705b8 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -171,6 +171,7 @@ export enum DICT_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', // 佣金提现状态 // ========== MALL - 营销模块 ========== PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型 diff --git a/src/views/mall/trade/brokerage/withdraw/BrokerageWithdrawRejectForm.vue b/src/views/mall/trade/brokerage/withdraw/BrokerageWithdrawRejectForm.vue new file mode 100644 index 00000000..2a69b5b0 --- /dev/null +++ b/src/views/mall/trade/brokerage/withdraw/BrokerageWithdrawRejectForm.vue @@ -0,0 +1,73 @@ + + 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 @@ + + +