| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- @extends('base.base')
- @section('base')
- @php
- $reviewingCount = (int)($kpi['reviewing_count'] ?? 0);
- $approvedCount = (int)($kpi['approved_count'] ?? 0);
- $rejectedCount = (int)($kpi['rejected_count'] ?? 0);
- $paidLiability = (int)($kpi['paid_liability'] ?? 0);
- $decisionCount = $approvedCount + $rejectedCount;
- $approvalRate = $decisionCount > 0 ? round($approvedCount * 100 / $decisionCount, 1) : 0;
- $rejectedRate = $decisionCount > 0 ? round($rejectedCount * 100 / $decisionCount, 1) : 0;
- $totalCount = $reviewingCount + $decisionCount;
- $reviewingRate = $totalCount > 0 ? round($reviewingCount * 100 / $totalCount, 1) : 0;
- @endphp
- <style>
- .world-cup-kpi-band {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 12px;
- }
- .world-cup-kpi-value {
- font-size: 28px;
- line-height: 1.1;
- font-weight: 600;
- }
- .world-cup-kpi-label {
- margin-bottom: 10px;
- font-size: 14px;
- opacity: 0.9;
- }
- .world-cup-progress {
- height: 10px;
- border-radius: 6px;
- background: #edf2f7;
- overflow: hidden;
- }
- .world-cup-progress span {
- display: block;
- height: 100%;
- }
- .world-cup-section-action {
- display: flex;
- justify-content: space-between;
- align-items: center;
- gap: 12px;
- margin-bottom: 16px;
- }
- @media screen and (max-width: 767px) {
- .world-cup-section-action {
- align-items: flex-start;
- flex-direction: column;
- }
- }
- </style>
- <div class="main-panel">
- <div class="content-wrapper">
- <div class="page-header">
- <h3 class="page-title">
- <span class="page-title-icon bg-gradient-primary text-white mr-2">
- <i class="mdi mdi-chart-bar"></i>
- </span>
- World Cup KPI 看板
- </h3>
- <nav aria-label="breadcrumb">
- <ol class="breadcrumb">
- <li class="breadcrumb-item"><a href="#">活动管理</a></li>
- <li class="breadcrumb-item active" aria-current="page">KPI 看板</li>
- </ol>
- </nav>
- </div>
- <div class="row">
- <div class="col-md-3 stretch-card grid-margin">
- <div class="card bg-gradient-warning text-white">
- <div class="card-body">
- <div class="world-cup-kpi-band">
- <div>
- <div class="world-cup-kpi-label">待审核奖励</div>
- <div class="world-cup-kpi-value">{{ $reviewingCount }}</div>
- </div>
- <i class="mdi mdi-timer-sand" style="font-size: 34px;"></i>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-3 stretch-card grid-margin">
- <div class="card bg-gradient-success text-white">
- <div class="card-body">
- <div class="world-cup-kpi-band">
- <div>
- <div class="world-cup-kpi-label">已通过奖励</div>
- <div class="world-cup-kpi-value">{{ $approvedCount }}</div>
- </div>
- <i class="mdi mdi-check-circle-outline" style="font-size: 34px;"></i>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-3 stretch-card grid-margin">
- <div class="card bg-gradient-danger text-white">
- <div class="card-body">
- <div class="world-cup-kpi-band">
- <div>
- <div class="world-cup-kpi-label">已驳回奖励</div>
- <div class="world-cup-kpi-value">{{ $rejectedCount }}</div>
- </div>
- <i class="mdi mdi-close-circle-outline" style="font-size: 34px;"></i>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-3 stretch-card grid-margin">
- <div class="card bg-gradient-info text-white">
- <div class="card-body">
- <div class="world-cup-kpi-band">
- <div>
- <div class="world-cup-kpi-label">已赔付金额</div>
- <div class="world-cup-kpi-value">${{ number_format($paidLiability / 100, 2) }}</div>
- </div>
- <i class="mdi mdi-cash-multiple" style="font-size: 34px;"></i>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-5 grid-margin stretch-card">
- <div class="card">
- <div class="card-body">
- <div class="world-cup-section-action">
- <h4 class="card-title mb-0">审核漏斗</h4>
- <div>
- <a class="btn btn-gradient-primary btn-sm" href="/admin/world-cup/rewards">进入审核队列</a>
- <a class="btn btn-outline-primary btn-sm" href="/admin/world-cup/schedule">赛程更新</a>
- </div>
- </div>
- <div class="mb-4">
- <div class="d-flex justify-content-between mb-2">
- <span>待审核占比</span>
- <span>{{ $reviewingRate }}%</span>
- </div>
- <div class="world-cup-progress">
- <span style="width: {{ $reviewingRate }}%; background: #fed713;"></span>
- </div>
- </div>
- <div class="mb-4">
- <div class="d-flex justify-content-between mb-2">
- <span>通过率</span>
- <span>{{ $approvalRate }}%</span>
- </div>
- <div class="world-cup-progress">
- <span style="width: {{ $approvalRate }}%; background: #1bcfb4;"></span>
- </div>
- </div>
- <div>
- <div class="d-flex justify-content-between mb-2">
- <span>驳回率</span>
- <span>{{ $rejectedRate }}%</span>
- </div>
- <div class="world-cup-progress">
- <span style="width: {{ $rejectedRate }}%; background: #fe7c96;"></span>
- </div>
- </div>
- <div class="table-responsive mt-4">
- <table class="table table-bordered">
- <tbody>
- <tr>
- <th>已处理总数</th>
- <td>{{ $decisionCount }}</td>
- </tr>
- <tr>
- <th>当前队列总数</th>
- <td>{{ $totalCount }}</td>
- </tr>
- <tr>
- <th>已赔付总额</th>
- <td>${{ number_format($paidLiability / 100, 2) }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <div class="col-lg-7 grid-margin stretch-card">
- <div class="card">
- <div class="card-body">
- <div class="world-cup-section-action">
- <h4 class="card-title mb-0">High Risk 待审</h4>
- <a class="btn btn-outline-danger btn-sm" href="/admin/world-cup/rewards?status=reviewing&risk=high">只看高风险</a>
- </div>
- <div class="table-responsive">
- <table class="table table-bordered table-hover">
- <thead>
- <tr>
- <th>Reward ID</th>
- <th>邀请人</th>
- <th>被邀请人</th>
- <th>首充</th>
- <th>赔付</th>
- <th>风险</th>
- <th>提交时间</th>
- </tr>
- </thead>
- <tbody>
- @forelse($highRiskList as $row)
- <tr>
- <td>{{ $row['reward_id'] }}</td>
- <td>{{ $row['referrer_id'] }}</td>
- <td>{{ $row['invitee_id'] }}</td>
- <td>${{ number_format(($row['first_deposit_amt'] ?? 0) / 100, 2) }}</td>
- <td>${{ number_format(($row['total_liability'] ?? 0) / 100, 2) }}</td>
- <td>
- <span class="badge badge-danger">
- {{ $row['risk_level'] ?? 'high' }} / {{ $row['risk_score'] ?? 0 }}
- </span>
- </td>
- <td>{{ $row['submitted_at'] ?? '-' }}</td>
- </tr>
- @empty
- <tr>
- <td colspan="7" class="text-center text-muted">暂无 High Risk 待审奖励</td>
- </tr>
- @endforelse
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-6 grid-margin stretch-card">
- <div class="card">
- <div class="card-body">
- <h4 class="card-title">最新待审核</h4>
- <div class="table-responsive">
- <table class="table table-bordered table-hover">
- <thead>
- <tr>
- <th>Reward ID</th>
- <th>邀请人</th>
- <th>被邀请人</th>
- <th>风险</th>
- <th>提交时间</th>
- </tr>
- </thead>
- <tbody>
- @forelse($reviewingList as $row)
- <tr>
- <td>{{ $row['reward_id'] }}</td>
- <td>{{ $row['referrer_id'] }}</td>
- <td>{{ $row['invitee_id'] }}</td>
- <td>{{ $row['risk_level'] ?? '-' }}</td>
- <td>{{ $row['submitted_at'] ?? '-' }}</td>
- </tr>
- @empty
- <tr>
- <td colspan="5" class="text-center text-muted">暂无待审核奖励</td>
- </tr>
- @endforelse
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <div class="col-lg-6 grid-margin stretch-card">
- <div class="card">
- <div class="card-body">
- <div class="world-cup-section-action">
- <h4 class="card-title mb-0">最近审核日志</h4>
- <a class="btn btn-outline-primary btn-sm" href="/admin/world-cup/logs">查看全部日志</a>
- </div>
- <div class="table-responsive">
- <table class="table table-bordered table-hover">
- <thead>
- <tr>
- <th>Reward ID</th>
- <th>操作人</th>
- <th>动作</th>
- <th>状态变化</th>
- <th>时间</th>
- </tr>
- </thead>
- <tbody>
- @forelse($logs as $log)
- <tr>
- <td>{{ $log['reward_id'] ?? '-' }}</td>
- <td>{{ $log['actor'] ?? '-' }}</td>
- <td>{{ $log['action'] ?? '-' }}</td>
- <td>{{ $log['before_status'] ?? '-' }} -> {{ $log['after_status'] ?? '-' }}</td>
- <td>{{ $log['created_at'] ?? '-' }}</td>
- </tr>
- @empty
- <tr>
- <td colspan="5" class="text-center text-muted">暂无审核日志</td>
- </tr>
- @endforelse
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endsection
|