fix: reset stock quantity color and enforce location validation for all inbound operations

This commit is contained in:
DXC
2026-03-18 17:04:23 +08:00
parent 06677ee92c
commit 878d11af28
7 changed files with 23 additions and 7 deletions

View File

@ -213,6 +213,11 @@ def submit():
if perm_code and perm_code not in user_permissions:
data.pop(field, None)
# 库位必填校验(安全兜底)
location = data.get('warehouse_location', '').strip()
if not location:
return jsonify({"code": 400, "msg": "入库失败:库位为必填项,不能为空!"}), 400
new_stock = BuyInboundService.handle_inbound(data)
return jsonify({