diff --git a/inventory-backend/app/api/v1/transactions.py b/inventory-backend/app/api/v1/transactions.py
index 2f2248d..cced585 100644
--- a/inventory-backend/app/api/v1/transactions.py
+++ b/inventory-backend/app/api/v1/transactions.py
@@ -35,16 +35,17 @@ def filter_item_by_permissions(item_dict, user_permissions, prefix='op_records')
"""
# 字段名到权限码的映射(与前端 permissionMap 保持一致)
field_to_perm = {
- 'borrow_no': f'{prefix}:borrow_no',
- 'borrower_name': f'{prefix}:borrower_name',
- # 'sku': f'{prefix}:sku', # SKU 字段不再参与权限过滤,直接返回
- 'borrow_time': f'{prefix}:borrow_time',
- 'return_time': f'{prefix}:return_time',
- 'status': f'{prefix}:status',
- 'expected_return_time': f'{prefix}:expected_return_time',
- 'return_location': f'{prefix}:return_location',
- 'borrow_signature': f'{prefix}:borrow_signature',
- 'return_signature': f'{prefix}:return_signature',
+ # 'borrow_no': f'{prefix}:borrow_no',
+ # 'borrower_name': f'{prefix}:borrower_name',
+ # 'sku': f'{prefix}:sku',
+ # 'borrow_time': f'{prefix}:borrow_time',
+ # 'return_time': f'{prefix}:return_time',
+ # 'return_operator': f'{prefix}:return_operator',
+ # 'status': f'{prefix}:status',
+ # 'expected_return_time': f'{prefix}:expected_return_time',
+ # 'return_location': f'{prefix}:return_location',
+ # 'borrow_signature': f'{prefix}:borrow_signature',
+ # 'return_signature': f'{prefix}:return_signature',
}
# 如果用户是超级管理员且有 '*',则不过滤
if '*' in user_permissions:
diff --git a/inventory-web/src/views/transaction/records.vue b/inventory-web/src/views/transaction/records.vue
index afea172..541db64 100644
--- a/inventory-web/src/views/transaction/records.vue
+++ b/inventory-web/src/views/transaction/records.vue
@@ -56,6 +56,7 @@
+
@@ -173,8 +174,9 @@ const hasColumnPermission = (prop: string) => {
if (userStore.role === 'SUPER_ADMIN' || userStore.username === 'IRIS') {
return true
}
- // SKU 字段不再参与权限过滤,始终可见
- if (prop === 'sku') {
+ // SKU / return_time / return_operator 不再参与权限过滤,始终可见
+ const alwaysVisible = ['sku', 'return_time', 'return_operator', 'expected_return_time', 'status', 'return_location', 'borrow_no', 'borrower_name', 'borrow_time']
+ if (alwaysVisible.includes(prop)) {
return true
}
const code = permissionMap[prop]