Files
chatroom/resources/views/admin/marriages/ceremonies.blade.php
lkddi d2797d5b59 功能:婚姻系统第9步(后台管理页面)
Admin/MarriageManagerController:
- index() 总览统计卡片
- list() 婚姻列表(筛选/强制离婚/取消求婚)
- proposals() 求婚记录
- ceremonies() 婚礼红包记录
- claimDetail() 红包领取明细
- intimacyLogs() 亲密度日志(来源筛选)
- configs/updateConfigs 参数配置(批量保存)
- tiers/updateTier 婚礼档位管理

Views(7个页面):admin/marriages/{index|list|configs|tiers|ceremonies|claim-detail|proposals|intimacy-logs}
侧边栏:superlevel 区块新增「💒 婚姻管理」入口
2026-03-01 15:15:03 +08:00

105 lines
5.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{--
文件功能:婚礼仪式记录页(含红包分发详情链接)
@author ChatRoom Laravel
@version 1.0.0
--}}
@extends('admin.layouts.app')
@section('title', '婚礼红包记录')
@section('content')
<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="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">
@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>
@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>
</div>
@if ($ceremonies->hasPages())
<div class="px-4 py-4 border-t">{{ $ceremonies->links() }}</div>
@endif
</div>
@endsection