修复了已知问题以及报销合理化

This commit is contained in:
2026-07-08 18:12:31 +08:00
parent 948e94f425
commit 73564a0db6
37 changed files with 114 additions and 430 deletions

View File

@@ -39,27 +39,6 @@ export function delSealReq(bizIds) {
})
}
export function approveSealReq(bizId) {
return request({
url: `/hrm/seal/${bizId}/approve`,
method: 'post'
})
}
export function rejectSealReq(bizId) {
return request({
url: `/hrm/seal/${bizId}/reject`,
method: 'post'
})
}
export function cancelSealReq(bizId) {
return request({
url: `/hrm/seal/${bizId}/cancel`,
method: 'post'
})
}
export function stampSealJava(bizId, data) {
// 确保数据正确序列化,特别是 0 值
const payload = {

View File

@@ -30,7 +30,7 @@
</div>
</div>
<slot :detail="detail"></slot>
<slot :detail="detail" :flowInstance="flowInstance"></slot>
<div class="block-title">审批信息</div>
<el-card class="inner-card" shadow="never">

View File

@@ -136,9 +136,8 @@ export default {
return empId ? `员工ID:${empId}` : '-'
},
canApprove () {
// 只有审批状态且是当前用户待审批的才能审批
console.log(this.currentTask, this.$store.getters.name, this.$store.getters.id)
return this.detail.status === 'pending' && (this.currentTask?.assigneeUserName === this.$store.getters.name || this.currentTask?.assigneeUserId === this.$store.getters.id)
// 只有审批且是当前用户待审批的才能审批
return this.flowInstance?.status === 'running' && (this.currentTask?.assigneeUserName === this.$store.getters.name || this.currentTask?.assigneeUserId === this.$store.getters.id)
},
canWithdraw () {
return false

View File

@@ -81,13 +81,10 @@ export default {
},
canWithdraw () {
return false;
// 只有待审批状态且是当前用户提交的才能撤回
return this.detail.status === 'pending' && this.detail.createBy === this.$store.getters.name
},
canApprove () {
// 只有审批状态且是当前用户待审批的才能审批
console.log(this.currentTask, this.$store.getters.name, this.$store.getters.id)
return this.detail.status === 'pending' && (this.currentTask?.assigneeUserName === this.$store.getters.name || this.currentTask?.assigneeUserId === this.$store.getters.id)
// 只有审批且是当前用户待审批的才能审批
return this.flowInstance?.status === 'running' && (this.currentTask?.assigneeUserName === this.$store.getters.name || this.currentTask?.assigneeUserId === this.$store.getters.id)
}
},
created () {

View File

@@ -1,9 +1,9 @@
<template>
<BizDetailContainer :bizId="currentBizId" bizType="travel" :preview="preview">
<template slot-scope="{ detail }">
<template slot-scope="{ detail, flowInstance }">
<div>
<!-- ===== 新增提前结束按钮区域 ===== -->
<div class="action-buttons" v-if="showEarlyEndButton(detail)">
<div class="action-buttons" v-if="showEarlyEndButton(detail, flowInstance)">
<el-button
type="warning"
size="small"
@@ -110,13 +110,14 @@ export default {
const now = Date.now()
return Boolean(detail.actualEndTime) || (endTime && endTime <= now)
},
showEarlyEndButton(detail) {
showEarlyEndButton(detail, flowInstance) {
if (!detail) return false
if (detail.actualEndTime) return false
const status = detail.status
// 已通过与否以流程实例为准
const approved = flowInstance?.status === 'approved'
const endTime = detail.endTime ? new Date(detail.endTime).getTime() : 0
const now = Date.now()
return status === 'approved' && endTime > now
return approved && endTime > now
},
handleEarlyEnd() {