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); + } +}