feat(platform-orders): 导出与列表补充支付回执统计列
This commit is contained in:
@@ -475,6 +475,10 @@ class PlatformOrderController extends Controller
|
|||||||
'同步失败时间',
|
'同步失败时间',
|
||||||
'最近批量生效时间',
|
'最近批量生效时间',
|
||||||
'最近批量生效管理员',
|
'最近批量生效管理员',
|
||||||
|
'支付回执数',
|
||||||
|
'最近回执时间',
|
||||||
|
'最近回执金额',
|
||||||
|
'最近回执渠道',
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($includeMeta) {
|
if ($includeMeta) {
|
||||||
@@ -496,6 +500,10 @@ class PlatformOrderController extends Controller
|
|||||||
$syncStatus = '未同步';
|
$syncStatus = '未同步';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$receipts = (array) (data_get($order->meta, 'payment_receipts', []) ?? []);
|
||||||
|
$receiptCount = count($receipts);
|
||||||
|
$latestReceipt = $receiptCount > 0 ? end($receipts) : null;
|
||||||
|
|
||||||
$row = [
|
$row = [
|
||||||
$order->id,
|
$order->id,
|
||||||
$order->order_no,
|
$order->order_no,
|
||||||
@@ -518,6 +526,10 @@ class PlatformOrderController extends Controller
|
|||||||
(string) (data_get($order->meta, 'subscription_activation_error.at') ?? ''),
|
(string) (data_get($order->meta, 'subscription_activation_error.at') ?? ''),
|
||||||
(string) (data_get($order->meta, 'batch_mark_activated.at') ?? ''),
|
(string) (data_get($order->meta, 'batch_mark_activated.at') ?? ''),
|
||||||
(string) (data_get($order->meta, 'batch_mark_activated.admin_id') ?? ''),
|
(string) (data_get($order->meta, 'batch_mark_activated.admin_id') ?? ''),
|
||||||
|
$receiptCount,
|
||||||
|
(string) (data_get($latestReceipt, 'paid_at') ?? ''),
|
||||||
|
(float) (data_get($latestReceipt, 'amount') ?? 0),
|
||||||
|
(string) (data_get($latestReceipt, 'channel') ?? ''),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($includeMeta) {
|
if ($includeMeta) {
|
||||||
|
|||||||
@@ -302,6 +302,7 @@
|
|||||||
<th>失败原因</th>
|
<th>失败原因</th>
|
||||||
<th>最近批量同步</th>
|
<th>最近批量同步</th>
|
||||||
<th>最近批量生效</th>
|
<th>最近批量生效</th>
|
||||||
|
<th>回执数</th>
|
||||||
<th>操作</th>
|
<th>操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -422,6 +423,16 @@
|
|||||||
<span class="muted">-</span>
|
<span class="muted">-</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
@php
|
||||||
|
$receiptCount = count((array) (data_get($order->meta, 'payment_receipts', []) ?? []));
|
||||||
|
@endphp
|
||||||
|
@if($receiptCount > 0)
|
||||||
|
<a href="/admin/platform-orders/{{ $order->id }}" class="muted">{{ $receiptCount }}</a>
|
||||||
|
@else
|
||||||
|
<span class="muted">0</span>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@php
|
@php
|
||||||
$canActivate = ($order->payment_status === 'paid') && ($order->status === 'activated');
|
$canActivate = ($order->payment_status === 'paid') && ($order->status === 'activated');
|
||||||
|
|||||||
Reference in New Issue
Block a user