From 91036350cd63c293ef5d2703bf96258cf5369fa7 Mon Sep 17 00:00:00 2001 From: renshen <1005457301@qq.com> Date: Sat, 7 Nov 2026 14:22:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=88=90=E6=9C=AC?= =?UTF-8?q?=E8=BF=90=E8=B4=B9=E5=BC=82=E5=B8=B8=E7=9B=AE=E5=BD=95=20(#975)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/business_navigation.php | 11 +++++++++++ tests/Feature/Settings/NavigationTest.php | 16 ++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/config/business_navigation.php b/config/business_navigation.php index db8b9dac..e67a7d35 100644 --- a/config/business_navigation.php +++ b/config/business_navigation.php @@ -1046,6 +1046,17 @@ $navigation = [ ], ], ], + [ + 'slug' => 'cost-freight-anomaly', + 'title' => '成本/运费异常', + 'directory' => [ + 'icon' => 'warning_amber', + 'status' => '待接入', + 'description' => '监控商品成本与运费异常,集中展示成本缺失、成本波动、运费异常和异常结果。', + 'empty' => '成本/运费异常数据尚未接入。提供取数来源、成本口径和异常阈值后,这里会显示可追溯的异常明细。', + 'fields' => [], + ], + ], [ 'slug' => 'overview', 'title' => '异常数据监控', diff --git a/tests/Feature/Settings/NavigationTest.php b/tests/Feature/Settings/NavigationTest.php index 7e3e9a3f..ce56d478 100644 --- a/tests/Feature/Settings/NavigationTest.php +++ b/tests/Feature/Settings/NavigationTest.php @@ -24,6 +24,7 @@ class NavigationTest extends FeatureTestCase ->assertSee('/workspace/refunds/non-jingxi-refund-data', false) ->assertDontSee('/workspace/refunds/refund-pending', false) ->assertSee('/workspace/fee-ratio-monitoring/refund-pending', false) + ->assertSee('/workspace/fee-ratio-monitoring/cost-freight-anomaly', false) ->assertSee('/workspace/product-inventory/normal-products', false) ->assertSee('/workspace/product-inventory/monthly-weighted-average-price', false) ->assertSee('/workspace/product-inventory/inventory-report', false); @@ -306,19 +307,30 @@ class NavigationTest extends FeatureTestCase $this->assertSame('费比异常数据监控', $section['title']); $this->assertSame('monitor_heart', $section['icon']); $this->assertSame( - ['refund-pending', 'overview'], + ['refund-pending', 'cost-freight-anomaly', 'overview'], array_column($section['pages'], 'slug'), ); $this->assertSame( - ['退款待确认', '异常数据监控'], + ['退款待确认', '成本/运费异常', '异常数据监控'], array_column($section['pages'], 'title'), ); $this->assertSame('待接入', $section['pages'][1]['directory']['status']); + $this->assertSame('待接入', $section['pages'][2]['directory']['status']); $sidebarGroup = collect(SidebarMenu::groups($this->user)) ->firstWhere('title', '费比异常数据监控'); $this->assertNull($sidebarGroup); + $this->loginAs() + ->get(route('business.pages.show', [ + 'section' => 'fee-ratio-monitoring', + 'page' => 'cost-freight-anomaly', + ])) + ->assertOk() + ->assertSeeText('费比异常数据监控') + ->assertSeeText('成本/运费异常') + ->assertSeeText('成本/运费异常数据尚未接入'); + $this->loginAs() ->get(route('business.pages.show', [ 'section' => 'fee-ratio-monitoring',