From 8bc919386b1d4037db9de061bf638c4141ad327b Mon Sep 17 00:00:00 2001 From: caoxiaozhu Date: Wed, 13 May 2026 06:47:46 +0000 Subject: [PATCH] style(web): update travel request detail view styles - travel-request-detail-view.css: update travel request detail styles --- .../views/travel-request-detail-view.css | 645 ++++++++++++++---- 1 file changed, 513 insertions(+), 132 deletions(-) diff --git a/web/src/assets/styles/views/travel-request-detail-view.css b/web/src/assets/styles/views/travel-request-detail-view.css index 3e60341..617f841 100644 --- a/web/src/assets/styles/views/travel-request-detail-view.css +++ b/web/src/assets/styles/views/travel-request-detail-view.css @@ -32,82 +32,133 @@ .detail-hero { display: grid; - grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr; + gap: 14px; + padding: 18px 22px 20px; +} + +.hero-topline { + display: grid; + grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; - padding: 22px; + align-items: center; + padding-bottom: 14px; + border-bottom: 1px solid #e5eaf0; } .applicant-card { display: grid; - grid-template-columns: 78px minmax(0, 1fr); + grid-template-columns: 48px minmax(0, 1fr); align-items: center; - gap: 16px; + gap: 12px; + min-width: 0; + padding: 0; + border: 0; + border-radius: 0; + background: transparent; } .portrait { - width: 72px; - height: 72px; + width: 44px; + height: 44px; display: grid; place-items: center; - border-radius: 999px; - background: linear-gradient(135deg, #dbeafe, #ecfdf5); + border: 1px solid #dde6ef; + border-radius: 10px; + background: #f3f6fa; color: #0f766e; - font-size: 26px; - font-weight: 900; + font-size: 18px; + font-weight: 800; } .applicant-card h2 { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px; color: #0f172a; - font-size: 22px; - font-weight: 900; + font-size: 17px; + font-weight: 800; + line-height: 1.35; } .applicant-card h2 span { - margin-left: 8px; - padding: 3px 9px; + margin-left: 0; + padding: 2px 8px; + border: 1px solid #dbe4ee; border-radius: 6px; - background: #dcfce7; - color: #059669; - font-size: 12px; + background: #fff; + color: #475569; + font-size: 11px; + font-weight: 700; } .applicant-card p { - margin-top: 6px; + margin-top: 4px; color: #64748b; - font-size: 13px; + font-size: 12px; + line-height: 1.5; } -.applicant-card p strong { - margin-left: 18px; - color: #334155; +.hero-stat-strip { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 0; + overflow: hidden; + border: 1px solid #e5eaf0; + border-radius: 10px; + background: #fff; } .hero-stat { display: grid; align-content: center; - gap: 8px; + gap: 6px; + min-width: 0; + padding: 12px 16px; + border: 0; + border-left: 1px solid #eef2f7; + border-radius: 0; + background: transparent; +} + +.hero-stat:first-child { + border-left: 0; } .hero-stat span { color: #64748b; - font-size: 13px; - font-weight: 750; + font-size: 11px; + font-weight: 700; + letter-spacing: .03em; + text-transform: uppercase; } .hero-stat strong { color: #0f172a; - font-size: 24px; - font-weight: 900; + font-size: 17px; + font-weight: 800; + line-height: 1.35; +} + +.hero-stat.emphasis strong { + font-size: 22px; +} + +.hero-stat b { + display: inline-flex; + align-items: center; } .risk-pill, .state-pill, .approval-pill { width: max-content; - padding: 5px 10px; + max-width: 100%; + padding: 4px 10px; border-radius: 6px; - font-size: 14px; - font-weight: 850; + font-size: 12px; + font-weight: 800; + line-height: 1.4; } .state-pill.info, @@ -160,11 +211,9 @@ } .hero-summary-panel { - grid-column: 1 / -1; display: grid; - grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); - gap: 4px 18px; - padding: 4px 0 0; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 0; border-top: 1px solid #e5eaf0; border-bottom: 1px solid #e5eaf0; } @@ -172,36 +221,45 @@ .hero-summary-item { min-width: 0; display: grid; - gap: 8px; - align-content: start; - padding: 16px 0 14px; + gap: 5px; + align-content: center; + padding: 12px 14px; + border: 0; + border-right: 1px solid #eef2f7; + border-radius: 0; + background: transparent; +} + +.hero-summary-item:last-child { + border-right: 0; } .hero-summary-label { display: inline-flex; align-items: center; - gap: 8px; + gap: 6px; color: #64748b; - font-size: 13px; - font-weight: 750; + font-size: 11px; + font-weight: 700; + letter-spacing: .03em; + text-transform: uppercase; } .hero-summary-icon { - color: #059669; - font-size: 14px; + color: #64748b; + font-size: 12px; } .hero-summary-item strong { display: block; color: #0f172a; - font-size: 16px; - font-weight: 850; + font-size: 13px; + font-weight: 800; line-height: 1.5; } .progress-block { - grid-column: 1 / -1; - padding-top: 18px; + padding-top: 16px; border-top: 1px solid #e5eaf0; } @@ -255,9 +313,23 @@ background: #dbe4ee; } -.progress-step.active::before { background: #10b981; } -.progress-step:first-child::before { left: 50%; } -.progress-step:last-child::before { right: 50%; } +.progress-step::after { + content: ""; + position: absolute; + top: 13px; + left: 0; + right: 0; + z-index: 0; + height: 2px; + background: #10b981; + opacity: 0; +} + +.progress-step.done::after { opacity: 1; } +.progress-step:first-child::before, +.progress-step:first-child::after { left: 50%; } +.progress-step:last-child::before, +.progress-step:last-child::after { right: 50%; } .progress-step span { position: relative; @@ -309,10 +381,14 @@ .progress-step strong { color: #334155; font-size: 12px; + text-align: center; } .progress-step.current strong { color: #059669; } -.progress-step small { font-size: 11px; } +.progress-step small { + font-size: 11px; + text-align: center; +} .progress-step.current small { color: #059669; @@ -349,6 +425,14 @@ margin-bottom: 14px; } +.detail-card-actions { + display: inline-flex; + align-items: center; + justify-content: flex-end; + flex-wrap: wrap; + gap: 8px; +} + .detail-card-head h3 { margin-bottom: 4px; } @@ -376,6 +460,12 @@ white-space: nowrap; } +.smart-entry-btn.secondary { + background: #fff; + color: #0f766e; + border-color: rgba(16, 185, 129, .24); +} + .smart-entry-btn:hover { border-color: rgba(16, 185, 129, .36); background: #f0fdf4; @@ -427,18 +517,19 @@ .detail-expense-table table { width: 100%; min-width: 0; - border-collapse: collapse; - table-layout: auto; + border-collapse: separate; + border-spacing: 0; + table-layout: fixed; } .detail-expense-table th, .detail-expense-table td { - padding: 12px 10px; + padding: 13px 12px; border-bottom: 1px solid #edf2f7; color: #24324a; - text-align: left; + text-align: center; font-size: 12px; - vertical-align: top; + vertical-align: middle; white-space: normal; } @@ -452,24 +543,22 @@ text-transform: uppercase; } -.detail-expense-table th:nth-child(1), -.detail-expense-table td:nth-child(1) { width: 12%; } -.detail-expense-table th:nth-child(2), -.detail-expense-table td:nth-child(2) { width: 12%; } -.detail-expense-table th:nth-child(3), -.detail-expense-table td:nth-child(3) { width: 21%; } -.detail-expense-table th:nth-child(4), -.detail-expense-table td:nth-child(4) { width: 10%; } -.detail-expense-table th:nth-child(5), -.detail-expense-table td:nth-child(5) { width: 16%; } -.detail-expense-table th:nth-child(6), -.detail-expense-table td:nth-child(6) { width: 21%; } -.detail-expense-table th:nth-child(7), -.detail-expense-table td:nth-child(7) { width: 8%; } +.detail-expense-table tbody tr:hover td { + 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%; } .cell-editor { display: grid; - gap: 6px; + gap: 7px; + justify-items: stretch; } .editor-stack { @@ -488,6 +577,25 @@ font-size: 12px; } +.currency-editor { + display: grid; + grid-template-columns: 34px minmax(0, 1fr); + align-items: center; + gap: 8px; +} + +.currency-editor span { + min-height: 34px; + display: grid; + place-items: center; + border: 1px solid #d7e0ea; + border-radius: 8px; + background: #f8fafc; + color: #334155; + font-size: 12px; + font-weight: 800; +} + .editor-input:focus, .editor-select:focus { border-color: #10b981; @@ -499,6 +607,7 @@ color: #64748b; font-size: 11px; line-height: 1.45; + text-align: center; } .expense-time strong, @@ -510,6 +619,7 @@ font-size: 13px; font-weight: 850; line-height: 1.4; + text-align: center; } .expense-time span, @@ -519,12 +629,24 @@ margin-top: 4px; color: #64748b; line-height: 1.45; + text-align: center; } .expense-amount strong { white-space: nowrap; } +.expense-desc, +.detail-expense-table .col-desc { + text-align: left; +} + +.expense-desc strong, +.expense-desc span, +.expense-risk p { + text-align: left; +} + .over-tag { display: inline-flex; align-items: center; @@ -541,41 +663,73 @@ color: #ea580c; } -.expense-attachment-main { - display: flex; +.attachment-action-group { + display: inline-flex; align-items: center; + justify-content: center; gap: 8px; flex-wrap: wrap; } .expense-attachment .attachment-hint { display: block; - margin-top: 3px; + margin-top: 4px; color: #64748b; font-size: 11px; line-height: 1.5; + text-align: center; } -.attachment-pill, -.risk-inline-tag { - display: inline-flex; - align-items: center; - min-height: 24px; - padding: 0 8px; - border-radius: 999px; - font-size: 11px; - font-weight: 800; +.attachment-hint.compact { + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; white-space: nowrap; } -.attachment-pill.ok { background: #ecfdf5; color: #059669; } -.attachment-pill.partial { background: #fff7ed; color: #ea580c; } -.attachment-pill.missing { background: #fef2f2; color: #ef4444; } -.attachment-pill.neutral { background: #eef2ff; color: #4f46e5; } +.icon-action, +.risk-inline-tag { + display: inline-flex; + align-items: center; + justify-content: center; + width: 30px; + height: 30px; + border-radius: 999px; + font-size: 14px; + font-weight: 800; +} + +.icon-action { + border: 1px solid #dbe4ee; + background: #fff; + color: #475569; + transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease; +} + +.icon-action.upload { + background: #ecfdf5; + border-color: rgba(16, 185, 129, .24); + color: #047857; +} + +.icon-action.preview { + background: #f8fafc; + color: #2563eb; +} + +.icon-action.danger { + background: #fff5f5; + color: #dc2626; + border-color: rgba(239, 68, 68, .18); +} + +.icon-action:hover:not(:disabled) { + transform: translateY(-1px); +} .inline-action { - min-height: 24px; - padding: 0 8px; + min-height: 28px; + padding: 0 10px; border: 1px solid #dbe4ee; border-radius: 999px; background: #fff; @@ -584,12 +738,24 @@ font-weight: 800; } +.inline-action.accent { + border-color: rgba(16, 185, 129, .24); + background: #ecfdf5; + color: #047857; +} + .inline-action.primary { border-color: #10b981; background: #10b981; color: #fff; } +.inline-action.danger { + border-color: rgba(239, 68, 68, .2); + background: #fff5f5; + color: #dc2626; +} + .inline-action:hover { border-color: rgba(16, 185, 129, .36); color: #047857; @@ -601,20 +767,46 @@ color: #fff; } +.inline-action.danger:hover { + border-color: rgba(220, 38, 38, .3); + background: #fee2e2; + color: #b91c1c; +} + .expense-action-cell { - min-width: 84px; + min-width: 128px; } .row-action-group { display: flex; flex-wrap: wrap; gap: 6px; + justify-content: center; } +.risk-inline-tag { + min-height: 24px; + width: auto; + padding: 0 8px; + font-size: 11px; + white-space: nowrap; +} + +.risk-inline-tag.pass, .risk-inline-tag.low { background: #ecfdf5; color: #059669; } .risk-inline-tag.medium { background: #fff7ed; color: #ea580c; } .risk-inline-tag.high { background: #fef2f2; color: #dc2626; } +.risk-headline { + display: block; + margin-top: 8px; + color: #0f172a; + font-size: 12px; + line-height: 1.5; + font-weight: 800; + text-align: left; +} + .expense-risk p { margin-top: 6px; color: #475569; @@ -622,35 +814,18 @@ line-height: 1.55; } -.expense-expand-row td { - padding: 0 10px 12px; - background: #fbfdff; - border-bottom: 1px solid #edf2f7; -} - -.expense-files { - display: flex; - flex-wrap: wrap; - gap: 8px; - padding: 10px 0 0; -} - -.expense-file-chip { - display: inline-flex; - align-items: center; - gap: 6px; - padding: 6px 10px; - border-radius: 999px; - background: #fff; - border: 1px solid #e2e8f0; - color: #334155; +.risk-point-list { + margin: 8px 0 0; + padding-left: 16px; + color: #475569; font-size: 11px; - font-weight: 700; + line-height: 1.6; + text-align: left; } -.expense-file-chip i { - color: #059669; - font-size: 12px; +.risk-suggestion { + color: #0f766e; + font-weight: 700; } .total-row td { @@ -659,6 +834,148 @@ background: #f8fafc; } +.empty-row-cell { + padding: 22px 16px; + color: #64748b; + font-size: 13px; + font-weight: 700; + text-align: center; + 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; +} + +.attachment-preview-mask { + position: fixed; + inset: 0; + z-index: 1200; + display: grid; + place-items: center; + padding: 24px; + background: rgba(15, 23, 42, 0.42); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); +} + +.attachment-preview-card { + width: min(920px, calc(100vw - 48px)); + max-height: calc(100vh - 48px); + display: grid; + grid-template-rows: auto minmax(0, 1fr); + gap: 14px; + padding: 22px; + border: 1px solid rgba(16, 185, 129, .14); + border-radius: 24px; + background: + radial-gradient(circle at top left, rgba(16, 185, 129, .12), transparent 36%), + linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 252, .98)); + box-shadow: 0 28px 56px rgba(15, 23, 42, .2); +} + +.attachment-preview-head { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 16px; +} + +.attachment-preview-badge { + display: inline-flex; + align-items: center; + min-height: 28px; + padding: 0 10px; + border-radius: 999px; + background: rgba(16, 185, 129, .12); + color: #047857; + font-size: 12px; + font-weight: 800; +} + +.attachment-preview-head h4 { + margin: 10px 0 0; + color: #0f172a; + font-size: 20px; + line-height: 1.4; + 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; + overflow: hidden; + border-radius: 20px; + background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%); +} + +.attachment-preview-image, +.attachment-preview-frame { + width: 100%; + height: 100%; + min-height: 520px; + border: 0; + object-fit: contain; + background: #fff; +} + +.attachment-preview-state { + min-height: 320px; + display: grid; + place-items: center; + gap: 10px; + color: #475569; + font-size: 14px; + font-weight: 700; + text-align: center; +} + +.attachment-preview-state i { + font-size: 24px; +} + +.attachment-preview-state.error { + color: #dc2626; +} + .detail-actions { position: relative; display: flex; @@ -683,7 +1000,8 @@ } .detail-actions button:disabled, -.inline-action:disabled { +.inline-action:disabled, +.icon-action:disabled { cursor: not-allowed; opacity: .58; box-shadow: none; @@ -731,12 +1049,23 @@ .validation-head { display: flex; - align-items: center; + align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; } +.validation-head h3 { + margin-bottom: 4px; +} + +.validation-head p { + margin: 0; + color: #64748b; + font-size: 12px; + line-height: 1.55; +} + .validation-pill { min-height: 26px; display: inline-flex; @@ -757,6 +1086,11 @@ color: #c2410c; } +.validation-pill.warning { + background: #fef2f2; + color: #dc2626; +} + .validation-summary { margin: 0; color: #475569; @@ -1244,11 +1578,24 @@ @media (max-width: 1320px) { .detail-hero { - grid-template-columns: minmax(0, 1.8fr) repeat(4, minmax(0, 1fr)); + gap: 14px; } .hero-summary-panel { - grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .hero-summary-item { + border-right: 1px solid #eef2f7; + border-bottom: 1px solid #eef2f7; + } + + .hero-summary-item:nth-child(2n) { + border-right: 0; + } + + .hero-summary-item:nth-last-child(-n + 2) { + border-bottom: 0; } .detail-expense-table { @@ -1270,24 +1617,28 @@ } @media (max-width: 760px) { - .detail-hero { - grid-template-columns: 1fr 1fr; - gap: 12px; - padding: 16px; + .detail-hero { gap: 12px; padding: 16px; } + + .hero-topline { + grid-template-columns: 1fr; + gap: 14px; } - .applicant-card, - .hero-summary-panel, - .progress-line { - grid-column: 1 / -1; - } - - .hero-summary-panel { + .hero-stat-strip { grid-template-columns: 1fr; } - .hero-summary-item { - padding: 14px 0; + .hero-stat { + border-left: 0; + border-top: 1px solid #eef2f7; + } + + .hero-stat:first-child { + border-top: 0; + } + + .hero-summary-panel { + grid-template-columns: 1fr 1fr; } .detail-card { @@ -1299,12 +1650,22 @@ align-items: stretch; } + .detail-card-actions { + width: 100%; + justify-content: flex-start; + } + .smart-entry-btn { align-self: flex-start; } .detail-expense-table table { min-width: 980px; } + .expense-total-bar, + .expense-total-meta { + justify-content: flex-start; + } + .detail-actions { flex-direction: column; } @@ -1313,6 +1674,10 @@ width: 100%; } + .validation-head { + flex-direction: column; + } + .detail-modal { width: 100vw; height: 100vh; @@ -1325,4 +1690,20 @@ .modal-body { padding: 16px 18px; } .ai-composer-actions { flex-direction: column; align-items: stretch; } .ai-preview-actions { flex-direction: column; } + + .attachment-preview-mask { + padding: 14px; + } + + .attachment-preview-card { + width: min(100vw - 28px, 920px); + max-height: calc(100vh - 28px); + padding: 18px; + border-radius: 20px; + } + + .attachment-preview-image, + .attachment-preview-frame { + min-height: 360px; + } }