商品成本:精简成本指标卡

移除商品成本页面四个指标卡,保留成本合计、待核验与仓库异常指标,其余逻辑不变。
This commit is contained in:
chenxi 2026-10-25 16:37:40 +08:00
parent ff70c61007
commit fcd54a8080
2 changed files with 8 additions and 4 deletions

View File

@ -19,13 +19,9 @@
: $formatted;
};
$metricCards = [
['label' => '明细行数', 'value' => number_format((int) ($summary['rows'] ?? 0)), 'unit' => '行'],
['label' => '已计价商品数量', 'value' => $qty($summary['quantity_total'] ?? null), 'unit' => '件'],
['label' => '商品成本合计', 'value' => number_format((float) ($summary['cost_total'] ?? 0) / 10000, 2), 'unit' => '万'],
['label' => '待核验成本', 'value' => number_format((int) ($summary['pending_cost_rows'] ?? 0)), 'unit' => '行', 'tone' => 'warn'],
['label' => '待核验商品数量', 'value' => $qty($summary['pending_cost_quantity'] ?? null), 'unit' => '件', 'tone' => 'warn'],
['label' => '线上代发价兜底', 'value' => number_format((int) ($summary['fallback_price_rows'] ?? 0)), 'unit' => '行'],
['label' => '商品资料成本兜底', 'value' => number_format((int) ($summary['catalog_price_rows'] ?? 0)), 'unit' => '行'],
['label' => '未匹配仓库简称', 'value' => number_format((int) ($summary['missing_warehouse_rows'] ?? 0)), 'unit' => '行', 'tone' => 'warn'],
];
$tableColumns = [

View File

@ -54,6 +54,14 @@ class ProductCostPageLayoutTest extends TestCase
$this->assertStringContainsString('共享镜像', $html);
$this->assertStringContainsString('成本指标', $html);
$this->assertStringContainsString('口径说明', $html);
$this->assertStringContainsString('商品成本合计', $html);
$this->assertStringContainsString('待核验成本', $html);
$this->assertStringContainsString('待核验商品数量', $html);
$this->assertStringContainsString('未匹配仓库简称', $html);
$this->assertStringNotContainsString('明细行数', $html);
$this->assertStringNotContainsString('已计价商品数量', $html);
$this->assertStringNotContainsString('线上代发价兜底', $html);
$this->assertStringNotContainsString('商品资料成本兜底', $html);
$this->assertStringContainsString('class="product-cost-filter-form"', $html);
$this->assertStringContainsString('搜索当前页数据', $html);
$this->assertStringContainsString('列设置', $html);