feat(web): update views

- AppShellRouteView.vue: update app shell route view
- AuditView.vue: update audit view
- EmployeeManagementView.vue: update employee management view
- PoliciesView.vue: update policies view
- RequestsView.vue: update requests view
- TravelReimbursementCreateView.vue: update travel form view
- TravelRequestDetailView.vue: update travel detail view
This commit is contained in:
caoxiaozhu
2026-05-13 03:33:11 +00:00
parent 473198c669
commit 8b72f4e962
7 changed files with 456 additions and 398 deletions

View File

@@ -281,7 +281,11 @@
v-for="item in reviewFactCards"
:key="item.key"
class="review-side-metric-card"
:class="{ editable: item.editor, editing: reviewInlineEditorKey === item.key }"
:class="{
editable: item.editor,
editing: reviewInlineEditorKey === item.key,
invalid: Boolean(reviewInlineErrors[item.key])
}"
@click="openInlineReviewEditor(item.key)"
>
<span class="review-side-metric-icon">
@@ -289,39 +293,46 @@
</span>
<div class="review-side-metric-copy">
<small>{{ item.label }}</small>
<template v-if="reviewInlineEditorKey === item.key && item.key === 'occurred_date'">
<template v-if="reviewInlineEditorKey === item.key && item.editor === 'date'">
<input
v-model="reviewInlineForm.occurred_date"
class="review-inline-input"
type="date"
@click.stop
@change="commitInlineReviewEditor"
@keydown.enter.prevent="commitInlineReviewEditor"
/>
</template>
<template v-else-if="reviewInlineEditorKey === item.key && item.key === 'amount'">
<input
v-model="reviewInlineForm.amount"
v-model="reviewInlineForm[item.modelKey]"
class="review-inline-input"
:class="{ invalid: Boolean(reviewInlineErrors[item.key]) }"
type="text"
placeholder="例如 200.00元"
:placeholder="`仅支持 ${DATE_INPUT_FORMAT}`"
@click.stop
@input="clearInlineReviewFieldError(item.key)"
@blur="commitInlineReviewEditor"
@keydown.enter.prevent="commitInlineReviewEditor"
/>
</template>
<template v-else-if="reviewInlineEditorKey === item.key && item.key === 'customer_name'">
<template v-else-if="reviewInlineEditorKey === item.key && item.editor === 'amount'">
<input
v-model="reviewInlineForm.customer_name"
v-model="reviewInlineForm[item.modelKey]"
class="review-inline-input"
:class="{ invalid: Boolean(reviewInlineErrors[item.key]) }"
type="text"
placeholder="请输入客户名称"
:placeholder="item.placeholder"
@click.stop
@input="clearInlineReviewFieldError(item.key)"
@blur="commitInlineReviewEditor"
@keydown.enter.prevent="commitInlineReviewEditor"
/>
</template>
<template v-else-if="reviewInlineEditorKey === item.key && item.key === 'scene'">
<template v-else-if="reviewInlineEditorKey === item.key && item.editor === 'text'">
<input
v-model="reviewInlineForm[item.modelKey]"
class="review-inline-input"
:class="{ invalid: Boolean(reviewInlineErrors[item.key]) }"
type="text"
:placeholder="item.placeholder"
@click.stop
@input="clearInlineReviewFieldError(item.key)"
@blur="commitInlineReviewEditor"
@keydown.enter.prevent="commitInlineReviewEditor"
/>
</template>
<template v-else-if="reviewInlineEditorKey === item.key && item.editor === 'select'">
<div class="review-inline-select-list" @click.stop>
<button
v-for="scene in REVIEW_SCENE_OPTIONS"
@@ -335,7 +346,10 @@
</button>
</div>
</template>
<strong v-else>{{ item.value }}</strong>
<strong v-else :title="item.value">{{ item.value }}</strong>
<span v-if="reviewInlineErrors[item.key]" class="review-inline-error">
{{ reviewInlineErrors[item.key] }}
</span>
</div>
<span v-if="item.key !== 'attachments'" class="review-side-edit-hint">修改</span>
<span v-else class="review-side-edit-hint upload">{{ reviewInlinePendingFiles.length ? '已选择' : '上传' }}</span>
@@ -366,14 +380,14 @@
</div>
<div v-if="reviewOtherCategoryOpen" class="review-other-category-popover">
<button
v-for="item in REVIEW_OTHER_CATEGORY_OPTIONS"
v-for="item in reviewOtherCategoryOptions"
:key="item.key"
type="button"
class="review-other-category-option"
:class="{ active: reviewSelectedOtherCategory === item.label }"
@click="selectReviewOtherCategory(item)"
>
{{ item.label }}
{{ item.label }} · {{ item.confidenceLabel }}
</button>
</div>
</section>
@@ -381,13 +395,28 @@
<section class="review-side-card review-side-risk-card">
<div class="review-side-head">
<strong>合规提醒 / 风险评分</strong>
<span class="review-side-risk-score">{{ reviewRiskScore }}/100</span>
<span class="review-side-risk-score" :class="{ empty: reviewRiskScore === null }">
{{ reviewRiskScore === null ? '无' : `${reviewRiskScore}/100` }}
</span>
</div>
<p class="review-side-risk-summary">{{ reviewRiskSummary }}</p>
<ul class="review-side-risk-list">
<ul v-if="reviewRiskItems.length" class="review-side-risk-list">
<li v-for="item in reviewRiskItems" :key="item">{{ item }}</li>
</ul>
<button type="button" class="review-side-link" :disabled="submitting || reviewActionBusy" @click="explainCurrentReviewRisk">
<div v-else-if="reviewRiskEmpty" class="review-side-empty">
<span class="review-side-empty-icon">
<i class="mdi mdi-shield-check-outline"></i>
</span>
<strong>暂无风险评分</strong>
<p>当前版本还没有返回结构化风险评分结果这里先不展示虚拟分数</p>
</div>
<button
v-if="reviewRiskActionAvailable"
type="button"
class="review-side-link"
:disabled="submitting || reviewActionBusy"
@click="explainCurrentReviewRisk"
>
查看全部风险项
<i class="mdi mdi-chevron-right"></i>
</button>
@@ -451,21 +480,21 @@
</div>
</Transition>
<Transition name="assistant-modal">
<div v-if="reviewCancelDialogOpen" class="assistant-overlay review-overlay">
<section class="review-confirm-modal">
<header>
<span class="assistant-badge warning">取消核对</span>
<h3>确认放弃本次识别结果</h3>
<p>关闭后将退出当前核对窗口本次尚未确认的修改不会继续保留</p>
</header>
<div class="review-confirm-actions">
<button type="button" class="secondary-dialog-btn" :disabled="reviewActionBusy" @click="closeCancelReviewDialog">返回继续核对</button>
<button type="button" class="danger-dialog-btn" :disabled="reviewActionBusy" @click="confirmCancelReview">确认取消</button>
</div>
</section>
</div>
</Transition>
<ConfirmDialog
:open="reviewCancelDialogOpen"
badge="取消核对"
badge-tone="warning"
title="确认放弃本次识别结果?"
description="关闭后将退出当前核对窗口,本次尚未确认的修改不会继续保留。"
cancel-text="返回继续核对"
confirm-text="确认取消"
busy-text="处理中..."
confirm-tone="danger"
confirm-icon="mdi mdi-close-circle-outline"
:busy="reviewActionBusy"
@close="closeCancelReviewDialog"
@confirm="confirmCancelReview"
/>
<Transition name="assistant-modal">
<div v-if="reviewEditDialogOpen" class="assistant-overlay review-overlay">