feat: 完善审批退回流程与报销申请关联

后端优化报销单访问策略和常量定义,增强退回原因和审批状态
流转,前端完善退回对话框和审批交互组件,新增报销申请关联
模型,优化文档中心行数据和审批收件箱工具函数,增强引导
流程和会话模型,补充单元测试覆盖。
This commit is contained in:
caoxiaozhu
2026-05-27 14:35:17 +08:00
parent 7d32eae74e
commit cbb98f4469
30 changed files with 1794 additions and 250 deletions

View File

@@ -27,11 +27,27 @@
<span>{{ summaryLabel }}</span>
<strong>{{ nextStage }}</strong>
</div>
<div class="submit-confirm-row">
<span>{{ opinionTitle }}</span>
<strong>{{ normalizedOpinion }}</strong>
</div>
</div>
<label class="approval-opinion-field">
<span>
{{ opinionTitle }}
<em v-if="opinionRequired">必填</em>
</span>
<textarea
:value="currentOpinion"
maxlength="500"
:required="opinionRequired"
:disabled="busy"
:placeholder="opinionPlaceholder"
:aria-label="opinionTitle"
@input="handleOpinionInput"
></textarea>
<small>
<span>{{ opinionHint }}</span>
<strong>{{ currentOpinion.length }}/500</strong>
</small>
</label>
</ConfirmDialog>
</template>
@@ -53,10 +69,83 @@ const props = defineProps({
summaryLabel: { type: String, required: true },
nextStage: { type: String, required: true },
opinionTitle: { type: String, required: true },
opinion: { type: String, default: '' }
opinion: { type: String, default: '' },
opinionPlaceholder: { type: String, default: '' },
opinionHint: { type: String, default: '' },
opinionRequired: { type: Boolean, default: false }
})
const emit = defineEmits(['close', 'confirm'])
const emit = defineEmits(['close', 'confirm', 'update:opinion'])
const normalizedOpinion = computed(() => props.opinion.trim() || '未填写')
const currentOpinion = computed(() => String(props.opinion || ''))
function handleOpinionInput(event) {
emit('update:opinion', event.target.value)
}
</script>
<style scoped>
.approval-opinion-field {
display: grid;
gap: 8px;
margin-top: 14px;
}
.approval-opinion-field > span {
display: inline-flex;
align-items: center;
gap: 8px;
color: #334155;
font-size: 12px;
font-weight: 850;
}
.approval-opinion-field em {
border-radius: 999px;
padding: 2px 7px;
background: rgba(var(--theme-primary-rgb), .1);
color: var(--theme-primary-active);
font-style: normal;
font-size: 11px;
font-weight: 850;
}
.approval-opinion-field textarea {
width: 100%;
min-height: 96px;
resize: vertical;
padding: 12px;
border: 1px solid #d7e0ea;
border-radius: 8px;
background: #fff;
color: #0f172a;
font-size: 13px;
line-height: 1.6;
outline: none;
}
.approval-opinion-field textarea:focus {
border-color: rgba(var(--theme-primary-rgb), .5);
box-shadow: 0 0 0 3px var(--theme-focus-ring);
}
.approval-opinion-field small {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
color: #64748b;
font-size: 12px;
line-height: 1.5;
}
.approval-opinion-field small span {
min-width: 0;
}
.approval-opinion-field small strong {
flex: 0 0 auto;
color: var(--theme-primary-active);
font-weight: 850;
}
</style>

View File

@@ -4,6 +4,7 @@
:title="title"
:description="description"
:busy="busy"
:application="application"
@close="emit('close')"
@confirm="emit('confirm', $event)"
/>
@@ -16,7 +17,8 @@ defineProps({
open: { type: Boolean, required: true },
title: { type: String, required: true },
description: { type: String, required: true },
busy: { type: Boolean, required: true }
busy: { type: Boolean, required: true },
application: { type: Boolean, default: false }
})
const emit = defineEmits(['close', 'confirm'])