feat(platform-orders): 列表增加退款数列与退款快捷筛选

This commit is contained in:
萝卜
2026-03-10 16:51:15 +00:00
parent aa7c655043
commit b081a03e69

View File

@@ -20,6 +20,10 @@
<a href="/admin/platform-orders?payment_status=paid&status=pending" class="muted">待生效</a>
<span class="muted"></span>
<a href="/admin/platform-orders?syncable_only=1" class="muted">可同步订阅</a>
<span class="muted"></span>
<a href="/admin/platform-orders?payment_status=partially_refunded" class="muted">部分退款</a>
<span class="muted"></span>
<a href="/admin/platform-orders?payment_status=refunded" class="muted">已退款</a>
</div>
</div>
@@ -303,6 +307,7 @@
<th>最近批量同步</th>
<th>最近批量生效</th>
<th>回执数</th>
<th>退款数</th>
<th>操作</th>
</tr>
</thead>
@@ -433,6 +438,16 @@
<span class="muted">0</span>
@endif
</td>
<td>
@php
$refundCount = count((array) (data_get($order->meta, 'refund_receipts', []) ?? []));
@endphp
@if($refundCount > 0)
<a href="/admin/platform-orders/{{ $order->id }}" class="muted">{{ $refundCount }}</a>
@else
<span class="muted">0</span>
@endif
</td>
<td>
@php
$canActivate = ($order->payment_status === 'paid') && ($order->status === 'activated');