feat(permission): “出库/借库需审批”开关权限化——仅主管/超管可见可改

- 新增权限码 material_list:isApprovalRequired,授予仅 SUPER_ADMIN/SUPERVISOR(收回其它角色)
- 物料列表该列仅持码角色可见;后端批量端点与字段脱敏均改按新码校验,其余角色看不到值也无法改
This commit is contained in:
yueli
2026-09-09 10:47:36 +08:00
parent 6bdc8a82f2
commit 4146f35010
4 changed files with 36 additions and 4 deletions

View File

@ -543,7 +543,7 @@ def batch_set_inspection():
# 2.8 批量设置“出库/借库需审批” (POST /api/v1/inbound/base/batch-approval)
# ==============================================================================
@inbound_base_bp.route('/batch-approval', methods=['POST'])
@permission_required('material_list:operation')
@permission_required('material_list:isApprovalRequired')
def batch_set_approval_required():
"""
批量设置物料“出库/借库需审批”标记(仿强制质检批量接口)。

View File

@ -14,7 +14,7 @@ STOCK_FIELD_RBAC_MAPPING = {
"category": "material_list:category", "type": "material_list:type",
"spec": "material_list:spec", "unit": "material_list:unit",
"companyName": "material_list:companyName", "isInspectionRequired": "material_list:isInspectionRequired",
"isApprovalRequired": "material_list:operation",
"isApprovalRequired": "material_list:isApprovalRequired",
"generalImage": "material_list:files", "generalManual": "material_list:files",
"productImageRemark": "material_list:productImageRemark",
"manualLinkRemark": "material_list:manualLinkRemark",