diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php
index 53c4c9d..68f158f 100644
--- a/resources/views/admin/platform_orders/index.blade.php
+++ b/resources/views/admin/platform_orders/index.blade.php
@@ -1060,6 +1060,19 @@
{{ $paymentStatusLabels[$order->payment_status] ?? $order->payment_status }}
{{ $order->payment_status }}
+
+ @php
+ $hasReceiptEvidenceRow = (data_get($order->meta, 'payment_summary.total_amount') !== null)
+ || (data_get($order->meta, 'payment_receipts.0.amount') !== null);
+ $noReceiptFixUrlRow = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#add-payment-receipt';
+ @endphp
+ @if($order->payment_status === 'paid' && ! $hasReceiptEvidenceRow)
+
+ @endif
|
¥{{ number_format((float) $order->payable_amount, 2) }} |
¥{{ number_format((float) $order->paid_amount, 2) }} |
diff --git a/tests/Feature/AdminPlatformOrderIndexCompactViewPaidButNoReceiptShowsFixLinkTest.php b/tests/Feature/AdminPlatformOrderIndexCompactViewPaidButNoReceiptShowsFixLinkTest.php
new file mode 100644
index 0000000..f1cd17b
--- /dev/null
+++ b/tests/Feature/AdminPlatformOrderIndexCompactViewPaidButNoReceiptShowsFixLinkTest.php
@@ -0,0 +1,83 @@
+seed();
+
+ $this->post('/admin/login', [
+ 'email' => 'platform.admin@demo.local',
+ 'password' => 'Platform@123456',
+ ])->assertRedirect('/admin');
+ }
+
+ public function test_compact_view_shows_fix_link_when_paid_but_no_receipt_evidence(): void
+ {
+ $this->loginAsPlatformAdmin();
+
+ $merchant = Merchant::query()->firstOrFail();
+
+ $plan = Plan::query()->create([
+ 'code' => 'compact_view_no_receipt_fix_link_test',
+ 'name' => '精简视图无回执修复入口测试套餐',
+ 'billing_cycle' => 'monthly',
+ 'price' => 10,
+ 'list_price' => 10,
+ 'status' => 'active',
+ 'sort' => 10,
+ 'published_at' => now(),
+ ]);
+
+ $order = PlatformOrder::query()->create([
+ 'merchant_id' => $merchant->id,
+ 'plan_id' => $plan->id,
+ 'order_no' => 'PO_COMPACT_NO_RECEIPT_0001',
+ 'order_type' => 'new_purchase',
+ 'status' => 'activated',
+ 'payment_status' => 'paid',
+ 'plan_name' => $plan->name,
+ 'billing_cycle' => $plan->billing_cycle,
+ 'period_months' => 1,
+ 'quantity' => 1,
+ 'payable_amount' => 10,
+ 'paid_amount' => 10,
+ 'placed_at' => now(),
+ 'paid_at' => now(),
+ 'activated_at' => now(),
+ // 关键:无 payment_summary / payment_receipts
+ 'meta' => [],
+ ]);
+
+ $res = $this->get('/admin/platform-orders?status=activated');
+ $res->assertOk();
+
+ $indexSelfWithoutBack = '/admin/platform-orders?' . Arr::query([
+ 'status' => 'activated',
+ ]);
+
+ $fixUrl = '/admin/platform-orders/' . $order->id . '?' . Arr::query([
+ 'back' => $indexSelfWithoutBack,
+ ]) . '#add-payment-receipt';
+
+ $res->assertSee('无回执', false);
+ $res->assertSee($fixUrl, false);
+ $res->assertSee('去补回执', false);
+
+ // full 视图:仍应保留该提示(因为“无回执”不属于对账差额/退款总额等可选列的内容)
+ $this->get('/admin/platform-orders?status=activated&view=full')
+ ->assertOk()
+ ->assertSee('无回执', false);
+ }
+}