diff --git a/deploy.tar.gz b/deploy.tar.gz deleted file mode 100644 index 8cb6d35..0000000 Binary files a/deploy.tar.gz and /dev/null differ diff --git a/inventory-backend/app/services/inbound/base_service.py b/inventory-backend/app/services/inbound/base_service.py index ec236ca..f6086ec 100644 --- a/inventory-backend/app/services/inbound/base_service.py +++ b/inventory-backend/app/services/inbound/base_service.py @@ -252,7 +252,8 @@ class MaterialBaseService: category = filters.get('category') if category is not None and category != '': - query = query.filter(MaterialBase.category.ilike(category.strip())) + # 在末尾拼接 '%' 实现前缀模糊匹配 + query = query.filter(MaterialBase.category.ilike(f"{category.strip()}%")) type_val = filters.get('type') if type_val is not None and type_val != '': @@ -750,7 +751,8 @@ class MaterialBaseService: category = filters.get('category') if category is not None and category != '': - filter_conditions.append(MaterialBase.category.ilike(category.strip())) + # 同样在末尾拼接 '%' + filter_conditions.append(MaterialBase.category.ilike(f"{category.strip()}%")) type_val = filters.get('type') if type_val is not None and type_val != '': filter_conditions.append(MaterialBase.material_type.ilike(type_val.strip())) diff --git a/inventory-web/src/App.vue b/inventory-web/src/App.vue index da52ad0..21106c0 100644 --- a/inventory-web/src/App.vue +++ b/inventory-web/src/App.vue @@ -239,7 +239,7 @@ const handleLogout = () => { diff --git a/inventory-web/src/views/material/list.vue b/inventory-web/src/views/material/list.vue index 6d29e54..58dd5f1 100644 --- a/inventory-web/src/views/material/list.vue +++ b/inventory-web/src/views/material/list.vue @@ -32,19 +32,16 @@ - - - + /> + @@ -315,7 +313,7 @@ - +