feat: 本体字段治理与风险规则模板执行器重构

- 新增本体字段注册表与字段治理审计脚本
- 重构风险规则模板执行器、DSL 验证与清单分类器
- 完善票据夹服务与差旅请求详情页交互
- 优化趋势图表与总览页数据展示
- 增强报销平台风险分级与模拟公司筛选
- 补充本体字段、风险规则生成与票据夹服务测试覆盖
This commit is contained in:
caoxiaozhu
2026-06-03 15:46:56 +08:00
parent e12b140508
commit 34457f9c3e
81 changed files with 4858 additions and 1073 deletions

View File

@@ -865,6 +865,25 @@
overflow-x: auto;
}
.expense-recognition-banner {
min-width: 760px;
display: flex;
align-items: center;
gap: 8px;
margin: 0 0 10px;
padding: 10px 12px;
border: 1px solid rgba(var(--theme-primary-rgb), .20);
border-radius: 4px;
background: var(--theme-primary-soft);
color: var(--theme-primary-active);
font-size: 12px;
font-weight: 800;
}
.expense-recognition-banner i {
font-size: 16px;
}
.detail-expense-table table {
width: 100%;
min-width: 0;
@@ -907,12 +926,13 @@
background: var(--success-soft);
}
.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-time { width: 10%; }
.detail-expense-table .col-filled-at { width: 13%; }
.detail-expense-table .col-type { width: 11%; }
.detail-expense-table .col-desc { width: 15%; }
.detail-expense-table .col-amount { width: 9%; }
.detail-expense-table .col-attachment { width: 18%; }
.detail-expense-table .col-risk-note { width: 15%; }
.detail-expense-table .col-action { width: 9%; }
.expense-time {
@@ -929,12 +949,25 @@
top: 50%;
width: 18px;
height: 18px;
padding: 0;
border: 0;
background: transparent;
display: inline-grid;
place-items: center;
transform: translateY(-50%);
color: #dc2626;
font-size: 18px;
line-height: 1;
cursor: pointer;
}
.expense-risk-indicator:hover {
color: #b91c1c;
}
.expense-risk-indicator:focus-visible {
outline: 2px solid rgba(220, 38, 38, .28);
outline-offset: 2px;
}
.cell-editor {
@@ -948,7 +981,8 @@
}
.editor-input,
.editor-select {
.editor-select,
.editor-textarea {
width: 100%;
min-height: 34px;
padding: 0 10px;
@@ -959,6 +993,13 @@
font-size: 12px;
}
.editor-textarea {
min-height: 68px;
padding: 8px 10px;
resize: vertical;
line-height: 1.45;
}
.currency-editor {
display: grid;
grid-template-columns: 34px minmax(0, 1fr);
@@ -979,7 +1020,8 @@
}
.editor-input:focus,
.editor-select:focus {
.editor-select:focus,
.editor-textarea:focus {
border-color: var(--theme-primary);
box-shadow: 0 0 0 3px var(--theme-focus-ring);
outline: none;
@@ -1036,6 +1078,29 @@
text-align: left;
}
.expense-risk-note strong {
display: block;
color: #0f172a;
font-size: 12px;
font-weight: 800;
line-height: 1.45;
text-align: center;
overflow-wrap: anywhere;
}
.expense-risk-note span {
display: block;
color: #64748b;
font-size: 12px;
line-height: 1.45;
text-align: center;
}
.expense-risk-note .risk-note-missing {
color: #b45309;
font-weight: 750;
}
.over-tag {
display: inline-flex;
align-items: center;
@@ -1339,6 +1404,12 @@
font-weight: 700;
}
.system-attachment-note.pending {
border-color: rgba(var(--theme-primary-rgb), .20);
background: var(--theme-primary-soft);
color: var(--theme-primary-active);
}
.empty-row-cell {
padding: 22px 16px;
color: #64748b;
@@ -1352,6 +1423,105 @@
display: none;
}
.smart-entry-upload-panel {
display: grid;
gap: 12px;
}
.smart-entry-upload-picker {
min-height: 40px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 0 14px;
border: 1px solid rgba(var(--theme-primary-rgb), .28);
border-radius: 4px;
background: #fff;
color: var(--theme-primary-active);
font-size: 13px;
font-weight: 850;
}
.smart-entry-upload-picker:hover {
background: var(--theme-primary-soft);
}
.smart-entry-upload-picker:disabled {
cursor: not-allowed;
opacity: .64;
}
.smart-entry-upload-file {
display: grid;
grid-template-columns: 32px minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
min-height: 68px;
padding: 12px;
border: 1px solid #e2e8f0;
border-radius: 4px;
background: #f8fafc;
}
.smart-entry-upload-file > i {
color: var(--theme-primary-active);
font-size: 24px;
}
.smart-entry-upload-file strong,
.smart-entry-upload-file span {
display: block;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.smart-entry-upload-file strong {
color: #0f172a;
font-size: 13px;
font-weight: 850;
white-space: nowrap;
}
.smart-entry-upload-file span {
margin-top: 3px;
color: #64748b;
font-size: 12px;
line-height: 1.45;
}
.smart-entry-upload-list {
display: grid;
gap: 2px;
max-height: 84px;
margin: 8px 0 0;
padding: 0;
overflow: auto;
list-style: none;
}
.smart-entry-upload-list li {
min-width: 0;
overflow: hidden;
color: #334155;
font-size: 12px;
line-height: 1.45;
text-overflow: ellipsis;
white-space: nowrap;
}
.smart-entry-upload-clear {
min-height: 30px;
padding: 0 10px;
border: 1px solid #d7e0ea;
border-radius: 4px;
background: #fff;
color: #475569;
font-size: 12px;
font-weight: 800;
}
.attachment-preview-mask {
position: fixed;
inset: 0;
@@ -1813,6 +1983,30 @@
border-radius: 2px;
background: #ffffff;
box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.validation-section--risk .risk-advice-card.is-highlighted {
border-color: #f59e0b;
background: #fff7ed;
box-shadow: 0 0 0 3px rgba(245, 158, 11, .20), 0 8px 18px rgba(15, 23, 42, .08);
animation: risk-card-flash 1.2s ease-in-out 1;
}
@keyframes risk-card-flash {
0%,
100% {
box-shadow: 0 0 0 3px rgba(245, 158, 11, .18), 0 8px 18px rgba(15, 23, 42, .08);
}
45% {
box-shadow: 0 0 0 6px rgba(245, 158, 11, .30), 0 10px 22px rgba(15, 23, 42, .10);
}
}
@media (prefers-reduced-motion: reduce) {
.validation-section--risk .risk-advice-card.is-highlighted {
animation: none;
}
}
.validation-section--risk .risk-advice-card::before {