平台订单摘要卡收紧已付无回执治理口径
This commit is contained in:
@@ -833,21 +833,21 @@
|
|||||||
<div class="muted muted-xs">
|
<div class="muted muted-xs">
|
||||||
@include('admin.platform_orders._summary_text_link', [
|
@include('admin.platform_orders._summary_text_link', [
|
||||||
'role' => 'po-summary-link-view-no-receipt-orders',
|
'role' => 'po-summary-link-view-no-receipt-orders',
|
||||||
'href' => $safeFullUrlWithQuery(['receipt_status' => 'none', 'page' => null]),
|
'href' => $safeFullUrlWithQuery(['payment_status' => 'paid', 'receipt_status' => 'none', 'page' => null]),
|
||||||
'label' => '查看无回执订单',
|
'label' => '查看已付无回执订单',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h3>无回执订单</h3>
|
<h3>已付无回执订单</h3>
|
||||||
<div class="metric-number">
|
<div class="metric-number">
|
||||||
@include('admin.platform_orders._summary_metric_link', [
|
@include('admin.platform_orders._summary_metric_link', [
|
||||||
'role' => 'po-summary-link-no-receipt-orders',
|
'role' => 'po-summary-link-no-receipt-orders',
|
||||||
'href' => $safeFullUrlWithQuery(['receipt_status' => 'none', 'page' => null]),
|
'href' => $safeFullUrlWithQuery(['payment_status' => 'paid', 'receipt_status' => 'none', 'page' => null]),
|
||||||
'label' => $summaryStats['no_receipt_orders'] ?? 0,
|
'label' => $summaryStats['no_receipt_orders'] ?? 0,
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="muted muted-xs">无 payment_summary 且无 payment_receipts</div>
|
<div class="muted muted-xs">已支付且无 payment_summary / payment_receipts,优先进入补回执治理集合</div>
|
||||||
<div class="muted muted-xs">
|
<div class="muted muted-xs">
|
||||||
@include('admin.platform_orders._summary_text_link', [
|
@include('admin.platform_orders._summary_text_link', [
|
||||||
'role' => 'po-summary-link-view-receipt-orders',
|
'role' => 'po-summary-link-view-receipt-orders',
|
||||||
|
|||||||
@@ -25,8 +25,9 @@ class AdminPlatformOrderReceiptCardsCrossLinksTest extends TestCase
|
|||||||
|
|
||||||
$this->get('/admin/platform-orders')
|
$this->get('/admin/platform-orders')
|
||||||
->assertOk()
|
->assertOk()
|
||||||
->assertSee('查看无回执订单')
|
->assertSee('查看已付无回执订单')
|
||||||
->assertSee('查看有回执订单')
|
->assertSee('查看有回执订单')
|
||||||
|
->assertSee('payment_status=paid')
|
||||||
->assertSee('receipt_status=none')
|
->assertSee('receipt_status=none')
|
||||||
->assertSee('receipt_status=has');
|
->assertSee('receipt_status=has');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,9 @@ class AdminPlatformOrderReceiptSummaryCardLinksTest extends TestCase
|
|||||||
$this->get('/admin/platform-orders')
|
$this->get('/admin/platform-orders')
|
||||||
->assertOk()
|
->assertOk()
|
||||||
->assertSee('有回执订单 / 回执总额')
|
->assertSee('有回执订单 / 回执总额')
|
||||||
->assertSee('无回执订单')
|
->assertSee('已付无回执订单')
|
||||||
->assertSee('receipt_status=has')
|
->assertSee('receipt_status=has')
|
||||||
|
->assertSee('payment_status=paid')
|
||||||
->assertSee('receipt_status=none');
|
->assertSee('receipt_status=none');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminPlatformOrderReceiptSummaryCardShouldUsePaidNoReceiptScopeTest extends TestCase
|
||||||
|
{
|
||||||
|
use RefreshDatabase;
|
||||||
|
|
||||||
|
protected function loginAsPlatformAdmin(): void
|
||||||
|
{
|
||||||
|
$this->seed();
|
||||||
|
|
||||||
|
$this->post('/admin/login', [
|
||||||
|
'email' => 'platform.admin@demo.local',
|
||||||
|
'password' => 'Platform@123456',
|
||||||
|
])->assertRedirect('/admin');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_receipt_summary_card_should_use_paid_no_receipt_scope(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$res = $this->get('/admin/platform-orders');
|
||||||
|
$res->assertOk();
|
||||||
|
|
||||||
|
$html = (string) $res->getContent();
|
||||||
|
$this->assertStringContainsString('已付无回执订单', $html);
|
||||||
|
|
||||||
|
$matched = preg_match('/data-role="po-summary-link-no-receipt-orders"[^>]*href="([^"]+)"/u', $html, $m);
|
||||||
|
$this->assertSame(1, $matched, '未找到平台订单列表摘要卡“已付无回执订单”链接');
|
||||||
|
|
||||||
|
$href = html_entity_decode($m[1] ?? '');
|
||||||
|
$parts = parse_url($href);
|
||||||
|
parse_str($parts['query'] ?? '', $q);
|
||||||
|
|
||||||
|
$this->assertSame('paid', (string) ($q['payment_status'] ?? ''));
|
||||||
|
$this->assertSame('none', (string) ($q['receipt_status'] ?? ''));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user