统一后台列表页样式并调整站长菜单
This commit is contained in:
@@ -7,110 +7,117 @@
|
||||
@section('title', '会员购买日志')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-white p-5 rounded-xl border border-gray-100 shadow-sm mb-6">
|
||||
<form action="{{ route('admin.vip-payment-logs.index') }}" method="GET" class="flex flex-wrap items-end gap-4">
|
||||
<div class="flex-1 min-w-[140px]">
|
||||
<label class="block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1.5">用户名</label>
|
||||
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
|
||||
|
||||
<div class="{{ $adminListPageClass }}">
|
||||
<div class="{{ $adminListFilterCardClass }}">
|
||||
<div class="{{ $adminListFilterInnerClass }}">
|
||||
<form action="{{ route('admin.vip-payment-logs.index') }}" method="GET"
|
||||
class="{{ $adminListFilterFormClass }}">
|
||||
<div class="flex-1 min-w-[140px]">
|
||||
<label class="{{ $adminListFilterLabelClass }}">用户名</label>
|
||||
<input type="text" name="username" value="{{ request('username') }}"
|
||||
class="w-full border-gray-300 rounded-lg shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm px-3 py-2"
|
||||
class="w-full {{ $adminListFilterInputClass }}"
|
||||
placeholder="支持模糊搜索">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 min-w-[140px]">
|
||||
<label class="block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1.5">订单号/流水号</label>
|
||||
<div class="flex-1 min-w-[140px]">
|
||||
<label class="{{ $adminListFilterLabelClass }}">订单号/流水号</label>
|
||||
<input type="text" name="order_no" value="{{ request('order_no') }}"
|
||||
class="w-full border-gray-300 rounded-lg shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm px-3 py-2"
|
||||
class="w-full {{ $adminListFilterInputClass }}"
|
||||
placeholder="本地单号 / 平台单号 / 第三方单号">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 min-w-[130px]">
|
||||
<label class="block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1.5">订单状态</label>
|
||||
<select name="status"
|
||||
class="w-full border-gray-300 rounded-lg shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm px-3 py-2">
|
||||
<option value="">全部状态</option>
|
||||
@foreach ($statusOptions as $value => $label)
|
||||
<option value="{{ $value }}" {{ request('status') === $value ? 'selected' : '' }}>{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex-1 min-w-[130px]">
|
||||
<label class="{{ $adminListFilterLabelClass }}">订单状态</label>
|
||||
<select name="status" class="w-full {{ $adminListFilterInputClass }}">
|
||||
<option value="">全部状态</option>
|
||||
@foreach ($statusOptions as $value => $label)
|
||||
<option value="{{ $value }}" {{ request('status') === $value ? 'selected' : '' }}>{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="flex-none w-36">
|
||||
<label class="block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1.5">开始日期</label>
|
||||
<div class="flex-none w-36">
|
||||
<label class="{{ $adminListFilterLabelClass }}">开始日期</label>
|
||||
<input type="date" name="date_start" value="{{ request('date_start') }}"
|
||||
class="w-full border-gray-300 rounded-lg shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm px-3 py-2">
|
||||
</div>
|
||||
class="w-full {{ $adminListFilterInputClass }}">
|
||||
</div>
|
||||
|
||||
<div class="flex-none w-36">
|
||||
<label class="block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1.5">结束日期</label>
|
||||
<div class="flex-none w-36">
|
||||
<label class="{{ $adminListFilterLabelClass }}">结束日期</label>
|
||||
<input type="date" name="date_end" value="{{ request('date_end') }}"
|
||||
class="w-full border-gray-300 rounded-lg shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm px-3 py-2">
|
||||
</div>
|
||||
class="w-full {{ $adminListFilterInputClass }}">
|
||||
</div>
|
||||
|
||||
<div class="flex-none flex items-center space-x-2">
|
||||
<button type="submit"
|
||||
class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-5 rounded-lg shadow-sm transition text-sm">查询</button>
|
||||
<a href="{{ route('admin.vip-payment-logs.index') }}"
|
||||
class="bg-white border border-gray-300 hover:bg-gray-50 text-gray-700 font-medium py-2 px-4 rounded-lg shadow-sm transition text-sm">重置</a>
|
||||
<div class="flex-none flex items-center gap-2">
|
||||
<button type="submit" class="{{ $adminListPrimaryButtonClass }}">查询</button>
|
||||
<a href="{{ route('admin.vip-payment-logs.index') }}"
|
||||
class="{{ $adminListSecondaryButtonClass }}">重置</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded shadow overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left border-collapse min-w-[1200px]">
|
||||
<thead>
|
||||
<tr class="bg-gray-50 text-gray-600 text-sm uppercase tracking-wider border-b border-gray-200">
|
||||
<th class="px-6 py-4 font-semibold whitespace-nowrap">订单ID</th>
|
||||
<th class="px-6 py-4 font-semibold whitespace-nowrap">用户</th>
|
||||
<th class="px-6 py-4 font-semibold whitespace-nowrap">会员等级</th>
|
||||
<th class="px-6 py-4 font-semibold whitespace-nowrap">本地订单号</th>
|
||||
<th class="px-6 py-4 font-semibold whitespace-nowrap">平台支付单号</th>
|
||||
<th class="px-6 py-4 font-semibold whitespace-nowrap">支付金额</th>
|
||||
<th class="px-6 py-4 font-semibold whitespace-nowrap">状态</th>
|
||||
<th class="px-6 py-4 font-semibold whitespace-nowrap">支付时间</th>
|
||||
<th class="px-6 py-4 font-semibold whitespace-nowrap">开通时间</th>
|
||||
<th class="px-6 py-4 font-semibold whitespace-nowrap text-right">创建时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
<div class="{{ $adminListCardClass }}">
|
||||
<div class="{{ $adminListTableWrapClass }}">
|
||||
<table class="{{ $adminListTableClass }} min-w-[1200px] text-left">
|
||||
<thead class="{{ $adminListTableHeadRowClass }}">
|
||||
<tr>
|
||||
<th class="{{ $adminListTableHeadCellClass }} whitespace-nowrap">订单ID</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} whitespace-nowrap">用户</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} whitespace-nowrap">会员等级</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} whitespace-nowrap">本地订单号</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} whitespace-nowrap">平台支付单号</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} whitespace-nowrap">支付金额</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} whitespace-nowrap">状态</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} whitespace-nowrap">支付时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} whitespace-nowrap">开通时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} whitespace-nowrap text-right">创建时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($logs as $log)
|
||||
@php
|
||||
$statusClass = match ($log->status) {
|
||||
'paid' => 'bg-emerald-100 text-emerald-700',
|
||||
'pending' => 'bg-amber-100 text-amber-700',
|
||||
'closed' => 'bg-gray-100 text-gray-500',
|
||||
'failed' => 'bg-rose-100 text-rose-700',
|
||||
default => 'bg-slate-100 text-slate-700',
|
||||
'paid' => 'border-emerald-200 bg-emerald-100 text-emerald-700',
|
||||
'pending' => 'border-amber-200 bg-amber-100 text-amber-700',
|
||||
'closed' => 'border-gray-200 bg-gray-100 text-gray-500',
|
||||
'failed' => 'border-rose-200 bg-rose-100 text-rose-700',
|
||||
default => 'border-slate-200 bg-slate-100 text-slate-700',
|
||||
};
|
||||
@endphp
|
||||
<tr class="hover:bg-gray-50 transition cursor-default">
|
||||
<td class="px-6 py-4 text-sm text-gray-500">#{{ $log->id }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="font-bold text-gray-800 whitespace-nowrap">{{ $log->user?->username ?? '未知用户' }}</div>
|
||||
<tr class="{{ $adminListTableRowClass }} cursor-default">
|
||||
<td class="px-4 py-4 {{ $adminListSecondaryTextClass }}">#{{ $log->id }}</td>
|
||||
<td class="px-4 py-4 whitespace-nowrap">
|
||||
<div class="{{ $adminListPrimaryTextClass }} whitespace-nowrap">{{ $log->user?->username ?? '未知用户' }}</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<td class="px-4 py-4 whitespace-nowrap">
|
||||
<span style="color: {{ $log->vipLevel?->color ?: '#111827' }}">{{ $log->vipLevel?->icon ?: '👑' }}</span>
|
||||
<span class="font-bold text-gray-800 ml-1">{{ $log->vip_name }}</span>
|
||||
<span class="{{ $adminListPrimaryTextClass }} ml-1">{{ $log->vip_name }}</span>
|
||||
</td>
|
||||
<td class="px-6 py-4 font-mono text-xs text-gray-600 whitespace-nowrap">{{ $log->order_no }}</td>
|
||||
<td class="px-6 py-4 font-mono text-xs text-gray-600 whitespace-nowrap">{{ $log->payment_order_no ?: '-' }}</td>
|
||||
<td class="px-6 py-4 font-bold text-rose-600 whitespace-nowrap">¥{{ number_format((float) $log->amount, 2) }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap"><span class="inline-flex px-2.5 py-1 rounded-full text-xs font-bold {{ $statusClass }}">{{ $statusOptions[$log->status] ?? $log->status }}</span></td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500 whitespace-nowrap">{{ $log->paid_at?->format('Y-m-d H:i:s') ?? '未支付' }}</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500 whitespace-nowrap">{{ $log->opened_vip_at?->format('Y-m-d H:i:s') ?? '未开通' }}</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500 text-right whitespace-nowrap">{{ $log->created_at->format('Y-m-d H:i:s') }}</td>
|
||||
<td class="px-4 py-4 {{ $adminListNumericTextClass }} text-xs text-gray-600 whitespace-nowrap">{{ $log->order_no }}</td>
|
||||
<td class="px-4 py-4 {{ $adminListNumericTextClass }} text-xs text-gray-600 whitespace-nowrap">{{ $log->payment_order_no ?: '-' }}</td>
|
||||
<td class="px-4 py-4 whitespace-nowrap font-bold text-rose-600">¥{{ number_format((float) $log->amount, 2) }}</td>
|
||||
<td class="px-4 py-4 whitespace-nowrap">
|
||||
<span class="{{ $adminListBadgeBaseClass }} {{ $statusClass }}">{{ $statusOptions[$log->status] ?? $log->status }}</span>
|
||||
</td>
|
||||
<td class="px-4 py-4 {{ $adminListBodyTextClass }} whitespace-nowrap">{{ $log->paid_at?->format('Y-m-d H:i:s') ?? '未支付' }}</td>
|
||||
<td class="px-4 py-4 {{ $adminListBodyTextClass }} whitespace-nowrap">{{ $log->opened_vip_at?->format('Y-m-d H:i:s') ?? '未开通' }}</td>
|
||||
<td class="px-4 py-4 {{ $adminListBodyTextClass }} text-right whitespace-nowrap">{{ $log->created_at->format('Y-m-d H:i:s') }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="10" class="px-6 py-8 text-center text-gray-500">📭 暂无会员购买记录</td>
|
||||
<td colspan="10" class="{{ $adminListEmptyClass }}">📭 暂无会员购买记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($logs->hasPages())
|
||||
<div class="px-6 py-4 border-t border-gray-200">{{ $logs->links() }}</div>
|
||||
@endif
|
||||
@if ($logs->hasPages())
|
||||
<div class="{{ $adminListPaginationClass }}">{{ $logs->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user