feat(mining-admin-web): 系统账户算力明细显示更多信息
- 显示认种订单:日期、树数 - 显示认种用户:姓名/手机号 - 更新类型定义匹配后端新字段 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7c8ea7a9d7
commit
e89c3166bf
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Reference in New Issue