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 e7d10487..6f3ded5c 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -299,23 +299,6 @@ export const BrokerageEnabledConditionEnum = { name: '指定分销' } } -/** - * 分销用户类型枚举 - */ -export const BrokerageUserTypeEnum = { - ALL: { - type: 0, - name: '全部' - }, - FIRST: { - type: 1, - name: '一级推广人' - }, - SECOND: { - type: 2, - name: '二级推广人' - } -} /** * 佣金记录业务类型枚举 */ @@ -329,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..aa948594 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -168,9 +168,10 @@ 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', // 佣金提现状态 // ========== MALL - 营销模块 ========== PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型 diff --git a/src/views/mall/trade/brokerage/user/BrokerageOrderListDialog.vue b/src/views/mall/trade/brokerage/user/BrokerageOrderListDialog.vue index 5d9bb5ad..d2c0568f 100644 --- a/src/views/mall/trade/brokerage/user/BrokerageOrderListDialog.vue +++ b/src/views/mall/trade/brokerage/user/BrokerageOrderListDialog.vue @@ -9,15 +9,11 @@ :inline="true" label-width="85px" > - - - - {{ item.name }} - + + + 全部 + 一级推广人 + 二级推广人 @@ -98,7 +94,7 @@ 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..535387e9 --- /dev/null +++ b/src/views/mall/trade/brokerage/withdraw/index.vue @@ -0,0 +1,264 @@ + + + diff --git a/src/views/mall/trade/config/index.vue b/src/views/mall/trade/config/index.vue index 7ffe4091..6fa41cad 100644 --- a/src/views/mall/trade/config/index.vue +++ b/src/views/mall/trade/config/index.vue @@ -12,6 +12,20 @@ + + + + 商城是否启用全场包邮 + + + + 商城商品满多少金额即可包邮 + + @@ -61,6 +75,7 @@ 订单交易成功后给推广人返佣的百分比 @@ -70,6 +85,7 @@ 订单交易成功后给推广人的推荐人返佣的百分比 @@ -79,6 +95,7 @@ 防止用户退款,佣金被提现了,所以需要设置佣金冻结时间,单位:天 @@ -87,12 +104,23 @@ 用户提现最低金额限制,单位:元 + + + + 提现手续费百分比,范围0-100,0为无提现手续费,例:设置10,即收取10%手续费,提现100元,到账90元,10元手续费 + + { const id = params.orderId as unknown as number if (id) { - const res = (await TradeOrderApi.getOrder(66666)) as TradeOrderApi.OrderVO + const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO // 没有表单信息则关闭页面返回 - if (res == null) { + if (res === null) { message.error('交易订单不存在') close() }