Admin subscriptions: add expiring 7d merchant top10 reminder list

This commit is contained in:
萝卜
2026-03-17 00:39:50 +08:00
parent 7ce6a65aab
commit 03d30f0c7d
3 changed files with 185 additions and 0 deletions

View File

@@ -100,6 +100,43 @@
<h3>到期治理</h3>
<div class="muted mb-10">按到期时间ends_at快速定位需要续费/处理的订阅集合(不改变订阅 status 字段)。</div>
@if(($filters['expiry'] ?? '') === 'expiring_7d')
<div class="mt-10">
<div class="muted"><strong>7天内到期站点维度提醒清单Top10</strong></div>
<div class="muted muted-xs mt-6">用于运营优先触达按“到期订阅数”排序同时展示最早到期时间min_ends_at</div>
<table class="mt-10" data-role="expiring-7d-merchant-top10">
<thead>
<tr>
<th>站点</th>
<th>到期订阅数</th>
<th>最早到期</th>
</tr>
</thead>
<tbody>
@forelse(($expiryMerchantRows ?? []) as $row)
@php
$mid = (int) ($row['merchant_id'] ?? 0);
$mname = (string) ($row['merchant_name'] ?? '');
$cnt = (int) ($row['count'] ?? 0);
$minEndsAt = (string) ($row['min_ends_at'] ?? '');
$merchantUrl = $buildSelfUrl(['merchant_id' => $mid, 'page' => null]);
@endphp
<tr>
<td><a class="link" href="{!! $merchantUrl !!}">{{ $mname !== '' ? $mname : ('站点#' . $mid) }}</a></td>
<td>{{ $cnt }}</td>
<td>{{ $minEndsAt !== '' ? $minEndsAt : '-' }}</td>
</tr>
@empty
<tr>
<td colspan="3" class="muted">暂无数据</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@endif
@php
$expiredUrl = $buildQuickFilterUrl(['status' => null, 'expiry' => 'expired']);
$expiring7dUrl = $buildQuickFilterUrl(['status' => null, 'expiry' => 'expiring_7d']);