|
@@ -85,6 +85,62 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
+ <!-- Card: 超级会员配置 -->
|
|
|
|
|
+ <el-card shadow="hover" class="config-card">
|
|
|
|
|
+ <template #header>
|
|
|
|
|
+ <div class="card-header">
|
|
|
|
|
+ <span>超级会员配置</span>
|
|
|
|
|
+ <el-tooltip :content="resetTooltipContent(superMemberKeys)" placement="top">
|
|
|
|
|
+ <el-button size="small" text type="primary" @click="handleReset(superMemberKeys)">
|
|
|
|
|
+ 恢复初始值
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div class="card-body">
|
|
|
|
|
+ <div class="field-item">
|
|
|
|
|
+ <div class="field-main">
|
|
|
|
|
+ <span class="field-label">超级会员年费</span>
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ v-model="configValues['pricing.super_member']"
|
|
|
|
|
+ :min="1" :max="999999" :step="100" :precision="0"
|
|
|
|
|
+ controls-position="right"
|
|
|
|
|
+ />
|
|
|
|
|
+ <span class="field-unit">元</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-hint">固定价 ¥1,314/年,无种子价</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-item">
|
|
|
|
|
+ <div class="field-main">
|
|
|
|
|
+ <span class="field-label">直推佣金率</span>
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ v-model="configValues['commission.super_member.direct_rate']"
|
|
|
|
|
+ :min="0" :max="100" :step="1" :precision="0"
|
|
|
|
|
+ controls-position="right"
|
|
|
|
|
+ />
|
|
|
|
|
+ <span class="field-unit">%</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-hint" v-if="superMemberFee > 0">
|
|
|
|
|
+ 每笔 ¥{{ superMemberFee }}:直接 ¥{{ superDirectCommission }} / 上级 ¥{{ superUpstreamCommission }} / 平台 ¥{{ superPlatformCommission }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-item">
|
|
|
|
|
+ <div class="field-main">
|
|
|
|
|
+ <span class="field-label">上级佣金率</span>
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ v-model="configValues['commission.super_member.upstream_rate']"
|
|
|
|
|
+ :min="0" :max="50" :step="1" :precision="0"
|
|
|
|
|
+ controls-position="right"
|
|
|
|
|
+ />
|
|
|
|
|
+ <span class="field-unit">%</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-hint" v-if="superMemberFee > 0">
|
|
|
|
|
+ (每笔 ¥{{ superMemberFee }} 年费中上级分成)
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+
|
|
|
<!-- Card 2: B端佣金配置 -->
|
|
<!-- Card 2: B端佣金配置 -->
|
|
|
<el-card shadow="hover" class="config-card">
|
|
<el-card shadow="hover" class="config-card">
|
|
|
<template #header>
|
|
<template #header>
|
|
@@ -270,6 +326,91 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Card: 关系类型配置 -->
|
|
|
|
|
+ <el-card shadow="hover" class="config-card">
|
|
|
|
|
+ <template #header>
|
|
|
|
|
+ <div class="card-header">
|
|
|
|
|
+ <span>关系类型配置</span>
|
|
|
|
|
+ <el-tooltip :content="resetTooltipContent(relationTypeKeys)" placement="top">
|
|
|
|
|
+ <el-button size="small" text type="primary" @click="handleReset(relationTypeKeys)">
|
|
|
|
|
+ 恢复初始值
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div class="card-body">
|
|
|
|
|
+ <div class="field-item">
|
|
|
|
|
+ <div class="field-main" style="flex-direction: column; align-items: stretch;">
|
|
|
|
|
+ <span class="field-label" style="margin-bottom: 8px;">关系类型列表(JSON)</span>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="configValues['relation.types']"
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ :rows="6"
|
|
|
|
|
+ placeholder='[{"value":"spouse","label":"夫妻"},...]'
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-hint" style="margin-left: 0;">
|
|
|
|
|
+ 配置页面上显示的关系类型列表,格式为 JSON 数组,每个元素含 value(唯一标识)和 label(显示名称)。
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Card: Dify AI 配置 -->
|
|
|
|
|
+ <el-card shadow="hover" class="config-card">
|
|
|
|
|
+ <template #header>
|
|
|
|
|
+ <div class="card-header">
|
|
|
|
|
+ <span>Dify AI 配置</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div class="card-body">
|
|
|
|
|
+ <div class="field-item">
|
|
|
|
|
+ <div class="field-main">
|
|
|
|
|
+ <span class="field-label">Chart Chatflow App ID</span>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="storageValues['dify.workflow.app_id']"
|
|
|
|
|
+ placeholder="Dify Workflow App ID"
|
|
|
|
|
+ style="width: 300px;"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-hint">能量盘解读 Workflow</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-item">
|
|
|
|
|
+ <div class="field-main">
|
|
|
|
|
+ <span class="field-label">关系分析 Chatflow App ID</span>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="storageValues['dify.chatflow.relation_app_id']"
|
|
|
|
|
+ placeholder="Dify Chatflow App ID"
|
|
|
|
|
+ style="width: 300px;"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-hint">关系能量分析对话 Chatflow(v20260604.2)</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-item">
|
|
|
|
|
+ <div class="field-main">
|
|
|
|
|
+ <span class="field-label">关系合盘 Workflow App ID</span>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="storageValues['dify.workflow.relation_app_id']"
|
|
|
|
|
+ placeholder="Dify Workflow App ID"
|
|
|
|
|
+ style="width: 300px;"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-hint">旧版关系合盘解读 Workflow</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-item">
|
|
|
|
|
+ <div class="field-main">
|
|
|
|
|
+ <span class="field-label">号码分析 Workflow App ID</span>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="storageValues['dify.workflow.number_analysis_app_id']"
|
|
|
|
|
+ placeholder="Dify Workflow App ID"
|
|
|
|
|
+ style="width: 300px;"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="field-hint">八星号码分析 Workflow</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-card>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -287,6 +428,9 @@ const VALUE_TYPES: Record<string, 'price' | 'percent' | 'plain' | 'string'> = {
|
|
|
'pricing.practitioner.seed_limit': 'plain',
|
|
'pricing.practitioner.seed_limit': 'plain',
|
|
|
'pricing.practitioner.seed_period_end': 'string',
|
|
'pricing.practitioner.seed_period_end': 'string',
|
|
|
'pricing.annual': 'price',
|
|
'pricing.annual': 'price',
|
|
|
|
|
+ 'pricing.super_member': 'price',
|
|
|
|
|
+ 'commission.super_member.direct_rate': 'percent',
|
|
|
|
|
+ 'commission.super_member.upstream_rate': 'percent',
|
|
|
'commission.practitioner.l1': 'price',
|
|
'commission.practitioner.l1': 'price',
|
|
|
'commission.practitioner.l1_cend': 'price',
|
|
'commission.practitioner.l1_cend': 'price',
|
|
|
'commission.practitioner.l2': 'price',
|
|
'commission.practitioner.l2': 'price',
|
|
@@ -306,6 +450,9 @@ const ALL_CONFIG_KEYS: string[] = [
|
|
|
'pricing.practitioner.seed_limit',
|
|
'pricing.practitioner.seed_limit',
|
|
|
'pricing.practitioner.seed_period_end',
|
|
'pricing.practitioner.seed_period_end',
|
|
|
'pricing.annual',
|
|
'pricing.annual',
|
|
|
|
|
+ 'pricing.super_member',
|
|
|
|
|
+ 'commission.super_member.direct_rate',
|
|
|
|
|
+ 'commission.super_member.upstream_rate',
|
|
|
'commission.practitioner.l1',
|
|
'commission.practitioner.l1',
|
|
|
'commission.practitioner.l1_cend',
|
|
'commission.practitioner.l1_cend',
|
|
|
'commission.practitioner.l2',
|
|
'commission.practitioner.l2',
|
|
@@ -330,6 +477,9 @@ const SEED_DEFAULTS: Record<string, string> = {
|
|
|
'pricing.practitioner.seed_limit': '300',
|
|
'pricing.practitioner.seed_limit': '300',
|
|
|
'pricing.practitioner.seed_period_end': '2027-12-31T23:59:59',
|
|
'pricing.practitioner.seed_period_end': '2027-12-31T23:59:59',
|
|
|
'pricing.annual': '13100',
|
|
'pricing.annual': '13100',
|
|
|
|
|
+ 'pricing.super_member': '131400',
|
|
|
|
|
+ 'commission.super_member.direct_rate': '3000',
|
|
|
|
|
+ 'commission.super_member.upstream_rate': '500',
|
|
|
'commission.practitioner.l1': '50000',
|
|
'commission.practitioner.l1': '50000',
|
|
|
'commission.practitioner.l1_cend': '20000',
|
|
'commission.practitioner.l1_cend': '20000',
|
|
|
'commission.practitioner.l2': '10000',
|
|
'commission.practitioner.l2': '10000',
|
|
@@ -348,9 +498,11 @@ const SEED_DEFAULTS: Record<string, string> = {
|
|
|
/* ──────────── Card key groups ──────────── */
|
|
/* ──────────── Card key groups ──────────── */
|
|
|
|
|
|
|
|
const pricingKeys = ['pricing.practitioner.seed', 'pricing.practitioner.standard', 'pricing.practitioner.seed_limit', 'pricing.practitioner.seed_period_end', 'pricing.annual']
|
|
const pricingKeys = ['pricing.practitioner.seed', 'pricing.practitioner.standard', 'pricing.practitioner.seed_limit', 'pricing.practitioner.seed_period_end', 'pricing.annual']
|
|
|
|
|
+const superMemberKeys = ['pricing.super_member', 'commission.super_member.direct_rate', 'commission.super_member.upstream_rate']
|
|
|
const bCommissionKeys = ['commission.practitioner.l1', 'commission.practitioner.l1_cend', 'commission.practitioner.l2']
|
|
const bCommissionKeys = ['commission.practitioner.l1', 'commission.practitioner.l1_cend', 'commission.practitioner.l2']
|
|
|
const cCommissionKeys = ['commission.annual.direct_rate', 'commission.annual.upstream_rate']
|
|
const cCommissionKeys = ['commission.annual.direct_rate', 'commission.annual.upstream_rate']
|
|
|
const planKeys = ['commerce.category.practitioner_plan.commission_rate', 'commission.practitioner_plan.referral_rate', 'commission.practitioner_plan.upstream_rate', 'plan_request.min_price', 'plan_request.max_price', 'plan_request.max_negotiation_rounds']
|
|
const planKeys = ['commerce.category.practitioner_plan.commission_rate', 'commission.practitioner_plan.referral_rate', 'commission.practitioner_plan.upstream_rate', 'plan_request.min_price', 'plan_request.max_price', 'plan_request.max_negotiation_rounds']
|
|
|
|
|
+const relationTypeKeys = ['relation.types']
|
|
|
|
|
|
|
|
/* ──────────── Field labels ──────────── */
|
|
/* ──────────── Field labels ──────────── */
|
|
|
|
|
|
|
@@ -360,6 +512,9 @@ const FIELD_LABELS: Record<string, string> = {
|
|
|
'pricing.practitioner.seed_limit': '种子价名额上限',
|
|
'pricing.practitioner.seed_limit': '种子价名额上限',
|
|
|
'pricing.practitioner.seed_period_end': '种子价有效期',
|
|
'pricing.practitioner.seed_period_end': '种子价有效期',
|
|
|
'pricing.annual': 'C端年费',
|
|
'pricing.annual': 'C端年费',
|
|
|
|
|
+ 'pricing.super_member': '超级会员年费',
|
|
|
|
|
+ 'commission.super_member.direct_rate': '超级会员直推佣金率',
|
|
|
|
|
+ 'commission.super_member.upstream_rate': '超级会员上级佣金率',
|
|
|
'commission.practitioner.l1': 'L1 佣金—能量师推荐',
|
|
'commission.practitioner.l1': 'L1 佣金—能量师推荐',
|
|
|
'commission.practitioner.l1_cend': 'L1 佣金—C端推荐',
|
|
'commission.practitioner.l1_cend': 'L1 佣金—C端推荐',
|
|
|
'commission.practitioner.l2': 'L2 佣金',
|
|
'commission.practitioner.l2': 'L2 佣金',
|
|
@@ -492,6 +647,14 @@ const directCommission = computed(() => (annualFee.value * directRate.value).toF
|
|
|
const upstreamCommission = computed(() => (annualFee.value * upstreamRate.value).toFixed(2))
|
|
const upstreamCommission = computed(() => (annualFee.value * upstreamRate.value).toFixed(2))
|
|
|
const platformCommission = computed(() => (annualFee.value - annualFee.value * directRate.value - annualFee.value * upstreamRate.value).toFixed(2))
|
|
const platformCommission = computed(() => (annualFee.value - annualFee.value * directRate.value - annualFee.value * upstreamRate.value).toFixed(2))
|
|
|
|
|
|
|
|
|
|
+/** Super member previews */
|
|
|
|
|
+const superMemberFee = computed(() => configValues['pricing.super_member'] || 0)
|
|
|
|
|
+const superDirectRate = computed(() => (configValues['commission.super_member.direct_rate'] || 0) / 100)
|
|
|
|
|
+const superUpstreamRate = computed(() => (configValues['commission.super_member.upstream_rate'] || 0) / 100)
|
|
|
|
|
+const superDirectCommission = computed(() => (superMemberFee.value * superDirectRate.value).toFixed(2))
|
|
|
|
|
+const superUpstreamCommission = computed(() => (superMemberFee.value * superUpstreamRate.value).toFixed(2))
|
|
|
|
|
+const superPlatformCommission = computed(() => (superMemberFee.value - superMemberFee.value * superDirectRate.value - superMemberFee.value * superUpstreamRate.value).toFixed(2))
|
|
|
|
|
+
|
|
|
/** Card 4 — 人工方案预览 */
|
|
/** Card 4 — 人工方案预览 */
|
|
|
const PLAN_EXAMPLE = 299
|
|
const PLAN_EXAMPLE = 299
|
|
|
const planCommissionRate = computed(() => (configValues['commerce.category.practitioner_plan.commission_rate'] || 0) / 100)
|
|
const planCommissionRate = computed(() => (configValues['commerce.category.practitioner_plan.commission_rate'] || 0) / 100)
|