统一后台列表页样式并调整站长菜单
This commit is contained in:
@@ -3,110 +3,113 @@
|
||||
@section('title', "百家乐第 #{$round->id} 局下注明细")
|
||||
|
||||
@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">🎲 百家乐 #{{ $round->id }} 局下注明细</h2>
|
||||
<p class="text-xs text-gray-500 mt-1">
|
||||
<h2 class="{{ $adminListHeaderTitleClass }}">🎲 百家乐 #{{ $round->id }} 局下注明细</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">
|
||||
结算时间:{{ $round->settled_at?->format('Y-m-d H:i:s') ?? '未结算' }}
|
||||
· 结果:
|
||||
<span class="font-bold text-indigo-600">{{ $round->resultLabel() }}</span>
|
||||
· 总点数:<span class="font-bold">{{ $round->total_points }}</span>
|
||||
· 结果:<span class="font-semibold text-indigo-600">{{ $round->resultLabel() }}</span>
|
||||
· 总点数:<span class="font-semibold text-gray-700">{{ $round->total_points }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ route('admin.game-history.baccarat') }}"
|
||||
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.baccarat') }}" class="{{ $adminListSecondaryButtonClass }}">
|
||||
← 返回历史列表
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{-- 本局摘要 --}}
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5">
|
||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4">
|
||||
<div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-indigo-600">{{ number_format($round->bet_count ?? 0) }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">参与下注人数</div>
|
||||
<div class="mt-1 text-xs text-gray-500">参与下注人数</div>
|
||||
</div>
|
||||
<div class="bg-red-50 rounded-xl shadow-sm border border-red-100 p-5">
|
||||
<div class="rounded-xl border border-red-100 bg-red-50 p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-red-600">{{ number_format($round->total_bet_big ?? 0) }}</div>
|
||||
<div class="text-xs text-red-400 mt-1">押大总金额</div>
|
||||
<div class="mt-1 text-xs text-red-400">押大总金额</div>
|
||||
</div>
|
||||
<div class="bg-blue-50 rounded-xl shadow-sm border border-blue-100 p-5">
|
||||
<div class="rounded-xl border border-blue-100 bg-blue-50 p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-blue-600">{{ number_format($round->total_bet_small ?? 0) }}</div>
|
||||
<div class="text-xs text-blue-400 mt-1">押小总金额</div>
|
||||
<div class="mt-1 text-xs text-blue-400">押小总金额</div>
|
||||
</div>
|
||||
<div class="bg-amber-50 rounded-xl shadow-sm border border-amber-100 p-5">
|
||||
<div class="rounded-xl border border-amber-100 bg-amber-50 p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-amber-600">{{ number_format($round->total_payout ?? 0) }}</div>
|
||||
<div class="text-xs text-amber-400 mt-1">本局派奖总额</div>
|
||||
<div class="mt-1 text-xs text-amber-400">本局派奖总额</div>
|
||||
</div>
|
||||
</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-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 ($bets as $bet)
|
||||
@php
|
||||
$betLabels = ['big' => '大', 'small' => '小', 'triple' => '豹子'];
|
||||
$betColors = [
|
||||
'big' => 'bg-red-100 text-red-700',
|
||||
'small' => 'bg-blue-100 text-blue-700',
|
||||
'triple' => 'bg-purple-100 text-purple-700',
|
||||
];
|
||||
$won = $bet->payout > 0;
|
||||
@endphp
|
||||
<tr class="hover:bg-gray-50 transition">
|
||||
<td class="px-4 py-3 font-medium text-gray-800">
|
||||
{{ $bet->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold {{ $betColors[$bet->bet_type] ?? 'bg-gray-100 text-gray-600' }}">
|
||||
{{ $betLabels[$bet->bet_type] ?? $bet->bet_type }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-sm text-gray-700">
|
||||
{{ number_format($bet->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($bet->payout) : '0' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($won)
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold bg-emerald-100 text-emerald-700">🎉
|
||||
中奖</span>
|
||||
@else
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold bg-gray-100 text-gray-500">未中</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right text-xs text-gray-400">
|
||||
{{ $bet->created_at->format('H:i:s') }}
|
||||
</td>
|
||||
<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-right">押注金额</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">实际获得</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">是否中奖</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">下注时间</th>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="px-4 py-10 text-center text-gray-400 text-sm">本局无人下注</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($bets as $bet)
|
||||
@php
|
||||
$betLabels = ['big' => '大', 'small' => '小', 'triple' => '豹子'];
|
||||
$betColors = [
|
||||
'big' => 'bg-red-100 text-red-700 border-red-200',
|
||||
'small' => 'bg-blue-100 text-blue-700 border-blue-200',
|
||||
'triple' => 'bg-purple-100 text-purple-700 border-purple-200',
|
||||
];
|
||||
$won = $bet->payout > 0;
|
||||
@endphp
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListPrimaryTextClass }}">
|
||||
{{ $bet->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
<span class="{{ $badgeClass }} {{ $betColors[$bet->bet_type] ?? 'bg-gray-100 text-gray-600 border-gray-200' }}">
|
||||
{{ $betLabels[$bet->bet_type] ?? $bet->bet_type }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} text-gray-700">
|
||||
{{ number_format($bet->amount) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} {{ $won ? 'font-semibold text-emerald-600' : 'text-gray-400' }}">
|
||||
{{ $won ? '+' . number_format($bet->payout) : '0' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@if ($won)
|
||||
<span class="{{ $badgeClass }} bg-emerald-100 text-emerald-700 border-emerald-200">🎉 中奖</span>
|
||||
@else
|
||||
<span class="{{ $badgeClass }} bg-gray-100 text-gray-500 border-gray-200">未中</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListSecondaryTextClass }}">
|
||||
{{ $bet->created_at->format('H:i:s') }}
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="{{ $adminListEmptyClass }}">本局无人下注</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($bets->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $bets->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user