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:
@@ -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>
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
{% if kind=='inbound' %}
|
||||
<label>来源 / 供应商</label>
|
||||
<input name="source">
|
||||
<label>送货日期</label>
|
||||
<input name="delivery_date" type="date" value="{{ today }}">
|
||||
{% else %}
|
||||
<label>用途</label>
|
||||
<input name="purpose">
|
||||
|
||||
Reference in New Issue
Block a user