diff --git a/resources/views/admin/plans/index.blade.php b/resources/views/admin/plans/index.blade.php index f27b417..7f64e09 100644 --- a/resources/views/admin/plans/index.blade.php +++ b/resources/views/admin/plans/index.blade.php @@ -268,6 +268,11 @@ 'plan_id' => $plan->id, 'renewal_missing_subscription' => '1', ]); + $paidNoReceiptUrl = $makePlatformOrderUrl([ + 'plan_id' => $plan->id, + 'payment_status' => 'paid', + 'receipt_status' => 'none', + ]); @endphp
编辑 @@ -277,6 +282,7 @@ 未启用:不建议下单 @endif 续费缺订阅 + 已付无回执
diff --git a/tests/Feature/AdminPlanIndexPaidNoReceiptGovernanceLinkTest.php b/tests/Feature/AdminPlanIndexPaidNoReceiptGovernanceLinkTest.php new file mode 100644 index 0000000..8e25bd2 --- /dev/null +++ b/tests/Feature/AdminPlanIndexPaidNoReceiptGovernanceLinkTest.php @@ -0,0 +1,47 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_plan_index_should_render_paid_no_receipt_governance_link(): void + { + $this->loginAsPlatformAdmin(); + + $plan = Plan::query()->create([ + 'code' => 'plan_index_paid_no_receipt_link', + 'name' => '套餐页已付无回执治理入口测试套餐', + 'billing_cycle' => 'monthly', + 'price' => 99, + 'list_price' => 99, + 'status' => 'active', + 'sort' => 10, + 'published_at' => now(), + ]); + + $res = $this->get('/admin/plans'); + $res->assertOk(); + + $html = (string) $res->getContent(); + $this->assertStringContainsString('已付无回执', $html); + + $expectedBack = urlencode('/admin/plans'); + $this->assertStringContainsString('/admin/platform-orders?plan_id=' . $plan->id . '&payment_status=paid&receipt_status=none&back=' . $expectedBack, $html); + } +}