ui(platform-orders): add export ledger link on index rows when receipts present
This commit is contained in:
@@ -1578,6 +1578,26 @@
|
|||||||
@if($syncError)
|
@if($syncError)
|
||||||
<div class="muted text-danger mt-6">同步失败:{{ $syncError }}{{ $syncErrorAt ? '(' . $syncErrorAt . ')' : '' }}</div>
|
<div class="muted text-danger mt-6">同步失败:{{ $syncError }}{{ $syncErrorAt ? '(' . $syncErrorAt . ')' : '' }}</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@php
|
||||||
|
// 对账明细导出:减少“先点详情页再导出”的额外跳转。
|
||||||
|
// 仅当存在支付/退款回执证据时展示(避免列表噪音)。
|
||||||
|
$hasLedgerEvidenceRow = (data_get($order->meta, 'payment_summary.total_amount') !== null)
|
||||||
|
|| (data_get($order->meta, 'payment_receipts.0.amount') !== null)
|
||||||
|
|| (data_get($order->meta, 'refund_summary.total_amount') !== null)
|
||||||
|
|| (data_get($order->meta, 'refund_receipts.0.amount') !== null);
|
||||||
|
|
||||||
|
$exportLedgerUrlRow = '/admin/platform-orders/' . $order->id . '/export-ledger?' . \Illuminate\Support\Arr::query([
|
||||||
|
'download' => 1,
|
||||||
|
// 列表页导出默认带“订单摘要”,便于离线流转(财务/运营对账)
|
||||||
|
'include_order_snapshot' => 1,
|
||||||
|
]);
|
||||||
|
@endphp
|
||||||
|
@if($hasLedgerEvidenceRow)
|
||||||
|
<div class="mt-6">
|
||||||
|
<a class="link muted muted-xs" href="{!! $exportLedgerUrlRow !!}" target="_blank" rel="noopener">导出对账明细</a>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
|
|||||||
Reference in New Issue
Block a user