feat: 出库/借库记录记录并展示库位快照(DB加列+后端写入+记录页展示)
This commit is contained in:
@ -278,6 +278,8 @@ class OutboundService:
|
||||
quantity=quantity,
|
||||
unit_price=unit_price,
|
||||
outbound_time=current_time,
|
||||
# [新增] 记录出库时的库位快照
|
||||
warehouse_location=getattr(stock_record, 'warehouse_location', None),
|
||||
**common_data
|
||||
)
|
||||
db.session.add(new_record)
|
||||
@ -647,7 +649,9 @@ class OutboundService:
|
||||
'quantity': qty,
|
||||
'unit_price': price,
|
||||
'subtotal': subtotal,
|
||||
'batch_sn': batch_sn
|
||||
'batch_sn': batch_sn,
|
||||
# [新增] 出库时的库位快照(展示用)
|
||||
'warehouse_location': getattr(d, 'warehouse_location', None) or ''
|
||||
})
|
||||
|
||||
# 4. 排序输出
|
||||
|
||||
Reference in New Issue
Block a user