feat: 入库新增「送货日期」字段(与业务日期区分)

- models.Inbound 增加 delivery_date 列(可空, 默认 None)
- 入库单笔录入表单新增「送货日期」输入(默认当天, 可改供应商实际到货日); 出库不受影响
- 物料明细页入库流水新增「送货日期」列展示
- seed_admin 增加幂等补列: 旧库启动时自动 ALTER TABLE inbound ADD COLUMN delivery_date, 开发/EXE 均兼容
- 教程补充送货日期字段说明

(注: instance/app.db 已本地补列, 但未纳入本次提交; dist/app.db 为运行库已 gitignore)
This commit is contained in:
2026-09-23 14:21:57 +08:00
parent 439877c6ba
commit 33efc7c846
5 changed files with 20 additions and 4 deletions
+3 -2
View File
@@ -29,11 +29,12 @@
<h3>入库流水(每次入库时间 / 数量)</h3>
<table class="tbl">
<thead><tr><th>入库日期</th><th>录入时间</th><th>数量</th><th>批次号</th><th>来源 / 供应商</th><th>经手人</th><th>备注</th></tr></thead>
<thead><tr><th>入库日期</th><th>送货日期</th><th>录入时间</th><th>数量</th><th>批次号</th><th>来源 / 供应商</th><th>经手人</th><th>备注</th></tr></thead>
<tbody>
{% for r in inbounds %}
<tr>
<td>{{ r.occur_date }}</td>
<td>{{ r.delivery_date or '-' }}</td>
<td class="small muted">{{ r.created_at.strftime('%Y-%m-%d %H:%M') if r.created_at else '-' }}</td>
<td class="num">{{ '%.2f'|format(r.qty) }}</td>
<td>{{ r.batch_no or '-' }}</td>
@@ -42,7 +43,7 @@
<td>{{ r.remark or '-' }}</td>
</tr>
{% else %}
<tr><td colspan="7" class="muted">暂无入库记录</td></tr>
<tr><td colspan="8" class="muted">暂无入库记录</td></tr>
{% endfor %}
</tbody>
</table>