统一后台列表页样式并调整站长菜单

This commit is contained in:
2026-04-26 18:10:37 +08:00
parent 61cfc2091c
commit 00270b3904
36 changed files with 2590 additions and 2345 deletions
@@ -10,76 +10,85 @@
@section('title', '婚礼红包明细')
@section('content')
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
<div class="flex items-center justify-between mb-5">
<div>
<h2 class="text-xl font-bold text-gray-800">🎁 红包领取明细</h2>
<p class="text-sm text-gray-500 mt-1">
{{ $ceremony->marriage?->user?->username }} × {{ $ceremony->marriage?->partner?->username }}
{{ $ceremony->tier?->icon }} {{ $ceremony->tier?->name ?? '婚礼' }}
· 总额 <strong class="text-amber-600">{{ number_format($ceremony->total_amount) }} </strong>
</p>
<div class="{{ $adminListPageClass }}">
<div class="{{ $adminListHeaderCardClass }}">
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
<div>
<h2 class="{{ $adminListHeaderTitleClass }}">🎁 红包领取明细</h2>
<p class="{{ $adminListHeaderSubtitleClass }}">
{{ $ceremony->marriage?->user?->username }} × {{ $ceremony->marriage?->partner?->username }}
{{ $ceremony->tier?->icon }} {{ $ceremony->tier?->name ?? '婚礼' }}
· 总额 <strong class="text-amber-600">{{ number_format($ceremony->total_amount) }} </strong>
</p>
</div>
<a href="{{ route('admin.marriages.ceremonies') }}" class="{{ $adminListSecondaryButtonClass }}">返回婚礼列表</a>
</div>
</div>
<a href="{{ route('admin.marriages.ceremonies') }}" class="text-sm text-indigo-600 hover:underline"> 返回婚礼列表</a>
</div>
{{-- 汇总 --}}
<div class="grid grid-cols-3 gap-4 mb-5">
<div class="bg-white rounded-xl border shadow-sm p-4 text-center">
<div class="text-2xl font-bold text-indigo-600">{{ $ceremony->online_count ?? 0 }}</div>
<div class="text-xs text-gray-500 mt-1">在线人数</div>
<div class="grid grid-cols-1 gap-4 md:grid-cols-3">
<div class="{{ $adminListCardClass }} p-4 text-center">
<div class="text-2xl font-bold text-indigo-600">{{ $ceremony->online_count ?? 0 }}</div>
<div class="mt-1 text-xs text-gray-500">在线人数</div>
</div>
<div class="{{ $adminListCardClass }} p-4 text-center">
<div class="text-2xl font-bold text-green-600">{{ $ceremony->claimed_count }}</div>
<div class="mt-1 text-xs text-gray-500">已领取人数</div>
</div>
<div class="{{ $adminListCardClass }} p-4 text-center">
<div class="text-2xl font-bold text-amber-600">{{ number_format($ceremony->claimed_amount) }}</div>
<div class="mt-1 text-xs text-gray-500">已领取金额</div>
</div>
</div>
<div class="bg-white rounded-xl border shadow-sm p-4 text-center">
<div class="text-2xl font-bold text-green-600">{{ $ceremony->claimed_count }}</div>
<div class="text-xs text-gray-500 mt-1">已领取人数</div>
</div>
<div class="bg-white rounded-xl border shadow-sm p-4 text-center">
<div class="text-2xl font-bold text-amber-600">{{ number_format($ceremony->claimed_amount) }}</div>
<div class="text-xs text-gray-500 mt-1">已领取金额</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm border overflow-hidden">
<div class="overflow-x-auto">
<table class="w-full text-sm">
<thead class="bg-gray-50 text-xs uppercase text-gray-600">
<tr>
<th class="px-4 py-3 text-left">用户</th>
<th class="px-4 py-3 text-center">分配金额</th>
<th class="px-4 py-3 text-center">状态</th>
<th class="px-4 py-3 text-left">领取时间</th>
</tr>
</thead>
<tbody class="divide-y">
@forelse ($claims as $claim)
<tr class="hover:bg-gray-50">
<td class="px-4 py-3 font-bold">{{ $claim->user?->username }}</td>
<td class="px-4 py-3 text-center font-bold text-amber-600">
{{ number_format($claim->amount) }}
</td>
<td class="px-4 py-3 text-center">
@if ($claim->claimed)
<span class="px-2 py-0.5 rounded-full text-xs bg-green-100 text-green-700 font-bold">
已领取</span>
@else
<span class="px-2 py-0.5 rounded-full text-xs bg-gray-100 text-gray-500">未领取</span>
@endif
</td>
<td class="px-4 py-3 text-xs text-gray-500">
{{ $claim->claimed_at?->format('H:i:s') ?? '—' }}
</td>
<div class="{{ $adminListCardClass }}">
<div class="{{ $adminListSectionHeadClass }}">
<div>
<h3 class="{{ $adminListSectionTitleClass }}">领取明细</h3>
<p class="{{ $adminListSectionDescClass }}">明细表头、正文、状态徽章与分页统一到后台列表页样式。</p>
</div>
</div>
<div class="{{ $adminListTableWrapClass }}">
<table class="{{ $adminListTableClass }}">
<thead>
<tr class="{{ $adminListTableHeadRowClass }}">
<th class="{{ $adminListTableHeadCellClass }}">用户</th>
<th class="{{ $adminListTableHeadCellClass }} text-center">分配金额</th>
<th class="{{ $adminListTableHeadCellClass }} text-center">状态</th>
<th class="{{ $adminListTableHeadCellClass }}">领取时间</th>
</tr>
@empty
<tr>
<td colspan="4" class="px-4 py-12 text-center text-gray-400">暂无领取记录</td>
</tr>
@endforelse
</tbody>
</table>
</thead>
<tbody class="{{ $adminListTableBodyClass }}">
@forelse ($claims as $claim)
<tr class="{{ $adminListTableRowClass }}">
<td class="px-4 py-3 {{ $adminListPrimaryTextClass }}">{{ $claim->user?->username }}</td>
<td class="px-4 py-3 text-center font-semibold text-amber-600">
{{ number_format($claim->amount) }}
</td>
<td class="px-4 py-3 text-center">
@if ($claim->claimed)
<span class="{{ $adminListBadgeBaseClass }} border-green-200 bg-green-100 text-green-700"> 已领取</span>
@else
<span class="{{ $adminListBadgeBaseClass }} border-gray-200 bg-gray-100 text-gray-500">未领取</span>
@endif
</td>
<td class="px-4 py-3 {{ $adminListSecondaryTextClass }}">
{{ $claim->claimed_at?->format('H:i:s') ?? '—' }}
</td>
</tr>
@empty
<tr>
<td colspan="4" class="{{ $adminListEmptyClass }}">暂无领取记录</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@if ($claims->hasPages())
<div class="{{ $adminListPaginationClass }}">{{ $claims->links() }}</div>
@endif
</div>
@if ($claims->hasPages())
<div class="px-4 py-4 border-t">{{ $claims->links() }}</div>
@endif
</div>
@endsection