feat: 出库/借库记录记录并展示库位快照(DB加列+后端写入+记录页展示)
This commit is contained in:
@ -133,6 +133,9 @@ class TransOutbound(db.Model):
|
||||
outbound_time = db.Column(db.DateTime, default=beijing_time)
|
||||
operator_name = db.Column(db.String(100)) # 操作员
|
||||
|
||||
# [新增] 出库时的库位快照(从源库存记录带出,便于历史追溯)
|
||||
warehouse_location = db.Column(db.String(100))
|
||||
|
||||
remark = db.Column(db.Text)
|
||||
|
||||
def to_dict(self):
|
||||
@ -148,5 +151,6 @@ class TransOutbound(db.Model):
|
||||
'signature_path': self.signature_path,
|
||||
'outbound_time': self.outbound_time.strftime('%Y-%m-%d %H:%M:%S') if self.outbound_time else None,
|
||||
'operator_name': self.operator_name,
|
||||
'warehouse_location': self.warehouse_location or '',
|
||||
'remark': self.remark
|
||||
}
|
||||
Reference in New Issue
Block a user