From e875656c665bd703ea6986e117b3ccbae2f08231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E6=9C=A8?= <594326199@qq.com> Date: Thu, 12 Nov 2026 15:44:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=9A=90=E8=97=8F=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E5=BA=94=E4=BB=98=E8=A1=A8=E6=89=93=E6=AC=BE=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E5=88=97=20(#1136)=20Co-authored-by:=20=E8=8B=8F?= =?UTF-8?q?=E6=9C=A8=20<594326199@qq.com>=20Co-committed-by:=20=E8=8B=8F?= =?UTF-8?q?=E6=9C=A8=20<594326199@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplier-payables-report.blade.php | 16 +------- .../Business/SupplierPayablePagesTest.php | 39 +++++++++++++------ 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/resources/views/business/pages/supplier-payables/supplier-payables-report.blade.php b/resources/views/business/pages/supplier-payables/supplier-payables-report.blade.php index 7fc7e974..4b488b7d 100644 --- a/resources/views/business/pages/supplier-payables/supplier-payables-report.blade.php +++ b/resources/views/business/pages/supplier-payables/supplier-payables-report.blade.php @@ -306,12 +306,8 @@ - - - - @@ -333,10 +329,9 @@ 本月采购金额 减 加 - 单位:元 + 单位:元 备注 是否直接对私打款 - 对私原因 含税定价金额 押款金额 结款截图 @@ -360,9 +355,6 @@ 供应商余额 应付余额 预估金额 - 对公打款金额 - 对私打款金额 - 已销账金额 @@ -389,12 +381,8 @@ {{ $money($row->supplier_balance) }} {{ $money($row->should_pay) }} {{ $money($row->estimated_price) }} - {{ $money($row->to_corporate) }} - {{ $money($row->to_private) }} - {{ $money($row->cashier_paid) }} {{ $row->remarks ?: '-' }} {{ (float) ($row->to_private ?? 0) !== 0.0 ? '是' : '否' }} - {{ $row->private_reason ?: '-' }} - {{ $money($row->deposit) }} - @@ -405,7 +393,7 @@ @empty - {{ $supplierPayableError ? '数据读取失败,请稍后重试。' : '暂无供应商应付数据' }} + {{ $supplierPayableError ? '数据读取失败,请稍后重试。' : '暂无供应商应付数据' }} @endforelse diff --git a/tests/Feature/Business/SupplierPayablePagesTest.php b/tests/Feature/Business/SupplierPayablePagesTest.php index 61c813ef..fe1b6054 100644 --- a/tests/Feature/Business/SupplierPayablePagesTest.php +++ b/tests/Feature/Business/SupplierPayablePagesTest.php @@ -148,7 +148,7 @@ class SupplierPayablePagesTest extends FeatureTestCase $this->assertCount(17, $headers[0]); } - public function testSupplierPayablesReportPageUsesItsOwnThirtyFourColumnGroupedTable() + public function testSupplierPayablesReportPageUsesItsOwnThirtyColumnGroupedTable() { $this->grantAdminPermission(); @@ -160,19 +160,36 @@ class SupplierPayablePagesTest extends FeatureTestCase $response ->assertOk() ->assertSee('class="supplier-payables-report-table"', false) - ->assertSee('已销账供应商', false) - ->assertSee('供应商简称', false) - ->assertSee('已销账供应商') - ->assertSee('本月采购金额') - ->assertSee('加', false) - ->assertSee('单位:元', false) - ->assertSee('供应商余额', false) - ->assertSee('最晚出账单时间(新执行标准)') ->assertDontSee('class="business-blank-page"', false); - preg_match_all('/)/', $response->getContent(), $columns); + $this->assertSame( + 1, + preg_match( + '/]*class="[^"]*supplier-payables-report-table[^"]*"[^>]*>.*?<\/table>/s', + $response->getContent(), + $tableMatch + ), + '供应商应付报表表格未找到。' + ); - $this->assertCount(34, $columns[0]); + $table = $tableMatch[0]; + + $this->assertStringContainsString('已销账供应商', $table); + $this->assertStringContainsString('供应商简称', $table); + $this->assertStringContainsString('已销账供应商', $table); + $this->assertStringContainsString('本月采购金额', $table); + $this->assertStringContainsString('加', $table); + $this->assertStringContainsString('单位:元', $table); + $this->assertStringContainsString('供应商余额', $table); + $this->assertStringNotContainsString('对公打款金额', $table); + $this->assertStringNotContainsString('对私打款金额', $table); + $this->assertStringNotContainsString('已销账金额', $table); + $this->assertStringNotContainsString('对私原因', $table); + $this->assertStringContainsString('最晚出账单时间(新执行标准)', $table); + + preg_match_all('/)/', $table, $columns); + + $this->assertCount(30, $columns[0]); } public function testProductPricesPageUsesOperationsReplicaPriceLimitFields(): void