diff --git a/src/api/mall/trade/brokerage/user/index.ts b/src/api/mall/trade/brokerage/user/index.ts index 95f3a6a1..1fed3bfa 100644 --- a/src/api/mall/trade/brokerage/user/index.ts +++ b/src/api/mall/trade/brokerage/user/index.ts @@ -8,6 +8,9 @@ export interface BrokerageUserVO { brokerageTime: Date price: number frozenPrice: number + + nickname: string + avatar: string } // 查询分销用户列表 @@ -19,3 +22,18 @@ export const getBrokerageUserPage = async (params: any) => { export const getBrokerageUser = async (id: number) => { return await request.get({ url: `/trade/brokerage-user/get?id=` + id }) } + +// 修改推广员 +export const updateBindUser = async (data: any) => { + return await request.put({ url: `/trade/brokerage-user/update-bind-user`, data }) +} + +// 清除推广员 +export const clearBindUser = async (data: any) => { + return await request.put({ url: `/trade/brokerage-user/clear-bind-user`, data }) +} + +// 修改推广资格 +export const updateBrokerageEnabled = async (data: any) => { + return await request.put({ url: `/trade/brokerage-user/update-brokerage-enable`, data }) +} diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 022d308c..e7d10487 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -299,3 +299,33 @@ export const BrokerageEnabledConditionEnum = { name: '指定分销' } } +/** + * 分销用户类型枚举 + */ +export const BrokerageUserTypeEnum = { + ALL: { + type: 0, + name: '全部' + }, + FIRST: { + type: 1, + name: '一级推广人' + }, + SECOND: { + type: 2, + name: '二级推广人' + } +} +/** + * 佣金记录业务类型枚举 + */ +export const BrokerageRecordBizTypeEnum = { + ORDER: { + type: 1, + name: '获得推广佣金' + }, + WITHDRAW: { + type: 2, + name: '提现申请' + } +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index f898ed58..0f77d0d5 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -151,13 +151,6 @@ export enum DICT_TYPE { // ========== MALL - 会员模块 ========== MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型 MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型 - // TODO @疯狂:这块的枚举,是不是要挪到 TRADE 那啦 - 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_RECORD_BIZ_TYPE = 'brokerage_record_biz_type', // 佣金业务类型 - BROKERAGE_RECORD_STATUS = 'brokerage_record_status', // 佣金状态 // ========== MALL - 商品模块 ========== PRODUCT_UNIT = 'product_unit', // 商品单位 @@ -172,6 +165,12 @@ export enum DICT_TYPE { TRADE_ORDER_STATUS = 'trade_order_status', // 订单 - 状态 TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status', // 订单项 - 售后状态 TRADE_DELIVERY_TYPE = 'trade_delivery_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_RECORD_BIZ_TYPE = 'brokerage_record_biz_type', // 佣金业务类型 + BROKERAGE_RECORD_STATUS = 'brokerage_record_status', // 佣金状态 // ========== MALL - 营销模块 ========== PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型 diff --git a/src/views/mall/trade/brokerage/record/index.vue b/src/views/mall/trade/brokerage/record/index.vue index 0e62a778..f9cae4e1 100644 --- a/src/views/mall/trade/brokerage/record/index.vue +++ b/src/views/mall/trade/brokerage/record/index.vue @@ -65,6 +65,12 @@ + + + + @@ -131,10 +126,14 @@ v-hasPermi="[ 'trade:brokerage-user:user-query', 'trade:brokerage-user:order-query', - 'trade:brokerage-user:update-brokerage-user', - 'trade:brokerage-user:clear-brokerage-user' + 'trade:brokerage-user:update-bind-user', + 'trade:brokerage-user:clear-bind-user' ]" > + + + 更多 +