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 @@
-
+
红色预警
@@ -348,7 +346,7 @@
= {
available: 'material_list:availableCount',
files: 'material_list:files',
isEnabled: 'material_list:isEnabled',
- isInspectionRequired: 'material_list:operation'
+ isInspectionRequired: 'material_list:operation',
+ warningStatus: 'material_list:view_warning'
};
// ================= 全选与本地缓存逻辑 =================
@@ -1003,6 +1003,16 @@ const categoryOptions = ref([]);
const typeOptions = ref([]);
const categoryTreeOptions = ref([]);
+// 用于搜索栏级联选择器的数据绑定中转
+const searchCategoryPath = computed({
+ get() {
+ return queryParams.category ? queryParams.category.split('/') : [];
+ },
+ set(val: string[] | null) {
+ queryParams.category = val && val.length > 0 ? val.join('/') : '';
+ }
+});
+
// 类别级联选择器的 ref
const categoryCascaderRef = ref(null);
@@ -1018,7 +1028,7 @@ const tempCategorySuffix = ref('');
const queryParams = reactive({
pageNum: 1,
- pageSize: 10,
+ pageSize: 100,
keyword: '',
searchField: 'all',
category: '',