文本更改

This commit is contained in:
dzl
2025-09-16 15:04:56 +08:00
parent fc6d7b9c5c
commit 278a1dd763

View File

@@ -47,7 +47,7 @@
</div>
<div class="stat-content">
<div class="stat-number">¥{{ (Number(stats.total_commission) || 0).toFixed(2) }}</div>
<div class="stat-label">佣金</div>
<div class="stat-label">营收</div>
<div class="stat-trend">¥{{ (Number(stats.monthly_commission) || 0).toFixed(2) }} 本月</div>
</div>
</div>
@@ -58,7 +58,7 @@
</div>
<div class="stat-content">
<div class="stat-number">¥{{ (Number(stats.daily_commission) || 0).toFixed(2) }}</div>
<div class="stat-label">今日佣金</div>
<div class="stat-label">今日营收</div>
<div class="stat-trend">{{ stats.daily_commission_records || 0 }} 笔记录</div>
</div>
</div>
@@ -79,10 +79,10 @@
<!-- 数据可视化图表 -->
<div class="charts-section">
<!-- 佣金趋势图 -->
<!-- 营收趋势图 -->
<div class="chart-card">
<div class="card-header">
<h3>佣金趋势</h3>
<h3>营收趋势</h3>
<el-select v-model="chartPeriod" size="small" @change="loadChartData">
<el-option label="近7天" value="7d" />
<el-option label="近30天" value="30d" />
@@ -112,7 +112,7 @@
<el-icon><CreditCard /></el-icon>
</div>
<div class="action-content">
<div class="action-title">佣金提现</div>
<div class="action-title">营收提现</div>
<div class="action-desc">快速提现到账</div>
</div>
<el-icon class="arrow"><ArrowRight /></el-icon>
@@ -144,7 +144,7 @@
<div class="stat-item">
<span class="stat-label">早期商户</span>
<span class="stat-value early">{{ stats.early_merchants || 0 }}</span>
<el-tooltip content="注册时间早于代理加入时间的商户,不参与佣金计算" placement="top">
<el-tooltip content="注册时间早于代理加入时间的商户,不参与营收计算" placement="top">
<el-icon class="info-icon"><InfoFilled /></el-icon>
</el-tooltip>
</div>
@@ -189,7 +189,7 @@
</el-tag>
<el-tooltip
v-if="row.is_early_merchant"
content="该商户注册时间早于代理加入时间不参与佣金计算"
content="该商户注册时间早于代理加入时间不参与营收计算"
placement="top"
>
<el-icon class="info-icon"><InfoFilled /></el-icon>
@@ -240,11 +240,11 @@
</div>
</el-tab-pane>
<!-- 佣金记录 -->
<el-tab-pane label="佣金记录" name="commissions">
<!-- 营收记录 -->
<el-tab-pane label="营收记录" name="commissions">
<div class="commissions-section">
<div class="section-header">
<h3>佣金记录</h3>
<h3>营收记录</h3>
<el-button @click="loadCommissions" :loading="loadingCommissions">
刷新
</el-button>
@@ -266,25 +266,25 @@
</template>
</el-table-column>
<el-table-column prop="real_name" label="真实姓名" :width="null" min-width="80" class-name="hide-on-small-mobile" />
<el-table-column prop="commission_amount" label="佣金金额" :width="null" min-width="90">
<el-table-column prop="commission_amount" label="营收金额" :width="null" min-width="90">
<template #default="{ row }">
¥{{ (Number(row.commission_amount) || 0).toFixed(2) }}
</template>
</el-table-column>
<el-table-column prop="commission_type" label="佣金类型" :width="null" min-width="90">
<el-table-column prop="commission_type" label="营收类型" :width="null" min-width="90">
<template #default="{ row }">
<el-tag size="small" :type="getCommissionTypeTagType(row.commission_type)">
{{ getCommissionTypeText(row.commission_type) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" :width="null" min-width="70">
<!-- <el-table-column prop="status" label="状态" :width="null" min-width="70">
<template #default="{ row }">
<el-tag size="small" :type="getCommissionStatusType(row.status)">
{{ getCommissionStatusText(row.status) }}
</el-tag>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="created_at" label="生成时间" :width="null" min-width="120" class-name="hide-on-mobile">
<template #default="{ row }">
{{ formatDateTime(row.created_at) }}
@@ -320,11 +320,11 @@
<!-- 佣金提现 -->
<el-tab-pane label="佣金提现" name="withdrawals">
<!-- 营收提现 -->
<el-tab-pane label="营收提现" name="withdrawals">
<div class="withdrawals-section">
<div class="section-header">
<h3>佣金提现</h3>
<h3>营收提现</h3>
<el-button type="primary" @click="goToWithdrawals">
进入提现页面
</el-button>
@@ -505,7 +505,7 @@ const merchantsPage = ref(1)
const merchantsPageSize = ref(10)
const merchantsTotal = ref(0)
// 佣金数据
// 营收数据
const commissions = ref([])
const loadingCommissions = ref(false)
const commissionsPage = ref(1)
@@ -611,7 +611,7 @@ const loadCommissions = async () => {
commissions.value = data.data.commissions
commissionsTotal.value = data.data.summary.total_records
} catch (error) {
ElMessage.error('加载佣金记录失败')
ElMessage.error('加载营收记录失败')
} finally {
loadingCommissions.value = false
}
@@ -699,8 +699,8 @@ const getAuditStatusText = (status) => {
}
/**
* 获取佣金类型标签类型
* @param {string} type - 佣金类型
* 获取营收类型标签类型
* @param {string} type - 营收类型
* @returns {string} 标签类型
*/
const getCommissionTypeTagType = (type) => {
@@ -712,35 +712,35 @@ const getCommissionTypeTagType = (type) => {
}
/**
* 获取佣金类型文本
* @param {string} type - 佣金类型
* 获取营收类型文本
* @param {string} type - 营收类型
* @returns {string} 显示文本
*/
const getCommissionTypeText = (type) => {
const texts = {
registration: '注册佣金',
matching: '匹配佣金'
registration: '注册营收',
matching: '匹配营收'
}
return texts[type] || type
}
/**
* 获取佣金状态标签类型
* @param {string} status - 佣金状态
* 获取营收状态标签类型
* @param {string} status - 营收状态
* @returns {string} 标签类型
*/
const getCommissionStatusType = (status) => {
// 由于agent_commission_records表没有status字段所有佣金记录都是已生成状态
// 由于agent_commission_records表没有status字段所有营收记录都是已生成状态
return 'success'
}
/**
* 获取佣金状态文本
* @param {string} status - 佣金状态
* 获取营收状态文本
* @param {string} status - 营收状态
* @returns {string} 显示文本
*/
const getCommissionStatusText = (status) => {
// 由于agent_commission_records表没有status字段所有佣金记录都是已生成状态
// 由于agent_commission_records表没有status字段所有营收记录都是已生成状态
return '已生成'
}
@@ -805,17 +805,19 @@ const getTransferTypeType = (type) => {
*/
const getTransferTypeText = (type) => {
const texts = {
deposit: '充值',
withdraw: '提现',
transfer: '转账',
commission: '佣金',
refund: '退款',
penalty: '罚金',
initial: '初始转账',
return: '返还转账',
// deposit: '充值',
// withdraw: '提现',
// transfer: '转账',
// commission: '营收',
// refund: '退款',
// penalty: '罚金',
// initial: '初始转账',
// return: '返还转账',
user_to_user: '用户转账',
user_to_public: '用户转公户',
public_to_user: '户转用户'
user_to_agent: '用户转代理',
user_to_system: '户转系统',
// user_to_public: '用户转公户',
// public_to_user: '公户转用户'
}
return texts[type] || type
}
@@ -933,7 +935,7 @@ const loadChartData = async () => {
* 生成模拟图表数据(用于演示)
*/
const generateMockChartData = () => {
// 模拟佣金趋势数据
// 模拟营收趋势数据
const days = chartPeriod.value === '7d' ? 7 : chartPeriod.value === '30d' ? 30 : 90
const trendData = []
const today = new Date()
@@ -968,11 +970,11 @@ const updateChartOptions = () => {
return
}
// 佣金趋势图配置
// 营收趋势图配置
commissionTrendOption.value = {
tooltip: {
trigger: 'axis',
formatter: '{b}<br/>佣金: ¥{c}'
formatter: '{b}<br/>营收: ¥{c}'
},
grid: {
left: '3%',