diff --git a/src/App.tsx b/src/App.tsx index 8e86f6e..7fd0648 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1356,6 +1356,269 @@ export default function App() { + {/* Region - Vehicle - Customer Section */} +
+
+
+
+
+

区域运营统计

+

*按区域—车型—客户维度统计

+
+
+ +
+ + + + {isRegionFilterOpen && ( + <> +
setIsRegionFilterOpen(false)} /> + +
+

区域筛选

+ +
+ +
+
+ +
+ + setRegionFilters(prev => ({ ...prev, customer: e.target.value }))} + /> +
+
+ +
+
+ + +
+
+ + +
+
+
+ +
+ +
+
+ + )} + +
+
+ +
+
+ + + + + + + + + + + + {filteredRegionData.map((r) => { + if (r.totalAssets === 0) return null; + const isExpanded = expandedRegions.has(r.region); + + return ( + + toggleRegion(r.region)} + > + + + + + + + {isExpanded && r.typeBreakdown.map(tb => { + if (tb.total === 0) return null; + const vehicleType = tb.type === '4.5T' ? '4.5T普货' : tb.type; + + return ( + + + + + + + + + + ); + })} + + ); + })} + +
区域 / 车型 / 客户资产总数运营中库存主要客户
+ {isExpanded ? : } + + {r.region}区域 + {r.totalAssets} { + e.stopPropagation(); + setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', category: 'Operating' }); + }} + > + {r.operatingCount} + { + e.stopPropagation(); + setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', category: 'Inventory' }); + }} + > + {r.inventoryCount} + + {r.customers.slice(0, 2).join(', ')} +
+
+ {tb.type} 车型 +
{tb.total} setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', vehicleType, category: 'Operating' })} + > + {tb.operating} + setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', vehicleType, category: 'Inventory' })} + > + {tb.inventory} + + {tb.customers.join(', ')} +
+
+ + {/* Mobile View (Region) */} +
+ {filteredRegionData.map((r) => { + if (r.totalAssets === 0) return null; + const isExpanded = expandedRegions.has(r.region); + + return ( +
+
toggleRegion(r.region)} + > +
+ {isExpanded ? : } + + {r.region}区域 +
+
资产: {r.totalAssets}
+
+ {isExpanded && ( + <> +
+
setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', category: 'Operating' })} + > +
运营中
+
{r.operatingCount}
+
+
setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', category: 'Inventory' })} + > +
库存
+
{r.inventoryCount}
+
+
+
+ {r.typeBreakdown.map(tb => { + if (tb.total === 0) return null; + const vehicleType = tb.type === '4.5T' ? '4.5T普货' : tb.type; + return ( +
+ {tb.type} 车型 +
+ setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', vehicleType, category: 'Operating' })} + > + 运:{tb.operating} + + setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', vehicleType, category: 'Inventory' })} + > + 库:{tb.inventory} + +
+
+ ); + })} +
+ + )} +
+ ); + })} +
+
+
+ {/* Plate Number Modal */} {showPlateNumbers && (