Trade: 完善配置

This commit is contained in:
owen 2023-09-22 22:51:45 +08:00
parent df6a384321
commit 21c67b1b75
3 changed files with 41 additions and 7 deletions

View File

@ -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', // 佣金提现状态

View File

@ -102,11 +102,11 @@
</el-table-column>
<el-table-column label="提现方式" align="left" prop="type" min-width="120px">
<template #default="scope">
<div
>{{ getDictLabel(DICT_TYPE.BROKERAGE_WITHDRAW_TYPE, scope.row.type) }}账号{{
scope.row.accountNo
}}</div
>
<div v-if="scope.row.type === BrokerageWithdrawTypeEnum.WALLET.type"> 余额 </div>
<div v-else>
{{ getDictLabel(DICT_TYPE.BROKERAGE_WITHDRAW_TYPE, scope.row.type) }}账号
{{ scope.row.accountNo }}
</div>
<template v-if="scope.row.type === BrokerageWithdrawTypeEnum.BANK.type">
<div>真实姓名{{ scope.row.name }}</div>
<div>

View File

@ -12,6 +12,20 @@
</el-form-item>
<el-tabs>
<el-tab-pane label="配送">
<el-form-item label="启用包邮" prop="deliveryExpressFreeEnabled">
<el-switch v-model="formData.deliveryExpressFreeEnabled" style="user-select: none" />
<el-text class="w-full" size="small" type="info"> 商城是否启用全场包邮 </el-text>
</el-form-item>
<el-form-item label="满额包邮" prop="deliveryExpressFreePrice">
<el-input-number
v-model="formData.deliveryExpressFreePrice"
placeholder="请输入满额包邮"
class="!w-xs"
/>
<el-text class="w-full" size="small" type="info"> 商城商品满多少金额即可包邮 </el-text>
</el-form-item>
</el-tab-pane>
<el-tab-pane label="分销">
<el-form-item label="分佣启用" prop="brokerageEnabled">
<el-switch v-model="formData.brokerageEnabled" style="user-select: none" />
@ -61,6 +75,7 @@
<el-input-number
v-model="formData.brokerageFirstPercent"
placeholder="请输入一级返佣比例"
class="!w-xs"
/>
<el-text class="w-full" size="small" type="info">
订单交易成功后给推广人返佣的百分比
@ -70,6 +85,7 @@
<el-input-number
v-model="formData.brokerageSecondPercent"
placeholder="请输入二级返佣比例"
class="!w-xs"
/>
<el-text class="w-full" size="small" type="info">
订单交易成功后给推广人的推荐人返佣的百分比
@ -79,6 +95,7 @@
<el-input-number
v-model="formData.brokerageFrozenDays"
placeholder="请输入佣金冻结天数"
class="!w-xs"
/>
<el-text class="w-full" size="small" type="info">
防止用户退款佣金被提现了所以需要设置佣金冻结时间单位
@ -87,12 +104,23 @@
<el-form-item label="提现最低金额" prop="brokerageWithdrawMinPrice">
<el-input-number
v-model="formData.brokerageWithdrawMinPrice"
placeholder="请输入用户提现最低金额"
placeholder="请输入提现最低金额"
class="!w-xs"
/>
<el-text class="w-full" size="small" type="info">
用户提现最低金额限制单位
</el-text>
</el-form-item>
<el-form-item label="提现手续费" prop="brokerageWithdrawFeePercent">
<el-input-number
v-model="formData.brokerageWithdrawFeePercent"
placeholder="请输入提现手续费"
class="!w-xs"
/>
<el-text class="w-full" size="small" type="info">
提现手续费百分比范围0-1000为无提现手续费设置10即收取10%手续费提现100元到账90元10元手续费
</el-text>
</el-form-item>
<el-form-item label="提现方式" prop="brokerageWithdrawType">
<el-checkbox-group v-model="formData.brokerageWithdrawType">
<el-checkbox
@ -138,6 +166,9 @@ const message = useMessage() // 消息弹窗
const formLoading = ref(false) // 12
const formRef = ref()
const formData = ref({
id: null,
deliveryExpressFreeEnabled: true,
deliveryExpressFreePrice: 0,
brokerageEnabled: true,
brokerageEnabledCondition: BrokerageEnabledConditionEnum.ALL.condition,
brokerageBindMode: BrokerageBindModeEnum.ANYTIME.mode,
@ -145,11 +176,13 @@ const formData = ref({
brokerageFirstPercent: 0,
brokerageSecondPercent: 0,
brokerageWithdrawMinPrice: 0,
brokerageWithdrawFeePercent: 0,
brokerageBankNames: [],
brokerageFrozenDays: 0,
brokerageWithdrawType: []
})
const formRules = reactive({
deliveryExpressFreePrice: [{ required: true, message: '满额包邮不能为空', trigger: 'blur' }],
brokerageEnabledCondition: [{ required: true, message: '分佣模式不能为空', trigger: 'blur' }],
brokerageBindMode: [{ required: true, message: '分销关系绑定模式不能为空', trigger: 'blur' }],
brokerageFirstPercent: [{ required: true, message: '一级返佣比例不能为空', trigger: 'blur' }],
@ -157,6 +190,7 @@ const formRules = reactive({
brokerageWithdrawMinPrice: [
{ required: true, message: '用户提现最低金额不能为空', trigger: 'blur' }
],
brokerageWithdrawFeePercent: [{ required: true, message: '提现手续费不能为空', trigger: 'blur' }],
brokerageBankNames: [{ required: true, message: '提现银行不能为空', trigger: 'blur' }],
brokerageFrozenDays: [{ required: true, message: '佣金冻结时间不能为空', trigger: 'blur' }],
brokerageWithdrawType: [