From d736d5d4a9df7249993abd100c4a61d82c9285b9 Mon Sep 17 00:00:00 2001 From: DXC Date: Fri, 15 May 2026 10:40:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BD=BB=E5=BA=95=E7=A7=BB=E9=99=A4=20o?= =?UTF-8?q?p=5Frecords=20=E5=AD=97=E6=AE=B5=E7=BA=A7=E6=9D=83=E9=99=90?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=EF=BC=8C=E6=89=80=E6=9C=89=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=AF=B9=E6=99=AE=E9=80=9A=E8=A7=92=E8=89=B2=E5=8F=AF=E8=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventory-backend/app/api/v1/transactions.py | 21 ++++++++++--------- .../src/views/transaction/records.vue | 6 ++++-- 2 files changed, 15 insertions(+), 12 deletions(-) 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 @@ +