初次提交项目

This commit is contained in:
2026-03-08 00:52:03 +08:00
parent 8241dbc861
commit fc38b1eb3d
9 changed files with 608 additions and 0 deletions

35
templates/box.html Normal file
View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ box.name }} - 28宫格</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
<header class="hero slim">
<h1>{{ box.name }} - 28 宫格</h1>
<nav>
<a class="btn btn-light" href="{{ url_for('index') }}">返回首页</a>
<a class="btn" href="{{ url_for('scan_page') }}">扫码/搜索</a>
</nav>
</header>
<main class="container">
<section class="grid-28">
{% for item in slots %}
<a class="slot {% if item.component %}filled{% endif %}" href="{{ url_for('edit_component', box_id=box.id, slot=item.slot) }}">
<span class="slot-no">#{{ item.slot }}</span>
{% if item.component %}
<strong>{{ item.component.part_no }}</strong>
<small>{{ item.component.name }}</small>
<small>库存: {{ item.component.quantity }}</small>
{% else %}
<small>空位</small>
{% endif %}
</a>
{% endfor %}
</section>
</main>
</body>
</html>