From 9a3ab559fdce56ac56a09676cbe494a33fc2ecd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 18 Mar 2026 22:03:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E7=B4=A2=E9=A1=B5=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E5=B7=B2=E4=BB=98=E6=97=A0=E5=9B=9E=E6=89=A7=E6=B2=BB=E7=90=86?= =?UTF-8?q?=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/platform_leads/index.blade.php | 8 +++ ...IncludePaidNoReceiptGovernanceLinkTest.php | 56 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 tests/Feature/AdminPlatformLeadIndexShouldIncludePaidNoReceiptGovernanceLinkTest.php diff --git a/resources/views/admin/platform_leads/index.blade.php b/resources/views/admin/platform_leads/index.blade.php index 23d8e41..39310a4 100644 --- a/resources/views/admin/platform_leads/index.blade.php +++ b/resources/views/admin/platform_leads/index.blade.php @@ -217,9 +217,17 @@ 'renewal_missing_subscription' => '1', 'back' => $selfWithoutBack, ]); + + $viewPaidNoReceiptOrdersUrl = '/admin/platform-orders?' . \Illuminate\Support\Arr::query([ + 'lead_id' => $l->id, + 'payment_status' => 'paid', + 'receipt_status' => 'none', + 'back' => $selfWithoutBack, + ]); @endphp 查看订单 续费缺订阅 + 已付无回执 diff --git a/tests/Feature/AdminPlatformLeadIndexShouldIncludePaidNoReceiptGovernanceLinkTest.php b/tests/Feature/AdminPlatformLeadIndexShouldIncludePaidNoReceiptGovernanceLinkTest.php new file mode 100644 index 0000000..16d5dab --- /dev/null +++ b/tests/Feature/AdminPlatformLeadIndexShouldIncludePaidNoReceiptGovernanceLinkTest.php @@ -0,0 +1,56 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_lead_index_should_include_paid_no_receipt_governance_link(): void + { + $this->loginAsPlatformAdmin(); + + $plan = Plan::query()->create([ + 'code' => 'lead_index_paid_no_receipt_plan', + 'name' => '线索页已付无回执治理入口测试套餐', + 'billing_cycle' => 'monthly', + 'price' => 99, + 'list_price' => 99, + 'status' => 'active', + 'sort' => 10, + 'published_at' => now(), + ]); + + $lead = PlatformLead::query()->create([ + 'name' => '线索已付无回执测试', + 'mobile' => '13900000001', + 'email' => 'lead-paid-no-receipt@example.com', + 'company' => '线索治理测试公司', + 'plan_id' => $plan->id, + 'source' => 'web', + 'status' => 'new', + ]); + + $res = $this->get('/admin/platform-leads'); + $res->assertOk(); + + $html = (string) $res->getContent(); + $this->assertStringContainsString('已付无回执', $html); + $this->assertStringContainsString('/admin/platform-orders?lead_id=' . $lead->id . '&payment_status=paid&receipt_status=none&back=' . urlencode('/admin/platform-leads'), $html); + } +}