文本更改

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