基础信息页:计量单位改 el-select(下拉历史+手动输入);表单排版重排为 4 行(类别占满行);类别末级英文后缀自动填规格型号
This commit is contained in:
@ -98,6 +98,24 @@ def search_base():
|
||||
return jsonify({"code": 500, "msg": str(e)}), 500
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# 1.1 计量单位字典接口 (GET /api/v1/inbound/base/units)
|
||||
# ==============================================================================
|
||||
@inbound_base_bp.route('/units', methods=['GET'])
|
||||
@permission_required('material_list')
|
||||
def get_unit_dict():
|
||||
"""
|
||||
获取所有已存在的非空计量单位(去重 + 排序),用于前端
|
||||
新增/编辑弹窗中"计量单位"下拉框的历史记录。
|
||||
"""
|
||||
try:
|
||||
units = MaterialBaseService.get_distinct_units()
|
||||
return jsonify({"code": 200, "msg": "success", "data": units})
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
return jsonify({"code": 500, "msg": str(e)}), 500
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# 2. 列表接口 (GET /api/v1/inbound/base/list)
|
||||
# ==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user