统一后台列表页样式并调整站长菜单
This commit is contained in:
@@ -10,95 +10,108 @@
|
||||
@section('title', '婚礼红包记录')
|
||||
|
||||
@section('content')
|
||||
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
|
||||
|
||||
<div class="flex items-center justify-between mb-5">
|
||||
<h2 class="text-xl font-bold text-gray-800">🎊 婚礼红包记录</h2>
|
||||
<a href="{{ route('admin.marriages.index') }}" class="text-sm text-indigo-600 hover:underline">← 返回总览</a>
|
||||
</div>
|
||||
<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 }}">统一查看婚礼红包发放进度与领取详情。</p>
|
||||
</div>
|
||||
<a href="{{ route('admin.marriages.index') }}" class="{{ $adminListSecondaryButtonClass }}">返回总览</a>
|
||||
</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-gray-600 text-xs uppercase">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left">ID</th>
|
||||
<th class="px-4 py-3 text-left">新人</th>
|
||||
<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-center">领取进度</th>
|
||||
<th class="px-4 py-3 text-center">状态</th>
|
||||
<th class="px-4 py-3 text-left">时间</th>
|
||||
<th class="px-4 py-3 text-center">详情</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y">
|
||||
@forelse ($ceremonies as $c)
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="px-4 py-3 text-gray-400 font-mono text-xs">{{ $c->id }}</td>
|
||||
<td class="px-4 py-3">
|
||||
<span class="font-bold">{{ $c->marriage?->user?->username }}</span>
|
||||
<span class="text-gray-400 mx-1">×</span>
|
||||
<span class="font-bold">{{ $c->marriage?->partner?->username }}</span>
|
||||
</td>
|
||||
<td class="px-4 py-3">
|
||||
{{ $c->tier?->icon }} {{ $c->tier?->name ?? '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center font-bold text-amber-600">
|
||||
{{ number_format($c->total_amount) }} 金
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center text-gray-600">
|
||||
{{ $c->online_count ?? '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($c->total_amount > 0)
|
||||
<div class="text-xs text-gray-600">
|
||||
{{ $c->claimed_count }} / {{ $c->online_count ?? '?' }} 人
|
||||
</div>
|
||||
<div class="text-xs text-emerald-600 font-bold">
|
||||
{{ number_format($c->claimed_amount) }} / {{ number_format($c->total_amount) }}
|
||||
</div>
|
||||
@else
|
||||
<span class="text-gray-300 text-xs">无红包</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold
|
||||
{{ match ($c->status) {
|
||||
'completed' => 'bg-green-100 text-green-700',
|
||||
'active' => 'bg-blue-100 text-blue-700',
|
||||
'pending' => 'bg-amber-100 text-amber-700',
|
||||
'expired' => 'bg-gray-100 text-gray-500',
|
||||
'cancelled' => 'bg-red-100 text-red-600',
|
||||
default => 'bg-gray-100 text-gray-600',
|
||||
} }}">
|
||||
{{ ['completed' => '已完成', 'active' => '进行中', 'pending' => '待触发', 'expired' => '已过期', 'cancelled' => '已取消'][$c->status] ?? $c->status }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-xs text-gray-500">
|
||||
{{ $c->ceremony_at?->format('Y-m-d H:i') }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<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 }}">ID</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">新人</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">档位</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">总金额</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">在线人数</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">领取进度</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">状态</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">详情</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($ceremonies as $c)
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="px-4 py-3 {{ $adminListSecondaryTextClass }} {{ $adminListNumericTextClass }}">{{ $c->id }}</td>
|
||||
<td class="px-4 py-3">
|
||||
<span class="{{ $adminListPrimaryTextClass }}">{{ $c->marriage?->user?->username }}</span>
|
||||
<span class="mx-1 text-gray-400">×</span>
|
||||
<span class="{{ $adminListPrimaryTextClass }}">{{ $c->marriage?->partner?->username }}</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 {{ $adminListBodyTextClass }}">
|
||||
{{ $c->tier?->icon }} {{ $c->tier?->name ?? '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center font-semibold text-amber-600">
|
||||
{{ number_format($c->total_amount) }} 金
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center {{ $adminListBodyTextClass }}">
|
||||
{{ $c->online_count ?? '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($c->total_amount > 0)
|
||||
<div class="text-xs text-gray-600">
|
||||
{{ $c->claimed_count }} / {{ $c->online_count ?? '?' }} 人
|
||||
</div>
|
||||
<div class="text-xs font-semibold text-emerald-600">
|
||||
{{ number_format($c->claimed_amount) }} / {{ number_format($c->total_amount) }}
|
||||
</div>
|
||||
@else
|
||||
<span class="text-gray-300 text-xs">无红包</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span
|
||||
class="{{ $adminListBadgeBaseClass }} {{ match ($c->status) {
|
||||
'completed' => 'border-green-200 bg-green-100 text-green-700',
|
||||
'active' => 'border-blue-200 bg-blue-100 text-blue-700',
|
||||
'pending' => 'border-amber-200 bg-amber-100 text-amber-700',
|
||||
'expired' => 'border-gray-200 bg-gray-100 text-gray-500',
|
||||
'cancelled' => 'border-red-200 bg-red-100 text-red-600',
|
||||
default => 'border-gray-200 bg-gray-100 text-gray-600',
|
||||
} }}">
|
||||
{{ ['completed' => '已完成', 'active' => '进行中', 'pending' => '待触发', 'expired' => '已过期', 'cancelled' => '已取消'][$c->status] ?? $c->status }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 {{ $adminListSecondaryTextClass }}">
|
||||
{{ $c->ceremony_at?->format('Y-m-d H:i') }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($c->total_amount > 0)
|
||||
<a href="{{ route('admin.marriages.claim-detail', $c->id) }}"
|
||||
class="text-xs text-indigo-600 hover:underline font-bold">明细</a>
|
||||
class="{{ $adminListActionButtonClass }} bg-indigo-50 text-indigo-600 hover:bg-indigo-600 hover:text-white">明细</a>
|
||||
@else
|
||||
<span class="text-gray-300 text-xs">—</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="9" class="px-4 py-12 text-center text-gray-400">暂无婚礼记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="9" class="{{ $adminListEmptyClass }}">暂无婚礼记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if ($ceremonies->hasPages())
|
||||
<div class="{{ $adminListPaginationClass }}">{{ $ceremonies->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
@if ($ceremonies->hasPages())
|
||||
<div class="px-4 py-4 border-t">{{ $ceremonies->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user