diff --git a/config/business_navigation.php b/config/business_navigation.php index 1ea8cea1..ad7c2ab8 100644 --- a/config/business_navigation.php +++ b/config/business_navigation.php @@ -302,6 +302,17 @@ $navigation = [ 'pages' => [ ['slug' => 'normal-products', 'title' => '普通商品资料'], ['slug' => 'online-daifa-price', 'title' => '线上代发价格'], + [ + 'slug' => 'inventory-report', + 'title' => '进销存报表', + 'directory' => [ + 'icon' => 'inventory', + 'status' => '字段待定义', + 'description' => '进销存报表页面入口已建立,待确认报表字段和数据来源后接入正式数据。', + 'empty' => '进销存报表字段和数据来源尚未定义。', + 'fields' => [], + ], + ], ], ], [ diff --git a/tests/Feature/Settings/NavigationTest.php b/tests/Feature/Settings/NavigationTest.php index 8fb57a89..ce6690d6 100644 --- a/tests/Feature/Settings/NavigationTest.php +++ b/tests/Feature/Settings/NavigationTest.php @@ -18,7 +18,20 @@ class NavigationTest extends FeatureTestCase ->assertSeeText('商品价格管理') ->assertSee('/workspace/order-data/raw-data', false) ->assertSee('/workspace/refunds/non-jingxi-refund-data', false) - ->assertSee('/workspace/product-inventory/normal-products', false); + ->assertSee('/workspace/product-inventory/normal-products', false) + ->assertSee('/workspace/product-inventory/inventory-report', false); + } + + public function testInventoryReportMenuPageIsAvailable(): void + { + $this->loginAs() + ->get(route('business.pages.show', [ + 'section' => 'product-inventory', + 'page' => 'inventory-report', + ])) + ->assertOk() + ->assertSeeText('进销存报表') + ->assertSeeText('进销存报表字段和数据来源尚未定义。'); } public function testGroupedNavigationKeepsRestrictedPagePermissions(): void @@ -91,6 +104,7 @@ class NavigationTest extends FeatureTestCase $receivablesIndex = array_search('store-receivables', $slugs, true); $orderData = $navigation[$orderIndex] ?? null; $refund = $navigation[$refundIndex] ?? null; + $productInventory = $navigation[$productIndex] ?? null; $financialOperations = collect($navigation)->firstWhere('slug', 'financial-operations'); $this->assertNotFalse($invoiceIndex); @@ -148,6 +162,14 @@ class NavigationTest extends FeatureTestCase ['订单售后费用明细', '商品推广费用明细'], array_column($orderData['pages'][0]['tabs'], 'title') ); + $this->assertSame( + ['normal-products', 'online-daifa-price', 'inventory-report'], + array_column($productInventory['pages'], 'slug') + ); + $this->assertSame( + ['普通商品资料', '线上代发价格', '进销存报表'], + array_column($productInventory['pages'], 'title') + ); $this->assertArrayNotHasKey('children', $orderData['pages'][0]); $this->assertSame( ['bill-offset'],