feat(分拣批次卡): 补显效期,解释「为何先出这批」
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s

- 背景:本系统 FIFO = **效期优先**(ORDER BY expiry_date ASC NULLS LAST, created_at ASC),不是先入库先出;界面原先不显示效期,用户无法理解排序
- 后端 listPickingOutboundBatches 增返 expiry_date
- Web 批次编辑行 + 小程序批次卡补显「效期 {expiry}」;rowMeta 三语同步
- 不改排序口径(库存冻结面);只多显示一个字段
- 验证:两端 tsc + 小程序 node --check 通过;前端全量仍基线(3 文件/4 例)
This commit is contained in:
雨天
2026-10-12 16:28:12 +08:00
parent dc849bb30b
commit b59443539a
8 changed files with 16 additions and 5 deletions
@@ -576,6 +576,7 @@ Component({
storage_zone: b.storage_zone || '',
inbound_date: b.inbound_date || '',
production_date: b.production_date || '',
expiry_date: b.expiry_date || '',
}));
const need = resolveItemNeed(item);
const serverPlan = normalizeSavedPlan(item.outbound_batches) || [];
@@ -718,6 +719,7 @@ Component({
batch_no: String(b.batch_no),
storage_zone: b.storage_zone || '',
inbound_date: b.inbound_date || '',
expiry_date: b.expiry_date || '',
available_qty: Number(b.available_qty) || 0,
qty: formatBatchQty(qtyByNo.get(String(b.batch_no)) || 0),
}));
@@ -765,6 +767,7 @@ Component({
batch_no: String(b.batch_no),
storage_zone: b.storage_zone || '',
inbound_date: b.inbound_date || '',
expiry_date: b.expiry_date || '',
available_qty: Number(b.available_qty) || 0,
qty: formatBatchQty(qtyByNo.get(String(b.batch_no)) || 0),
}));
@@ -189,7 +189,7 @@
<view wx:for="{{editor.rows}}" wx:key="batch_id" class="batch-row">
<view class="batch-row-info">
<text class="batch-row-no">{{item.batch_no}}</text>
<text class="batch-row-meta">{{item.storage_zone || '未设区域'}} · 入库 {{item.inbound_date || '—'}} · 可用 {{item.available_qty}}</text>
<text class="batch-row-meta">{{item.storage_zone || '未设区域'}} · 入库 {{item.inbound_date || '—'}} · 效期 {{item.expiry_date || '—'}} · 可用 {{item.available_qty}}</text>
</view>
<input
class="batch-input"