基础信息展示以及搜索逻辑进行修复

This commit is contained in:
dxc
2026-02-11 13:12:05 +08:00
parent d0a237625c
commit 5532c87684
9 changed files with 285 additions and 395 deletions

View File

@ -44,6 +44,19 @@ def get_list():
return jsonify({"code": 500, "msg": str(e)}), 500
# ==============================================================================
# 2.1 选项接口 (GET /api/v1/inbound/base/options) [新增]
# ==============================================================================
@inbound_base_bp.route('/options', methods=['GET'])
def get_options():
try:
data = MaterialBaseService.get_distinct_options()
return jsonify({"code": 200, "msg": "success", "data": data})
except Exception as e:
traceback.print_exc()
return jsonify({"code": 500, "msg": str(e)}), 500
# ==============================================================================
# 3. 新增接口 (POST /api/v1/inbound/base/)
# 注意:前端 material_base.ts 可能会请求 / 或 /add这里统一匹配