diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php
index a694582..3f18fd7 100644
--- a/resources/views/admin/platform_orders/index.blade.php
+++ b/resources/views/admin/platform_orders/index.blade.php
@@ -1130,7 +1130,13 @@
-
@endif
-
{{ optional($order->siteSubscription?->ends_at)->format('Y-m-d H:i:s') ?: '-' }} |
+
+ @if($isFullView)
+ {{ optional($order->siteSubscription?->ends_at)->format('Y-m-d H:i:s') ?: '-' }}
+ @else
+ {{ optional($order->siteSubscription?->ends_at)->format('Y-m-d') ?: '-' }}
+ @endif
+ |
{{ data_get($order->meta, 'subscription_activation.synced_at') ?: '-' }} |
@php
diff --git a/tests/Feature/AdminPlatformOrderIndexCompactViewSubscriptionEndsAtFormatTest.php b/tests/Feature/AdminPlatformOrderIndexCompactViewSubscriptionEndsAtFormatTest.php
new file mode 100644
index 0000000..5873071
--- /dev/null
+++ b/tests/Feature/AdminPlatformOrderIndexCompactViewSubscriptionEndsAtFormatTest.php
@@ -0,0 +1,88 @@
+seed();
+
+ $this->post('/admin/login', [
+ 'email' => 'platform.admin@demo.local',
+ 'password' => 'Platform@123456',
+ ])->assertRedirect('/admin');
+ }
+
+ public function test_compact_view_subscription_ends_at_shows_date_only_full_view_shows_datetime(): void
+ {
+ $this->loginAsPlatformAdmin();
+
+ $merchant = Merchant::query()->firstOrFail();
+
+ $plan = Plan::query()->create([
+ 'code' => 'po_index_sub_ends_at_format_plan',
+ 'name' => '平台订单列表订阅到期时间格式测试套餐',
+ 'billing_cycle' => 'monthly',
+ 'price' => 10,
+ 'list_price' => 10,
+ 'status' => 'active',
+ 'sort' => 10,
+ 'published_at' => now(),
+ ]);
+
+ $endsAt = now()->setDate(2026, 3, 31)->setTime(23, 59, 59);
+
+ $sub = SiteSubscription::query()->create([
+ 'merchant_id' => $merchant->id,
+ 'plan_id' => $plan->id,
+ 'status' => 'active',
+ 'source' => 'test',
+ 'subscription_no' => 'SS_ENDS_AT_FORMAT_0001',
+ 'plan_name' => $plan->name,
+ 'billing_cycle' => $plan->billing_cycle,
+ 'period_months' => 1,
+ 'amount' => 10,
+ 'starts_at' => now(),
+ 'ends_at' => $endsAt,
+ ]);
+
+ PlatformOrder::query()->create([
+ 'merchant_id' => $merchant->id,
+ 'plan_id' => $plan->id,
+ 'site_subscription_id' => $sub->id,
+ 'order_no' => 'PO_INDEX_SUB_ENDS_AT_0001',
+ 'order_type' => 'renewal',
+ '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(),
+ 'meta' => [],
+ ]);
+
+ $this->get('/admin/platform-orders')
+ ->assertOk()
+ ->assertSee('2026-03-31', false)
+ ->assertDontSee('23:59:59', false);
+
+ $this->get('/admin/platform-orders?view=full')
+ ->assertOk()
+ ->assertSee('2026-03-31 23:59:59', false);
+ }
+}
|