feat: rewrite orders page as dense list

This commit is contained in:
afei A
2026-03-28 00:25:45 +08:00
parent edd03b03a7
commit ae8ab2cf9c
8 changed files with 299 additions and 197 deletions

View File

@@ -8,6 +8,8 @@ const RECENT_ORDERS: OrderSummaryVM[] = [
{
orderId: 4201,
workflowId: "wf-4201",
customerLevel: "mid",
serviceMode: "semi_pro",
status: "waiting_review",
statusMeta: {
label: "待审核",
@@ -15,15 +17,20 @@ const RECENT_ORDERS: OrderSummaryVM[] = [
},
currentStep: "review",
currentStepLabel: "人工审核",
reviewTaskStatus: "revision_uploaded",
revisionCount: 1,
pendingManualConfirm: true,
updatedAt: "2026-03-27T09:15:00Z",
},
];
test("shows the real recent-orders entry state", () => {
test("renders orders as a high-density table with shared toolbar controls", () => {
render(<OrdersHome recentOrders={RECENT_ORDERS} />);
expect(screen.getByText("最近订单已接入真实后端接口")).toBeInTheDocument();
expect(screen.getByText("订单 #4201")).toBeInTheDocument();
expect(screen.getByRole("columnheader", { name: "订单号" })).toBeInTheDocument();
expect(screen.getByRole("columnheader", { name: "服务模式" })).toBeInTheDocument();
expect(screen.getByLabelText("订单状态筛选")).toBeInTheDocument();
expect(screen.getByText("#4201")).toBeInTheDocument();
});
test("supports status filtering and pagination actions", () => {