初次提交项目
This commit is contained in:
55
templates/edit.html
Normal file
55
templates/edit.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>编辑元件</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<header class="hero slim">
|
||||
<h1>{{ box.name }} - 格子 #{{ slot }}</h1>
|
||||
<a class="btn btn-light" href="{{ url_for('view_box', box_id=box.id) }}">返回宫格</a>
|
||||
</header>
|
||||
|
||||
<main class="container">
|
||||
{% if error %}
|
||||
<p class="alert">{{ error }}</p>
|
||||
{% endif %}
|
||||
|
||||
<form class="panel form-grid" method="post">
|
||||
<label>
|
||||
料号 *
|
||||
<input type="text" name="part_no" required value="{{ component.part_no if component else '' }}">
|
||||
</label>
|
||||
<label>
|
||||
名称 *
|
||||
<input type="text" name="name" required value="{{ component.name if component else '' }}">
|
||||
</label>
|
||||
<label>
|
||||
规格
|
||||
<input type="text" name="specification" value="{{ component.specification if component else '' }}">
|
||||
</label>
|
||||
<label>
|
||||
数量
|
||||
<input type="number" name="quantity" min="0" value="{{ component.quantity if component else 0 }}">
|
||||
</label>
|
||||
<label>
|
||||
位置备注
|
||||
<input type="text" name="location" value="{{ component.location if component else '' }}">
|
||||
</label>
|
||||
<label class="full">
|
||||
备注
|
||||
<textarea name="note" rows="3">{{ component.note if component else '' }}</textarea>
|
||||
</label>
|
||||
|
||||
<div class="actions full">
|
||||
<button class="btn" type="submit" name="action" value="save">保存</button>
|
||||
{% if component %}
|
||||
<button class="btn btn-danger" type="submit" name="action" value="delete" onclick="return confirm('确认清空该格子吗?')">删除</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user