fix: 区分人工费用分组表头并完善冻结 #759
@ -13,6 +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;
|
||||
color: var(--vip-content-ink, #171717);
|
||||
font-family: "JetBrains Mono", "Microsoft YaHei", "PingFang SC", monospace;
|
||||
font-size: 0.8125rem;
|
||||
@ -187,17 +192,46 @@
|
||||
}
|
||||
|
||||
.labor-expense-table thead tr:first-child th {
|
||||
top: 0;
|
||||
height: 2rem;
|
||||
background: #eadfca;
|
||||
color: var(--vip-content-ink, #171717);
|
||||
font-weight: 700;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.labor-expense-table thead tr:first-child th[data-labor-group="base"] {
|
||||
background: var(--labor-group-base);
|
||||
box-shadow: inset 0 3px 0 #918a7d;
|
||||
}
|
||||
|
||||
.labor-expense-table thead tr:first-child th[data-labor-group="original"] {
|
||||
background: var(--labor-group-original);
|
||||
box-shadow: inset 0 3px 0 #b69a65;
|
||||
}
|
||||
|
||||
.labor-expense-table thead tr:first-child th[data-labor-group="fund"] {
|
||||
background: var(--labor-group-fund);
|
||||
box-shadow: inset 0 3px 0 #7e9b78;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.labor-expense-table thead tr:first-child th[data-labor-group="settlement"] {
|
||||
background: var(--labor-group-settlement);
|
||||
box-shadow: inset 0 3px 0 #ad8173;
|
||||
}
|
||||
|
||||
.labor-expense-table thead tr:last-child th {
|
||||
top: 2rem;
|
||||
min-height: 3.25rem;
|
||||
background: var(--vip-content-accent-soft, #F7F0DE);
|
||||
color: var(--vip-content-ink, #171717);
|
||||
font-weight: 600;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.labor-expense-table thead th[data-labor-column="A"],
|
||||
@ -485,9 +519,14 @@
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($laborGroups as $group)
|
||||
<th colspan="{{ $group['span'] }}" @if ($group['label'] === '') aria-label="推荐方案" @endif>{{ $group['label'] }}</th>
|
||||
<th
|
||||
colspan="{{ $group['span'] }}"
|
||||
data-labor-group="{{ $group['key'] }}"
|
||||
@if ($group['key'] === 'base') data-finance-fixed="true" @endif
|
||||
@if ($group['label'] === '') aria-label="推荐方案" @endif
|
||||
>{{ $group['label'] }}</th>
|
||||
@endforeach
|
||||
<th>操作</th>
|
||||
<th data-labor-action-group data-finance-fixed="end">操作</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach ($laborFields as $field)
|
||||
|
||||
@ -97,6 +97,12 @@ class LaborExpensePageAccessTest extends FeatureTestCase
|
||||
->assertSee('data-labor-expense-table', false)
|
||||
->assertSee('data-labor-import-form', false)
|
||||
->assertSee('data-labor-import-open', false)
|
||||
->assertSee('data-labor-group="base"', false)
|
||||
->assertSee('data-labor-group="original"', false)
|
||||
->assertSee('data-labor-group="fund"', false)
|
||||
->assertSee('data-labor-group="salary_parttime"', false)
|
||||
->assertSee('data-labor-group="settlement"', false)
|
||||
->assertSee('data-labor-action-group', false)
|
||||
->assertSee('=F#-G#-H#-I#', false)
|
||||
->assertSee('=IF(AN#<=0,0,IF(AN#<=4000,800,AN#*0.2))', false)
|
||||
->assertSee('=IF(J#<=0,"",IF(J#<=3000,0.03', false)
|
||||
@ -116,6 +122,14 @@ class LaborExpensePageAccessTest extends FeatureTestCase
|
||||
$html = $response->getContent();
|
||||
$this->assertSame(61, substr_count($html, 'data-labor-header="'));
|
||||
$this->assertSame(52, substr_count($html, 'class="labor-expense-formula"'));
|
||||
$this->assertMatchesRegularExpression(
|
||||
'/<th[^>]*data-labor-group="base"[^>]*data-finance-fixed="true"[^>]*>/s',
|
||||
$html
|
||||
);
|
||||
$this->assertMatchesRegularExpression(
|
||||
'/<th[^>]*data-labor-action-group[^>]*data-finance-fixed="end"[^>]*>/s',
|
||||
$html
|
||||
);
|
||||
}
|
||||
|
||||
public function test_labor_expense_workbook_import_returns_editable_rows(): void
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user