From 06f29b6937dde27af442badab4d60dca74a42788 Mon Sep 17 00:00:00 2001 From: shanshi <3316401569@qq.com> Date: Wed, 21 Oct 2026 16:19:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=A2=E5=8A=A1=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=E5=BE=85=E5=8A=9E=E5=88=97=E5=AE=BD=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E5=9F=BA=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unavailable-balance-tasks.blade.php | 24 +++++++++++++++---- .../FinanceLedgerAccountStatusTest.php | 3 +++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/resources/views/business/pages/financial-ledger/unavailable-balance-tasks.blade.php b/resources/views/business/pages/financial-ledger/unavailable-balance-tasks.blade.php index 37573f02..30154bec 100644 --- a/resources/views/business/pages/financial-ledger/unavailable-balance-tasks.blade.php +++ b/resources/views/business/pages/financial-ledger/unavailable-balance-tasks.blade.php @@ -311,10 +311,26 @@ const minimumWidth = 56; const maximumWidth = 720; const clampWidth = (value) => Math.min(maximumWidth, Math.max(minimumWidth, Math.round(Number(value) || 0))); - const defaults = new Map(headers.map((header) => [ - header.dataset.pendingColumnKey, - Math.max(minimumWidth, Math.round(header.getBoundingClientRect().width * 10) / 10), - ])); + const pendingColumnDefaultWidths = Object.freeze({ + company_name: 170, + account_short: 92, + account_type: 72, + account_status: 78, + account_no: 180, + bank_name: 250, + bank_city_branch: 180, + abnormal_reason: 145, + handling_method: 95, + owner_name: 105, + started_at: 178, + completed_at: 178, + current_progress: 165, + completion_status: 105, + }); + const defaults = new Map(headers.map((header) => { + const key = header.dataset.pendingColumnKey; + return [key, clampWidth(pendingColumnDefaultWidths[key] ?? 120)]; + })); const widths = new Map(defaults); try { diff --git a/tests/Feature/Business/FinanceLedgerAccountStatusTest.php b/tests/Feature/Business/FinanceLedgerAccountStatusTest.php index 54d8caea..b6da8c8e 100644 --- a/tests/Feature/Business/FinanceLedgerAccountStatusTest.php +++ b/tests/Feature/Business/FinanceLedgerAccountStatusTest.php @@ -229,6 +229,9 @@ class FinanceLedgerAccountStatusTest extends FeatureTestCase ->assertSee('data-pending-pagination', false) ->assertSee('data-pending-table', false) ->assertSee('拖动表头右侧边界可调整列宽') + ->assertSee('const pendingColumnDefaultWidths = Object.freeze({', false) + ->assertSee('company_name: 170', false) + ->assertSee('completion_status: 105', false) ->assertSee('ledger-page-box', false) ->assertSee('1 / 1', false) ->assertSee('data-pending-account="待办测试账户二"', false) -- 2.47.2