采购人走用户的表
This commit is contained in:
@ -29,7 +29,7 @@ def search_base():
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# 1. 获取列表 (修改:支持状态筛选)
|
||||
# 1. 获取列表
|
||||
# ------------------------------------------------------------------
|
||||
@inbound_buy_bp.route('/list', methods=['GET'])
|
||||
def get_list():
|
||||
@ -38,7 +38,7 @@ def get_list():
|
||||
limit = request.args.get('pageSize', 15, type=int)
|
||||
keyword = request.args.get('keyword', '')
|
||||
|
||||
# 获取状态列表参数,前端传参格式: statuses=在库,借库
|
||||
# 获取状态列表参数
|
||||
statuses_str = request.args.get('statuses', '')
|
||||
statuses = statuses_str.split(',') if statuses_str else []
|
||||
|
||||
@ -126,10 +126,22 @@ def get_supplier_suggestions():
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# 7. 系统用户建议
|
||||
# 7. 系统用户建议 (采购人)
|
||||
# ------------------------------------------------------------------
|
||||
@inbound_buy_bp.route('/suggestions/users', methods=['GET'])
|
||||
def get_user_suggestions():
|
||||
keyword = request.args.get('keyword', '')
|
||||
data = BuyInboundService.search_system_users(keyword)
|
||||
return jsonify({"code": 200, "msg": "success", "data": data})
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# 8. [新增] 链接建议
|
||||
# ------------------------------------------------------------------
|
||||
@inbound_buy_bp.route('/suggestions/links', methods=['GET'])
|
||||
def get_link_suggestions():
|
||||
base_id = request.args.get('base_id', type=int)
|
||||
link_type = request.args.get('type', 'original') # original or detail
|
||||
if not base_id:
|
||||
return jsonify({"code": 400, "msg": "base_id required"}), 400
|
||||
data = BuyInboundService.get_history_links(base_id, link_type)
|
||||
return jsonify({"code": 200, "msg": "success", "data": data})
|
||||
Reference in New Issue
Block a user