admin: 详情页退款治理入口直达追加退款面板
This commit is contained in:
@@ -275,7 +275,7 @@
|
||||
<div>
|
||||
原因:当前订单已存在退款记录/退款汇总。
|
||||
<span class="muted">|</span>
|
||||
<a class="btn btn-secondary btn-sm" href="#refund-receipts">去核对退款</a>
|
||||
<a class="btn btn-secondary btn-sm" href="#add-refund-receipt">去核对退款</a>
|
||||
</div>
|
||||
@endif
|
||||
@if($markPaidBlockedByMissingSubscriptionOnRenewal)
|
||||
@@ -360,7 +360,7 @@
|
||||
@endif
|
||||
@if($order->isRefundInconsistent())
|
||||
@php
|
||||
$fixRefundUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $orderShowSelf, 'refund-receipts');
|
||||
$fixRefundUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $orderShowSelf, 'add-refund-receipt');
|
||||
@endphp
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $fixRefundUrl !!}">去核对退款</a>
|
||||
@endif
|
||||
|
||||
@@ -154,11 +154,11 @@ class AdminPlatformOrderShowActivateSubscriptionButtonDisabledWhenGovernanceMism
|
||||
preg_match_all('/href="([^"]+)"/', $html, $m);
|
||||
$hrefs = $m[1] ?? [];
|
||||
|
||||
$links = array_values(array_filter($hrefs, fn ($u) => str_starts_with($u, '/admin/platform-orders/' . $order->id) && str_contains($u, '#refund-receipts')));
|
||||
$this->assertGreaterThanOrEqual(1, count($links), '未找到指向 #refund-receipts 的治理链接');
|
||||
$links = array_values(array_filter($hrefs, fn ($u) => str_starts_with($u, '/admin/platform-orders/' . $order->id) && str_contains($u, '#add-refund-receipt')));
|
||||
$this->assertGreaterThanOrEqual(1, count($links), '未找到指向 #add-refund-receipt 的治理链接');
|
||||
|
||||
$parts = parse_url($links[0]);
|
||||
$this->assertSame('/admin/platform-orders/' . $order->id, $parts['path'] ?? '');
|
||||
$this->assertSame('refund-receipts', $parts['fragment'] ?? '');
|
||||
$this->assertSame('add-refund-receipt', $parts['fragment'] ?? '');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +112,6 @@ class AdminPlatformOrderShowActivateSubscriptionGovernanceHintTest extends TestC
|
||||
$this->get('/admin/platform-orders/' . $order->id)
|
||||
->assertOk()
|
||||
->assertSee('当前订单命中「对账不一致/退款不一致」', false)
|
||||
->assertSee('#refund-receipts', false);
|
||||
->assertSee('#add-refund-receipt', false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class AdminPlatformOrderShowFixReceiptRefundLinksContainBackTest extends TestCas
|
||||
|
||||
$fixRefundUrl = '/admin/platform-orders/' . $order->id . '?' . Arr::query([
|
||||
'back' => $orderShowSelf,
|
||||
]) . '#refund-receipts';
|
||||
]) . '#add-refund-receipt';
|
||||
|
||||
$res->assertSee($fixReceiptUrl, false);
|
||||
$res->assertSee($fixRefundUrl, false);
|
||||
|
||||
@@ -72,6 +72,6 @@ class AdminPlatformOrderShowMarkPaidAndActivateGovernanceBlockTest extends TestC
|
||||
|
||||
$res->assertSee('BMPA 治理提示', false);
|
||||
$res->assertSee('去核对退款', false);
|
||||
$res->assertSee('href="#refund-receipts"', false);
|
||||
$res->assertSee('href="#add-refund-receipt"', false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class AdminPlatformOrderShowMarkPaidAndActivateGuidanceLinksTest extends TestCas
|
||||
$res->assertOk();
|
||||
|
||||
$res->assertSee('去核对退款', false);
|
||||
$res->assertSee('href="#refund-receipts"', false);
|
||||
$res->assertSee('href="#add-refund-receipt"', false);
|
||||
}
|
||||
|
||||
public function test_when_bmpa_blocked_by_receipt_mismatch_should_show_receipt_guidance_link(): void
|
||||
|
||||
Reference in New Issue
Block a user