feat: 库存弹窗展示车牌号及省市信息
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
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:
11
src/App.tsx
11
src/App.tsx
@@ -733,13 +733,18 @@ export default function App() {
|
||||
))}
|
||||
</div>
|
||||
) : modalVehicles.length > 0 ? (
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 gap-2">
|
||||
<div className="space-y-1.5">
|
||||
{modalVehicles.map((v) => (
|
||||
<div
|
||||
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>
|
||||
|
||||
@@ -231,6 +231,8 @@ function transformRow(row: VehicleRow): Vehicle {
|
||||
color: row.车辆颜色 || '',
|
||||
location: region,
|
||||
region,
|
||||
province: row.省,
|
||||
city: row.市,
|
||||
status: mapStatus(row.车辆租赁状态Label),
|
||||
ownership: mapOwnership(row.车辆归属状态Label),
|
||||
rentCompany: row.租赁公司 || '',
|
||||
@@ -639,6 +641,8 @@ app.get('/list', async (c) => {
|
||||
type: v.type,
|
||||
model: v.model,
|
||||
location: v.location,
|
||||
province: v.province,
|
||||
city: v.city,
|
||||
status: v.status,
|
||||
ownership: v.ownership,
|
||||
contractNo: v.contractNo,
|
||||
|
||||
@@ -36,6 +36,8 @@ export interface Vehicle {
|
||||
color: string;
|
||||
location: string;
|
||||
region: string;
|
||||
province: string | null;
|
||||
city: string | null;
|
||||
status: 'Operating' | 'Inventory' | 'Pending' | 'Abnormal';
|
||||
ownership: string;
|
||||
rentCompany: string;
|
||||
|
||||
@@ -101,6 +101,8 @@ export interface VehicleListItem {
|
||||
type: string;
|
||||
model: string;
|
||||
location: string;
|
||||
province: string | null;
|
||||
city: string | null;
|
||||
status: string;
|
||||
ownership: string;
|
||||
contractNo: string | null;
|
||||
|
||||
Reference in New Issue
Block a user