入库管理三页面类别搜索中间节点支持子级匹配(buy/semi/product 类别过滤改为 ilike 前缀,与基础信息页一致)
This commit is contained in:
@ -349,7 +349,8 @@ class ProductInboundService:
|
||||
sku_str = f'%{sku.strip()}%'
|
||||
query = query.filter(StockProduct.sku.ilike(sku_str))
|
||||
if category and category.strip():
|
||||
query = query.filter(MaterialBase.category == category.strip())
|
||||
# 级联选择器:中间节点用前缀匹配,与 base_service.get_list 行为一致
|
||||
query = query.filter(MaterialBase.category.ilike(f"{category.strip()}%"))
|
||||
if material_type and material_type.strip():
|
||||
query = query.filter(MaterialBase.material_type == material_type.strip())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user