From 5a9764c08c0a2c12cabd0416638313f9f4942db7 Mon Sep 17 00:00:00 2001 From: owen Date: Sun, 3 Sep 2023 21:14:44 +0800 Subject: [PATCH] =?UTF-8?q?member:=20=E5=88=86=E9=94=80=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/point/config/index.ts | 10 ++ src/utils/constants.ts | 27 ++++ src/utils/dict.ts | 4 + src/views/member/point/config/index.vue | 203 +++++++++++++++++++----- 4 files changed, 202 insertions(+), 42 deletions(-) diff --git a/src/api/member/point/config/index.ts b/src/api/member/point/config/index.ts index 9a3c4c48..9fbd0447 100644 --- a/src/api/member/point/config/index.ts +++ b/src/api/member/point/config/index.ts @@ -6,6 +6,16 @@ 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/utils/constants.ts b/src/utils/constants.ts index 8d783635..022d308c 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -272,3 +272,30 @@ export const PromotionDiscountTypeEnum = { name: '折扣' } } + +/** + * 分销关系绑定模式枚举 + */ +export const BrokerageBindModeEnum = { + ANYTIME: { + mode: 0, + name: '没有推广人' + }, + REGISTER: { + mode: 1, + name: '新用户' + } +} +/** + * 分佣模式枚举 + */ +export const BrokerageEnabledConditionEnum = { + ALL: { + condition: 0, + name: '人人分销' + }, + ADMIN: { + condition: 1, + name: '指定分销' + } +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 6b163628..fce46f95 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -143,6 +143,10 @@ export enum DICT_TYPE { // ========== MALL - 会员模块 ========== MEMBER_POINT_BIZ_TYPE = 'member_point_biz_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', // 佣金冻结时间 // ========== MALL - 商品模块 ========== PRODUCT_UNIT = 'product_unit', // 商品单位 diff --git a/src/views/member/point/config/index.vue b/src/views/member/point/config/index.vue index 27c52085..bd0fe733 100644 --- a/src/views/member/point/config/index.vue +++ b/src/views/member/point/config/index.vue @@ -10,47 +10,149 @@ - - - - - 下单积分是否抵用订单金额 - - - - - - - 积分抵用比例(1 积分抵多少金额),单位:元 - - - - - - - 单次下单积分使用上限,0 不限制 - - - - - - - 下单支付金额按比例赠送积分(实际支付 1 元赠送多少积分) - - + + + + + + 下单积分是否抵用订单金额 + + + + + 积分抵用比例(1 积分抵多少金额),单位:元 + + + + + + 单次下单积分使用上限,0 不限制 + + + + + + 下单支付金额按比例赠送积分(实际支付 1 元赠送多少积分) + + + + + + + 商城是否开启分销模式 + + + + + {{ dict.label }} + + + + 人人分销:每个用户都可以成为推广员 + + + 指定分销:仅可在后台手动设置推广员 + + + + + + {{ dict.label }} + + + + 没有推广人:只要用户没有推广人,随时都可以绑定推广关系 + + + 新用户:只有新用户注册时或首次进入系统时才可以绑定推广关系 + + + + + + 个人中心分销海报图片,建议尺寸600x1000 + + + + + + 订单交易成功后给推广人返佣的百分比 + + + + + + 订单交易成功后给推广人的推荐人返佣的百分比 + + + + + + 防止用户退款,佣金被提现了,所以需要设置佣金冻结时间,单位:天 + + + + + + 用户提现最低金额限制,单位:元 + + + + + + {{ dict.label }} + + + 商城开通提现的付款方式 + + + + + + 商城开通提现的银行列表 + + + + 保存 @@ -59,6 +161,8 @@