半成品/成品入库:BOM 编号下拉按父件规格联动过滤(前后端双端改造)
- 后端 /inbound/{semi,product}/search-bom 增加 parent_spec 可选参数,Service 层在 MaterialBase.spec_model 上加等值过滤
This commit is contained in:
@ -60,7 +60,8 @@ def search_base():
|
||||
def search_bom():
|
||||
try:
|
||||
keyword = request.args.get('keyword', '')
|
||||
data = ProductInboundService.search_bom_options(keyword)
|
||||
parent_spec = request.args.get('parent_spec', None)
|
||||
data = ProductInboundService.search_bom_options(keyword, parent_spec=parent_spec)
|
||||
return jsonify({"code": 200, "msg": "success", "data": data})
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
|
||||
@ -60,7 +60,8 @@ def search_base():
|
||||
def search_bom():
|
||||
try:
|
||||
keyword = request.args.get('keyword', '')
|
||||
data = SemiInboundService.search_bom_options(keyword)
|
||||
parent_spec = request.args.get('parent_spec', None)
|
||||
data = SemiInboundService.search_bom_options(keyword, parent_spec=parent_spec)
|
||||
return jsonify({"code": 200, "msg": "success", "data": data})
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
|
||||
Reference in New Issue
Block a user