fix: reset stock quantity color and enforce location validation for all inbound operations
This commit is contained in:
@ -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({
|
||||
|
||||
Reference in New Issue
Block a user