feat:增强箱子管理功能与界面优化
- 新增箱子重命名与删除功能 - 引入新箱子前缀与起始编号配置 - 在首页展示箱子编号范围 - 添加概览按钮,快速查看已启用的物品及其名称 - 实现组件的启用/禁用功能 - 更新数据库结构,新增箱子与组件字段 - 优化箱子与组件管理界面,改进表单与表格展示 - 在索引页面增加箱子详细信息概览区域 - 增强扫描与搜索功能,优化结果显示效果
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<header class="hero slim">
|
||||
<h1>{{ box.name }} - 格子 #{{ slot }}</h1>
|
||||
<h1>{{ box.name }} - 编号 {{ slot_code }}</h1>
|
||||
<a class="btn btn-light" href="{{ url_for('view_box', box_id=box.id) }}">返回宫格</a>
|
||||
</header>
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
位置备注
|
||||
<input type="text" name="location" value="{{ component.location if component else '' }}">
|
||||
</label>
|
||||
<label class="full">
|
||||
<input type="checkbox" name="is_enabled" value="1" {% if component is none or component.is_enabled %}checked{% endif %}>
|
||||
启用该位
|
||||
</label>
|
||||
<label class="full">
|
||||
备注
|
||||
<textarea name="note" rows="3">{{ component.note if component else '' }}</textarea>
|
||||
@@ -46,6 +50,11 @@
|
||||
<div class="actions full">
|
||||
<button class="btn" type="submit" name="action" value="save">保存</button>
|
||||
{% if component %}
|
||||
{% if component.is_enabled %}
|
||||
<button class="btn btn-light" type="submit" name="action" value="toggle_disable">停用</button>
|
||||
{% else %}
|
||||
<button class="btn btn-light" type="submit" name="action" value="toggle_enable">启用</button>
|
||||
{% endif %}
|
||||
<button class="btn btn-danger" type="submit" name="action" value="delete" onclick="return confirm('确认清空该格子吗?')">删除</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user