feat(admin): subscriptions list links + platform orders count
This commit is contained in:
@@ -97,6 +97,7 @@
|
||||
<th>开始时间</th>
|
||||
<th>到期时间</th>
|
||||
<th>到期状态</th>
|
||||
<th>关联订单数</th>
|
||||
<th>生效时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -104,9 +105,23 @@
|
||||
@forelse($subscriptions as $subscription)
|
||||
<tr>
|
||||
<td>{{ $subscription->id }}</td>
|
||||
<td>{{ $subscription->subscription_no }}</td>
|
||||
<td>{{ $subscription->merchant?->name ?? '未关联站点' }}</td>
|
||||
<td>{{ $subscription->plan_name ?: ($subscription->plan?->name ?? '未设置') }}</td>
|
||||
<td>
|
||||
<a href="/admin/site-subscriptions?keyword={{ urlencode($subscription->subscription_no) }}">{{ $subscription->subscription_no }}</a>
|
||||
</td>
|
||||
<td>
|
||||
@if($subscription->merchant)
|
||||
<a href="/admin/site-subscriptions?merchant_id={{ $subscription->merchant->id }}">{{ $subscription->merchant->name }}</a>
|
||||
@else
|
||||
未关联站点
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($subscription->plan)
|
||||
<a href="/admin/site-subscriptions?plan_id={{ $subscription->plan->id }}">{{ $subscription->plan_name ?: $subscription->plan->name }}</a>
|
||||
@else
|
||||
{{ $subscription->plan_name ?: '未设置' }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ ($statusLabels[$subscription->status] ?? $subscription->status) }} <span class="muted">({{ $subscription->status }})</span></td>
|
||||
<td>{{ $subscription->billing_cycle ?: '-' }}</td>
|
||||
<td>{{ $subscription->period_months }}</td>
|
||||
@@ -129,11 +144,19 @@
|
||||
@endphp
|
||||
{{ $expiryLabel }}
|
||||
</td>
|
||||
<td>
|
||||
@php $cnt = (int) ($subscription->platform_orders_count ?? 0); @endphp
|
||||
@if($cnt > 0)
|
||||
<a href="/admin/platform-orders?keyword={{ urlencode($subscription->subscription_no) }}">{{ $cnt }}</a>
|
||||
@else
|
||||
<span class="muted">0</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ optional($subscription->activated_at)->format('Y-m-d H:i:s') ?: '-' }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="12" class="muted">暂无订阅数据,当前阶段先把订阅主表与总台目录立起来,后续再接订阅创建/激活/续费链路。</td>
|
||||
<td colspan="13" class="muted">暂无订阅数据,当前阶段先把订阅主表与总台目录立起来,后续再接订阅创建/激活/续费链路。</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user