Show aftersales stats and recent orders on dashboard

- Adds a second row of cards (total / pending / closed / rejected)
- New "最近售后工单" table linking to detail pages
- DashboardStats type extended; dashboardApi maps backend overview

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Frudrax Cheng
2026-05-26 11:04:25 +08:00
parent eab66bc3e9
commit f61004ba12
3 changed files with 156 additions and 4 deletions
+15
View File
@@ -99,12 +99,26 @@ export interface ApiResponse<T> {
error?: string;
}
export interface DashboardRecentAftersales {
serialNumber: string;
companyName: string;
serviceType: AftersalesServiceType;
workOrderStatus: AftersalesWorkOrderStatus;
authorizationStatus: AftersalesAuthorizationStatus;
technicianName: string;
createdAt: string;
}
export interface DashboardStats {
totalCompanies: number;
totalSerials: number;
totalEmployeeSerials: number;
activeSerials: number;
inactiveSerials: number;
totalAftersales: number;
pendingConfirmation: number;
closedAftersales: number;
rejectedAftersales: number;
monthlyData: Array<{
month: string;
companies: number;
@@ -112,6 +126,7 @@ export interface DashboardStats {
}>;
recentCompanies: Company[];
recentSerials: Serial[];
recentAftersales: DashboardRecentAftersales[];
}
export interface CompanyFilter {