fix: 待办页返回账户汇总

## 变更

- 不保留账户处理待办的返回按钮改为“返回账户汇总”,目标为账户资金汇总的账户汇总页。
- 账户异常待办使用相同返回文案和目标。

## 验证

- FinanceLedgerAccountKeepTodoTest 全量通过。
- FinanceLedgerAccountStatusTest 全量通过。
- 本地实际页面验证两个按钮文案和点击跳转。
This commit is contained in:
shanshi 2026-11-16 17:43:34 +08:00
parent a03405e932
commit 125c6cb003
5 changed files with 20 additions and 4 deletions

View File

@ -434,7 +434,7 @@ class FinanceLedger extends Controller
'backUrl' => route('business.pages.show', [
'section' => 'financial-operations',
'page' => 'ledger',
]) . '?tab=accounts',
]) . '?tab=flows&flows_view=summary',
'canEdit' => FinanceLedgerAccess::canEditAccountStatus(user()),
'handlingMethods' => $handlingMethods,
'completionStatuses' => $completionStatuses,
@ -895,7 +895,7 @@ class FinanceLedger extends Controller
'backUrl' => route('business.pages.show', [
'section' => 'financial-operations',
'page' => 'ledger',
]) . '?tab=accounts',
]) . '?tab=flows&flows_view=summary',
'canEdit' => FinanceLedgerAccess::canEditAccountStatus(user()),
'handlingMethods' => $handlingMethods,
'completionStatuses' => $completionStatuses,

View File

@ -132,7 +132,7 @@
</div>
<a class="pending-balance-back" href="{{ $backUrl }}">
<span class="material-icons-outlined" aria-hidden="true">arrow_back</span>
返回账户总表
返回账户汇总
</a>
</header>

View File

@ -162,7 +162,7 @@
</div>
<a class="keep-task-back" href="{{ $backUrl }}">
<span class="material-icons-outlined" aria-hidden="true">arrow_back</span>
返回账户总表
返回账户汇总
</a>
</header>

View File

@ -45,6 +45,11 @@ class FinanceLedgerAccountKeepTodoTest extends FeatureTestCase
], $parameters));
}
private function accountSummaryUrl(): string
{
return $this->ledgerUrl() . '?tab=flows&flows_view=summary';
}
private function keepTodoUrl(): string
{
return route('business.financial-ledger.accounts.keep-todo', [
@ -172,6 +177,9 @@ class FinanceLedgerAccountKeepTodoTest extends FeatureTestCase
$response
->assertSee('不保留账户处理待办')
->assertSee('不与其他页面的待办事项合并')
->assertSee('href="' . e($this->accountSummaryUrl()) . '"', false)
->assertSee('返回账户汇总')
->assertDontSee('返回账户总表')
->assertSee('data-keep-account="显式不保留账户"', false)
->assertSee('data-keep-account="规划不保留账户"', false)
->assertSee('法人名称')

View File

@ -46,6 +46,11 @@ class FinanceLedgerAccountStatusTest extends FeatureTestCase
]);
}
private function accountSummaryUrl(): string
{
return $this->pageUrl() . '?tab=flows&flows_view=summary';
}
private function accountTodoUrl(): string
{
return route('business.financial-ledger.accounts.todo', [
@ -394,6 +399,9 @@ class FinanceLedgerAccountStatusTest extends FeatureTestCase
->assertOk()
->assertSee('账户异常待办')
->assertSee('不与其他页面的待办事项合并')
->assertSee('href="' . e($this->accountSummaryUrl()) . '"', false)
->assertSee('返回账户汇总')
->assertDontSee('返回账户总表')
->assertSee('待办测试公司')
->assertSee('data-pending-account="待办测试账户"', false)
->assertSee('不可用金额合计')