fix(admin-web): update account names and change USDT to 绿积分
- Rename account labels: - 成本账户 → 总部储备 - 运营账户 → 运营账户1 - 总部社区 → 运营账户2 - RWAD待发放池 → 积分股池 - Change all USDT displays to 绿积分 throughout the system account report - Add getAssetTypeLabel function for asset type mapping in ledger details 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
44a1023cdd
commit
0f3c26c6fa
|
|
@ -185,13 +185,14 @@ export default function SystemAccountsTab() {
|
|||
|
||||
/**
|
||||
* 固定系统账户区域
|
||||
* [2026-01-05] 更新:根据业务需求调整显示名称,USDT改为绿积分
|
||||
*/
|
||||
function FixedAccountsSection({ data }: { data: SystemAccountReportResponse['fixedAccounts'] }) {
|
||||
const accounts = [
|
||||
{ key: 'costAccount', label: '成本账户', sequence: 'S0000000001', data: data.costAccount },
|
||||
{ key: 'operationAccount', label: '运营账户', sequence: 'S0000000002', data: data.operationAccount },
|
||||
{ key: 'hqCommunity', label: '总部社区', sequence: 'S0000000003', data: data.hqCommunity },
|
||||
{ key: 'rwadPoolPending', label: 'RWAD待发放池', sequence: 'S0000000004', data: data.rwadPoolPending },
|
||||
{ key: 'costAccount', label: '总部储备', sequence: 'S0000000001', data: data.costAccount },
|
||||
{ key: 'operationAccount', label: '运营账户1', sequence: 'S0000000002', data: data.operationAccount },
|
||||
{ key: 'hqCommunity', label: '运营账户2', sequence: 'S0000000003', data: data.hqCommunity },
|
||||
{ key: 'rwadPoolPending', label: '积分股池', sequence: 'S0000000004', data: data.rwadPoolPending },
|
||||
{ key: 'platformFee', label: '平台手续费', sequence: 'S0000000005', data: data.platformFee },
|
||||
];
|
||||
|
||||
|
|
@ -209,19 +210,19 @@ function FixedAccountsSection({ data }: { data: SystemAccountReportResponse['fix
|
|||
<div className={styles.statRow}>
|
||||
<span className={styles.statLabel}>账户余额</span>
|
||||
<span className={styles.statValue}>
|
||||
{accountData ? formatAmount(accountData.usdtBalance) : '0.00'} USDT
|
||||
{accountData ? formatAmount(accountData.usdtBalance) : '0.00'} 绿积分
|
||||
</span>
|
||||
</div>
|
||||
<div className={styles.statRow}>
|
||||
<span className={styles.statLabel}>累计收入</span>
|
||||
<span className={styles.statValue}>
|
||||
{accountData ? formatAmount(accountData.totalReceived) : '0.00'} USDT
|
||||
{accountData ? formatAmount(accountData.totalReceived) : '0.00'} 绿积分
|
||||
</span>
|
||||
</div>
|
||||
<div className={styles.statRow}>
|
||||
<span className={styles.statLabel}>累计转出</span>
|
||||
<span className={styles.statValue}>
|
||||
{accountData ? formatAmount(accountData.totalTransferred) : '0.00'} USDT
|
||||
{accountData ? formatAmount(accountData.totalTransferred) : '0.00'} 绿积分
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -234,6 +235,7 @@ function FixedAccountsSection({ data }: { data: SystemAccountReportResponse['fix
|
|||
|
||||
/**
|
||||
* 区域账户汇总区域
|
||||
* [2026-01-05] 更新:USDT改为绿积分
|
||||
*/
|
||||
function RegionAccountsSection({ data, type }: { data: RegionAccountsSummary; type: 'province' | 'city' }) {
|
||||
const typeLabel = type === 'province' ? '省' : '市';
|
||||
|
|
@ -250,11 +252,11 @@ function RegionAccountsSection({ data, type }: { data: RegionAccountsSummary; ty
|
|||
</div>
|
||||
<div className={styles.summaryCard}>
|
||||
<span className={styles.summaryLabel}>总余额</span>
|
||||
<span className={styles.summaryValue}>{formatAmount(data.summary.totalBalance)} USDT</span>
|
||||
<span className={styles.summaryValue}>{formatAmount(data.summary.totalBalance)} 绿积分</span>
|
||||
</div>
|
||||
<div className={styles.summaryCard}>
|
||||
<span className={styles.summaryLabel}>累计收入</span>
|
||||
<span className={styles.summaryValue}>{formatAmount(data.summary.totalReceived)} USDT</span>
|
||||
<span className={styles.summaryValue}>{formatAmount(data.summary.totalReceived)} 绿积分</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -266,8 +268,8 @@ function RegionAccountsSection({ data, type }: { data: RegionAccountsSummary; ty
|
|||
<tr>
|
||||
<th>区域代码</th>
|
||||
<th>区域名称</th>
|
||||
<th>余额 (USDT)</th>
|
||||
<th>累计收入 (USDT)</th>
|
||||
<th>余额 (绿积分)</th>
|
||||
<th>累计收入 (绿积分)</th>
|
||||
<th>状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -297,6 +299,7 @@ function RegionAccountsSection({ data, type }: { data: RegionAccountsSummary; ty
|
|||
|
||||
/**
|
||||
* 面对面结算统计区域
|
||||
* [2026-01-05] 更新:USDT改为绿积分
|
||||
*/
|
||||
function OfflineSettlementSection({ data }: { data: SystemAccountReportResponse['offlineSettlement'] }) {
|
||||
return (
|
||||
|
|
@ -311,7 +314,7 @@ function OfflineSettlementSection({ data }: { data: SystemAccountReportResponse[
|
|||
</div>
|
||||
<div className={styles.summaryCard}>
|
||||
<span className={styles.summaryLabel}>总金额</span>
|
||||
<span className={styles.summaryValue}>{formatAmount(data.totalAmount)} USDT</span>
|
||||
<span className={styles.summaryValue}>{formatAmount(data.totalAmount)} 绿积分</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -325,7 +328,7 @@ function OfflineSettlementSection({ data }: { data: SystemAccountReportResponse[
|
|||
<tr>
|
||||
<th>月份</th>
|
||||
<th>笔数</th>
|
||||
<th>金额 (USDT)</th>
|
||||
<th>金额 (绿积分)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -351,6 +354,7 @@ function OfflineSettlementSection({ data }: { data: SystemAccountReportResponse[
|
|||
|
||||
/**
|
||||
* 过期收益统计区域
|
||||
* [2026-01-05] 更新:USDT改为绿积分
|
||||
*/
|
||||
function ExpiredRewardsSection({ data }: { data: SystemAccountReportResponse['expiredRewards'] }) {
|
||||
return (
|
||||
|
|
@ -365,7 +369,7 @@ function ExpiredRewardsSection({ data }: { data: SystemAccountReportResponse['ex
|
|||
</div>
|
||||
<div className={styles.summaryCard}>
|
||||
<span className={styles.summaryLabel}>总金额</span>
|
||||
<span className={styles.summaryValue}>{formatAmount(data.totalAmount)} USDT</span>
|
||||
<span className={styles.summaryValue}>{formatAmount(data.totalAmount)} 绿积分</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -379,7 +383,7 @@ function ExpiredRewardsSection({ data }: { data: SystemAccountReportResponse['ex
|
|||
<tr>
|
||||
<th>权益类型</th>
|
||||
<th>笔数</th>
|
||||
<th>金额 (USDT)</th>
|
||||
<th>金额 (绿积分)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -406,7 +410,7 @@ function ExpiredRewardsSection({ data }: { data: SystemAccountReportResponse['ex
|
|||
<tr>
|
||||
<th>月份</th>
|
||||
<th>笔数</th>
|
||||
<th>金额 (USDT)</th>
|
||||
<th>金额 (绿积分)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -562,8 +566,21 @@ function LedgerSection({
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 资产类型显示名称映射
|
||||
* [2026-01-05] 新增:USDT改为绿积分
|
||||
*/
|
||||
const getAssetTypeLabel = (assetType: string): string => {
|
||||
const labels: Record<string, string> = {
|
||||
USDT: '绿积分',
|
||||
usdt: '绿积分',
|
||||
};
|
||||
return labels[assetType] || assetType;
|
||||
};
|
||||
|
||||
/**
|
||||
* 单个账户的分类账卡片
|
||||
* [2026-01-05] 更新:资产类型显示改用中文
|
||||
*/
|
||||
function LedgerAccountCard({
|
||||
title,
|
||||
|
|
@ -618,7 +635,7 @@ function LedgerAccountCard({
|
|||
</span>
|
||||
</td>
|
||||
<td className={entry.amount >= 0 ? styles.amountPositive : styles.amountNegative}>
|
||||
{entry.amount >= 0 ? '+' : ''}{formatAmount(entry.amount)} {entry.assetType}
|
||||
{entry.amount >= 0 ? '+' : ''}{formatAmount(entry.amount)} {getAssetTypeLabel(entry.assetType)}
|
||||
</td>
|
||||
<td>{entry.balanceAfter !== null ? formatAmount(entry.balanceAfter) : '-'}</td>
|
||||
<td className={styles.memo}>{entry.memo || entry.allocationType || '-'}</td>
|
||||
|
|
|
|||
|
|
@ -97,12 +97,13 @@ export interface SystemAccountReportResponse {
|
|||
|
||||
/**
|
||||
* 账户类型显示名称映射
|
||||
* [2026-01-05] 更新:根据业务需求调整显示名称
|
||||
*/
|
||||
export const ACCOUNT_TYPE_LABELS: Record<string, string> = {
|
||||
COST_ACCOUNT: '成本账户',
|
||||
OPERATION_ACCOUNT: '运营账户',
|
||||
HQ_COMMUNITY: '总部社区',
|
||||
RWAD_POOL_PENDING: 'RWAD待发放池',
|
||||
COST_ACCOUNT: '总部储备',
|
||||
OPERATION_ACCOUNT: '运营账户1',
|
||||
HQ_COMMUNITY: '运营账户2',
|
||||
RWAD_POOL_PENDING: '积分股池',
|
||||
PLATFORM_FEE: '平台手续费',
|
||||
SYSTEM_PROVINCE: '系统省账户',
|
||||
SYSTEM_CITY: '系统市账户',
|
||||
|
|
|
|||
Loading…
Reference in New Issue