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

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
@@ -3,117 +3,111 @@
@section('title', "双色球第 {$issue->issue_no} 期购买明细")
@section('content')
<div class="space-y-6">
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
{{-- 页头 --}}
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6 flex justify-between items-center">
@php
$tableCellClass = 'px-4 py-3';
$badgeClass = $adminListBadgeBaseClass;
@endphp
<div class="{{ $adminListPageClass }}">
<div class="{{ $adminListHeaderCardClass }} flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
<div>
<h2 class="text-lg font-bold text-gray-800">🎟️ 双色球 {{ $issue->issue_no }} 期购买明细</h2>
<p class="text-xs text-gray-500 mt-1">
<h2 class="{{ $adminListHeaderTitleClass }}">🎟️ 双色球第 {{ $issue->issue_no }} 期购买明细</h2>
<p class="{{ $adminListHeaderSubtitleClass }}">
开奖时间:{{ $issue->draw_at?->format('Y-m-d H:i:s') ?? '未开奖' }}
@if ($issue->status === 'settled')
&nbsp;·&nbsp;开奖号码:
<span class="font-bold text-indigo-600">
<span
class="bg-red-100 text-red-600 px-1 rounded">{{ str_pad($issue->red1, 2, '0', STR_PAD_LEFT) }}</span>
<span
class="bg-red-100 text-red-600 px-1 rounded">{{ str_pad($issue->red2, 2, '0', STR_PAD_LEFT) }}</span>
<span
class="bg-red-100 text-red-600 px-1 rounded">{{ str_pad($issue->red3, 2, '0', STR_PAD_LEFT) }}</span>
<span
class="bg-blue-100 text-blue-600 px-1 rounded">{{ str_pad($issue->blue, 2, '0', STR_PAD_LEFT) }}</span>
<span class="inline-flex items-center gap-1 font-semibold text-indigo-600">
<span class="rounded border border-red-200 bg-red-100 px-1.5 py-0.5 text-red-600">{{ str_pad($issue->red1, 2, '0', STR_PAD_LEFT) }}</span>
<span class="rounded border border-red-200 bg-red-100 px-1.5 py-0.5 text-red-600">{{ str_pad($issue->red2, 2, '0', STR_PAD_LEFT) }}</span>
<span class="rounded border border-red-200 bg-red-100 px-1.5 py-0.5 text-red-600">{{ str_pad($issue->red3, 2, '0', STR_PAD_LEFT) }}</span>
<span class="rounded border border-blue-200 bg-blue-100 px-1.5 py-0.5 text-blue-600">{{ str_pad($issue->blue, 2, '0', STR_PAD_LEFT) }}</span>
</span>
@endif
&nbsp;·&nbsp;奖池:<span class="font-bold text-amber-600">{{ number_format($issue->pool_amount ?? 0) }}
金币</span>
&nbsp;·&nbsp;奖池:<span class="font-semibold text-amber-600">{{ number_format($issue->pool_amount ?? 0) }} 金币</span>
</p>
</div>
<a href="{{ route('admin.game-history.lottery') }}"
class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg text-sm font-bold hover:bg-gray-200 transition">
<a href="{{ route('admin.game-history.lottery') }}" class="{{ $adminListSecondaryButtonClass }}">
返回期号列表
</a>
</div>
{{-- 购买明细表 --}}
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
<table class="w-full text-sm">
<thead class="bg-gray-50 border-b border-gray-100">
<tr>
<th class="px-4 py-3 text-left text-xs font-bold text-gray-500 uppercase">玩家</th>
<th class="px-4 py-3 text-center text-xs font-bold text-gray-500 uppercase">投注号码</th>
<th class="px-4 py-3 text-center text-xs font-bold text-gray-500 uppercase">彩票类型</th>
<th class="px-4 py-3 text-right text-xs font-bold text-gray-500 uppercase">花费</th>
<th class="px-4 py-3 text-right text-xs font-bold text-gray-500 uppercase">奖金获得</th>
<th class="px-4 py-3 text-center text-xs font-bold text-gray-500 uppercase">中奖等级</th>
<th class="px-4 py-3 text-right text-xs font-bold text-gray-500 uppercase">下注时间</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-50">
@forelse ($tickets as $ticket)
@php
$won = ($ticket->payout ?? 0) > 0;
@endphp
<tr class="hover:bg-gray-50 transition {{ $won ? 'bg-amber-50/50' : '' }}">
<td class="px-4 py-3 font-medium text-gray-800">
{{ $ticket->user?->username ?? '已注销' }}
</td>
<td class="px-4 py-3 text-center font-mono">
<div class="flex items-center justify-center gap-1 flex-wrap">
<span
class="text-xs bg-red-50 text-red-500 px-1 rounded shadow-sm border border-red-100">{{ str_pad($ticket->red1, 2, '0', STR_PAD_LEFT) }}</span>
<span
class="text-xs bg-red-50 text-red-500 px-1 rounded shadow-sm border border-red-100">{{ str_pad($ticket->red2, 2, '0', STR_PAD_LEFT) }}</span>
<span
class="text-xs bg-red-50 text-red-500 px-1 rounded shadow-sm border border-red-100">{{ str_pad($ticket->red3, 2, '0', STR_PAD_LEFT) }}</span>
<span
class="text-xs bg-blue-50 text-blue-500 px-1 rounded shadow-sm border border-blue-100">{{ str_pad($ticket->blue, 2, '0', STR_PAD_LEFT) }}</span>
</div>
</td>
<td class="px-4 py-3 text-center">
@if ($ticket->is_quick_pick)
<span
class="px-2 py-0.5 rounded-full text-xs font-bold bg-purple-100 text-purple-700">随机机选</span>
@else
<span
class="px-2 py-0.5 rounded-full text-xs font-bold bg-blue-100 text-blue-700">自选号码</span>
@endif
</td>
<td class="px-4 py-3 text-right font-mono text-sm text-gray-700">
{{ number_format($ticket->amount) }}
</td>
<td
class="px-4 py-3 text-right font-mono text-sm {{ $won ? 'text-emerald-600 font-bold' : 'text-gray-400' }}">
{{ $won ? '+' . number_format($ticket->payout) : '0' }}
</td>
<td class="px-4 py-3 text-center">
@if ($issue->status === 'settled')
@if ($won)
<span
class="px-2 py-0.5 rounded-full text-xs font-bold bg-amber-100 text-amber-700">
🎉 {{ $ticket->prize_level }}等奖
</span>
<div class="{{ $adminListCardClass }}">
<div class="{{ $adminListSectionHeadClass }}">
<div class="{{ $adminListSectionTitleClass }}">购买明细</div>
<div class="{{ $adminListSectionDescClass }}">统一明细表格样式,保留号码球颜色、票种和中奖等级语义。</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 }} text-right">花费</th>
<th class="{{ $adminListTableHeadCellClass }} text-right">奖金获得</th>
<th class="{{ $adminListTableHeadCellClass }} text-center">中奖等级</th>
<th class="{{ $adminListTableHeadCellClass }} text-right">下注时间</th>
</tr>
</thead>
<tbody class="{{ $adminListTableBodyClass }}">
@forelse ($tickets as $ticket)
@php
$won = ($ticket->payout ?? 0) > 0;
@endphp
<tr class="{{ $adminListTableRowClass }} {{ $won ? 'bg-amber-50/50' : '' }}">
<td class="{{ $tableCellClass }} {{ $adminListPrimaryTextClass }}">
{{ $ticket->user?->username ?? '已注销' }}
</td>
<td class="{{ $tableCellClass }} text-center {{ $adminListNumericTextClass }}">
<div class="flex flex-wrap items-center justify-center gap-1">
<span class="rounded border border-red-100 bg-red-50 px-1.5 py-0.5 text-xs text-red-500">{{ str_pad($ticket->red1, 2, '0', STR_PAD_LEFT) }}</span>
<span class="rounded border border-red-100 bg-red-50 px-1.5 py-0.5 text-xs text-red-500">{{ str_pad($ticket->red2, 2, '0', STR_PAD_LEFT) }}</span>
<span class="rounded border border-red-100 bg-red-50 px-1.5 py-0.5 text-xs text-red-500">{{ str_pad($ticket->red3, 2, '0', STR_PAD_LEFT) }}</span>
<span class="rounded border border-blue-100 bg-blue-50 px-1.5 py-0.5 text-xs text-blue-500">{{ str_pad($ticket->blue, 2, '0', STR_PAD_LEFT) }}</span>
</div>
</td>
<td class="{{ $tableCellClass }} text-center">
@if ($ticket->is_quick_pick)
<span class="{{ $badgeClass }} border-purple-200 bg-purple-100 text-purple-700">随机机选</span>
@else
<span
class="px-2 py-0.5 rounded-full text-xs font-bold bg-gray-100 text-gray-500">未中奖</span>
<span class="{{ $badgeClass }} border-blue-200 bg-blue-100 text-blue-700">自选号码</span>
@endif
@else
<span class="text-xs text-gray-400">等待开奖</span>
@endif
</td>
<td class="px-4 py-3 text-right text-xs text-gray-400">
{{ $ticket->created_at->format('H:i:s') }}
</td>
</tr>
@empty
<tr>
<td colspan="7" class="px-4 py-10 text-center text-gray-400 text-sm">本期暂无人购买</td>
</tr>
@endforelse
</tbody>
</table>
</td>
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} text-gray-700">
{{ number_format($ticket->amount) }}
</td>
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} {{ $won ? 'font-semibold text-emerald-600' : 'text-gray-400' }}">
{{ $won ? '+' . number_format($ticket->payout) : '0' }}
</td>
<td class="{{ $tableCellClass }} text-center">
@if ($issue->status === 'settled')
@if ($won)
<span class="{{ $badgeClass }} border-amber-200 bg-amber-100 text-amber-700">🎉 {{ $ticket->prize_level }}等奖</span>
@else
<span class="{{ $badgeClass }} border-gray-200 bg-gray-100 text-gray-500">未中奖</span>
@endif
@else
<span class="{{ $adminListSecondaryTextClass }}">等待开奖</span>
@endif
</td>
<td class="{{ $tableCellClass }} text-right {{ $adminListSecondaryTextClass }}">
{{ $ticket->created_at->format('H:i:s') }}
</td>
</tr>
@empty
<tr>
<td colspan="7" class="{{ $adminListEmptyClass }}">本期暂无人购买</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@if ($tickets->hasPages())
<div class="px-4 py-3 border-t border-gray-100">
<div class="{{ $adminListPaginationClass }}">
{{ $tickets->links() }}
</div>
@endif