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 { export interface SystemContributionRecord {
id: string; id: string;
originalRecordId: string; originalRecordId: string;
systemAccountType: string; accountType: string;
regionCode: string | null;
sourceAdoptionId: string; sourceAdoptionId: string;
sourceAccountSequence: string; sourceAccountSequence: string;
// 认种订单详情
adoptionTreeCount: number;
adoptionDate: string | null;
adoptionStatus: string | null;
contributionPerTree: string;
// 用户信息
sourceUserPhone: string | null;
sourceUserName: string | null;
// 分配信息
distributionRate: string; distributionRate: string;
amount: string; amount: string;
effectiveDate: string; effectiveDate: string;

View File

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