feat(mining-admin-web): 系统账户算力明细显示更多信息

- 显示认种订单:日期、树数
- 显示认种用户:姓名/手机号
- 更新类型定义匹配后端新字段

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-21 03:36:02 -08:00
parent 7c8ea7a9d7
commit e89c3166bf
2 changed files with 41 additions and 11 deletions

View File

@ -47,9 +47,19 @@ export interface SystemTransactionsResponse {
export interface SystemContributionRecord {
id: string;
originalRecordId: string;
systemAccountType: string;
accountType: string;
regionCode: string | null;
sourceAdoptionId: string;
sourceAccountSequence: string;
// 认种订单详情
adoptionTreeCount: number;
adoptionDate: string | null;
adoptionStatus: string | null;
contributionPerTree: string;
// 用户信息
sourceUserPhone: string | null;
sourceUserName: string | null;
// 分配信息
distributionRate: string;
amount: string;
effectiveDate: string;

View File

@ -108,8 +108,9 @@ export function ContributionRecordsTable({
<Table>
<TableHeader>
<TableRow>
<TableHead>ID</TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead className="text-right"></TableHead>
<TableHead className="text-right"></TableHead>
<TableHead className="text-right"></TableHead>
<TableHead></TableHead>
@ -120,7 +121,7 @@ export function ContributionRecordsTable({
{isLoading ? (
[...Array(5)].map((_, i) => (
<TableRow key={i}>
{[...Array(6)].map((_, j) => (
{[...Array(7)].map((_, j) => (
<TableCell key={j}>
<Skeleton className="h-4 w-full" />
</TableCell>
@ -130,7 +131,7 @@ export function ContributionRecordsTable({
) : records.length === 0 ? (
<TableRow>
<TableCell
colSpan={6}
colSpan={7}
className="text-center text-muted-foreground py-8"
>
@ -138,16 +139,35 @@ export function ContributionRecordsTable({
</TableRow>
) : (
records.map((record) => (
<TableRow key={record.id}>
<TableRow key={record.originalRecordId}>
<TableCell>
<code className="text-xs bg-muted px-1.5 py-0.5 rounded">
#{record.sourceAdoptionId}
</code>
<div className="flex flex-col gap-0.5">
<code className="text-xs bg-muted px-1.5 py-0.5 rounded inline-block w-fit">
#{record.sourceAdoptionId}
</code>
{record.adoptionDate && (
<span className="text-xs text-muted-foreground">
{format(new Date(record.adoptionDate), 'yyyy-MM-dd', { locale: zhCN })}
</span>
)}
</div>
</TableCell>
<TableCell>
<code className="text-xs bg-blue-50 text-blue-700 px-1.5 py-0.5 rounded">
{record.sourceAccountSequence}
</code>
<div className="flex flex-col gap-0.5">
<code className="text-xs bg-blue-50 text-blue-700 px-1.5 py-0.5 rounded inline-block w-fit">
{record.sourceAccountSequence}
</code>
{(record.sourceUserName || record.sourceUserPhone) && (
<span className="text-xs text-muted-foreground">
{record.sourceUserName || record.sourceUserPhone}
</span>
)}
</div>
</TableCell>
<TableCell className="text-right">
<span className="font-mono text-sm">
{record.adoptionTreeCount > 0 ? record.adoptionTreeCount : '-'}
</span>
</TableCell>
<TableCell className="text-right">
<Badge variant="outline" className="font-mono">