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:
@@ -212,6 +212,10 @@ export const dashboardApi = {
|
||||
totalEmployeeSerials: data.overview?.totalEmployeeSerials || 0,
|
||||
activeSerials: data.overview?.activeSerials || 0,
|
||||
inactiveSerials: data.overview?.inactiveSerials || 0,
|
||||
totalAftersales: data.overview?.totalAftersales || 0,
|
||||
pendingConfirmation: data.overview?.pendingConfirmation || 0,
|
||||
closedAftersales: data.overview?.closedAftersales || 0,
|
||||
rejectedAftersales: data.overview?.rejectedAftersales || 0,
|
||||
monthlyData: data.monthlyStats || [],
|
||||
recentCompanies: data.recentCompanies?.map((c: any) => ({
|
||||
id: c.companyName,
|
||||
@@ -227,6 +231,7 @@ export const dashboardApi = {
|
||||
createdAt: s.createdAt,
|
||||
type: s.type,
|
||||
})) || [],
|
||||
recentAftersales: data.recentAftersales || [],
|
||||
};
|
||||
}
|
||||
throw new Error('获取统计数据失败');
|
||||
|
||||
Reference in New Issue
Block a user