feat: 增强员工管理与报销单全流程功能

- 新增员工Excel导入服务(employee_spreadsheet)及导入/导出API端点
- 员工服务增加批量创建、邮箱唯一校验、组织架构关联等能力
- 报销单提交补充身份回填、部门信息透传及预审结果展示优化
- 认证流程增加部门信息(departmentName)并在schema中同步扩展
- 用户Agent服务增加部门关联与报销单回填逻辑
- 前端员工管理页面全面重构,新增导入导出、搜索过滤、分页等功能
- 前端审批中心、审计、差旅报销等视图交互与样式优化
- 新增TableLoadingState共享组件及员工导入测试用例
This commit is contained in:
caoxiaozhu
2026-05-20 14:21:56 +08:00
parent 57957d11a0
commit d7e98a58b9
46 changed files with 4022 additions and 305 deletions

View File

@@ -359,6 +359,11 @@
text-align: left;
}
.table-state > .table-loading,
.detail-inline-state > .table-loading {
width: 100%;
}
.table-state i,
.detail-inline-state i {
font-size: 28px;
@@ -455,11 +460,7 @@ tbody tr:hover {
background: #f8fbff;
}
tbody tr.spotlight {
background: linear-gradient(90deg, rgba(16, 185, 129, 0.05), rgba(59, 130, 246, 0.03));
}
.skill-name-cell {
.skill-name-cell {
display: grid;
grid-template-columns: 38px minmax(0, 1fr);
gap: 10px;
@@ -942,7 +943,7 @@ tbody tr.spotlight {
line-height: 1.5;
}
.spreadsheet-change-center {
.spreadsheet-change-center {
min-height: 0;
height: 100%;
align-self: stretch;
@@ -956,20 +957,20 @@ tbody tr.spotlight {
overflow: hidden;
}
.change-center-head h3,
.change-center-head p,
.change-center-section header,
.change-center-section p {
.change-center-head h3,
.change-center-head p,
.change-center-section header,
.change-center-section p {
margin: 0;
}
.change-center-head h3 {
.change-center-head h3 {
color: #0f172a;
font-size: 15px;
font-weight: 900;
}
.change-center-head p {
.change-center-head p {
margin-top: 3px;
color: #64748b;
font-size: 12px;
@@ -1030,37 +1031,37 @@ tbody tr.spotlight {
color: #2563eb;
}
.change-center-section {
.change-center-section {
display: grid;
gap: 8px;
}
.change-history-section {
.change-history-section {
min-height: 0;
grid-template-rows: auto minmax(0, 1fr);
}
.change-center-section > header {
.change-center-section > header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.change-center-section > header strong {
.change-center-section > header strong {
color: #0f172a;
font-size: 13px;
font-weight: 900;
}
.change-center-section > header small,
.change-center-section > header button {
.change-center-section > header small,
.change-center-section > header button {
color: #64748b;
font-size: 11px;
font-weight: 800;
}
.change-center-section > header button {
.change-center-section > header button {
padding: 0;
border: 0;
background: transparent;
@@ -1068,7 +1069,7 @@ tbody tr.spotlight {
cursor: pointer;
}
.change-center-list {
.change-center-list {
display: grid;
align-content: start;
gap: 8px;
@@ -1077,7 +1078,7 @@ tbody tr.spotlight {
padding-right: 2px;
}
.change-center-item {
.change-center-item {
display: grid;
gap: 8px;
padding: 10px;
@@ -1086,12 +1087,12 @@ tbody tr.spotlight {
background: #fff;
}
.change-center-item.active {
.change-center-item.active {
border-color: rgba(16, 185, 129, 0.35);
background: rgba(16, 185, 129, 0.05);
}
.change-center-item > button {
.change-center-item > button {
display: grid;
gap: 5px;
padding: 0;
@@ -1101,31 +1102,31 @@ tbody tr.spotlight {
cursor: pointer;
}
.change-center-item > button:disabled {
.change-center-item > button:disabled {
cursor: default;
}
.change-center-item > button div {
.change-center-item > button div {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.change-center-item > button strong {
.change-center-item > button strong {
color: #0f172a;
font-size: 13px;
font-weight: 900;
}
.change-center-item > button span,
.change-center-item > button p,
.change-center-item > button small {
.change-center-item > button span,
.change-center-item > button p,
.change-center-item > button small {
color: #64748b;
font-size: 11px;
}
.change-center-item > button p {
.change-center-item > button p {
margin: 0;
line-height: 1.45;
}
@@ -1250,7 +1251,7 @@ tbody tr.spotlight {
font-weight: 900;
}
.change-flow-empty {
.change-flow-empty {
color: #64748b;
font-size: 11px;
}
@@ -1746,11 +1747,19 @@ tbody tr.spotlight {
place-items: center;
gap: 8px;
padding: 24px;
background: rgba(248, 250, 252, 0.94);
background:
radial-gradient(circle at 50% 38%, rgba(224, 242, 254, 0.72), rgba(248, 250, 252, 0) 58%),
rgba(248, 250, 252, 0.94);
color: #475569;
font-size: 13px;
font-weight: 800;
text-align: center;
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
}
.rule-spreadsheet-state > .table-loading {
width: 100%;
}
.rule-spreadsheet-state i {
@@ -1857,6 +1866,14 @@ tbody tr.spotlight {
font-weight: 700;
}
.subtle-banner > .table-loading {
width: 100%;
}
.rule-drawer-state > .table-loading {
width: 100%;
}
.editor-foot {
margin-top: 12px;
color: #64748b;

View File

@@ -142,6 +142,8 @@
.picker-trigger,
.ghost-filter-btn,
.template-btn,
.export-btn,
.create-btn,
.row-action {
min-height: 38px;
@@ -282,6 +284,24 @@
color: #047857;
}
.template-btn,
.export-btn {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 0 14px;
border: 1px solid #d7e0ea;
background: #fff;
color: #334155;
}
.template-btn:hover,
.export-btn:hover {
border-color: rgba(16, 185, 129, 0.34);
background: #f6fffb;
color: #0f9f78;
}
.create-btn {
display: inline-flex;
align-items: center;
@@ -293,6 +313,50 @@
box-shadow: 0 8px 18px rgba(5, 150, 105, 0.18);
}
.create-btn:disabled,
.template-btn:disabled,
.export-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.import-file-input {
display: none;
}
.import-error-table-wrap {
max-height: 280px;
overflow: auto;
border: 1px solid #e2e8f0;
border-radius: 10px;
}
.import-error-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
.import-error-table th,
.import-error-table td {
padding: 10px 12px;
border-bottom: 1px solid #eef2f7;
text-align: left;
vertical-align: top;
}
.import-error-table th {
position: sticky;
top: 0;
background: #f8fafc;
color: #475569;
font-weight: 700;
}
.import-error-table td:last-child {
color: #b45309;
}
.hint {
display: inline-flex;
align-items: center;
@@ -333,13 +397,14 @@
background: linear-gradient(180deg, #fcfefd 0%, #f4f8f6 100%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
align-items: stretch;
justify-content: flex-start;
}
.table-wrap table {
width: 100%;
align-self: flex-start;
flex: 0 0 auto;
align-self: stretch;
}
.list-foot {
@@ -503,7 +568,7 @@
}
table {
height: 100%;
height: auto;
width: 100%;
min-width: 1180px;
border-collapse: collapse;
@@ -659,9 +724,12 @@ tbody tr:last-child td {
}
.role-stack {
display: flex;
gap: 6px;
display: inline-flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 6px;
max-width: 100%;
}
.role-pill {
@@ -770,6 +838,7 @@ tbody tr:last-child td {
display: grid;
grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.82fr);
gap: 16px;
align-items: start;
}
.detail-main,
@@ -777,6 +846,7 @@ tbody tr:last-child td {
display: grid;
gap: 16px;
align-content: start;
align-items: start;
}
.detail-card,
@@ -821,6 +891,7 @@ tbody tr:last-child td {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
overflow: visible;
}
.field {
@@ -850,6 +921,118 @@ tbody tr:last-child td {
color: #64748b;
}
.manager-picker,
.department-picker {
position: relative;
z-index: 2;
}
.manager-picker.open,
.department-picker.open {
z-index: 12;
}
.manager-picker-trigger {
width: 100%;
min-height: 42px;
display: inline-flex;
align-items: center;
justify-content: space-between;
gap: 10px;
padding: 10px 12px;
border: 1px solid #d7e0ea;
border-radius: 10px;
background: #fff;
color: #0f172a;
font-size: 13px;
text-align: left;
}
.manager-picker.open .manager-picker-trigger,
.manager-picker-trigger:hover {
border-color: rgba(16, 185, 129, 0.34);
background: #f6fffb;
}
.manager-picker-label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.manager-picker-panel {
position: absolute;
top: calc(100% + 8px);
left: 0;
width: min(420px, 100%);
z-index: 30;
display: grid;
gap: 10px;
padding: 12px;
border: 1px solid #d7e0ea;
border-radius: 12px;
background: #fff;
box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}
.manager-picker-panel input[type='search'] {
width: 100%;
border: 1px solid #d7e0ea;
border-radius: 10px;
background: #fff;
color: #0f172a;
font-size: 13px;
padding: 10px 12px;
}
.manager-picker-panel input[type='search']:focus {
outline: none;
border-color: rgba(16, 185, 129, 0.6);
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.manager-picker-options {
max-height: 240px;
overflow: auto;
display: grid;
gap: 8px;
}
.manager-picker-option {
display: grid;
gap: 4px;
width: 100%;
padding: 10px 12px;
border: 1px solid #edf2f7;
border-radius: 10px;
background: #fbfdff;
text-align: left;
}
.manager-picker-option strong {
color: #0f172a;
font-size: 13px;
font-weight: 800;
}
.manager-picker-option span {
color: #64748b;
font-size: 12px;
}
.manager-picker-option:hover,
.manager-picker-option.active {
border-color: rgba(16, 185, 129, 0.32);
background: linear-gradient(180deg, rgba(240, 253, 244, 0.85), #ffffff);
}
.manager-picker-empty {
margin: 0;
padding: 8px 4px;
color: #64748b;
font-size: 12px;
}
.role-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -912,9 +1095,9 @@ tbody tr:last-child td {
.history-row {
display: flex;
align-items: flex-start;
align-items: center;
justify-content: space-between;
gap: 10px;
gap: 12px;
padding: 12px 0;
border-top: 1px solid #edf2f7;
}
@@ -925,19 +1108,47 @@ tbody tr:last-child td {
}
.history-row strong {
display: block;
flex: 1 1 auto;
min-width: 0;
color: #0f172a;
font-size: 13px;
font-weight: 800;
line-height: 1.45;
}
.history-row span,
.history-row small {
display: block;
margin-top: 4px;
.history-row-meta {
display: inline-flex;
align-items: center;
justify-content: flex-end;
gap: 20px;
flex-shrink: 0;
margin-left: 16px;
padding-left: 16px;
border-left: 1px solid #e2e8f0;
}
.history-row-owner,
.history-row-time {
display: inline-block;
margin-top: 0;
color: #64748b;
font-size: 12px;
line-height: 1.5;
line-height: 1.45;
white-space: nowrap;
}
.history-row-owner {
color: #475569;
font-weight: 700;
}
.history-row-time {
color: #64748b;
}
td.cell-updated {
vertical-align: middle;
white-space: nowrap;
}
.publish-card {

View File

@@ -707,6 +707,15 @@
text-align: center;
}
.inline-empty.is-loading {
padding: 0;
background: transparent;
}
.inline-empty.is-loading > .table-loading {
min-height: 220px;
}
.inspector-empty {
display: grid;
align-content: center;

View File

@@ -418,12 +418,20 @@ th {
justify-content: center;
}
.empty-row {
color: #64748b;
text-align: center;
}
.list-foot {
.empty-row {
color: #64748b;
text-align: center;
}
.table-loading-row {
padding: 0;
}
.table-loading-row > .table-loading {
min-height: 220px;
}
.list-foot {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;

View File

@@ -2246,10 +2246,78 @@
display: grid;
gap: 8px;
margin: 0;
padding-left: 16px;
color: #475569;
}
.review-side-risk-item {
width: 100%;
display: grid;
grid-template-columns: 30px minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
min-height: 66px;
padding: 10px;
border: 1px solid rgba(226, 232, 240, 0.95);
border-radius: 14px;
background: rgba(255, 255, 255, 0.76);
color: #334155;
text-align: left;
transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.review-side-risk-item:hover {
border-color: rgba(249, 115, 22, 0.38);
box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
transform: translateY(-1px);
}
.review-side-risk-icon {
width: 30px;
height: 30px;
display: grid;
place-items: center;
border-radius: 10px;
background: rgba(14, 165, 233, 0.12);
color: #0284c7;
font-size: 16px;
}
.review-side-risk-item.warning .review-side-risk-icon {
background: rgba(245, 158, 11, 0.14);
color: #b45309;
}
.review-side-risk-item.high .review-side-risk-icon {
background: rgba(239, 68, 68, 0.12);
color: #dc2626;
}
.review-side-risk-copy {
min-width: 0;
display: grid;
gap: 3px;
}
.review-side-risk-copy strong {
color: #0f172a;
font-size: 12px;
line-height: 1.6;
font-weight: 900;
}
.review-side-risk-copy p {
margin: 0;
color: #64748b;
font-size: 12px;
line-height: 1.55;
}
.review-side-risk-meta {
display: inline-flex;
align-items: center;
gap: 2px;
color: #64748b;
font-size: 11px;
font-weight: 850;
white-space: nowrap;
}
.review-side-link {
@@ -4133,6 +4201,93 @@
flex: 1 1 168px;
}
.review-risk-detail-modal {
width: min(560px, calc(100vw - 40px));
max-height: min(760px, calc(100vh - 48px));
display: grid;
grid-template-rows: auto minmax(0, 1fr);
overflow: hidden;
border-radius: 24px;
border: 1px solid #e7eef6;
background:
radial-gradient(circle at top right, rgba(245, 158, 11, 0.10), transparent 28%),
linear-gradient(180deg, #fbfdff 0%, #f6f9fc 100%);
box-shadow:
0 24px 80px rgba(15, 23, 42, 0.22),
0 2px 12px rgba(15, 23, 42, 0.08);
}
.review-risk-detail-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
padding: 22px 24px 18px;
border-bottom: 1px solid #eef2f7;
}
.review-risk-detail-head h3 {
margin: 12px 0 0;
color: #0f172a;
font-size: 21px;
font-weight: 900;
line-height: 1.35;
}
.review-risk-detail-body {
min-height: 0;
display: grid;
gap: 14px;
padding: 18px 24px 24px;
overflow-y: auto;
}
.review-risk-detail-level {
width: fit-content;
display: inline-flex;
align-items: center;
gap: 8px;
min-height: 30px;
padding: 0 11px;
border-radius: 999px;
background: rgba(14, 165, 233, 0.12);
color: #0284c7;
font-size: 12px;
font-weight: 900;
}
.review-risk-detail-level.warning {
background: rgba(245, 158, 11, 0.14);
color: #b45309;
}
.review-risk-detail-level.high {
background: rgba(239, 68, 68, 0.12);
color: #dc2626;
}
.review-risk-detail-section {
display: grid;
gap: 8px;
padding: 14px;
border: 1px solid rgba(226, 232, 240, 0.92);
border-radius: 16px;
background: rgba(255, 255, 255, 0.72);
}
.review-risk-detail-section strong {
color: #0f172a;
font-size: 13px;
font-weight: 900;
}
.review-risk-detail-section p {
margin: 0;
color: #475569;
font-size: 13px;
line-height: 1.7;
}
.review-edit-modal {
max-height: min(860px, calc(100vh - 48px));
display: grid;

View File

@@ -1061,6 +1061,13 @@
color: #ef4444;
}
.return-action {
min-width: 98px;
border: 1px solid #fed7aa;
background: #fff7ed;
color: #c2410c;
}
.detail-action-hint {
color: #64748b;
font-size: 13px;
@@ -1583,6 +1590,7 @@
.ai-preview-secondary:disabled,
.ai-preview-primary:disabled,
.approve-action:disabled,
.return-action:disabled,
.ai-send-btn:disabled {
opacity: .45;
cursor: not-allowed;