{{-- 文件功能:后台职务管理页面 按部门分组展示所有职务,支持新增/编辑/删除职务 编辑时可通过多选框配置该职务可任命的目标职务列表(任命白名单) @author ChatRoom Laravel @version 1.0.0 --}} @extends('admin.layouts.app') @section('title', '职务管理') @section('content')
{{-- 头部 --}}

职务管理

管理各部门职务,配置等级、图标、人数上限和任命权限

← 部门管理 🎖️ 任命管理 → @if (Auth::id() === 1) @endif
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif {{-- 全局奖励接收上限配置卡片(失焦/回车自动保存) --}}

💰 全局奖励接收上限

每位用户单日内可从所有职务持有者处累计接收奖励金币的最高次数。 设为 0 表示不限制。

次(0=不限) {{-- 状态反馈 --}} 保存中… ✓ 已保存
{{-- 按部门分组展示职务 --}} @foreach ($departments as $dept)

{{ $dept->name }}

位阶 {{ $dept->rank }}
@php $superLvl = (int) \App\Models\Sysparam::getValue('superlevel', '100'); @endphp @if (Auth::user()->user_level >= $superLvl) @endif @forelse ($dept->positions as $pos) @php $appointableIds = $pos->appointablePositions->pluck('id')->toArray(); @endphp {{-- 人数上限:内联编辑 --}} {{-- 单次奖励上限:内联编辑 --}} {{-- 单日发放总上限:内联编辑 --}} @empty @endforelse
图标 职务名 位阶 等级 人数上限 当前在职 单次上限 单日上限 任命权操作
{{ $pos->icon }} {{ $pos->name }} {{ $pos->rank }} Lv.{{ $pos->level }} {{ $pos->active_user_positions_count }} 人 @if (count($appointableIds) > 0) {{ count($appointableIds) }} 个职务 @else @endif @php $superLvl = (int) \App\Models\Sysparam::getValue('superlevel', '100'); @endphp @if (Auth::user()->user_level >= $superLvl) @endif @if (Auth::id() === 1)
@csrf @method('DELETE')
@endif
该部门暂无职务
@endforeach {{-- 新增/编辑弹窗 --}} {{-- inlinePatch:职务列表内联编辑 Alpine 工厂函数(失焦/回车自动 PATCH 保存) --}}
@endsection