dashboard: recent platform orders show no-receipt hint and fix link

This commit is contained in:
萝卜
2026-03-16 00:06:45 +08:00
parent 423723cd5a
commit 97710f43d9
2 changed files with 79 additions and 1 deletions

View File

@@ -229,11 +229,25 @@
@php
$poShowUrl = \App\Support\BackUrl::withBack('/admin/platform-orders/' . $po->id, $selfWithoutBack);
@endphp
@php
$hasReceiptEvidence = (data_get($po->meta, 'payment_summary.total_amount') !== null)
|| (data_get($po->meta, 'payment_receipts.0.amount') !== null);
$fixReceiptUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $po->id, $selfWithoutBack, 'add-payment-receipt');
@endphp
<tr>
<td><a class="link" href="{!! $poShowUrl !!}">{{ $po->order_no }}</a></td>
<td>{{ $po->orderTypeLabel() }}</td>
<td>¥{{ number_format((float) $po->payable_amount, 2) }}</td>
<td>{{ $po->payment_status }}</td>
<td>
{{ $po->payment_status }}
@if((string) $po->payment_status === 'paid' && ! $hasReceiptEvidence)
<div class="muted text-danger muted-xs row-warn">
<span class="row-warn-prefix">无回执</span>
<span class="muted"></span>
<a class="link" href="{!! $fixReceiptUrl !!}">去补回执</a>
</div>
@endif
</td>
<td>{{ $po->status }}</td>
</tr>
@empty