修改bbug

This commit is contained in:
2026-06-16 15:51:19 +08:00
parent 44949287e0
commit c1a382c255
7 changed files with 122 additions and 13 deletions

View File

@@ -4,13 +4,13 @@
<div slot="header" class="card-header">
<span>{{ bizTitle }}</span>
<div class="actions">
<el-button v-if="!preview" size="mini" icon="el-icon-arrow-left" @click="$router.back()">返回</el-button>
<el-button v-if="!isPreview" size="mini" icon="el-icon-arrow-left" @click="$router.back()">返回</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="loadDetail">刷新</el-button>
<el-button v-if="!preview && canApprove" type="success" size="mini" :loading="actionLoading" @click="handleApprove">
<el-button v-if="!isPreview && canApprove" type="success" size="mini" :loading="actionLoading" @click="handleApprove">
通过
</el-button>
<el-button v-if="!preview && canApprove" type="danger" size="mini" :loading="actionLoading" @click="handleReject">
<el-button v-if="!isPreview && canApprove" type="danger" size="mini" :loading="actionLoading" @click="handleReject">
驳回
</el-button>
</div>
@@ -53,7 +53,7 @@
<ProjectInfo :info="detail" />
</el-card>
<div v-if="!preview">
<div v-if="!isPreview">
<div class="block-title">审批操作</div>
<el-card class="inner-card" shadow="never">
<div v-if="currentTask" class="btn-row">
@@ -75,7 +75,7 @@
<span>操作汇报</span>
</div>
<div v-if="!preview" class="comment-form">
<div v-if="!isPreview" class="comment-form">
<editor v-model="commentForm.commentContent" placeholder="填写操作汇报(可选)" />
<file-upload v-model="commentForm.attachments" />
<div class="form-actions">
@@ -89,7 +89,7 @@
<div class="comment-meta">
<span class="comment-operator">{{ item.createByName }}</span>
<span class="comment-time">{{ item.createTime }}</span>
<el-button v-if="!preview && isSelf(item)" type="danger" size="mini" @click="handleDeleteComment(item.commentId)"
<el-button v-if="!isPreview && isSelf(item)" type="danger" size="mini" @click="handleDeleteComment(item.commentId)"
:loading="buttonLoading">删除</el-button>
</div>
</div>
@@ -160,6 +160,9 @@ export default {
}
},
computed: {
isPreview () {
return this.preview || !!this.$route?.query?.preview
},
currentBizId () {
return this.bizId
},

View File

@@ -46,7 +46,7 @@ export default {
if (routePath) {
this.$router.push({
path: routePath,
query: { bizId: bizId }
query: { bizId: bizId, preview: 1 }
})
} else {
this.$message.warning('无法确定申请类型对应的详情页面')

View File

@@ -50,7 +50,6 @@
stripe
border
@row-dblclick="handleRowClick">
<el-table-column label="编号" prop="instId" width="80" />
<el-table-column label="类型" width="70">
<template slot-scope="scope">
<el-tag :type="getTypeTagType(scope.row.bizType)" size="mini">{{ getTypeText(scope.row.bizType) }}</el-tag>
@@ -80,6 +79,9 @@
<el-table-column label="申请时间" prop="createTime" width="140">
<template slot-scope="scope">{{ formatDate(scope.row.createTime) }}</template>
</el-table-column>
<el-table-column label="结束时间" width="140">
<template slot-scope="scope">{{ formatFinishTime(scope.row) }}</template>
</el-table-column>
<el-table-column label="耗时" width="80">
<template slot-scope="scope">{{ formatElapsed(scope.row) }}</template>
</el-table-column>
@@ -174,7 +176,7 @@ export default {
case 'travel':
return `${b.travelType || '出差'} · ${b.destination || '未填目的地'}${b.startTime ? ' · ' + this.formatDate(b.startTime) : ''}`
case 'seal':
return `${b.sealType || '用印'}${b.fileName ? ' · ' + b.fileName : ''}${b.useReason ? ' · ' + b.useReason : ''}`
return `${b.sealType || '用印'}${b.purpose ? ' · ' + b.purpose : ''}`
case 'reimburse':
return `${b.reimburseType || '报销'} · ¥${b.totalAmount != null ? b.totalAmount : 0}${b.reason ? ' · ' + b.reason : ''}`
case 'appropriation':
@@ -192,9 +194,19 @@ export default {
}
return '-'
},
flowEndTime (row) {
const finalStatus = ['approved', 'rejected', 'revoked', 'finished', 'complete']
if (row.bizType === 'travel' && row.actualEndTime) return row.actualEndTime
if (finalStatus.includes(row.status)) return row.updateTime || null
return null
},
formatFinishTime (row) {
const end = this.flowEndTime(row)
return end ? this.formatDate(end) : '-'
},
formatElapsed (row) {
if (!row.createTime) return '-'
const end = row.finishTime || row.endTime || Date.now()
const end = this.flowEndTime(row) || Date.now()
const ms = new Date(end).getTime() - new Date(row.createTime).getTime()
if (ms <= 0) return '-'
const h = ms / 3600000

View File

@@ -32,8 +32,8 @@
</el-card>
<!-- 盖章操作审批通过后显示 -->
<div v-if="canStamp" class="block-title">盖章操作</div>
<el-card v-if="canStamp" class="inner-card" shadow="never">
<div v-if="canStamp && !$route.query.preview" class="block-title">盖章操作</div>
<el-card v-if="canStamp && !$route.query.preview" class="inner-card" shadow="never">
<div class="stamp-section">
<div class="stamp-config">
<el-form :model="stampForm" label-width="120px" size="small">