feat: 完善报销单审批流程及退回原因追踪

新增直属领导审批通过接口和审批待办列表查询,报销单退回
支持原因码分类和审批环节标记,优化票据附件去重和路径
回退查找,前端新增退回原因对话框、审批收件箱和工作台
图标组件,补充工具函数和单元测试覆盖。
This commit is contained in:
caoxiaozhu
2026-05-20 21:00:47 +08:00
parent f8b25a7ccc
commit 002bf4f756
62 changed files with 5331 additions and 2101 deletions

View File

@@ -119,13 +119,28 @@
font-weight: 800;
}
.applicant-meta-line {
.applicant-profile-meta {
display: flex;
flex-wrap: wrap;
gap: 8px 0;
align-items: flex-start;
gap: 12px 28px;
}
.applicant-meta-line span {
.applicant-profile-meta__org {
display: grid;
gap: 6px;
min-width: 0;
}
.applicant-profile-meta__role {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
gap: 8px 0;
min-width: 0;
}
.applicant-meta-item {
min-width: 0;
position: relative;
display: inline-flex;
@@ -136,11 +151,11 @@
line-height: 1.5;
}
.applicant-meta-line span + span {
.applicant-profile-meta__role .applicant-meta-item + .applicant-meta-item {
margin-left: 16px;
}
.applicant-meta-line span + span::before {
.applicant-profile-meta__role .applicant-meta-item + .applicant-meta-item::before {
content: "•";
position: absolute;
left: -10px;
@@ -148,12 +163,17 @@
font-size: 12px;
}
.applicant-meta-line em {
font-style: normal;
color: #64748b;
.applicant-meta-item--sub strong {
font-weight: 750;
}
.applicant-meta-line strong {
.applicant-meta-item em {
font-style: normal;
color: #64748b;
flex-shrink: 0;
}
.applicant-meta-item strong {
color: #0f172a;
font-weight: 800;
}
@@ -245,14 +265,21 @@
.progress-line {
grid-column: 1 / -1;
display: grid;
grid-template-columns: repeat(var(--progress-columns, 5), minmax(0, 1fr));
grid-template-columns: repeat(var(--progress-columns, 5), minmax(118px, 1fr));
overflow-x: auto;
overscroll-behavior-x: contain;
padding: 4px 2px 2px;
}
.progress-step {
position: relative;
display: grid;
grid-template-rows: 26px minmax(62px, auto);
justify-items: center;
gap: 5px;
align-items: start;
gap: 10px;
min-width: 0;
padding: 0 6px;
color: #94a3b8;
}
@@ -297,8 +324,8 @@
.progress-step span {
position: relative;
z-index: 1;
width: 26px;
height: 26px;
width: 24px;
height: 24px;
display: grid;
place-items: center;
border-radius: 999px;
@@ -326,7 +353,7 @@
background: #10b981 !important;
color: #fff !important;
box-shadow: 0 0 0 4px rgba(16, 185, 129, .15) !important;
animation: breathe-dot 3s ease-in-out infinite !important;
animation: breathe-dot 3.2s ease-in-out infinite !important;
transform-origin: center !important;
}
@@ -344,19 +371,81 @@
.progress-step strong {
color: #334155;
font-size: 12px;
line-height: 1.35;
text-align: center;
}
.progress-step.current strong { color: #059669; }
.progress-step small {
.progress-step-copy {
width: 100%;
min-width: 0;
display: grid;
justify-items: center;
align-content: start;
gap: 6px;
}
.progress-step-status {
max-width: 100%;
min-height: 22px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 9px;
border: 1px solid #e2e8f0;
border-radius: 999px;
background: #f8fafc;
color: #64748b;
font-size: 11px;
font-weight: 850;
line-height: 1;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.progress-step.done .progress-step-status {
border-color: rgba(16, 185, 129, .2);
background: #ecfdf5;
color: #047857;
}
.progress-step.current .progress-step-status {
border-color: rgba(5, 150, 105, .22);
background: #059669;
color: #fff;
box-shadow: 0 8px 18px rgba(5, 150, 105, .14);
}
.progress-step:not(.done):not(.current) .progress-step-status {
background: #f8fafc;
color: #94a3b8;
}
.progress-step.current small {
color: #059669;
}
.progress-step-meta {
display: block;
width: 100%;
min-height: 16px;
color: #64748b;
font-size: 11px;
font-style: normal;
line-height: 1.35;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.progress-step.current .progress-step-meta {
color: #475569;
}
.detail-grid {
display: block;
min-width: 0;
@@ -472,6 +561,40 @@
white-space: pre-wrap;
}
.leader-approval-card {
border-color: rgba(5, 150, 105, .18);
background: linear-gradient(180deg, #ffffff 0%, #f7fdfb 100%);
}
.leader-approval-card textarea {
min-height: 96px;
background: #fff;
color: #0f172a;
}
.leader-approval-card textarea:focus {
outline: 0;
border-color: rgba(5, 150, 105, .5);
box-shadow: 0 0 0 3px rgba(5, 150, 105, .1);
}
.leader-opinion-meta {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-top: 8px;
color: #64748b;
font-size: 12px;
line-height: 1.5;
}
.leader-opinion-meta strong {
flex: 0 0 auto;
color: #047857;
font-weight: 850;
}
.detail-expense-table {
min-width: 0;
overflow-x: auto;
@@ -510,13 +633,13 @@
background: #fbfefd;
}
.detail-expense-table .col-time { width: 13%; }
.detail-expense-table .col-type { width: 15%; }
.detail-expense-table .col-desc { width: 23%; }
.detail-expense-table .col-amount { width: 12%; }
.detail-expense-table .col-attachment { width: 19%; }
.detail-expense-table .col-risk { width: 18%; }
.detail-expense-table .col-action { width: 10%; }
.detail-expense-table .col-time { width: 11%; }
.detail-expense-table .col-filled-at { width: 15%; }
.detail-expense-table .col-type { width: 13%; }
.detail-expense-table .col-desc { width: 19%; }
.detail-expense-table .col-amount { width: 11%; }
.detail-expense-table .col-attachment { width: 22%; }
.detail-expense-table .col-action { width: 9%; }
.cell-editor {
display: grid;
@@ -574,6 +697,7 @@
}
.expense-time strong,
.expense-filled-at strong,
.expense-type strong,
.expense-desc strong,
.expense-amount strong {
@@ -586,6 +710,7 @@
}
.expense-time span,
.expense-filled-at span,
.expense-type span,
.expense-desc span {
display: block;
@@ -599,6 +724,11 @@
white-space: nowrap;
}
.expense-filled-at strong {
font-size: 12px;
white-space: nowrap;
}
.expense-desc,
.detail-expense-table .col-desc {
text-align: left;
@@ -853,12 +983,6 @@
font-weight: 700;
}
.total-row td {
color: #0f172a;
font-weight: 900;
background: #f8fafc;
}
.empty-row-cell {
padding: 22px 16px;
color: #64748b;
@@ -868,31 +992,6 @@
background: #fcfdfd;
}
.expense-total-bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px 20px;
flex-wrap: wrap;
}
.expense-total-bar strong {
color: #0f172a;
font-size: 13px;
font-weight: 900;
}
.expense-total-meta {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 10px 16px;
flex-wrap: wrap;
color: #475569;
font-size: 12px;
font-weight: 700;
}
.expense-upload-input {
display: none;
}
@@ -910,7 +1009,7 @@
}
.attachment-preview-card {
width: min(920px, calc(100vw - 48px));
width: min(1160px, calc(100vw - 48px));
max-height: calc(100vh - 48px);
display: grid;
grid-template-rows: auto minmax(0, 1fr);
@@ -931,6 +1030,39 @@
gap: 16px;
}
.attachment-preview-toolbar {
margin-left: auto;
display: inline-flex;
align-items: center;
gap: 8px;
}
.attachment-preview-nav,
.attachment-preview-close {
width: 36px;
height: 36px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid #d7e0ea;
border-radius: 999px;
background: rgba(255, 255, 255, .9);
color: #475569;
}
.attachment-preview-nav:disabled {
cursor: not-allowed;
opacity: .5;
}
.attachment-preview-count {
min-width: 48px;
color: #64748b;
font-size: 12px;
font-weight: 800;
text-align: center;
}
.attachment-preview-badge {
display: inline-flex;
align-items: center;
@@ -951,27 +1083,30 @@
font-weight: 800;
}
.attachment-preview-close {
width: 36px;
height: 36px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid #d7e0ea;
border-radius: 999px;
background: rgba(255, 255, 255, .9);
color: #475569;
}
.attachment-preview-body {
min-height: 0;
display: grid;
place-items: center;
grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
align-items: stretch;
gap: 16px;
overflow: hidden;
background: transparent;
}
.attachment-source-pane,
.attachment-insight-pane {
min-height: 0;
border: 1px solid #e2e8f0;
border-radius: 20px;
overflow: hidden;
background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}
.attachment-source-pane {
display: grid;
place-items: center;
}
.attachment-preview-image,
.attachment-preview-frame {
width: 100%;
@@ -982,6 +1117,96 @@
background: #fff;
}
.attachment-insight-pane {
display: grid;
grid-template-rows: auto minmax(0, 1fr);
padding: 18px;
overflow-y: auto;
background: #fff;
}
.attachment-insight-head {
display: grid;
gap: 6px;
padding-bottom: 14px;
border-bottom: 1px solid #e2e8f0;
}
.attachment-insight-head span,
.attachment-insight-section span {
color: #64748b;
font-size: 12px;
font-weight: 800;
}
.attachment-insight-head strong {
color: #0f172a;
font-size: 18px;
line-height: 1.35;
}
.attachment-insight-content {
display: grid;
align-content: start;
gap: 14px;
padding-top: 14px;
}
.attachment-insight-pills {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.attachment-insight-section {
display: grid;
gap: 8px;
padding: 12px;
border-radius: 14px;
background: #f8fafc;
}
.attachment-insight-section ul {
display: grid;
gap: 6px;
margin: 0;
padding-left: 16px;
color: #334155;
font-size: 12px;
line-height: 1.55;
}
.attachment-risk-card {
display: grid;
gap: 6px;
padding: 10px;
border: 1px solid #fee2e2;
border-radius: 12px;
background: #fff7f7;
}
.attachment-risk-card.medium {
border-color: #fed7aa;
background: #fffaf2;
}
.attachment-risk-card strong {
color: #991b1b;
font-size: 12px;
line-height: 1.45;
}
.attachment-risk-card.medium strong {
color: #9a3412;
}
.attachment-risk-card p {
margin: 0;
color: #475569;
font-size: 12px;
line-height: 1.55;
}
.attachment-preview-state {
min-height: 320px;
display: grid;
@@ -993,6 +1218,11 @@
text-align: center;
}
.attachment-preview-state.compact {
min-height: 180px;
padding: 20px;
}
.attachment-preview-state i {
font-size: 24px;
}
@@ -1074,6 +1304,33 @@
line-height: 1.6;
}
.submit-confirm-summary {
display: grid;
gap: 8px;
padding: 12px 14px;
border: 1px solid #e2e8f0;
border-radius: 8px;
background: #f8fafc;
}
.submit-confirm-row {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
color: #64748b;
font-size: 13px;
line-height: 1.55;
}
.submit-confirm-row strong {
min-width: 0;
color: #0f172a;
font-weight: 780;
text-align: right;
word-break: break-word;
}
.validation-card {
border: 1px solid #e6f0eb;
background: linear-gradient(180deg, #fcfffd 0%, #f7fbf9 100%);
@@ -1140,6 +1397,109 @@
line-height: 1.55;
}
.risk-advice-list {
display: grid;
gap: 12px;
margin-top: 14px;
}
.risk-advice-card {
display: grid;
gap: 10px;
padding: 14px;
border: 1px solid #fee2e2;
border-radius: 8px;
background: #fffafa;
}
.risk-advice-card.medium {
border-color: #fed7aa;
background: #fffaf2;
}
.risk-advice-card-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.risk-advice-card-head span {
min-height: 24px;
display: inline-flex;
align-items: center;
padding: 0 9px;
border-radius: 999px;
background: #fee2e2;
color: #b91c1c;
font-size: 11px;
font-weight: 850;
white-space: nowrap;
}
.risk-advice-card.medium .risk-advice-card-head span {
background: #ffedd5;
color: #c2410c;
}
.risk-advice-card-head strong {
min-width: 0;
color: #0f172a;
font-size: 13px;
line-height: 1.45;
text-align: right;
}
.risk-advice-point {
margin: 0;
color: #7f1d1d;
font-size: 14px;
font-weight: 800;
line-height: 1.5;
}
.risk-advice-card.medium .risk-advice-point {
color: #9a3412;
}
.risk-advice-meta {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: 12px;
}
.risk-advice-meta > div {
min-width: 0;
display: grid;
gap: 6px;
padding: 10px;
border-radius: 8px;
background: rgba(255, 255, 255, .72);
}
.risk-advice-meta span {
color: #64748b;
font-size: 11px;
font-weight: 850;
}
.risk-advice-meta ul {
display: grid;
gap: 4px;
margin: 0;
padding-left: 16px;
color: #334155;
font-size: 12px;
line-height: 1.55;
}
.risk-advice-meta p {
margin: 0;
color: #334155;
font-size: 12px;
line-height: 1.55;
}
.detail-overlay {
position: fixed;
inset: 0;
@@ -1630,7 +1990,7 @@
}
.detail-expense-table table {
min-width: 980px;
min-width: 1080px;
}
.ai-entry-grid {
@@ -1665,16 +2025,21 @@
font-size: 16px;
}
.applicant-meta-line {
.applicant-profile-meta {
display: grid;
gap: 10px;
}
.applicant-profile-meta__role {
display: grid;
gap: 6px;
}
.applicant-meta-line span + span {
.applicant-profile-meta__role .applicant-meta-item + .applicant-meta-item {
margin-left: 0;
}
.applicant-meta-line span + span::before {
.applicant-profile-meta__role .applicant-meta-item + .applicant-meta-item::before {
content: none;
}
@@ -1726,12 +2091,7 @@
.smart-entry-btn { align-self: flex-start; }
.detail-expense-table table {
min-width: 980px;
}
.expense-total-bar,
.expense-total-meta {
justify-content: flex-start;
min-width: 1080px;
}
.detail-actions {
@@ -1764,12 +2124,34 @@
}
.attachment-preview-card {
width: min(100vw - 28px, 920px);
width: min(calc(100vw - 28px), 920px);
max-height: calc(100vh - 28px);
padding: 18px;
border-radius: 20px;
}
.attachment-preview-head {
flex-wrap: wrap;
}
.attachment-preview-toolbar {
order: 2;
width: 100%;
justify-content: flex-start;
}
.attachment-preview-body {
grid-template-columns: minmax(0, 1fr);
}
.attachment-insight-pane {
max-height: 320px;
}
.risk-advice-meta {
grid-template-columns: minmax(0, 1fr);
}
.attachment-preview-image,
.attachment-preview-frame {
min-height: 360px;