快递应付:附加费结算增加独立页签入口
This commit is contained in:
parent
9c62f4364b
commit
45b9feb8c4
@ -326,15 +326,6 @@ class Pages extends Controller
|
||||
|
||||
abort_if(empty($sectionConfig), 403, '当前账号没有该页面权限。');
|
||||
|
||||
// Keep the old direct URL working after settlement becomes a tab.
|
||||
if ($section === 'courier-payables' && $page === 'courier-surcharge-settlement') {
|
||||
return redirect()->route('business.pages.show', array_merge(request()->query(), [
|
||||
'section' => $section,
|
||||
'page' => 'courier-surcharge',
|
||||
'tab' => 'settlement',
|
||||
]));
|
||||
}
|
||||
|
||||
$pages = collect($sectionConfig['pages'] ?? []);
|
||||
|
||||
if ($pages->isEmpty()) {
|
||||
@ -2677,6 +2668,7 @@ class Pages extends Controller
|
||||
'product-costs' => $this->contentForProductCosts(),
|
||||
'financial-analysis' => $this->contentForFinancialAnalysis(),
|
||||
'courier-surcharge' => $this->contentForCourierSurcharge($tab),
|
||||
'courier-surcharge-settlement' => $this->contentForCourierSurchargeSettlementPage(),
|
||||
'freight-difference', 'other-surcharge-summary', 'return-fee' => $this->contentForCourierPayableSummary($page),
|
||||
'shipping-data' => $this->contentForShippingData(),
|
||||
'return-pickup-management' => $this->contentForReturnPickupManagement(),
|
||||
@ -3713,6 +3705,15 @@ class Pages extends Controller
|
||||
return $content;
|
||||
}
|
||||
|
||||
/** @return array<string,mixed> */
|
||||
protected function contentForCourierSurchargeSettlementPage(): array
|
||||
{
|
||||
return array_merge(
|
||||
['view' => 'business.pages.courier-payables.courier-surcharge-settlement'],
|
||||
$this->contentForCourierSurchargeSettlement(),
|
||||
);
|
||||
}
|
||||
|
||||
/** @return array<string,mixed> */
|
||||
protected function contentForCourierSurchargeSettlement(): array
|
||||
{
|
||||
|
||||
@ -732,6 +732,7 @@ $navigation = [
|
||||
['slug' => 'freight-difference', 'title' => '运费差'],
|
||||
['slug' => 'other-surcharge-summary', 'title' => '其他附加费汇总'],
|
||||
['slug' => 'return-fee', 'title' => '退件费'],
|
||||
['slug' => 'courier-surcharge-settlement', 'title' => '附加费结算'],
|
||||
],
|
||||
],
|
||||
[
|
||||
|
||||
@ -84,7 +84,7 @@ class CourierSurchargeSettlementPageTest extends FeatureTestCase
|
||||
]), false);
|
||||
}
|
||||
|
||||
public function test_old_settlement_page_url_redirects_to_settlement_tab(): void
|
||||
public function test_settlement_page_renders_as_courier_payables_page(): void
|
||||
{
|
||||
$this->user->attachPermission(Permission::where('name', 'read-admin-panel')->firstOrFail());
|
||||
|
||||
@ -92,12 +92,15 @@ class CourierSurchargeSettlementPageTest extends FeatureTestCase
|
||||
'section' => 'courier-payables',
|
||||
'page' => 'courier-surcharge-settlement',
|
||||
'waybill' => '0000123456789',
|
||||
]))->assertRedirect(route('business.pages.show', [
|
||||
]))->assertOk()
|
||||
->assertSeeText('附加费结算')
|
||||
->assertSee('data-finance-table-name="courier-surcharge-settlement"', false)
|
||||
->assertSee('value="0000123456789"', false);
|
||||
|
||||
$this->loginAs()->get(route('business.pages.show', [
|
||||
'section' => 'courier-payables',
|
||||
'page' => 'courier-surcharge',
|
||||
'tab' => 'settlement',
|
||||
'waybill' => '0000123456789',
|
||||
]));
|
||||
]))->assertOk()
|
||||
->assertSeeText('附加费结算');
|
||||
}
|
||||
|
||||
public function test_settlement_export_streams_filtered_rows_as_xlsx(): void
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user