diff --git a/modules/EcommerceFinance/View/NonStoreAccountMonitorPageData.php b/modules/EcommerceFinance/View/NonStoreAccountMonitorPageData.php
index b00b7043..95ed59e9 100644
--- a/modules/EcommerceFinance/View/NonStoreAccountMonitorPageData.php
+++ b/modules/EcommerceFinance/View/NonStoreAccountMonitorPageData.php
@@ -312,10 +312,12 @@ final class NonStoreAccountMonitorPageData
$bankNonDirectAccounts = $retainedBankAccounts
->reject(static fn (array $row): bool => (bool) $row['is_direct'])
->values();
+ $bankCompanyPlanTotals = $this->companyPlanBreakdown($retainedBankAccounts);
$fundOverview['bank_connection_totals'] = [
'all' => $this->summary($retainedBankAccounts),
'direct' => $this->summary($bankDirectAccounts),
'non_direct' => $this->summary($bankNonDirectAccounts),
+ 'company_plan' => $bankCompanyPlanTotals,
'all_url' => $this->pageUrl([
'view' => self::VIEW_ACCOUNTS,
'keep' => 'retained',
diff --git a/resources/views/business/pages/financial-operations/non-store-accounts.blade.php b/resources/views/business/pages/financial-operations/non-store-accounts.blade.php
index d221b7fd..7f98a81b 100644
--- a/resources/views/business/pages/financial-operations/non-store-accounts.blade.php
+++ b/resources/views/business/pages/financial-operations/non-store-accounts.blade.php
@@ -2276,7 +2276,26 @@
- | 合计 |
+
+
+ |
|
+
+ |
+
+
+ 公司规划保留
+ {{ number_format((int) $fundOverview['bank_connection_totals']['company_plan']['retained_count']) }} 户
+
+ {{ $moneyWan($fundOverview['bank_connection_totals']['company_plan']['retained_balance']) }} 万元
+
+
+
+ 公司规划不保留
+ {{ number_format((int) $fundOverview['bank_connection_totals']['company_plan']['unretained_count']) }} 户
+
+ {{ $moneyWan($fundOverview['bank_connection_totals']['company_plan']['unretained_balance']) }} 万元
+
+
+
+ 银行合计
+
+ {{ number_format((int) $fundOverview['bank_connection_totals']['all']['count']) }} 户 /
+ {{ $moneyWan($fundOverview['bank_connection_totals']['all']['current_balance']) }} 万元
+
+
+
+ 另有 {{ number_format((int) $fundOverview['bank_connection_totals']['company_plan']['unspecified_count']) }} 户未填写公司规划,
+ {{ $moneyWan($fundOverview['bank_connection_totals']['company_plan']['unspecified_balance']) }} 万元,未计入上述两类。
+
+
+ |
+
diff --git a/tests/Feature/Business/NonStoreAccountMonitorTest.php b/tests/Feature/Business/NonStoreAccountMonitorTest.php
index e18ed7bc..7d816441 100644
--- a/tests/Feature/Business/NonStoreAccountMonitorTest.php
+++ b/tests/Feature/Business/NonStoreAccountMonitorTest.php
@@ -5,6 +5,7 @@ namespace Tests\Feature\Business;
use App\Models\Auth\Permission;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
+use Modules\EcommerceFinance\View\NonStoreAccountMonitorPageData;
use Tests\Feature\FeatureTestCase;
class NonStoreAccountMonitorTest extends FeatureTestCase
@@ -910,6 +911,8 @@ class NonStoreAccountMonitorTest extends FeatureTestCase
]);
$html = $this->loginAs()->get($this->pageUrl())->assertOk()->getContent();
+ $totals = app(NonStoreAccountMonitorPageData::class)->page()['fundOverview']['bank_connection_totals'];
+ $planTotals = $totals['company_plan'];
$this->assertStringContainsString('data-bank-plan-open', $html);
$this->assertStringContainsString('data-bank-plan-bank="招商银行"', $html);
@@ -930,6 +933,19 @@ class NonStoreAccountMonitorTest extends FeatureTestCase
$this->assertStringContainsString('toggleBankPlanDetail', $html);
$this->assertStringContainsString('hideBankPlanDetails', $html);
$this->assertStringNotContainsString('data-bank-plan-dialog', $html);
+ $this->assertSame(
+ (int) $totals['all']['count'],
+ (int) $planTotals['retained_count']
+ + (int) $planTotals['unretained_count']
+ + (int) $planTotals['unspecified_count'],
+ );
+ $this->assertMatchesRegularExpression(
+ '/.*?data-bank-plan-total-summary'
+ . '.*?data-bank-plan-retained-count="' . (int) $planTotals['retained_count'] . '"'
+ . '.*?data-bank-plan-unretained-count="' . (int) $planTotals['unretained_count'] . '"'
+ . '.*?id="nsm-bank-plan-total".*?公司规划保留.*?公司规划不保留.*?<\/tfoot>/s',
+ $html,
+ );
}
public function test_independent_monthly_accounts_are_included_as_other_accounts(): void