@ -1,7 +1,7 @@
< template >
< div class = "container" >
< div ref = "lxHeader" >
< LxHeader :custom ="true" icon = "el-icon-s-check" text = "执行科室分解审核 " style = "margin-bottom: 10px; border: 0;" >
< LxHeader :custom ="true" icon = "el-icon-s-check" :text ="pageTitle " style = "margin-bottom: 10px; border: 0;" >
< div >
< div class = "search-panel" >
< div class = "filters" >
@ -27,8 +27,9 @@
@ change = "load"
>
< el -option label = "草稿" value = "draft" / >
< el -option label = "已提交" value = "submitted" / >
< el -option label = "审核通过" value = "approved" / >
< el -option label = "待科室负责人审核" value = "submitted" / >
< el -option label = "待分管领导审核" value = "manager_approved" / >
< el -option label = "终审通过" value = "approved" / >
< / e l - s e l e c t >
< / div >
< div class = "actions" >
@ -111,7 +112,7 @@
< div class = "action-group" >
< el -button type = "primary" size = "mini" @click ="viewDetail(scope.row)" > 查 看 详 情 < / el -button >
< el -button
v - if = "scope.row.status === 'submitted' "
v - if = "scope.row.status === reviewableStatus "
type = "warning"
size = "mini"
@ click = "openReviewDialog(scope.row)"
@ -153,7 +154,7 @@
< / e l - d i a l o g >
< el -dialog
title = "执行科室分解审核 "
: title = "pageTitle "
: visible . sync = "reviewDialogVisible"
width = "96%"
: close - on - click - modal = "false"
@ -262,7 +263,12 @@ import { formatMoney } from '@/utils/budgetMoney'
import LxHeader from '@/components/LxHeader/index.vue'
import BudgetSubmissionForm from '@/views/budget/collection/components/BudgetSubmissionForm.vue'
import { getBudgetCollectionYearOptions } from '@/api/budget/budgetCollectionYear.js'
import { getDepartmentSubmissions , reviewDepartmentSubmission } from '@/api/budget/leadDepartment.js'
import {
getDepartmentSubmissions ,
getManagerReviewDepartmentSubmissions ,
reviewDepartmentSubmission ,
reviewDepartmentSubmissionByManager
} from '@/api/budget/leadDepartment.js'
export default {
name : 'DepartmentReviewManagement' ,
@ -270,6 +276,12 @@ export default {
LxHeader ,
BudgetSubmissionForm
} ,
props : {
reviewStage : {
type : String ,
default : 'leader'
}
} ,
data ( ) {
return {
loading : false ,
@ -296,6 +308,17 @@ export default {
}
}
} ,
computed : {
isManagerReview ( ) {
return this . reviewStage === 'manager'
} ,
pageTitle ( ) {
return this . isManagerReview ? '科室负责人审核' : '分管领导审核'
} ,
reviewableStatus ( ) {
return this . isManagerReview ? 'submitted' : 'manager_approved'
}
} ,
created ( ) {
this . initLoad ( )
this . loadYearOptions ( )
@ -339,7 +362,8 @@ export default {
this . loading = true
try {
const response = await getDepartmentSubmissions ( {
const getList = this . isManagerReview ? getManagerReviewDepartmentSubmissions : getDepartmentSubmissions
const response = await getList ( {
... this . searchFields ,
page _size : this . pageSize ,
page : this . currentPage
@ -350,7 +374,7 @@ export default {
this . currentPage = response ? response . current _page || 1 : 1
} catch ( error ) {
console . error ( '获取执行科室分解审核列表失败:' , error )
this . $message . error ( error . message || '获取执行科室分解审核列表失败' )
this . $message . error ( error . message || ` 获取 ${ this . pageTitle } 列表失败 ` )
this . tableData = [ ]
this . total = 0
} finally {
@ -397,11 +421,14 @@ export default {
this . reviewSubmitting = true
try {
await reviewDepartmentSubmission ( this . currentReviewRow . id , {
const review = this . isManagerReview ? reviewDepartmentSubmissionByManager : reviewDepartmentSubmission
await review ( this . currentReviewRow . id , {
action : this . reviewForm . action ,
approval _notes : this . reviewForm . approval _notes . trim ( )
} )
this . $message . success ( this . reviewForm . action === 'approve' ? '审核通过' : '已退回执行科室修改' )
this . $message . success ( this . reviewForm . action === 'approve'
? ( this . isManagerReview ? '初审通过,已提交分管领导审核' : '终审通过' )
: '已退回执行科室修改' )
this . reviewDialogVisible = false
await this . load ( )
} catch ( error ) {
@ -460,6 +487,7 @@ export default {
const typeMap = {
draft : 'info' ,
submitted : 'warning' ,
manager _approved : 'primary' ,
approved : 'success'
}
return typeMap [ status ] || 'info'
@ -468,8 +496,9 @@ export default {
getStatusText ( status ) {
const textMap = {
draft : '草稿' ,
submitted : '已提交' ,
approved : '审核通过'
submitted : '待科室负责人审核' ,
manager _approved : '待分管领导审核' ,
approved : '终审通过'
}
return textMap [ status ] || '未知'
} ,
@ -484,6 +513,10 @@ export default {
const actionMap = {
submit : '提交审核' ,
resubmit : '重新提交' ,
manager _approve : '科室负责人初审通过' ,
manager _return : '科室负责人退回修改' ,
leader _approve : '分管领导终审通过' ,
leader _return : '分管领导退回修改' ,
approve : '审核通过' ,
return : '退回修改'
}