feat(config): add finance rules, activity rules, and real expert application flow
这个提交包含在:
@@ -469,6 +469,115 @@
|
||||
</a-card>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
|
||||
<!-- Tab 9: 财务抽成与推广分销规则 -->
|
||||
<a-tab-pane key="finance_rules_config" title="财务抽成与分销规则">
|
||||
<div class="tab-pane-content">
|
||||
<a-alert type="warning" style="margin-bottom: 20px">
|
||||
在此灵活调控全平台陪玩订单抽成比例、二级分销裂变返润比例以及陪伴师/玩家佣金提现限制门槛,小程序端推广说明与提现流程将动态同步。
|
||||
</a-alert>
|
||||
|
||||
<a-card title="平台抽成与裂变分销费率" :bordered="false" style="background: var(--color-fill-2)">
|
||||
<a-form :model="financeRulesForm.valueJson" layout="vertical">
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="8">
|
||||
<a-form-item label="平台订单抽成比例 (%)">
|
||||
<a-input-number v-model="financeRulesForm.valueJson.platformRatePercent" :min="0" :max="50" :precision="1" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="一级邀请直接返佣比例 (%)">
|
||||
<a-input-number v-model="financeRulesForm.valueJson.firstReferralPercent" :min="0" :max="30" :precision="1" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="二级邀请间接返佣比例 (%)">
|
||||
<a-input-number v-model="financeRulesForm.valueJson.secondReferralPercent" :min="0" :max="20" :precision="1" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="8">
|
||||
<a-form-item label="单笔提现最低门槛 (元)">
|
||||
<a-input-number v-model="financeRulesForm.valueJson.minWithdrawAmount" :min="1" :max="5000" placeholder="如 50" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="单笔提现最高上限 (元)">
|
||||
<a-input-number v-model="financeRulesForm.valueJson.maxWithdrawAmount" :min="100" :max="100000" placeholder="如 20000" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="提现手续费率 (%)">
|
||||
<a-input-number v-model="financeRulesForm.valueJson.withdrawFeePercent" :min="0" :max="10" :precision="1" placeholder="如 0" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-form-item label="小程序提现提示与到账说明文案">
|
||||
<a-textarea v-model="financeRulesForm.valueJson.withdrawDesc" :auto-size="{ minRows: 2, maxRows: 4 }" />
|
||||
</a-form-item>
|
||||
|
||||
<div style="margin-top: 16px">
|
||||
<a-button type="primary" :loading="saving" @click="saveFinanceRulesConfig">
|
||||
保存财务抽成与分销配置
|
||||
</a-button>
|
||||
</div>
|
||||
</a-form>
|
||||
</a-card>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
|
||||
<!-- Tab 10: 组局发单与预算预设规范 -->
|
||||
<a-tab-pane key="activity_rules_config" title="组局发单与预算规范">
|
||||
<div class="tab-pane-content">
|
||||
<a-alert type="info" style="margin-bottom: 20px">
|
||||
在此设定同城活动组局的招募席位上下限、AA制默认分摊基准,以及房主请客/悬赏发单时展示的快捷赏金与总预算梯队。
|
||||
</a-alert>
|
||||
|
||||
<a-card title="活动席位与预设金额梯队" :bordered="false" style="background: var(--color-fill-2)">
|
||||
<a-form :model="activityRulesForm.valueJson" layout="vertical">
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="8">
|
||||
<a-form-item label="最小招募人数 (人)">
|
||||
<a-input-number v-model="activityRulesForm.valueJson.minParticipants" :min="2" :max="10" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="最大招募人数 (人)">
|
||||
<a-input-number v-model="activityRulesForm.valueJson.maxParticipants" :min="2" :max="50" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="默认推荐招募人数 (人)">
|
||||
<a-input-number v-model="activityRulesForm.valueJson.defaultParticipants" :min="2" :max="20" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="单人出价快捷赏金梯队 (多个金额用逗号隔开,单位: 元)">
|
||||
<a-input v-model="presetPerPersonFeesText" placeholder="如:200, 300, 500, 800, 1000" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="包场总预算快捷梯队 (多个金额用逗号隔开,单位: 元)">
|
||||
<a-input v-model="presetTotalFeesText" placeholder="如:500, 1000, 2000, 3000, 5000" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<div style="margin-top: 16px">
|
||||
<a-button type="primary" :loading="saving" @click="saveActivityRulesConfig">
|
||||
保存组局发单规范配置
|
||||
</a-button>
|
||||
</div>
|
||||
</a-form>
|
||||
</a-card>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
</div>
|
||||
@@ -709,6 +818,59 @@ const saveExpertRulesConfig = () => {
|
||||
saveConfig('expert_rules', expertRulesForm);
|
||||
};
|
||||
|
||||
// P1 财务抽成与分销规则
|
||||
const financeRulesForm = reactive({
|
||||
name: '平台抽成与推广分销规则',
|
||||
description: '平台佣金抽成比例、二级分销返润与佣金提现门槛限制',
|
||||
status: 1,
|
||||
valueJson: {
|
||||
platformRatePercent: 10.0,
|
||||
firstReferralPercent: 5.0,
|
||||
secondReferralPercent: 2.0,
|
||||
minWithdrawAmount: 50,
|
||||
maxWithdrawAmount: 20000,
|
||||
withdrawFeePercent: 0.0,
|
||||
withdrawDesc: '提现将自动发起微信企业付款打款至微信零钱,工作日预计2小时内到账。'
|
||||
}
|
||||
});
|
||||
|
||||
const saveFinanceRulesConfig = () => {
|
||||
saveConfig('finance_rules', financeRulesForm);
|
||||
};
|
||||
|
||||
// P3 组局发单与预算规则
|
||||
const activityRulesForm = reactive({
|
||||
name: '同城组局发单与预算预设规范',
|
||||
description: '招募席位上下限、快捷单人赏金预设与包场预算梯队',
|
||||
status: 1,
|
||||
valueJson: {
|
||||
minParticipants: 2,
|
||||
maxParticipants: 10,
|
||||
defaultParticipants: 4,
|
||||
presetPerPersonFees: [200, 300, 500, 800, 1000],
|
||||
presetTotalFees: [500, 1000, 2000, 3000, 5000],
|
||||
defaultAaFee: 50
|
||||
}
|
||||
});
|
||||
|
||||
const presetPerPersonFeesText = ref('200, 300, 500, 800, 1000');
|
||||
const presetTotalFeesText = ref('500, 1000, 2000, 3000, 5000');
|
||||
|
||||
const saveActivityRulesConfig = () => {
|
||||
const pFees = presetPerPersonFeesText.value
|
||||
.split(/[,,\s]+/)
|
||||
.map(Number)
|
||||
.filter(n => !isNaN(n) && n > 0);
|
||||
const tFees = presetTotalFeesText.value
|
||||
.split(/[,,\s]+/)
|
||||
.map(Number)
|
||||
.filter(n => !isNaN(n) && n > 0);
|
||||
|
||||
if (pFees.length > 0) activityRulesForm.valueJson.presetPerPersonFees = pFees;
|
||||
if (tFees.length > 0) activityRulesForm.valueJson.presetTotalFees = tFees;
|
||||
saveConfig('activity_rules', activityRulesForm);
|
||||
};
|
||||
|
||||
const fetchConfigs = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
@@ -761,6 +923,22 @@ const fetchConfigs = async () => {
|
||||
if (Array.isArray(expertRulesForm.valueJson.candidateTags)) {
|
||||
expertCandidateTags.value = expertRulesForm.valueJson.candidateTags;
|
||||
}
|
||||
} else if (item.configKey === 'finance_rules') {
|
||||
financeRulesForm.name = item.name;
|
||||
financeRulesForm.description = item.description;
|
||||
financeRulesForm.status = item.status;
|
||||
financeRulesForm.valueJson = { ...financeRulesForm.valueJson, ...(item.valueJson || {}) };
|
||||
} else if (item.configKey === 'activity_rules') {
|
||||
activityRulesForm.name = item.name;
|
||||
activityRulesForm.description = item.description;
|
||||
activityRulesForm.status = item.status;
|
||||
activityRulesForm.valueJson = { ...activityRulesForm.valueJson, ...(item.valueJson || {}) };
|
||||
if (Array.isArray(activityRulesForm.valueJson.presetPerPersonFees)) {
|
||||
presetPerPersonFeesText.value = activityRulesForm.valueJson.presetPerPersonFees.join(', ');
|
||||
}
|
||||
if (Array.isArray(activityRulesForm.valueJson.presetTotalFees)) {
|
||||
presetTotalFeesText.value = activityRulesForm.valueJson.presetTotalFees.join(', ');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户