diff --git a/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx b/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx index 344e3b55..8244e3a0 100644 --- a/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx +++ b/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx @@ -300,7 +300,7 @@ export default function SystemAccountsTab() { * [2026-01-07] 更新:添加查看分类账明细按钮,在卡片下方公共区域显示明细 */ function FixedAccountsSection({ data }: { data: SystemAccountReportResponse['fixedAccounts'] }) { - // [2026-01-07] 修复:从后端返回数据中读取真实的 accountSequence,而不是硬编码 + // [2026-01-07] 修复:从后端返回数据中读取真实的 accountSequence,过滤掉不存在的账户 // 后端映射:S0000000001=HQ_COMMUNITY, S0000000002=COST_ACCOUNT, S0000000003=OPERATION_ACCOUNT const accounts = [ { key: 'costAccount', data: data.costAccount }, @@ -308,10 +308,12 @@ function FixedAccountsSection({ data }: { data: SystemAccountReportResponse['fix { key: 'hqCommunity', data: data.hqCommunity }, { key: 'rwadPoolPending', data: data.rwadPoolPending }, { key: 'platformFee', data: data.platformFee }, - ].map(item => ({ - ...item, - sequence: item.data?.accountSequence || '', - })); + ] + .filter(item => item.data !== null && item.data !== undefined) // 过滤掉不存在的账户 + .map(item => ({ + ...item, + sequence: item.data?.accountSequence || '', + })); // [2026-01-07] 新增:选中账户和分类账数据 const [selectedAccount, setSelectedAccount] = useState(null);