成品入库与出库相关联

This commit is contained in:
dxc
2026-02-05 11:58:35 +08:00
parent bf8cf37ff9
commit aa40d4a6da
3 changed files with 120 additions and 31 deletions

View File

@ -19,7 +19,7 @@ def search_base():
# ------------------------------------------------------------------
# 1. 获取列表
# 1. 获取列表 (修改:支持状态筛选)
# ------------------------------------------------------------------
@inbound_product_bp.route('/list', methods=['GET'])
def get_list():
@ -27,14 +27,19 @@ def get_list():
page = request.args.get('page', 1, type=int)
limit = request.args.get('pageSize', 15, type=int)
keyword = request.args.get('keyword', '')
result = ProductInboundService.get_list(page, limit, keyword)
# 获取状态列表参数
statuses_str = request.args.get('statuses', '')
statuses = statuses_str.split(',') if statuses_str else []
result = ProductInboundService.get_list(page, limit, keyword, statuses)
return jsonify({"code": 200, "msg": "success", "data": result})
except Exception as e:
return jsonify({"code": 500, "msg": str(e)}), 500
# ------------------------------------------------------------------
# 2. 新增入库 (修改:返回创建的对象数据,用于打印)
# 2. 新增入库
# ------------------------------------------------------------------
@inbound_product_bp.route('/submit', methods=['POST'])
def submit():