(.*?)<\/tr>/s', $allHtml, $accountRow));
+ $this->assertSame(22, substr_count($accountRow[1], 'assertStringNotContainsString('>预计出清天数', $allHtml);
+ $this->assertStringNotContainsString('>提额目标(万元)', $allHtml);
+ $this->assertStringNotContainsString('>提额状态', $allHtml);
+ $this->assertStringNotContainsString('>提额动作', $allHtml);
+ $this->assertStringNotContainsString('>已做动作', $allHtml);
+ $this->assertStringContainsString('caiwu.financial-ledger.accounts.preferences.v3.', $allHtml);
+ $this->assertStringContainsString('>下一步', $allHtml);
$bankHtml = $this->loginAs()->get($this->pageUrl([
'accounts_view' => 'bank',
From c5a525695b840e3936331438dcc3b7d5fbfe2a34 Mon Sep 17 00:00:00 2001
From: chenxi
Date: Wed, 11 Nov 2026 14:51:48 +0800
Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E9=A1=BE?=
=?UTF-8?q?=E5=AE=B6=E5=AF=B9=E8=B4=A6=E8=8F=9C=E5=8D=95=20(#1078)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
在顾家过账下新增顾家对账页面,并提供八个横向本地页签。
---
config/business_navigation.php | 1 +
.../kuka-reconciliation.blade.php | 95 +++++++++
.../kuka-reconciliation-tabs.blade.php | 192 ++++++++++++++++++
.../Business/KukaPostingBasePageTest.php | 10 +-
.../Business/KukaReconciliationPageTest.php | 47 +++++
tests/Feature/Settings/NavigationTest.php | 4 +-
.../SystemSettings/UserPermissionsTest.php | 4 +-
7 files changed, 347 insertions(+), 6 deletions(-)
create mode 100644 resources/views/business/pages/posting-data/kuka-reconciliation.blade.php
create mode 100644 resources/views/business/pages/posting-data/partials/kuka-reconciliation-tabs.blade.php
create mode 100644 tests/Feature/Business/KukaReconciliationPageTest.php
diff --git a/config/business_navigation.php b/config/business_navigation.php
index 14fa8c14..357bbdf1 100644
--- a/config/business_navigation.php
+++ b/config/business_navigation.php
@@ -728,6 +728,7 @@ $navigation = [
'children_inherit_parent_access' => true,
'children' => [
['slug' => 'kuka-basic-data', 'title' => '基础数据'],
+ ['slug' => 'kuka-reconciliation', 'title' => '顾家对账'],
],
],
['slug' => 'suofeiya-posting', 'title' => '索菲亚过账'],
diff --git a/resources/views/business/pages/posting-data/kuka-reconciliation.blade.php b/resources/views/business/pages/posting-data/kuka-reconciliation.blade.php
new file mode 100644
index 00000000..abe75b9f
--- /dev/null
+++ b/resources/views/business/pages/posting-data/kuka-reconciliation.blade.php
@@ -0,0 +1,95 @@
+@php
+ $tabs = [
+ [
+ 'slug' => 'posting-data',
+ 'title' => '顾家过账数据',
+ 'icon' => 'dataset',
+ 'description' => '顾家过账数据对账页面已建立,待接入订单与过账数据。',
+ ],
+ [
+ 'slug' => 'toc-orders',
+ 'title' => 'TOC订单',
+ 'icon' => 'shopping_cart',
+ 'description' => 'TOC 订单对账页面已建立,待接入订单明细。',
+ ],
+ [
+ 'slug' => 'lingshan-virtual-posting',
+ 'title' => '灵珊虚拟过账',
+ 'icon' => 'swap_horiz',
+ 'description' => '灵珊虚拟过账页面已建立,待接入虚拟过账数据。',
+ ],
+ [
+ 'slug' => 'erp-product-import',
+ 'title' => '顾家ERP商品导入',
+ 'icon' => 'inventory_2',
+ 'description' => '顾家 ERP 商品导入页面已建立,待接入商品导入流程。',
+ ],
+ [
+ 'slug' => 'invoice-entry-template',
+ 'title' => '开票填写模板-货物-灵珊',
+ 'icon' => 'description',
+ 'description' => '灵珊货物开票填写模板页面已建立。',
+ ],
+ [
+ 'slug' => 'inventory-management-template',
+ 'title' => '库存管理模板',
+ 'icon' => 'warehouse',
+ 'description' => '库存管理模板页面已建立。',
+ ],
+ [
+ 'slug' => 'lingshan-statement',
+ 'title' => '灵珊对账单',
+ 'icon' => 'receipt_long',
+ 'description' => '灵珊对账单页面已建立,待接入对账数据。',
+ ],
+ [
+ 'slug' => 'oberna-statement',
+ 'title' => '欧伯娜对账单',
+ 'icon' => 'fact_check',
+ 'description' => '欧伯娜对账单页面已建立,待接入对账数据。',
+ ],
+ ];
+ $validSubmenus = array_column($tabs, 'slug');
+ $requestedSubmenu = (string) request()->query('reconciliation_view', '');
+ $activeView = in_array($requestedSubmenu, $validSubmenus, true)
+ ? $requestedSubmenu
+ : 'posting-data';
+ $placeholder = 'business.pages.posting-data.partials.kuka-posting-placeholder';
+@endphp
+
+
+ @include('business.pages.posting-data.partials.kuka-reconciliation-tabs', [
+ 'tabs' => $tabs,
+ 'activeView' => $activeView,
+ ])
+
+
+ @foreach ($tabs as $tab)
+
+ @include($placeholder, [
+ 'title' => $tab['title'],
+ 'description' => $tab['description'],
+ 'icon' => $tab['icon'],
+ ])
+
+ @endforeach
+
+
+
+
diff --git a/resources/views/business/pages/posting-data/partials/kuka-reconciliation-tabs.blade.php b/resources/views/business/pages/posting-data/partials/kuka-reconciliation-tabs.blade.php
new file mode 100644
index 00000000..33e9682e
--- /dev/null
+++ b/resources/views/business/pages/posting-data/partials/kuka-reconciliation-tabs.blade.php
@@ -0,0 +1,192 @@
+
+
+
+
+
diff --git a/tests/Feature/Business/KukaPostingBasePageTest.php b/tests/Feature/Business/KukaPostingBasePageTest.php
index 50e2d6c0..7049ca91 100644
--- a/tests/Feature/Business/KukaPostingBasePageTest.php
+++ b/tests/Feature/Business/KukaPostingBasePageTest.php
@@ -79,8 +79,14 @@ class KukaPostingBasePageTest extends FeatureTestCase
->firstWhere('slug', 'posting-data');
$kuka = collect($navigation['pages'])->firstWhere('slug', 'kuka-posting');
- $this->assertSame(['kuka-basic-data'], array_column($kuka['children'], 'slug'));
- $this->assertSame(['基础数据'], array_column($kuka['children'], 'title'));
+ $this->assertSame(
+ ['kuka-basic-data', 'kuka-reconciliation'],
+ array_column($kuka['children'], 'slug')
+ );
+ $this->assertSame(
+ ['基础数据', '顾家对账'],
+ array_column($kuka['children'], 'title')
+ );
@unlink($file);
}
diff --git a/tests/Feature/Business/KukaReconciliationPageTest.php b/tests/Feature/Business/KukaReconciliationPageTest.php
new file mode 100644
index 00000000..bffaa81b
--- /dev/null
+++ b/tests/Feature/Business/KukaReconciliationPageTest.php
@@ -0,0 +1,47 @@
+loginAs()
+ ->get(route('business.pages.show', [
+ 'section' => 'posting-data',
+ 'page' => 'kuka-reconciliation',
+ ]))
+ ->assertOk()
+ ->assertSeeText('顾家对账')
+ ->assertSeeText('顾家过账数据')
+ ->assertSeeText('TOC订单')
+ ->assertSeeText('灵珊虚拟过账')
+ ->assertSeeText('顾家ERP商品导入')
+ ->assertSeeText('开票填写模板-货物-灵珊')
+ ->assertSeeText('库存管理模板')
+ ->assertSeeText('灵珊对账单')
+ ->assertSeeText('欧伯娜对账单')
+ ->assertSee('data-kuka-reconciliation-tabs', false)
+ ->assertSee('data-kuka-reconciliation-panel="posting-data"', false)
+ ->assertSee('data-kuka-reconciliation-panel="oberna-statement"', false)
+ ->assertSee('id="kuka-reconciliation-tab-posting-data"', false)
+ ->assertSee('class="kuka-reconciliation-subnav__tab is-active"', false);
+ }
+
+ public function test_kuka_reconciliation_tab_can_open_directly_from_the_url(): void
+ {
+ $this->loginAs()
+ ->get(route('business.pages.show', [
+ 'section' => 'posting-data',
+ 'page' => 'kuka-reconciliation',
+ 'reconciliation_view' => 'toc-orders',
+ ]))
+ ->assertOk()
+ ->assertSee('id="kuka-reconciliation-tab-toc-orders"', false)
+ ->assertSee('class="kuka-reconciliation-subnav__tab is-active"', false)
+ ->assertSee('data-kuka-reconciliation-panel="toc-orders"', false)
+ ->assertSeeText('TOC 订单对账页面已建立');
+ }
+}
diff --git a/tests/Feature/Settings/NavigationTest.php b/tests/Feature/Settings/NavigationTest.php
index ac203e01..2800d43e 100644
--- a/tests/Feature/Settings/NavigationTest.php
+++ b/tests/Feature/Settings/NavigationTest.php
@@ -623,11 +623,11 @@ class NavigationTest extends FeatureTestCase
);
$this->assertTrue($navigation[$postingIndex]['pages'][0]['children_inherit_parent_access']);
$this->assertSame(
- ['kuka-basic-data'],
+ ['kuka-basic-data', 'kuka-reconciliation'],
array_column($navigation[$postingIndex]['pages'][0]['children'], 'slug')
);
$this->assertSame(
- ['基础数据'],
+ ['基础数据', '顾家对账'],
array_column($navigation[$postingIndex]['pages'][0]['children'], 'title')
);
$this->assertSame(
diff --git a/tests/Feature/SystemSettings/UserPermissionsTest.php b/tests/Feature/SystemSettings/UserPermissionsTest.php
index 038a2223..cd8b4d79 100644
--- a/tests/Feature/SystemSettings/UserPermissionsTest.php
+++ b/tests/Feature/SystemSettings/UserPermissionsTest.php
@@ -160,7 +160,7 @@ class UserPermissionsTest extends FeatureTestCase
array_column($navigation[1]['pages'], 'title')
);
$this->assertSame(
- ['kuka-basic-data'],
+ ['kuka-basic-data', 'kuka-reconciliation'],
array_column($navigation[1]['pages'][0]['children'], 'slug')
);
}
@@ -172,7 +172,7 @@ class UserPermissionsTest extends FeatureTestCase
$navigation = SidebarPermissions::navigationFor($regular);
$this->assertSame(
- ['kuka-basic-data'],
+ ['kuka-basic-data', 'kuka-reconciliation'],
array_column($navigation[0]['pages'][0]['children'], 'slug')
);
}
|