fix(*): 全量 UI 审查与 undefined 展示异常修复

分析模块:补齐看板、排行、趋势及报表数值兜底
企业与用户中心:修复统计、成员、技能及资金字段展示
充值与交易:修复充值、发票、订单、订阅及支付字段拼接
平台页面:修复渠道、模型、服务监控与状态空值展示
通用能力:新增安全展示工具,补齐九语言文案与回归测试
文档记录:更新修复范围、影响及回滚说明
This commit is contained in:
zhanjunhao
2026-11-20 10:18:17 +08:00
parent 74ca103334
commit c492e2b7c0
65 changed files with 507 additions and 274 deletions
+11 -5
View File
@@ -16,7 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { formatIdReference } from '../../helpers/safeDisplay';
import {
formatCurrency,
formatIdReference,
formatPercent,
toFiniteNumber,
} from '../../helpers/safeDisplay';
import React, {
useCallback,
@@ -89,7 +94,8 @@ const { Title, Text } = Typography;
const emptyState = (description) => (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={description} />
);
const money = (value) => `¥${(Number(value || 0) / 1e6).toFixed(2)}`;
const money = (value) =>
formatCurrency((toFiniteNumber(value) ?? 0) / 1e6, '¥', 2, '¥0.00');
const protectionUntil = (row) =>
Number(row.extended_until || row.protected_until || 0);
const date = (value) =>
@@ -222,7 +228,7 @@ function TierSummary({ items }) {
{
title: t('比例'),
dataIndex: 'rate_bps',
render: (value) => `${Number(value || 0) / 100}%`,
render: (value) => formatPercent(Number(value || 0) / 100, 2),
},
{ title: t('调用笔数'), dataIndex: 'count' },
{ title: t('有效销售额'), dataIndex: 'sales', render: money },
@@ -1076,7 +1082,7 @@ function AdminPage() {
? t('企业组织')
: t('个人用户'))
}
reference={`${commissionLabel(t, 'subjectType', row.subject_type)} #${row.subject_id}`}
reference={`${commissionLabel(t, 'subjectType', row.subject_type)} ${formatIdReference(row.subject_id)}`}
/>
),
},
@@ -1282,7 +1288,7 @@ function AdminPage() {
{
title: t('比例'),
dataIndex: 'rate_bps',
render: (v) => `${(Number(v || 0) / 100).toFixed(2)}%`,
render: (v) => formatPercent(Number(v) / 100, 2),
},
{
title: t('生效时间'),