fix: 对齐人工费用分组表头配色与冻结 #764

Merged
chenxi merged 2 commits from fix/chenxi-labor-expense-header-color-freeze into main 2026-10-29 17:04:01 +08:00
2 changed files with 43 additions and 15 deletions

View File

@ -13,11 +13,11 @@
<div class="labor-expense-page" data-labor-expense data-finance-table-surface data-directory-page="labor-expenses">
<style>
.labor-expense-page {
--labor-group-base: #E7E3DA;
--labor-group-original: #E8D8B8;
--labor-group-fund: #D9E4D4;
--labor-group-salary-parttime: #DCE4EA;
--labor-group-settlement: #E8DDD6;
--labor-group-base: #CCE8CF;
--labor-group-original: #D0CECE;
--labor-group-fund: #ADD88D;
--labor-group-salary-parttime: #F9CBAA;
--labor-group-settlement: #FFE699;
color: var(--vip-content-ink, #171717);
font-family: "JetBrains Mono", "Microsoft YaHei", "PingFang SC", monospace;
font-size: 0.8125rem;
@ -200,29 +200,44 @@
z-index: 5;
}
.labor-expense-table thead tr:first-child th[data-labor-group="base"] {
.labor-expense-table thead th[data-labor-group="base"] {
background: var(--labor-group-base);
box-shadow: inset 0 3px 0 #918a7d;
}
.labor-expense-table thead th[data-labor-group="original"] {
background: var(--labor-group-original);
}
.labor-expense-table thead th[data-labor-group="fund"] {
background: var(--labor-group-fund);
}
.labor-expense-table thead th[data-labor-group="salary_parttime"] {
background: var(--labor-group-salary-parttime);
}
.labor-expense-table thead th[data-labor-group="settlement"] {
background: var(--labor-group-settlement);
}
.labor-expense-table thead tr:first-child th[data-labor-group="base"] {
box-shadow: inset 0 3px 0 #548235;
}
.labor-expense-table thead tr:first-child th[data-labor-group="original"] {
background: var(--labor-group-original);
box-shadow: inset 0 3px 0 #b69a65;
box-shadow: inset 0 3px 0 #7f7f7f;
}
.labor-expense-table thead tr:first-child th[data-labor-group="fund"] {
background: var(--labor-group-fund);
box-shadow: inset 0 3px 0 #7e9b78;
box-shadow: inset 0 3px 0 #70ad47;
}
.labor-expense-table thead tr:first-child th[data-labor-group="salary_parttime"] {
background: var(--labor-group-salary-parttime);
box-shadow: inset 0 3px 0 #7791a4;
box-shadow: inset 0 3px 0 #ed7d31;
}
.labor-expense-table thead tr:first-child th[data-labor-group="settlement"] {
background: var(--labor-group-settlement);
box-shadow: inset 0 3px 0 #ad8173;
box-shadow: inset 0 3px 0 #bf9000;
}
.labor-expense-table thead tr:last-child th {
@ -534,6 +549,7 @@
data-finance-column-key="{{ $field['key'] }}"
data-labor-column="{{ $field['key'] }}"
data-labor-header="{{ $field['key'] }}"
data-labor-group="{{ $field['group'] }}"
@if (in_array($field['key'], ['A', 'B', 'C'], true)) data-finance-fixed="true" @endif
@if (!empty($field['formula'])) title="公式:{{ $field['formula'] }}" @endif
>{{ $field['label'] }}</th>

View File

@ -130,6 +130,18 @@ class LaborExpensePageAccessTest extends FeatureTestCase
'/<th[^>]*data-labor-action-group[^>]*data-finance-fixed="end"[^>]*>/s',
$html
);
foreach ([
'B' => 'base',
'J' => 'original',
'O' => 'fund',
'AA' => 'salary_parttime',
'AW' => 'settlement',
] as $column => $group) {
$this->assertMatchesRegularExpression(
'/<th[^>]*data-labor-column="' . $column . '"[^>]*data-labor-group="' . $group . '"[^>]*>/s',
$html
);
}
}
public function test_labor_expense_workbook_import_returns_editable_rows(): void