Files

41 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>编辑车辆 - 车辆管理系统</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<header>
<h1>✏️ 编辑车辆</h1>
<p class="subtitle">ID: {{ vehicle.id }}</p>
</header>
<main>
<section class="form-card">
<form id="editForm" onsubmit="submitEdit(event, {{ vehicle.id }})">
<label>车牌号 *<input type="text" name="plate" value="{{ vehicle.plate }}" required></label>
<label>品牌 *<input type="text" name="brand" value="{{ vehicle.brand }}" required></label>
<label>型号 *<input type="text" name="model" value="{{ vehicle.model }}" required></label>
<label>年份<input type="number" name="year" value="{{ vehicle.year or '' }}" min="1900" max="2100"></label>
<label>颜色<input type="text" name="color" value="{{ vehicle.color or '' }}"></label>
<label>状态
<select name="status">
<option value="available" {% if vehicle.status == 'available' %}selected{% endif %}>可用</option>
<option value="in_use" {% if vehicle.status == 'in_use' %}selected{% endif %}>使用中</option>
<option value="maintenance" {% if vehicle.status == 'maintenance' %}selected{% endif %}>维修中</option>
</select>
</label>
<label>车主<input type="text" name="owner" value="{{ vehicle.owner or '' }}"></label>
<div class="modal-actions">
<a class="btn" href="/">返回</a>
<button type="submit" class="btn btn-primary">保存修改</button>
</div>
</form>
</section>
</main>
<script src="/static/script.js"></script>
</body>
</html>