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-27 15:39:10 +08:00
parent e4ffd027be
commit 9a7382101b
4 changed files with 16 additions and 3 deletions

View File

@@ -733,13 +733,18 @@ export default function App() {
))} ))}
</div> </div>
) : modalVehicles.length > 0 ? ( ) : modalVehicles.length > 0 ? (
<div className="grid grid-cols-2 sm:grid-cols-3 gap-2"> <div className="space-y-1.5">
{modalVehicles.map((v) => ( {modalVehicles.map((v) => (
<div <div
key={v.id} key={v.id}
className="bg-gray-50 p-2 rounded border border-gray-100 text-center font-mono text-[11px] sm:text-xs font-bold text-gray-700" className="flex items-center justify-between bg-gray-50 px-3 py-2 rounded border border-gray-100"
> >
{v.plateNumber} <span className="font-mono text-[11px] sm:text-xs font-bold text-gray-700">{v.plateNumber}</span>
{(v.province || v.city) && (
<span className="text-[10px] text-gray-400 ml-2 shrink-0">
{[v.province, v.city].filter(Boolean).join(' ')}
</span>
)}
</div> </div>
))} ))}
</div> </div>

View File

@@ -231,6 +231,8 @@ function transformRow(row: VehicleRow): Vehicle {
color: row.车辆颜色 || '', color: row.车辆颜色 || '',
location: region, location: region,
region, region,
province: row.省,
city: row.市,
status: mapStatus(row.Label), status: mapStatus(row.Label),
ownership: mapOwnership(row.Label), ownership: mapOwnership(row.Label),
rentCompany: row.租赁公司 || '', rentCompany: row.租赁公司 || '',
@@ -639,6 +641,8 @@ app.get('/list', async (c) => {
type: v.type, type: v.type,
model: v.model, model: v.model,
location: v.location, location: v.location,
province: v.province,
city: v.city,
status: v.status, status: v.status,
ownership: v.ownership, ownership: v.ownership,
contractNo: v.contractNo, contractNo: v.contractNo,

View File

@@ -36,6 +36,8 @@ export interface Vehicle {
color: string; color: string;
location: string; location: string;
region: string; region: string;
province: string | null;
city: string | null;
status: 'Operating' | 'Inventory' | 'Pending' | 'Abnormal'; status: 'Operating' | 'Inventory' | 'Pending' | 'Abnormal';
ownership: string; ownership: string;
rentCompany: string; rentCompany: string;

View File

@@ -101,6 +101,8 @@ export interface VehicleListItem {
type: string; type: string;
model: string; model: string;
location: string; location: string;
province: string | null;
city: string | null;
status: string; status: string;
ownership: string; ownership: string;
contractNo: string | null; contractNo: string | null;