feat: 重构管理端列表与风控/结算导航,新增表格导出和结算审核确认

This commit is contained in:
2026-05-19 17:06:56 +08:00
parent a1fb163f1b
commit 37b13278ef
47 changed files with 1255 additions and 524 deletions

View File

@@ -0,0 +1,17 @@
import { RiskPoolsConsole } from "@/modules/risk/risk-pools-console";
export default async function AdminDrawRiskHotPage(props: {
params: Promise<{ drawId: string }>;
}) {
const { drawId } = await props.params;
const id = Number(drawId);
return (
<RiskPoolsConsole
drawId={id}
title="热门号码监控"
soldOutOnly={false}
defaultSort="usage_desc"
/>
);
}

View File

@@ -0,0 +1,10 @@
import { RiskLockLogsConsole } from "@/modules/risk/risk-lock-logs-console";
export default async function AdminDrawRiskOccupancyPage(props: {
params: Promise<{ drawId: string }>;
}) {
const { drawId } = await props.params;
const id = Number(drawId);
return <RiskLockLogsConsole drawId={id} />;
}

View File

@@ -0,0 +1,9 @@
import { redirect } from "next/navigation";
export default async function AdminDrawRiskIndexPage(props: {
params: Promise<{ drawId: string }>;
}) {
const { drawId } = await props.params;
redirect(`/admin/draws/${drawId}/risk/occupancy`);
}

View File

@@ -0,0 +1,10 @@
import { RiskPoolDetailConsole } from "@/modules/risk/risk-pool-detail-console";
export default async function AdminDrawRiskPoolDetailPage(props: {
params: Promise<{ drawId: string; number: string }>;
}) {
const { drawId, number } = await props.params;
const id = Number(drawId);
return <RiskPoolDetailConsole drawId={id} number4d={number} />;
}

View File

@@ -0,0 +1,18 @@
import { RiskPoolsConsole } from "@/modules/risk/risk-pools-console";
export default async function AdminDrawRiskPoolsPage(props: {
params: Promise<{ drawId: string }>;
}) {
const { drawId } = await props.params;
const id = Number(drawId);
return (
<RiskPoolsConsole
drawId={id}
title="全部风险池"
soldOutOnly={false}
defaultSort="number_asc"
allowSortChange
/>
);
}

View File

@@ -0,0 +1,17 @@
import { RiskPoolsConsole } from "@/modules/risk/risk-pools-console";
export default async function AdminDrawRiskSoldOutPage(props: {
params: Promise<{ drawId: string }>;
}) {
const { drawId } = await props.params;
const id = Number(drawId);
return (
<RiskPoolsConsole
drawId={id}
title="售罄号码列表"
soldOutOnly
defaultSort="number_asc"
/>
);
}

View File

@@ -1,17 +1,8 @@
import { RiskPoolsConsole } from "@/modules/risk/risk-pools-console";
import { redirect } from "next/navigation";
export default async function AdminRiskHotPage(props: {
params: Promise<{ drawId: string }>;
}) {
const { drawId } = await props.params;
const id = Number(drawId);
return (
<RiskPoolsConsole
drawId={id}
title="热门号码监控"
soldOutOnly={false}
defaultSort="usage_desc"
/>
);
redirect(`/admin/draws/${drawId}/risk/hot`);
}

View File

@@ -1,10 +1,8 @@
import { RiskLockLogsConsole } from "@/modules/risk/risk-lock-logs-console";
import { redirect } from "next/navigation";
export default async function AdminRiskOccupancyPage(props: {
params: Promise<{ drawId: string }>;
}) {
const { drawId } = await props.params;
const id = Number(drawId);
return <RiskLockLogsConsole drawId={id} />;
redirect(`/admin/draws/${drawId}/risk/occupancy`);
}

View File

@@ -1,10 +1,8 @@
import { RiskPoolDetailConsole } from "@/modules/risk/risk-pool-detail-console";
import { redirect } from "next/navigation";
export default async function AdminRiskPoolDetailPage(props: {
params: Promise<{ drawId: string; number: string }>;
}) {
const { drawId, number } = await props.params;
const id = Number(drawId);
return <RiskPoolDetailConsole drawId={id} number4d={number} />;
redirect(`/admin/draws/${drawId}/risk/pools/${number}`);
}

View File

@@ -1,18 +1,8 @@
import { RiskPoolsConsole } from "@/modules/risk/risk-pools-console";
import { redirect } from "next/navigation";
export default async function AdminRiskPoolsPage(props: {
params: Promise<{ drawId: string }>;
}) {
const { drawId } = await props.params;
const id = Number(drawId);
return (
<RiskPoolsConsole
drawId={id}
title="全部风险池"
soldOutOnly={false}
defaultSort="number_asc"
allowSortChange
/>
);
redirect(`/admin/draws/${drawId}/risk/pools`);
}

View File

@@ -1,17 +1,8 @@
import { RiskPoolsConsole } from "@/modules/risk/risk-pools-console";
import { redirect } from "next/navigation";
export default async function AdminRiskSoldOutPage(props: {
params: Promise<{ drawId: string }>;
}) {
const { drawId } = await props.params;
const id = Number(drawId);
return (
<RiskPoolsConsole
drawId={id}
title="售罄号码列表"
soldOutOnly
defaultSort="number_asc"
/>
);
redirect(`/admin/draws/${drawId}/risk/sold-out`);
}

View File

@@ -1,10 +1,5 @@
import { ModuleScaffold } from "@/components/admin/module-scaffold";
import { RiskIndexConsole } from "@/modules/risk/risk-index-console";
import { redirect } from "next/navigation";
export default function AdminRiskIndexPage() {
return (
<ModuleScaffold className="w-full max-w-none">
<RiskIndexConsole />
</ModuleScaffold>
);
redirect("/admin/draws");
}

View File

@@ -128,3 +128,56 @@
@apply font-sans;
}
}
@layer components {
.admin-list-card {
@apply overflow-hidden border-border/80 shadow-sm;
}
.admin-list-header {
@apply border-b bg-muted/20 pb-4;
}
.admin-list-title {
@apply text-lg font-semibold tracking-tight;
}
.admin-list-content {
@apply space-y-4;
}
.admin-list-toolbar {
@apply flex w-full flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center;
}
.admin-list-field {
@apply flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center sm:shrink-0;
}
.admin-list-actions {
@apply flex shrink-0 flex-wrap gap-2;
margin-left: auto;
}
.admin-table-shell {
@apply overflow-x-auto rounded-xl border border-border bg-background;
}
.admin-table-toolbar {
@apply flex items-center justify-end border-b border-border bg-muted/15 px-3 py-2.5;
}
.admin-inline-note {
@apply text-sm text-muted-foreground;
}
[data-slot="table-cell"]:has(> [data-slot="button"]),
[data-slot="table-cell"]:has(> a) {
text-align: center;
}
[data-slot="table-cell"] > .flex:has([data-slot="button"]),
[data-slot="table-cell"] > .flex:has(a) {
justify-content: center;
}
}