feat: 资产数据实时汇总添加总计行
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-26 14:58:01 +08:00
parent 0b2e2f23b5
commit 40f05ecf00

View File

@@ -347,6 +347,21 @@ export default function App() {
<th className="p-3 font-semibold border-r border-gray-100 text-center bg-orange-50/20 w-24"></th> <th className="p-3 font-semibold border-r border-gray-100 text-center bg-orange-50/20 w-24"></th>
<th className="p-3 font-semibold text-center bg-purple-50/20 w-24"></th> <th className="p-3 font-semibold text-center bg-purple-50/20 w-24"></th>
</tr> </tr>
<tr className="bg-yellow-50/50 text-xs font-bold border-b border-gray-200">
<td className="p-3 border-r border-gray-100 text-gray-700"></td>
<td className="p-3 border-r border-gray-100"></td>
<td className="p-3 text-center border-r border-gray-100 text-gray-800">{SUMMARY.totalAssets}</td>
<td className="p-3 text-center border-r border-gray-100 text-blue-700">{SUMMARY.inventory.total}</td>
{['嘉兴', '广东', '北京', '新疆', '其他'].map((reg) => {
const val = processedData.reduce((sum, t) => sum + (t.inventoryRegions?.[reg] || 0), 0);
return <td key={reg} className="p-3 text-center border-r border-gray-100 text-blue-700">{val || ''}</td>;
})}
<td className="p-3 text-center border-r border-gray-100 text-gray-700">{SUMMARY.pendingDelivery || ''}</td>
<td className="p-3 text-center border-r border-gray-100 text-green-700 bg-green-50/10">{SUMMARY.operating.total}</td>
<td className="p-3 text-center border-r border-gray-100 text-blue-700 bg-blue-50/5">{SUMMARY.weeklyDelivered || ''}</td>
<td className="p-3 text-center border-r border-gray-100 text-orange-700 bg-orange-50/5">{SUMMARY.weeklyReturned || ''}</td>
<td className="p-3 text-center text-purple-700 bg-purple-50/5">{SUMMARY.weeklyReplaced || ''}</td>
</tr>
</thead> </thead>
<tbody className="text-xs"> <tbody className="text-xs">
{processedData.map((typeGroup) => ( {processedData.map((typeGroup) => (