feat:增强箱子管理功能与界面优化
- 新增箱子重命名与删除功能 - 引入新箱子前缀与起始编号配置 - 在首页展示箱子编号范围 - 添加概览按钮,快速查看已启用的物品及其名称 - 实现组件的启用/禁用功能 - 更新数据库结构,新增箱子与组件字段 - 优化箱子与组件管理界面,改进表单与表格展示 - 在索引页面增加箱子详细信息概览区域 - 增强扫描与搜索功能,优化结果显示效果
This commit is contained in:
@@ -26,27 +26,30 @@
|
||||
{% if box.box_type == 'bag' %}
|
||||
<section class="panel">
|
||||
<h2>袋装记录</h2>
|
||||
<p class="group-desc">每行一个袋位,按序号自动编号</p>
|
||||
<p class="group-desc">编号范围: {{ slot_range }} | 每行一个袋位</p>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>袋位</th>
|
||||
<th>袋位编号</th>
|
||||
<th>料号</th>
|
||||
<th>名称</th>
|
||||
<th>数量</th>
|
||||
<th>状态</th>
|
||||
<th>规格</th>
|
||||
<th>位置备注</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for c in bag_items %}
|
||||
{% for row in bag_rows %}
|
||||
{% set c = row.component %}
|
||||
<tr>
|
||||
<td>#{{ c.slot_index }}</td>
|
||||
<td>{{ row.slot_code }}</td>
|
||||
<td>{{ c.part_no }}</td>
|
||||
<td>{{ c.name }}</td>
|
||||
<td>{{ c.quantity }}</td>
|
||||
<td>{% if c.is_enabled %}启用{% else %}停用{% endif %}</td>
|
||||
<td>{{ c.specification or '-' }}</td>
|
||||
<td>{{ c.location or '-' }}</td>
|
||||
<td><a href="{{ url_for('edit_component', box_id=box.id, slot=c.slot_index) }}">编辑</a></td>
|
||||
@@ -105,15 +108,15 @@
|
||||
</form>
|
||||
</section>
|
||||
{% else %}
|
||||
<p class="group-desc">容量: {{ box.slot_capacity }} 位</p>
|
||||
<p class="group-desc">容量: {{ box.slot_capacity }} 位 | 编号范围: {{ slot_range }}</p>
|
||||
<section class="slot-grid{% if box.slot_capacity <= 14 %} slot-grid-14{% endif %}{% if box.slot_capacity <= 4 %} slot-grid-bag{% endif %}">
|
||||
{% 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>
|
||||
<span class="slot-no">{{ item.slot_code }}</span>
|
||||
{% if item.component %}
|
||||
<strong>{{ item.component.part_no }}</strong>
|
||||
<small>{{ item.component.name }}</small>
|
||||
<small>库存: {{ item.component.quantity }}</small>
|
||||
<small>库存: {{ item.component.quantity }} | {% if item.component.is_enabled %}启用{% else %}停用{% endif %}</small>
|
||||
{% else %}
|
||||
<small>空位</small>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user