fix(*): 全量 UI 审查与 undefined 展示异常修复
This commit is contained in:
@@ -51,6 +51,12 @@ import {
|
||||
} from './operationForm';
|
||||
import { pickerEpoch } from './datePicker';
|
||||
import { API } from '../../helpers';
|
||||
import {
|
||||
formatCurrency,
|
||||
formatIdReference,
|
||||
formatPercent,
|
||||
toFiniteNumber,
|
||||
} from '../../helpers/safeDisplay';
|
||||
import RemoteIdentitySelect from './RemoteIdentitySelect';
|
||||
import { fetchAllLatestTiers } from './latestTiers';
|
||||
import './formSections.css';
|
||||
@@ -340,7 +346,7 @@ export function OperationsDialog({
|
||||
style={{ width: '100%' }}
|
||||
optionList={rows.map((item) => ({
|
||||
value: item.id,
|
||||
label: `${name(item)} (#${item.id})`,
|
||||
label: `${name(item)} (${formatIdReference(item.id)})`,
|
||||
}))}
|
||||
/>
|
||||
</Field>
|
||||
@@ -848,7 +854,7 @@ export function OperationsDialog({
|
||||
channel.id,
|
||||
{
|
||||
value: channel.id,
|
||||
label: `${channel.name} (#${channel.id})`,
|
||||
label: `${channel.name || t('未知渠道')} (${formatIdReference(channel.id)})`,
|
||||
},
|
||||
]),
|
||||
]).values(),
|
||||
@@ -944,7 +950,7 @@ export function OperationsDialog({
|
||||
'等级档位',
|
||||
bindingConfigs.map((item) => ({ ...item, id: item.config_id })),
|
||||
(item) =>
|
||||
`${item.name || item.tier_key} · 配置 #${item.config_id}`,
|
||||
`${item.name || item.tier_key || t('未知档位')} · 配置 ${formatIdReference(item.config_id)}`,
|
||||
)}
|
||||
{dateField('effective_from', '绑定生效时间', true)}
|
||||
<Alert
|
||||
@@ -1148,7 +1154,7 @@ export function BillingColumns(t, money, date) {
|
||||
{
|
||||
title: t('比例'),
|
||||
dataIndex: 'rate_bps',
|
||||
render: (value) => `${Number(value || 0) / 100}%`,
|
||||
render: (value) => formatPercent(Number(value || 0) / 100, 2),
|
||||
},
|
||||
{ title: t('提成金额'), dataIndex: 'commission_uyuan', render: money },
|
||||
];
|
||||
@@ -1358,11 +1364,16 @@ export function SettlementDialog({
|
||||
<Descriptions
|
||||
row
|
||||
data={[
|
||||
{ key: t('账单编号'), value: `#${statement.id}` },
|
||||
{ key: t('账单编号'), value: formatIdReference(statement.id) },
|
||||
{ key: t('账期'), value: statement.statement_month || '—' },
|
||||
{
|
||||
key: t('应付金额'),
|
||||
value: `¥${(Number(statement.payable_uyuan || 0) / 1e6).toFixed(2)}`,
|
||||
value: formatCurrency(
|
||||
(toFiniteNumber(statement.payable_uyuan) ?? 0) / 1e6,
|
||||
'¥',
|
||||
2,
|
||||
'¥0.00',
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
@@ -1449,7 +1460,7 @@ export function SettlementDialog({
|
||||
onChange={(value) => set('detail_id', value)}
|
||||
optionList={items.map((item) => ({
|
||||
value: item.detail_id,
|
||||
label: `${item.billing_record_id} · ${item.model_name || ''} · ${Number(item.rate_bps || 0) / 100}%`,
|
||||
label: `${formatIdReference(item.billing_record_id)} · ${item.model_name || t('未知模型')} · ${formatPercent(Number(item.rate_bps) / 100, 2)}`,
|
||||
}))}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
Reference in New Issue
Block a user