From e619b1778e5c082b071f821b92449b5771037a8e Mon Sep 17 00:00:00 2001 From: chenxi Date: Sun, 25 Oct 2026 23:48:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=88=90=E6=9C=AC=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E6=96=B0=E5=A2=9E=E5=B9=B3=E5=8F=B0=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/financial-operations/product-costs.blade.php | 9 ++++++--- tests/Feature/Business/ProductCostPageLayoutTest.php | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/resources/views/business/pages/financial-operations/product-costs.blade.php b/resources/views/business/pages/financial-operations/product-costs.blade.php index 31a6db9a..41008a1c 100644 --- a/resources/views/business/pages/financial-operations/product-costs.blade.php +++ b/resources/views/business/pages/financial-operations/product-costs.blade.php @@ -37,6 +37,7 @@ ], ]; $tableColumns = [ + 'platform' => '平台', 'occurred_date' => '发生时间', 'store_name' => '店铺名称', 'online_order_no' => '线上单号', @@ -561,7 +562,7 @@ .product-cost-table { width: 100%; - min-width: 78rem; + min-width: 84rem; border-collapse: separate; border-spacing: 0; font-size: .75rem; @@ -1344,6 +1345,7 @@ + @@ -1358,6 +1360,7 @@ @forelse ($rows ?? [] as $row) + @@ -1370,7 +1373,7 @@ @empty - @endforelse - +
平台 发生时间 店铺名称 线上单号
{{ $text($row->platform) }} {{ $text(substr((string) ($row->occurred_date ?? ''), 0, 10)) }} {{ $text($row->store_name) }} {{ $text($row->online_order_no) }}
+
{{ $error ? '镜像读取失败,请稍后重试。' : '暂无符合条件的商品成本数据;生成完成后会自动显示。' }}
@@ -1378,7 +1381,7 @@
diff --git a/tests/Feature/Business/ProductCostPageLayoutTest.php b/tests/Feature/Business/ProductCostPageLayoutTest.php index feecf326..a796a5e8 100644 --- a/tests/Feature/Business/ProductCostPageLayoutTest.php +++ b/tests/Feature/Business/ProductCostPageLayoutTest.php @@ -12,6 +12,7 @@ class ProductCostPageLayoutTest extends TestCase { URL::defaults(['company_id' => 1]); $row = (object) [ + 'platform' => '京东账单', 'occurred_date' => '2026-09-01', 'store_name' => '测试店铺', 'online_order_no' => 'ORDER-1', @@ -100,6 +101,11 @@ class ProductCostPageLayoutTest extends TestCase $this->assertStringContainsString('全部筛选结果', $html); $this->assertStringContainsString('当前显示列及顺序', $html); $this->assertStringContainsString('id="product-cost-table"', $html); + $this->assertLessThan( + strpos($html, 'data-column-key="occurred_date">发生时间'), + strpos($html, 'data-column-key="platform">平台') + ); + $this->assertStringContainsString('data-column-key="platform">京东账单', $html); $this->assertStringContainsString('导出当前筛选结果', $html); } } -- 2.47.2