wuzhen update
This commit is contained in:
1 parent
1da0a6743f
commit
6a3246d98c
39 files changed
+5661
-667
No files matched your search
@@ -82,20 +82,59 @@ export const getApprovalRecord = (id: string | number): AxiosPromise<CwApprovalR
|
||||
|
||||
// 审批申报(单个)
|
||||
export const approveApplication = (data: CwApprovalForm) => {
|
||||
// 🔧 修复:使用部门审批接口,将JSON数据转换为URL参数
|
||||
const params = new URLSearchParams();
|
||||
params.append('applicationId', String(data.applicationId || ''));
|
||||
params.append('approveAction', data.approvalResult === 'approved' ? 'approve' : 'return');
|
||||
params.append('approveOpinion', data.approvalComment || '');
|
||||
|
||||
return request({
|
||||
url: '/cw/approval/process',
|
||||
url: '/cw/approval/dept', // 🔧 修复:使用部门审批接口
|
||||
method: 'post',
|
||||
data: data
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: params.toString()
|
||||
});
|
||||
};
|
||||
|
||||
// 批量审批申报
|
||||
export const batchApproveApplication = (data: CwApprovalForm) => {
|
||||
return request({
|
||||
url: '/cw/approval/batchApprove',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
export const batchApproveApplication = async (data: CwApprovalForm) => {
|
||||
// 🔧 修复:后端没有批量接口,改为逐个调用
|
||||
if (!data.applicationIds || data.applicationIds.length === 0) {
|
||||
throw new Error('未选择要审批的申报项目');
|
||||
}
|
||||
|
||||
console.log('🔧 批量审批开始,项目数量:', data.applicationIds.length);
|
||||
const results = [];
|
||||
|
||||
for (const applicationId of data.applicationIds) {
|
||||
try {
|
||||
const singleData = {
|
||||
applicationId: applicationId,
|
||||
approvalResult: data.approvalResult,
|
||||
approvalComment: data.approvalComment,
|
||||
nextApprover: data.nextApprover
|
||||
};
|
||||
|
||||
console.log('🔧 处理项目ID:', applicationId);
|
||||
const result = await approveApplication(singleData);
|
||||
results.push({ applicationId, success: true, result });
|
||||
} catch (error) {
|
||||
console.error('🔧 项目审批失败,ID:', applicationId, 'Error:', error);
|
||||
results.push({ applicationId, success: false, error });
|
||||
}
|
||||
}
|
||||
|
||||
// 检查是否有失败的项目
|
||||
const failures = results.filter(r => !r.success);
|
||||
if (failures.length > 0) {
|
||||
console.error('🔧 批量审批部分失败:', failures);
|
||||
throw new Error(`批量审批完成,${failures.length}个项目审批失败`);
|
||||
}
|
||||
|
||||
console.log('🔧 批量审批全部成功');
|
||||
return { code: 200, msg: '批量审批成功', data: results };
|
||||
};
|
||||
|
||||
// 获取审批历史记录
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
export interface LeaderApprovalForm {
|
||||
applicationId: number;
|
||||
approvalResult: string; // 'approve' | 'reject'
|
||||
approvalComment: string;
|
||||
}
|
||||
|
||||
// 分管领导审批操作
|
||||
export const leaderApproveApplication = (data: LeaderApprovalForm): AxiosPromise<any> => {
|
||||
return request({
|
||||
url: '/cw/approval/leader',
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: new URLSearchParams({
|
||||
applicationId: data.applicationId.toString(),
|
||||
approveAction: data.approvalResult,
|
||||
approveOpinion: data.approvalComment
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
// 分管领导批量审批操作
|
||||
export const batchLeaderApproveApplication = (dataList: LeaderApprovalForm[]): AxiosPromise<any> => {
|
||||
// 前端模拟批量操作,逐个调用单个审批接口
|
||||
const promises = dataList.map(item => leaderApproveApplication(item));
|
||||
|
||||
return Promise.all(promises).then(results => {
|
||||
return {
|
||||
data: results,
|
||||
code: 200,
|
||||
message: '批量操作成功'
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 财务项目预算审批 - TypeScript类型定义
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-26
|
||||
*/
|
||||
@@ -39,6 +39,7 @@ export interface CwProjectApplicationVO {
|
||||
totalMunicipalFiscal?: number;
|
||||
totalSelfFunding?: number;
|
||||
totalOtherFunding?: number;
|
||||
// 分年度预算明细
|
||||
currentYearTotal?: number;
|
||||
currentYearMunicipal?: number;
|
||||
currentYearSelf?: number;
|
||||
@@ -64,6 +65,7 @@ export interface CwProjectApplicationVO {
|
||||
updateBy?: number;
|
||||
updateTime?: string;
|
||||
remark?: string;
|
||||
performanceIndicators?: any[]; // 绩效指标数据
|
||||
}
|
||||
|
||||
// 项目预算申报表单对象
|
||||
@@ -86,6 +88,7 @@ export interface CwProjectApplicationForm {
|
||||
totalMunicipalFiscal?: number;
|
||||
totalSelfFunding?: number;
|
||||
totalOtherFunding?: number;
|
||||
// 分年度预算明细
|
||||
currentYearTotal?: number;
|
||||
currentYearMunicipal?: number;
|
||||
currentYearSelf?: number;
|
||||
@@ -199,4 +202,4 @@ export interface StatusDistribution {
|
||||
statusName: string;
|
||||
count: number;
|
||||
percentage: number;
|
||||
}
|
||||
}
|
||||
@@ -315,54 +315,145 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年度执行合计" prop="yearlyTotal">
|
||||
<el-input-number
|
||||
v-model="form.yearlyTotal"
|
||||
:model-value="yearlyTotals.total"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
placeholder="万元"
|
||||
size="large"
|
||||
style="width: 100%"
|
||||
:disabled="true"
|
||||
readonly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年度财政资金" prop="yearlyMunicipalFiscal">
|
||||
<el-input-number
|
||||
v-model="form.yearlyMunicipalFiscal"
|
||||
:model-value="yearlyTotals.municipal"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
placeholder="万元"
|
||||
size="large"
|
||||
style="width: 100%"
|
||||
:disabled="true"
|
||||
readonly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年度自筹资金" prop="yearlySelfFunding">
|
||||
<el-input-number
|
||||
v-model="form.yearlySelfFunding"
|
||||
:model-value="yearlyTotals.self"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
placeholder="万元"
|
||||
size="large"
|
||||
style="width: 100%"
|
||||
:disabled="true"
|
||||
readonly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年度其他资金" prop="yearlyOtherFunding">
|
||||
<el-input-number
|
||||
v-model="form.yearlyOtherFunding"
|
||||
:model-value="yearlyTotals.other"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
placeholder="万元"
|
||||
size="large"
|
||||
style="width: 100%"
|
||||
:disabled="true"
|
||||
readonly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 分年度预算明细 -->
|
||||
<div class="budget-breakdown-section">
|
||||
<h4 class="section-title">
|
||||
<el-icon><Calendar /></el-icon>
|
||||
分年度预算明细
|
||||
</h4>
|
||||
|
||||
<!-- 调试信息 -->
|
||||
<div style="background: #f5f5f5; padding: 10px; margin-bottom: 10px; border-radius: 4px; font-size: 12px;">
|
||||
<strong>调试信息:</strong><br>
|
||||
当前年度: {{ form.year }}<br>
|
||||
分年度数据长度: {{ budgetBreakdownData.length }}<br>
|
||||
当年预算: 总投资={{ form.currentYearTotal }}万, 财政={{ form.currentYearMunicipal }}万, 自筹={{ form.currentYearSelf }}万, 其他={{ form.currentYearOther }}万<br>
|
||||
下年预算: 总投资={{ form.nextYearTotal }}万, 财政={{ form.nextYearMunicipal }}万, 自筹={{ form.nextYearSelf }}万, 其他={{ form.nextYearOther }}万<br>
|
||||
后续预算: 总投资={{ form.futureYearTotal }}万, 财政={{ form.futureYearMunicipal }}万, 自筹={{ form.futureYearSelf }}万, 其他={{ form.futureYearOther }}万<br>
|
||||
表格数据: {{ JSON.stringify(budgetBreakdownData) }}
|
||||
</div>
|
||||
|
||||
<el-table :data="budgetBreakdownData" border style="width: 100%">
|
||||
<el-table-column prop="yearLabel" label="年度" width="120" align="center"/>
|
||||
<el-table-column label="总投资(万元)" align="center">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.total"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
placeholder="0.00"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="updateBudgetBreakdown(scope.$index)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="市财政资金(万元)" align="center">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.municipal"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
placeholder="0.00"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="updateBudgetBreakdown(scope.$index)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位自筹(万元)" align="center">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.self"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
placeholder="0.00"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="updateBudgetBreakdown(scope.$index)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="其他资金(万元)" align="center">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.other"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
placeholder="0.00"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="updateBudgetBreakdown(scope.$index)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="budget-breakdown-note">
|
||||
<el-alert
|
||||
title="说明:请根据项目实际情况填写各年度的预算分配,系统会自动汇总计算总投资。"
|
||||
type="info"
|
||||
:closable="false"
|
||||
show-icon
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 资金分配图表 -->
|
||||
<div class="budget-chart" v-if="hasBudgetData">
|
||||
<h4 class="section-title">资金分配可视化</h4>
|
||||
@@ -516,17 +607,17 @@ const form = reactive({
|
||||
totalMunicipalFiscal: 0,
|
||||
totalSelfFunding: 0,
|
||||
totalOtherFunding: 0,
|
||||
// 年度预计执行数
|
||||
// 分年度预算明细
|
||||
currentYearTotal: 0,
|
||||
currentYearMunicipal: 0,
|
||||
currentYearSelf: 0,
|
||||
currentYearOther: 0,
|
||||
// 下年度申请资金
|
||||
// 下年度预计执行数
|
||||
nextYearTotal: 0,
|
||||
nextYearMunicipal: 0,
|
||||
nextYearSelf: 0,
|
||||
nextYearOther: 0,
|
||||
// 以后年度安排
|
||||
// 后续年度预计执行数
|
||||
futureYearTotal: 0,
|
||||
futureYearMunicipal: 0,
|
||||
futureYearSelf: 0,
|
||||
@@ -536,32 +627,7 @@ const form = reactive({
|
||||
approvalStatus: 'draft'
|
||||
})
|
||||
|
||||
// 监听父组件传递的数据变化
|
||||
watch(() => props.formData, (newData) => {
|
||||
if (newData && typeof newData === 'object' && Object.keys(newData).length > 0) {
|
||||
console.log('接收到父组件传递的数据:', newData)
|
||||
// 安全地更新form数据
|
||||
Object.keys(form).forEach(key => {
|
||||
if (newData.hasOwnProperty(key) && newData[key] !== null && newData[key] !== undefined) {
|
||||
// 特殊处理不同类型的字段
|
||||
if (key === 'year' && newData[key]) {
|
||||
form[key] = newData[key].toString()
|
||||
} else if (key === 'startDate' || key === 'endDate') {
|
||||
form[key] = newData[key] ? formatDateString(newData[key]) : ''
|
||||
} else if (key.includes('Investment') || key.includes('Fiscal') || key.includes('Funding') ||
|
||||
key.includes('Total') || key.includes('Municipal') || key.includes('Self') || key.includes('Other')) {
|
||||
// 金额字段
|
||||
form[key] = Number(newData[key]) || 0
|
||||
} else {
|
||||
form[key] = newData[key]
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log('form数据更新完成:', form)
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
|
||||
// 日期格式化函数
|
||||
// 工具函数定义 - 提前定义避免提升问题
|
||||
const formatDateString = (dateValue: any): string => {
|
||||
if (!dateValue) return ''
|
||||
let date: Date
|
||||
@@ -572,15 +638,74 @@ const formatDateString = (dateValue: any): string => {
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
|
||||
|
||||
if (isNaN(date.getTime())) return ''
|
||||
|
||||
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
|
||||
const updateFormWithData = (newData: any) => {
|
||||
if (!newData || typeof newData !== 'object' || Object.keys(newData).length === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
console.log('接收到父组件传递的数据:', newData)
|
||||
|
||||
try {
|
||||
// 安全地更新form数据
|
||||
Object.keys(form).forEach(key => {
|
||||
if (newData.hasOwnProperty(key) && newData[key] !== null && newData[key] !== undefined) {
|
||||
// 特殊处理不同类型的字段
|
||||
if (key === 'year' && newData[key]) {
|
||||
form[key] = newData[key].toString()
|
||||
} else if (key === 'startDate' || key === 'endDate') {
|
||||
form[key] = newData[key] ? formatDateString(newData[key]) : ''
|
||||
} else if (key.includes('Investment') || key.includes('Fiscal') || key.includes('Funding') ||
|
||||
key.includes('Total') || key.includes('Municipal') || key.includes('Self') || key.includes('Other') ||
|
||||
key.includes('yearly') || key.includes('Year')) {
|
||||
// 金额字段 - 扩展匹配模式
|
||||
form[key] = Number(newData[key]) || 0
|
||||
} else if (key === 'performanceIndicators') {
|
||||
// 绩效指标数据特殊处理 - 需要转换数字字段
|
||||
if (Array.isArray(newData[key])) {
|
||||
form[key] = newData[key].map(indicator => {
|
||||
if (indicator && typeof indicator === 'object') {
|
||||
return {
|
||||
...indicator,
|
||||
weightPercentage: indicator.weightPercentage ? Number(indicator.weightPercentage) : 0,
|
||||
sortOrder: indicator.sortOrder ? Number(indicator.sortOrder) : 0
|
||||
}
|
||||
}
|
||||
return indicator
|
||||
})
|
||||
} else {
|
||||
form[key] = []
|
||||
}
|
||||
} else {
|
||||
form[key] = newData[key]
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 数据加载完成后,重新计算年度总数
|
||||
// calculateYearlyTotals() // 移除此函数调用
|
||||
|
||||
console.log('form数据更新完成:', form)
|
||||
} catch (error) {
|
||||
console.error('更新form数据时出错:', error)
|
||||
// 即使出错也要确保基本数据结构
|
||||
if (newData.id) form.id = newData.id
|
||||
if (newData.projectName) form.projectName = newData.projectName
|
||||
if (newData.principal) form.principal = newData.principal
|
||||
}
|
||||
}
|
||||
|
||||
// 监听父组件传递的数据变化
|
||||
watch(() => props.formData, updateFormWithData, { deep: true, immediate: true })
|
||||
|
||||
// 表单验证规则
|
||||
const rules = {
|
||||
projectName: [
|
||||
@@ -605,7 +730,7 @@ const rules = {
|
||||
],
|
||||
totalInvestment: [
|
||||
{ required: true, message: '请填写项目总投资', trigger: 'blur' },
|
||||
{ type: 'number', min: 0.01, message: '投资金额必须大于0', trigger: 'blur' }
|
||||
{ type: 'number' as const, min: 0.01, message: '投资金额必须大于0', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -618,6 +743,115 @@ const hasBudgetData = computed(() => {
|
||||
return form.totalMunicipalFiscal > 0 || form.totalSelfFunding > 0 || form.totalOtherFunding > 0
|
||||
})
|
||||
|
||||
// 年度执行合计(计算属性)
|
||||
const yearlyTotals = computed(() => {
|
||||
return {
|
||||
total: (form.currentYearTotal || 0) + (form.nextYearTotal || 0) + (form.futureYearTotal || 0),
|
||||
municipal: (form.currentYearMunicipal || 0) + (form.nextYearMunicipal || 0) + (form.futureYearMunicipal || 0),
|
||||
self: (form.currentYearSelf || 0) + (form.nextYearSelf || 0) + (form.futureYearSelf || 0),
|
||||
other: (form.currentYearOther || 0) + (form.nextYearOther || 0) + (form.futureYearOther || 0)
|
||||
}
|
||||
})
|
||||
|
||||
// 分年度预算明细数据
|
||||
const budgetBreakdownData = computed(() => {
|
||||
const currentYear = parseInt(form.year) || new Date().getFullYear()
|
||||
return [
|
||||
{
|
||||
yearLabel: `${currentYear}年`,
|
||||
total: form.currentYearTotal || 0,
|
||||
municipal: form.currentYearMunicipal || 0,
|
||||
self: form.currentYearSelf || 0,
|
||||
other: form.currentYearOther || 0,
|
||||
field: 'currentYear'
|
||||
},
|
||||
{
|
||||
yearLabel: `${currentYear + 1}年`,
|
||||
total: form.nextYearTotal || 0,
|
||||
municipal: form.nextYearMunicipal || 0,
|
||||
self: form.nextYearSelf || 0,
|
||||
other: form.nextYearOther || 0,
|
||||
field: 'nextYear'
|
||||
},
|
||||
{
|
||||
yearLabel: '以后年度',
|
||||
total: form.futureYearTotal || 0,
|
||||
municipal: form.futureYearMunicipal || 0,
|
||||
self: form.futureYearSelf || 0,
|
||||
other: form.futureYearOther || 0,
|
||||
field: 'futureYear'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
// 更新分年度预算明细
|
||||
const updateBudgetBreakdown = (index: number) => {
|
||||
const breakdown = budgetBreakdownData.value[index]
|
||||
const fieldPrefix = breakdown.field
|
||||
|
||||
// 更新form中对应的字段
|
||||
form[`${fieldPrefix}Total`] = breakdown.total || 0
|
||||
form[`${fieldPrefix}Municipal`] = breakdown.municipal || 0
|
||||
form[`${fieldPrefix}Self`] = breakdown.self || 0
|
||||
form[`${fieldPrefix}Other`] = breakdown.other || 0
|
||||
|
||||
console.log(`更新${breakdown.yearLabel}预算:`, {
|
||||
total: breakdown.total,
|
||||
municipal: breakdown.municipal,
|
||||
self: breakdown.self,
|
||||
other: breakdown.other
|
||||
})
|
||||
|
||||
// 重新计算年度执行总数
|
||||
// calculateYearlyTotals() // 移除此函数调用
|
||||
// 重新计算总投资
|
||||
recalculateTotalFromBreakdown()
|
||||
}
|
||||
|
||||
// 从分年度明细重新计算总投资
|
||||
const recalculateTotalFromBreakdown = () => {
|
||||
const totalMunicipal = (form.currentYearMunicipal || 0) + (form.nextYearMunicipal || 0) + (form.futureYearMunicipal || 0)
|
||||
const totalSelf = (form.currentYearSelf || 0) + (form.nextYearSelf || 0) + (form.futureYearSelf || 0)
|
||||
const totalOther = (form.currentYearOther || 0) + (form.nextYearOther || 0) + (form.futureYearOther || 0)
|
||||
|
||||
form.totalMunicipalFiscal = totalMunicipal
|
||||
form.totalSelfFunding = totalSelf
|
||||
form.totalOtherFunding = totalOther
|
||||
form.totalInvestment = totalMunicipal + totalSelf + totalOther
|
||||
|
||||
console.log('重新计算总投资:', {
|
||||
totalMunicipal,
|
||||
totalSelf,
|
||||
totalOther,
|
||||
totalInvestment: form.totalInvestment
|
||||
})
|
||||
}
|
||||
|
||||
// 计算预算汇总
|
||||
const calculateBudgetSummary = () => {
|
||||
// 计算各类资金的总和
|
||||
const totalMunicipal = (form.currentYearMunicipal || 0) +
|
||||
(form.nextYearMunicipal || 0) +
|
||||
(form.futureYearMunicipal || 0)
|
||||
const totalSelf = (form.currentYearSelf || 0) +
|
||||
(form.nextYearSelf || 0) +
|
||||
(form.futureYearSelf || 0)
|
||||
const totalOther = (form.currentYearOther || 0) +
|
||||
(form.nextYearOther || 0) +
|
||||
(form.futureYearOther || 0)
|
||||
|
||||
// 更新总投资字段
|
||||
form.totalMunicipalFiscal = totalMunicipal
|
||||
form.totalSelfFunding = totalSelf
|
||||
form.totalOtherFunding = totalOther
|
||||
form.totalInvestment = totalMunicipal + totalSelf + totalOther
|
||||
|
||||
// 更新图表
|
||||
if (budgetChartInstance && hasBudgetData.value) {
|
||||
renderBudgetChart()
|
||||
}
|
||||
}
|
||||
|
||||
// 格式化金额
|
||||
const formatAmount = (amount: number): string => {
|
||||
return amount ? amount.toFixed(2) : '0.00'
|
||||
@@ -927,10 +1161,16 @@ const handleSubmit = async () => {
|
||||
|
||||
// 解析错误信息
|
||||
let errorMessage = '提交申报失败'
|
||||
if (error?.response?.data?.msg) {
|
||||
errorMessage += ': ' + error.response.data.msg
|
||||
} else if (error?.message) {
|
||||
errorMessage += ': ' + error.message
|
||||
if (error && typeof error === 'object' && 'response' in error) {
|
||||
const axiosError = error as any
|
||||
if (axiosError.response?.data?.msg) {
|
||||
errorMessage += ': ' + axiosError.response.data.msg
|
||||
}
|
||||
} else if (error && typeof error === 'object' && 'message' in error) {
|
||||
const generalError = error as any
|
||||
if (generalError.message) {
|
||||
errorMessage += ': ' + generalError.message
|
||||
}
|
||||
} else if (typeof error === 'string') {
|
||||
errorMessage += ': ' + error
|
||||
}
|
||||
@@ -955,15 +1195,64 @@ const handleCancel = () => {
|
||||
|
||||
// 加载数据
|
||||
const loadData = async () => {
|
||||
console.log('=== loadData 函数被调用 ===')
|
||||
|
||||
const id = route.params.id as string
|
||||
console.log('解析的ID:', id, '类型:', typeof id)
|
||||
|
||||
if (id && id !== 'add') {
|
||||
console.log('符合加载条件,开始请求数据...')
|
||||
try {
|
||||
console.log('开始加载申报数据,ID:', id)
|
||||
const response = await getProjectApplication(id)
|
||||
console.log('API请求完成,响应:', response)
|
||||
|
||||
if (response.code === 200) {
|
||||
console.log('申报基础数据加载成功:', response.data)
|
||||
|
||||
// 显示原始后端数据的调试信息
|
||||
console.log('=== 后端返回的原始数据 ===')
|
||||
console.log('完整数据:', JSON.stringify(response.data, null, 2))
|
||||
console.log('分年度预算字段值:')
|
||||
const budgetFields = [
|
||||
'currentYearTotal', 'currentYearMunicipal', 'currentYearSelf', 'currentYearOther',
|
||||
'nextYearTotal', 'nextYearMunicipal', 'nextYearSelf', 'nextYearOther',
|
||||
'futureYearTotal', 'futureYearMunicipal', 'futureYearSelf', 'futureYearOther'
|
||||
]
|
||||
budgetFields.forEach(field => {
|
||||
console.log(`${field}: ${response.data[field]} (类型: ${typeof response.data[field]})`)
|
||||
})
|
||||
|
||||
// 更新基础数据
|
||||
Object.assign(form, response.data)
|
||||
|
||||
// 特殊处理分年度预算数据
|
||||
if (response.data) {
|
||||
// 确保年度预算字段存在
|
||||
const fields = [
|
||||
'currentYearTotal', 'currentYearMunicipal', 'currentYearSelf', 'currentYearOther',
|
||||
'nextYearTotal', 'nextYearMunicipal', 'nextYearSelf', 'nextYearOther',
|
||||
'futureYearTotal', 'futureYearMunicipal', 'futureYearSelf', 'futureYearOther'
|
||||
]
|
||||
|
||||
console.log('=== 开始处理分年度预算字段 ===')
|
||||
fields.forEach(field => {
|
||||
const originalValue = response.data[field]
|
||||
const processedValue = Number(originalValue) || 0
|
||||
console.log(`${field}: ${originalValue} -> ${processedValue}`)
|
||||
if (response.data[field] !== undefined && response.data[field] !== null) {
|
||||
form[field] = processedValue
|
||||
}
|
||||
})
|
||||
|
||||
// calculateYearlyTotals() // 移除此函数调用
|
||||
|
||||
console.log('=== 处理完成后的form数据 ===')
|
||||
budgetFields.forEach(field => {
|
||||
console.log(`form.${field}: ${form[field]}`)
|
||||
})
|
||||
}
|
||||
|
||||
// 检查是否有绩效指标数据
|
||||
if (response.data.performanceIndicators && response.data.performanceIndicators.length > 0) {
|
||||
console.log('发现绩效指标数据,数量:', response.data.performanceIndicators.length)
|
||||
@@ -973,19 +1262,61 @@ const loadData = async () => {
|
||||
console.log('没有绩效指标数据')
|
||||
form.performanceIndicators = []
|
||||
}
|
||||
|
||||
console.log('分年度预算数据加载完成:', {
|
||||
currentYear: {
|
||||
total: form.currentYearTotal,
|
||||
municipal: form.currentYearMunicipal,
|
||||
self: form.currentYearSelf,
|
||||
other: form.currentYearOther
|
||||
},
|
||||
nextYear: {
|
||||
total: form.nextYearTotal,
|
||||
municipal: form.nextYearMunicipal,
|
||||
self: form.nextYearSelf,
|
||||
other: form.nextYearOther
|
||||
},
|
||||
futureYear: {
|
||||
total: form.futureYearTotal,
|
||||
municipal: form.futureYearMunicipal,
|
||||
self: form.futureYearSelf,
|
||||
other: form.futureYearOther
|
||||
}
|
||||
})
|
||||
|
||||
// 检查计算属性的值
|
||||
console.log('=== budgetBreakdownData 计算属性结果 ===')
|
||||
console.log('budgetBreakdownData:', budgetBreakdownData.value)
|
||||
} else {
|
||||
console.log('API响应错误:', response)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error)
|
||||
ElMessage.error('加载数据失败')
|
||||
}
|
||||
} else {
|
||||
console.log('不符合加载条件,ID:', id)
|
||||
}
|
||||
}
|
||||
|
||||
// 暴露给父组件的方法
|
||||
const validate = (callback: (valid: boolean) => void) => {
|
||||
// 简单的验证逻辑,检查必填字段
|
||||
const validate = (callback: (valid: boolean, formData?: any) => void) => {
|
||||
// 验证逻辑 + 数据收集
|
||||
const isValid = !!(form.projectName && form.principal && form.totalInvestment > 0)
|
||||
callback(isValid)
|
||||
|
||||
if (isValid) {
|
||||
// 收集绩效指标数据
|
||||
if (performanceIndicatorsRef.value && typeof performanceIndicatorsRef.value.getAllIndicators === 'function') {
|
||||
const indicators = performanceIndicatorsRef.value.getAllIndicators()
|
||||
form.performanceIndicators = indicators
|
||||
console.log('收集到绩效指标数据:', indicators)
|
||||
}
|
||||
|
||||
// 返回验证结果和完整的表单数据
|
||||
callback(true, form)
|
||||
} else {
|
||||
callback(false)
|
||||
}
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
@@ -995,7 +1326,15 @@ defineExpose({
|
||||
|
||||
// 组件挂载
|
||||
onMounted(() => {
|
||||
console.log('=== CW Application Form 组件开始挂载 ===')
|
||||
console.log('当前路由参数:', route.params)
|
||||
console.log('route.params.id:', route.params.id)
|
||||
console.log('是否为详情页面:', route.params.id && route.params.id !== 'add')
|
||||
|
||||
loadData()
|
||||
|
||||
console.log('=== CW Application Form 组件挂载完成 ===')
|
||||
console.log('当前form初始状态:', JSON.stringify(form, null, 2))
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1124,6 +1463,67 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
// 分年度预算明细
|
||||
.budget-breakdown-section {
|
||||
margin-bottom: 32px;
|
||||
padding: 20px;
|
||||
background: #f8f9fa;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #e9ecef;
|
||||
|
||||
.section-title {
|
||||
margin: 0 0 20px 0;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #2c3e50;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
:deep(.el-table) {
|
||||
.el-table__header {
|
||||
background-color: #f5f7fa;
|
||||
|
||||
.el-table__cell {
|
||||
background-color: #f5f7fa;
|
||||
color: #606266;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table__body {
|
||||
.el-table__row {
|
||||
&:hover {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-input-number {
|
||||
width: 100%;
|
||||
|
||||
:deep(.el-input__inner) {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.budget-breakdown-note {
|
||||
margin-top: 16px;
|
||||
|
||||
:deep(.el-alert) {
|
||||
border-radius: 4px;
|
||||
|
||||
.el-alert__title {
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 资金分配图表
|
||||
.budget-chart {
|
||||
margin-top: 24px;
|
||||
padding: 20px;
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
v-hasPermi="['cw:application:query']"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="编辑" placement="top" v-if="scope.row.approvalStatus === 'draft'">
|
||||
<el-tooltip content="编辑" placement="top" v-if="['draft', 'returned'].includes(scope.row.approvalStatus)">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="Edit"
|
||||
@@ -234,7 +234,7 @@
|
||||
v-hasPermi="['cw:application:edit']"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="提交审批" placement="top" v-if="scope.row.approvalStatus === 'draft'">
|
||||
<el-tooltip content="提交审批" placement="top" v-if="['draft', 'returned'].includes(scope.row.approvalStatus)">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="Upload"
|
||||
@@ -254,7 +254,7 @@
|
||||
v-hasPermi="['cw:application:withdraw']"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top" v-if="['draft', 'cancelled'].includes(scope.row.approvalStatus)">
|
||||
<el-tooltip content="删除" placement="top" v-if="['draft', 'cancelled', 'returned'].includes(scope.row.approvalStatus)">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="Delete"
|
||||
@@ -272,13 +272,15 @@
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="pagination-container">
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page="queryParams.pageNum"
|
||||
:limit="queryParams.pageSize"
|
||||
@update:page="queryParams.pageNum = $event"
|
||||
@update:limit="queryParams.pageSize = $event"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -287,8 +289,7 @@
|
||||
<ApplicationForm ref="applicationFormRef" :form-data="form" @submit="submitForm" />
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -309,12 +310,14 @@
|
||||
import { listProjectApplication, getProjectApplication, delProjectApplication, addProjectApplication, updateProjectApplication, submitApplication, getApplicationStatistics } from "@/api/cw/projectApplication"
|
||||
import ApplicationForm from "./form.vue"
|
||||
import ApplicationSummary from "./summary.vue"
|
||||
import Pagination from "@/components/Pagination/index.vue"
|
||||
|
||||
export default {
|
||||
name: "ProjectApplication",
|
||||
components: {
|
||||
ApplicationForm,
|
||||
ApplicationSummary
|
||||
ApplicationSummary,
|
||||
Pagination
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -388,10 +391,10 @@ export default {
|
||||
}).catch(error => {
|
||||
console.error('获取统计数据失败:', error)
|
||||
// 如果API失败,使用本地计算作为后备方案
|
||||
this.totalCount = this.applicationList.length
|
||||
this.approvedCount = this.applicationList.filter(item => item.approvalStatus === 'approved').length
|
||||
this.pendingCount = this.applicationList.filter(item => item.approvalStatus === 'approving').length
|
||||
this.draftCount = this.applicationList.filter(item => item.approvalStatus === 'draft').length
|
||||
this.totalCount = this.applicationList.length
|
||||
this.approvedCount = this.applicationList.filter(item => item.approvalStatus === 'approved').length
|
||||
this.pendingCount = this.applicationList.filter(item => item.approvalStatus === 'approving').length
|
||||
this.draftCount = this.applicationList.filter(item => item.approvalStatus === 'draft').length
|
||||
})
|
||||
},
|
||||
/** 取消按钮 */
|
||||
@@ -480,8 +483,12 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["applicationFormRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$refs["applicationFormRef"].validate((valid, formData) => {
|
||||
if (valid && formData) {
|
||||
// 使用子组件回传的完整数据(包含绩效指标)
|
||||
this.form = formData
|
||||
console.log('提交表单数据:', this.form)
|
||||
|
||||
if (this.form.id != null) {
|
||||
updateProjectApplication(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
@@ -497,6 +504,8 @@ export default {
|
||||
this.getStatistics() // 新增后更新统计
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$modal.msgError("请检查表单数据是否完整")
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
<el-tag type="warning" size="small">分值占比总和:{{ performanceIndicatorTotal }}%</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<el-table :data="validPerformanceIndicators" border style="width: 100%">
|
||||
<el-table-column label="指标类型" width="120" align="center">
|
||||
<template #default="scope">
|
||||
@@ -229,7 +229,7 @@ const currentApplication = computed(() => {
|
||||
console.log('application数据:', props.application);
|
||||
return props.application;
|
||||
}
|
||||
|
||||
|
||||
// 否则使用内部获取的数据
|
||||
console.log('=== 使用内部获取的application数据 ===');
|
||||
console.log('internalApplication数据:', internalApplication.value);
|
||||
@@ -239,10 +239,10 @@ const currentApplication = computed(() => {
|
||||
// 获取申报详情数据
|
||||
const fetchApplicationData = async (id) => {
|
||||
if (!id) return;
|
||||
|
||||
|
||||
console.log('=== ApplicationSummary 开始获取数据 ===');
|
||||
console.log('applicationId:', id);
|
||||
|
||||
|
||||
loading.value = true;
|
||||
try {
|
||||
const response = await getProjectApplication(id);
|
||||
@@ -250,25 +250,25 @@ const fetchApplicationData = async (id) => {
|
||||
console.log('API响应:', response);
|
||||
console.log('响应数据:', response.data);
|
||||
console.log('响应数据类型:', typeof response.data);
|
||||
|
||||
|
||||
// 特别检查绩效指标字段
|
||||
if (response.data) {
|
||||
console.log('=== API响应中的绩效指标检查 ===');
|
||||
console.log('response.data.performanceIndicators:', response.data.performanceIndicators);
|
||||
console.log('performanceIndicators类型:', typeof response.data.performanceIndicators);
|
||||
console.log('是否为数组:', Array.isArray(response.data.performanceIndicators));
|
||||
|
||||
|
||||
// 检查所有可能的绩效指标字段名
|
||||
console.log('可能的字段名检查:');
|
||||
console.log('- performanceIndicators:', response.data.performanceIndicators);
|
||||
console.log('- performance_indicators:', response.data.performance_indicators);
|
||||
console.log('- indicators:', response.data.indicators);
|
||||
console.log('- performanceIndicatorList:', response.data.performanceIndicatorList);
|
||||
|
||||
|
||||
// 列出所有字段
|
||||
console.log('响应数据的所有字段:', Object.keys(response.data));
|
||||
}
|
||||
|
||||
|
||||
internalApplication.value = response.data || {};
|
||||
} catch (error) {
|
||||
console.error('=== ApplicationSummary API调用失败 ===');
|
||||
@@ -291,7 +291,7 @@ onMounted(() => {
|
||||
console.log('=== ApplicationSummary 组件挂载 ===');
|
||||
console.log('props.application:', props.application);
|
||||
console.log('props.applicationId:', props.applicationId);
|
||||
|
||||
|
||||
// 如果没有传入application但有applicationId,则获取数据
|
||||
if (props.applicationId && (!props.application || Object.keys(props.application).length === 0)) {
|
||||
fetchApplicationData(props.applicationId);
|
||||
@@ -315,14 +315,14 @@ const hasPerformanceIndicators = computed(() => {
|
||||
console.log('app.performanceIndicators类型:', typeof app.performanceIndicators);
|
||||
console.log('app.performanceIndicators值:', app.performanceIndicators);
|
||||
console.log('是否为数组:', Array.isArray(app.performanceIndicators));
|
||||
|
||||
|
||||
if (app.performanceIndicators) {
|
||||
console.log('绩效指标数组长度:', app.performanceIndicators.length);
|
||||
console.log('绩效指标数组内容:', JSON.stringify(app.performanceIndicators, null, 2));
|
||||
} else {
|
||||
console.log('绩效指标数据为空或未定义');
|
||||
}
|
||||
|
||||
|
||||
const hasIndicators = app.performanceIndicators && app.performanceIndicators.length > 0;
|
||||
console.log('最终判断 - 是否有绩效指标:', hasIndicators);
|
||||
return hasIndicators;
|
||||
@@ -346,18 +346,18 @@ const validPerformanceIndicators = computed(() => {
|
||||
const app = currentApplication.value;
|
||||
console.log('=== validPerformanceIndicators 计算 ===');
|
||||
console.log('app.performanceIndicators:', app.performanceIndicators);
|
||||
|
||||
|
||||
if (!app.performanceIndicators) {
|
||||
console.log('没有绩效指标数据,返回空数组');
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
const validIndicators = app.performanceIndicators.filter(indicator => {
|
||||
const weight = parseFloat(indicator.weightPercentage) || 0;
|
||||
console.log(`指标 ${indicator.goalName}: 权重=${indicator.weightPercentage}, 解析后权重=${weight}, 是否有效=${weight > 0}`);
|
||||
return weight > 0;
|
||||
});
|
||||
|
||||
|
||||
console.log('有效绩效指标数量:', validIndicators.length);
|
||||
console.log('有效绩效指标详情:', validIndicators);
|
||||
return validIndicators;
|
||||
@@ -367,37 +367,65 @@ const validPerformanceIndicators = computed(() => {
|
||||
const budgetBreakdown = computed(() => {
|
||||
const app = currentApplication.value;
|
||||
const currentYear = app.year || new Date().getFullYear();
|
||||
console.log('=== 预算数据检查 ===');
|
||||
console.log('application数据:', app);
|
||||
console.log('当年预算字段:', {
|
||||
|
||||
console.log('=== 🔍 分年度预算数据详细检查 ===');
|
||||
console.log('完整application数据:', app);
|
||||
console.log('当前年度:', currentYear);
|
||||
|
||||
console.log('📊 分年度预算字段值详情:');
|
||||
console.log('📅 当年预算:', {
|
||||
currentYearTotal: app.currentYearTotal,
|
||||
currentYearMunicipal: app.currentYearMunicipal,
|
||||
currentYearSelf: app.currentYearSelf,
|
||||
currentYearOther: app.currentYearOther
|
||||
});
|
||||
return [
|
||||
console.log('📅 下年预算:', {
|
||||
nextYearTotal: app.nextYearTotal,
|
||||
nextYearMunicipal: app.nextYearMunicipal,
|
||||
nextYearSelf: app.nextYearSelf,
|
||||
nextYearOther: app.nextYearOther
|
||||
});
|
||||
console.log('📅 以后年度预算:', {
|
||||
futureYearTotal: app.futureYearTotal,
|
||||
futureYearMunicipal: app.futureYearMunicipal,
|
||||
futureYearSelf: app.futureYearSelf,
|
||||
futureYearOther: app.futureYearOther
|
||||
});
|
||||
|
||||
const breakdown = [
|
||||
{
|
||||
year: `${currentYear}年`,
|
||||
total: app.currentYearTotal || 0,
|
||||
municipal: app.currentYearMunicipal || 0,
|
||||
self: app.currentYearSelf || 0,
|
||||
other: app.currentYearOther || 0
|
||||
total: Number(app.currentYearTotal) || 0,
|
||||
municipal: Number(app.currentYearMunicipal) || 0,
|
||||
self: Number(app.currentYearSelf) || 0,
|
||||
other: Number(app.currentYearOther) || 0
|
||||
},
|
||||
{
|
||||
year: `${parseInt(currentYear) + 1}年`,
|
||||
total: app.nextYearTotal || 0,
|
||||
municipal: app.nextYearMunicipal || 0,
|
||||
self: app.nextYearSelf || 0,
|
||||
other: app.nextYearOther || 0
|
||||
total: Number(app.nextYearTotal) || 0,
|
||||
municipal: Number(app.nextYearMunicipal) || 0,
|
||||
self: Number(app.nextYearSelf) || 0,
|
||||
other: Number(app.nextYearOther) || 0
|
||||
},
|
||||
{
|
||||
year: '以后年度',
|
||||
total: app.futureYearTotal || 0,
|
||||
municipal: app.futureYearMunicipal || 0,
|
||||
self: app.futureYearSelf || 0,
|
||||
other: app.futureYearOther || 0
|
||||
total: Number(app.futureYearTotal) || 0,
|
||||
municipal: Number(app.futureYearMunicipal) || 0,
|
||||
self: Number(app.futureYearSelf) || 0,
|
||||
other: Number(app.futureYearOther) || 0
|
||||
}
|
||||
].filter(item => item.total > 0); // 只显示有预算的年度
|
||||
];
|
||||
|
||||
console.log('📋 计算后的budgetBreakdown数据:', breakdown);
|
||||
console.log('📊 每年度预算汇总:');
|
||||
breakdown.forEach((item, index) => {
|
||||
const sum = item.municipal + item.self + item.other;
|
||||
console.log(`${item.year}: 总投资=${item.total}, 细项合计=${sum}, 财政=${item.municipal}, 自筹=${item.self}, 其他=${item.other}`);
|
||||
});
|
||||
|
||||
// 🔥 移除错误的过滤条件,始终显示所有年度
|
||||
console.log('✅ 返回完整的分年度预算数据,不进行过滤');
|
||||
return breakdown;
|
||||
});
|
||||
|
||||
// 格式化金额
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<!-- 快捷操作按钮 -->
|
||||
<el-row :gutter="10" class="mb-[10px]">
|
||||
<el-col :span="6">
|
||||
<el-col :span="12">
|
||||
<el-card shadow="hover" class="quick-action-card">
|
||||
<div class="quick-action" @click="showPendingApprovals">
|
||||
<el-icon class="quick-icon"><Clock /></el-icon>
|
||||
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="12">
|
||||
<el-card shadow="hover" class="quick-action-card">
|
||||
<div class="quick-action" @click="showMyApprovals">
|
||||
<el-icon class="quick-icon"><User /></el-icon>
|
||||
@@ -81,22 +81,6 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-card shadow="hover" class="quick-action-card">
|
||||
<div class="quick-action" @click="showDepartmentApprovals">
|
||||
<el-icon class="quick-icon"><OfficeBuilding /></el-icon>
|
||||
<span>部门审批</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-card shadow="hover" class="quick-action-card">
|
||||
<div class="quick-action" @click="showApprovalStatistics">
|
||||
<el-icon class="quick-icon"><DataAnalysis /></el-icon>
|
||||
<span>审批统计</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 表格区域 -->
|
||||
@@ -104,27 +88,17 @@
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Check"
|
||||
:disabled="multiple"
|
||||
@click="handleBatchApprove"
|
||||
v-hasPermi="['cw:application:approve']"
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Check"
|
||||
:disabled="multiple"
|
||||
@click="handleBatchApprove"
|
||||
v-hasPermi="['cw:approval:process']"
|
||||
>批量通过</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Close"
|
||||
:disabled="multiple"
|
||||
@click="handleBatchReject"
|
||||
v-hasPermi="['cw:application:approve']"
|
||||
>批量拒绝</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button icon="Download" @click="handleExport" v-hasPermi="['cw:approvalRecord:export']">导出</el-button>
|
||||
<el-button icon="Download" @click="handleExport" v-hasPermi="['cw:approval:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch="showSearch" @update:showSearch="showSearch = $event" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@@ -169,38 +143,29 @@
|
||||
<el-tooltip content="查看详情" placement="top">
|
||||
<el-button link type="info" icon="View" @click="handleView(scope.row)"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
|
||||
<!-- 待审批状态可以进行审批操作 -->
|
||||
<template v-if="scope.row.approvalStatus === 'submitted' || scope.row.approvalStatus === 'approving'">
|
||||
<template v-if="scope.row.approvalStatus === 'waiting' || scope.row.approvalStatus === 'submitted' || scope.row.approvalStatus === 'approving'">
|
||||
<el-tooltip content="通过" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="success"
|
||||
icon="Check"
|
||||
@click="handleApprove(scope.row)"
|
||||
v-hasPermi="['cw:application:approve']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="拒绝" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
icon="Close"
|
||||
@click="handleReject(scope.row)"
|
||||
v-hasPermi="['cw:application:approve']"
|
||||
<el-button
|
||||
link
|
||||
type="success"
|
||||
icon="Check"
|
||||
@click="handleApprove(scope.row)"
|
||||
v-hasPermi="['cw:approval:process']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="退回" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="warning"
|
||||
icon="RefreshLeft"
|
||||
@click="handleReturn(scope.row)"
|
||||
v-hasPermi="['cw:application:approve']"
|
||||
<el-button
|
||||
link
|
||||
type="warning"
|
||||
icon="RefreshLeft"
|
||||
@click="handleReturn(scope.row)"
|
||||
v-hasPermi="['cw:approval:process']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- 所有状态都可以查看审批记录 -->
|
||||
<el-tooltip content="审批记录" placement="top">
|
||||
<el-button link type="primary" icon="Document" @click="handleApprovalHistory(scope.row)"></el-button>
|
||||
@@ -209,22 +174,22 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page="queryParams.pageNum"
|
||||
:limit="queryParams.pageSize"
|
||||
@update:page="queryParams.pageNum = $event"
|
||||
@update:limit="queryParams.pageSize = $event"
|
||||
@pagination="getList"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
<!-- 审批对话框 -->
|
||||
<el-dialog
|
||||
v-model="approvalDialog.visible"
|
||||
:title="approvalDialog.title"
|
||||
width="800px"
|
||||
<el-dialog
|
||||
v-model="approvalDialog.visible"
|
||||
:title="approvalDialog.title"
|
||||
width="800px"
|
||||
append-to-body
|
||||
@close="closeApprovalDialog"
|
||||
>
|
||||
@@ -240,7 +205,7 @@
|
||||
<el-descriptions-item label="预算年度">{{ currentApplication.year }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- 审批决定 -->
|
||||
<el-form-item label="审批决定" prop="approvalResult">
|
||||
<el-radio-group v-model="approvalForm.approvalResult">
|
||||
@@ -248,42 +213,38 @@
|
||||
<el-icon class="approve-icon"><Check /></el-icon>
|
||||
通过
|
||||
</el-radio>
|
||||
<el-radio value="rejected">
|
||||
<el-icon class="reject-icon"><Close /></el-icon>
|
||||
拒绝
|
||||
</el-radio>
|
||||
<el-radio value="returned">
|
||||
<el-icon class="return-icon"><RefreshLeft /></el-icon>
|
||||
退回
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- 审批意见 -->
|
||||
<el-form-item label="审批意见" prop="approvalComment">
|
||||
<el-input
|
||||
v-model="approvalForm.approvalComment"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
<el-input
|
||||
v-model="approvalForm.approvalComment"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请输入审批意见(必填)"
|
||||
maxlength="500"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- 下一审批人(如果需要) -->
|
||||
<el-form-item label="下一审批人" prop="nextApprover" v-if="showNextApprover">
|
||||
<el-select v-model="approvalForm.nextApprover" placeholder="请选择下一审批人" style="width: 100%">
|
||||
<el-option
|
||||
v-for="approver in approverList"
|
||||
:key="approver.userId"
|
||||
:label="approver.userName"
|
||||
:value="approver.userId"
|
||||
<el-option
|
||||
v-for="approver in approverList"
|
||||
:key="approver.userId"
|
||||
:label="approver.nickName || approver.userName"
|
||||
:value="approver.userId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="closeApprovalDialog">取消</el-button>
|
||||
@@ -299,14 +260,23 @@
|
||||
width="90%"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<application-summary :application="currentApplication" />
|
||||
<application-summary :applicationId="currentApplicationId" />
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
v-if="canApprove(currentApplication)"
|
||||
type="primary"
|
||||
@click="approveFromDetail"
|
||||
>审批</el-button>
|
||||
<template v-if="canApprove(currentApplication)">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="Check"
|
||||
@click="approveFromDetail"
|
||||
v-hasPermi="['cw:approval:process']"
|
||||
>审批通过</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="RefreshLeft"
|
||||
@click="returnFromDetail"
|
||||
v-hasPermi="['cw:approval:process']"
|
||||
>退回</el-button>
|
||||
</template>
|
||||
<el-button @click="detailDialog.visible = false">关闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -341,7 +311,7 @@
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="historyDialog.visible = false">关闭</el-button>
|
||||
@@ -352,7 +322,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
listApprovalRecord,
|
||||
getApprovalRecord,
|
||||
approveApplication,
|
||||
@@ -360,7 +330,6 @@ import {
|
||||
getApprovalHistory,
|
||||
getPendingApprovals,
|
||||
getMyApprovals,
|
||||
getDepartmentApprovals,
|
||||
getAvailableApprovers,
|
||||
exportApprovalRecord
|
||||
} from "@/api/cw/approvalRecord";
|
||||
@@ -409,14 +378,15 @@ export default {
|
||||
approvalStatus: '',
|
||||
approverName: '',
|
||||
submitTimeBegin: '',
|
||||
submitTimeEnd: ''
|
||||
submitTimeEnd: '',
|
||||
deptId: '' // 添加部门ID查询参数
|
||||
},
|
||||
// 审批对话框
|
||||
approvalDialog: {
|
||||
visible: false,
|
||||
title: ''
|
||||
},
|
||||
// 详情对话框
|
||||
// 详情对话框
|
||||
detailDialog: {
|
||||
visible: false,
|
||||
title: ''
|
||||
@@ -427,6 +397,8 @@ export default {
|
||||
},
|
||||
// 当前申报信息
|
||||
currentApplication: {},
|
||||
// 当前申报ID
|
||||
currentApplicationId: null,
|
||||
// 审批表单
|
||||
approvalForm: {
|
||||
applicationId: null,
|
||||
@@ -482,7 +454,7 @@ export default {
|
||||
// 处理时间范围
|
||||
this.queryParams.submitTimeBegin = this.daterangeSubmitTime[0] || '';
|
||||
this.queryParams.submitTimeEnd = this.daterangeSubmitTime[1] || '';
|
||||
|
||||
|
||||
listApprovalRecord(this.queryParams).then(response => {
|
||||
this.approvalList = response.rows;
|
||||
this.total = response.total;
|
||||
@@ -492,91 +464,112 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeSubmitTime = [];
|
||||
this.$refs.queryFormRef.resetFields();
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
|
||||
/** 多选框选中数据 */
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id);
|
||||
// 🔧 修复:存储项目申报ID而不是审批记录ID
|
||||
this.ids = selection.map(item => item.applicationId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
|
||||
console.log('=== 🔧 选择变更 ===');
|
||||
console.log('选中的审批记录:', selection);
|
||||
console.log('提取的项目申报ID:', this.ids);
|
||||
},
|
||||
|
||||
|
||||
/** 快捷操作 */
|
||||
showPendingApprovals() {
|
||||
this.queryParams = {
|
||||
...this.queryParams,
|
||||
approvalStatus: 'submitted',
|
||||
currentApprover: 'current'
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
showMyApprovals() {
|
||||
this.queryParams = {
|
||||
...this.queryParams,
|
||||
approverName: 'current'
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
showDepartmentApprovals() {
|
||||
this.queryParams = {
|
||||
...this.queryParams,
|
||||
deptId: 'current'
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
showApprovalStatistics() {
|
||||
this.$router.push('/cw/approvalRecord/statistics');
|
||||
},
|
||||
|
||||
/** 查看详情 */
|
||||
handleView(row) {
|
||||
const id = row.id || row.applicationId;
|
||||
getApprovalRecord(id).then(response => {
|
||||
this.currentApplication = response.data;
|
||||
this.detailDialog.visible = true;
|
||||
this.detailDialog.title = "申报详情";
|
||||
console.log('=== 🔍 查询待我审批 ===');
|
||||
this.loading = true;
|
||||
|
||||
// 使用专门的API获取当前用户待审批列表
|
||||
getPendingApprovals({}).then(response => {
|
||||
console.log('✅ 待审批数据获取成功:', response.data);
|
||||
this.approvalList = response.data || [];
|
||||
this.total = this.approvalList.length;
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess(`查询到 ${this.total} 条待审批记录`);
|
||||
}).catch(error => {
|
||||
console.error('获取详情失败:', error);
|
||||
this.$modal.msgError('获取详情失败');
|
||||
console.error('❌ 获取待审批列表失败:', error);
|
||||
this.loading = false;
|
||||
this.$modal.msgError('获取待审批列表失败');
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
showMyApprovals() {
|
||||
console.log('=== 🔍 查询我已审批 ===');
|
||||
this.loading = true;
|
||||
|
||||
// 使用专门的API获取当前用户已审批列表
|
||||
// 注意:需要先添加这个API到apiRecord.ts中
|
||||
getMyApprovals({}).then(response => {
|
||||
console.log('✅ 已审批数据获取成功:', response.data);
|
||||
this.approvalList = response.data || [];
|
||||
this.total = this.approvalList.length;
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess(`查询到 ${this.total} 条已审批记录`);
|
||||
}).catch(error => {
|
||||
console.error('❌ 获取已审批列表失败:', error);
|
||||
this.loading = false;
|
||||
this.$modal.msgError('获取已审批列表失败');
|
||||
});
|
||||
},
|
||||
|
||||
/** 查看详情 */
|
||||
handleView(row) {
|
||||
// 🔧 修改:传递applicationId而不是整个对象,让summary组件获取完整的项目申报数据
|
||||
const applicationId = row.applicationId;
|
||||
console.log('=== 审批记录详情查看 ===');
|
||||
console.log('审批记录ID:', row.id);
|
||||
console.log('项目申报ID:', applicationId);
|
||||
|
||||
if (!applicationId) {
|
||||
this.$modal.msgError('无法获取项目申报信息');
|
||||
return;
|
||||
}
|
||||
|
||||
// 设置当前申报ID并打开对话框
|
||||
this.currentApplicationId = applicationId;
|
||||
this.currentApplication = row; // 保留审批记录基本信息,用于审批操作
|
||||
this.detailDialog.visible = true;
|
||||
this.detailDialog.title = `申报详情 - ${row.applicationNo || ''}`;
|
||||
},
|
||||
|
||||
/** 从详情页审批 */
|
||||
approveFromDetail() {
|
||||
this.detailDialog.visible = false;
|
||||
this.handleApprove(this.currentApplication);
|
||||
},
|
||||
|
||||
|
||||
/** 从详情页退回 */
|
||||
returnFromDetail() {
|
||||
this.detailDialog.visible = false;
|
||||
this.handleReturn(this.currentApplication);
|
||||
},
|
||||
|
||||
/** 单个审批通过 */
|
||||
handleApprove(row) {
|
||||
this.openApprovalDialog('approved', row, '审批通过');
|
||||
},
|
||||
|
||||
/** 单个审批拒绝 */
|
||||
handleReject(row) {
|
||||
this.openApprovalDialog('rejected', row, '审批拒绝');
|
||||
},
|
||||
|
||||
|
||||
/** 单个审批退回 */
|
||||
handleReturn(row) {
|
||||
this.openApprovalDialog('returned', row, '审批退回');
|
||||
},
|
||||
|
||||
|
||||
/** 批量审批通过 */
|
||||
handleBatchApprove() {
|
||||
if (this.ids.length === 0) {
|
||||
@@ -585,47 +578,53 @@ export default {
|
||||
}
|
||||
this.openBatchApprovalDialog('approved', '批量审批通过');
|
||||
},
|
||||
|
||||
/** 批量审批拒绝 */
|
||||
handleBatchReject() {
|
||||
if (this.ids.length === 0) {
|
||||
this.$modal.msgWarning('请选择要审批的记录');
|
||||
return;
|
||||
}
|
||||
this.openBatchApprovalDialog('rejected', '批量审批拒绝');
|
||||
},
|
||||
|
||||
|
||||
/** 打开审批对话框 */
|
||||
openApprovalDialog(result, row, title) {
|
||||
console.log('=== 🔧 打开审批对话框 ===');
|
||||
console.log('审批记录信息:', row);
|
||||
console.log('审批记录ID:', row.id);
|
||||
console.log('项目申报ID:', row.applicationId);
|
||||
console.log('审批结果:', result);
|
||||
|
||||
this.currentApplication = row;
|
||||
this.approvalForm = {
|
||||
applicationId: row.id,
|
||||
applicationId: row.applicationId, // 🔧 修复:使用项目申报ID而不是审批记录ID
|
||||
approvalResult: result,
|
||||
approvalComment: '',
|
||||
nextApprover: null
|
||||
};
|
||||
|
||||
|
||||
console.log('✅ 审批表单数据:', this.approvalForm);
|
||||
|
||||
// 如果是通过状态,加载可选审批人
|
||||
if (result === 'approved') {
|
||||
this.loadAvailableApprovers(row.id);
|
||||
this.loadAvailableApprovers(row.applicationId); // 🔧 修复:传递项目申报ID
|
||||
}
|
||||
|
||||
|
||||
this.approvalDialog.visible = true;
|
||||
this.approvalDialog.title = title;
|
||||
},
|
||||
|
||||
|
||||
/** 打开批量审批对话框 */
|
||||
openBatchApprovalDialog(result, title) {
|
||||
console.log('=== 🔧 打开批量审批对话框 ===');
|
||||
console.log('选中的项目申报ID:', this.ids);
|
||||
console.log('审批结果:', result);
|
||||
|
||||
this.approvalForm = {
|
||||
applicationIds: this.ids,
|
||||
applicationIds: this.ids, // 🔧 已修复:使用项目申报ID
|
||||
approvalResult: result,
|
||||
approvalComment: '',
|
||||
nextApprover: null
|
||||
};
|
||||
|
||||
console.log('✅ 批量审批表单数据:', this.approvalForm);
|
||||
|
||||
this.approvalDialog.visible = true;
|
||||
this.approvalDialog.title = title;
|
||||
},
|
||||
|
||||
|
||||
/** 加载可选审批人 */
|
||||
loadAvailableApprovers(applicationId) {
|
||||
getAvailableApprovers(applicationId).then(response => {
|
||||
@@ -635,7 +634,7 @@ export default {
|
||||
this.approverList = [];
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** 关闭审批对话框 */
|
||||
closeApprovalDialog() {
|
||||
this.approvalDialog.visible = false;
|
||||
@@ -650,17 +649,17 @@ export default {
|
||||
this.$refs.approvalFormRef.resetFields();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/** 提交审批 */
|
||||
submitApproval() {
|
||||
this.$refs.approvalFormRef.validate(valid => {
|
||||
if (valid) {
|
||||
this.approvalSubmitting = true;
|
||||
|
||||
const apiCall = this.approvalForm.applicationIds
|
||||
|
||||
const apiCall = this.approvalForm.applicationIds
|
||||
? batchApproveApplication(this.approvalForm)
|
||||
: approveApplication(this.approvalForm);
|
||||
|
||||
|
||||
apiCall.then(response => {
|
||||
this.$modal.msgSuccess("审批成功");
|
||||
this.closeApprovalDialog();
|
||||
@@ -674,14 +673,29 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** 查看审批历史 */
|
||||
handleApprovalHistory(row) {
|
||||
getApprovalHistory(row.id || row.applicationId).then(response => {
|
||||
console.log('=== 🔧 查看审批历史 ===');
|
||||
console.log('审批记录信息:', row);
|
||||
console.log('审批记录ID:', row.id);
|
||||
console.log('项目申报ID:', row.applicationId);
|
||||
|
||||
const applicationId = row.applicationId; // 🔧 修复:明确使用项目申报ID
|
||||
if (!applicationId) {
|
||||
console.error('❌ 无法获取项目申报ID');
|
||||
this.$modal.msgError('无法获取项目申报信息');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('✅ 获取审批历史,项目申报ID:', applicationId);
|
||||
|
||||
getApprovalHistory(applicationId).then(response => {
|
||||
this.approvalHistory = response.data || [];
|
||||
this.historyDialog.visible = true;
|
||||
console.log('✅ 审批历史获取成功:', this.approvalHistory);
|
||||
}).catch(error => {
|
||||
console.error('获取审批历史失败:', error);
|
||||
console.error('❌ 获取审批历史失败:', error);
|
||||
this.$modal.msgError('获取审批历史失败');
|
||||
// 显示模拟数据
|
||||
this.approvalHistory = [
|
||||
@@ -697,7 +711,7 @@ export default {
|
||||
this.historyDialog.visible = true;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** 导出 */
|
||||
handleExport() {
|
||||
exportApprovalRecord(this.queryParams).then(() => {
|
||||
@@ -707,17 +721,19 @@ export default {
|
||||
this.$modal.msgError('导出失败');
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** 判断是否可以审批 */
|
||||
canApprove(row) {
|
||||
return row.approvalStatus === 'submitted' || row.approvalStatus === 'approving';
|
||||
},
|
||||
|
||||
|
||||
/** 格式化金额 */
|
||||
formatAmount(amount) {
|
||||
return amount ? amount.toFixed(2) : '0.00';
|
||||
if (!amount && amount !== 0) return '0.00';
|
||||
const numAmount = parseFloat(amount);
|
||||
return isNaN(numAmount) ? '0.00' : numAmount.toFixed(2);
|
||||
},
|
||||
|
||||
|
||||
/** 获取历史记录图标 */
|
||||
getHistoryIcon(result) {
|
||||
const iconMap = {
|
||||
@@ -728,7 +744,7 @@ export default {
|
||||
};
|
||||
return iconMap[result] || 'Document';
|
||||
},
|
||||
|
||||
|
||||
/** 获取历史记录类型 */
|
||||
getHistoryType(result) {
|
||||
const typeMap = {
|
||||
@@ -739,7 +755,7 @@ export default {
|
||||
};
|
||||
return typeMap[result] || 'info';
|
||||
},
|
||||
|
||||
|
||||
/** 获取状态标签类型 */
|
||||
getStatusTagType(status) {
|
||||
const statusMap = {
|
||||
@@ -750,7 +766,7 @@ export default {
|
||||
};
|
||||
return statusMap[status] || 'info';
|
||||
},
|
||||
|
||||
|
||||
/** 获取审批结果文本 */
|
||||
getApprovalResultText(result) {
|
||||
const textMap = {
|
||||
@@ -775,25 +791,25 @@ export default {
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
border: 1px solid #e4e7ed;
|
||||
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
|
||||
.quick-action {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
|
||||
|
||||
.quick-icon {
|
||||
font-size: 28px;
|
||||
color: #409EFF;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
@@ -836,7 +852,7 @@ export default {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
|
||||
|
||||
.approver-name {
|
||||
font-weight: 600;
|
||||
color: #2c3e50;
|
||||
@@ -846,7 +862,7 @@ export default {
|
||||
.history-content {
|
||||
color: #606266;
|
||||
line-height: 1.6;
|
||||
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
@@ -856,14 +872,14 @@ export default {
|
||||
@media (max-width: 768px) {
|
||||
.quick-action {
|
||||
padding: 15px;
|
||||
|
||||
|
||||
.quick-icon {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
|
||||
span {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -0,0 +1,601 @@
|
||||
<template>
|
||||
<div class="p-2 page-container">
|
||||
<!-- 搜索区域 -->
|
||||
<transition :enter-active-class="animate.searchAnimate.enter" :leave-active-class="animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" label-width="100px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="申报编号" prop="applicationNo">
|
||||
<el-input v-model="queryParams.applicationNo" placeholder="请输入申报编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="申报人" prop="applicantName">
|
||||
<el-input v-model="queryParams.applicantName" placeholder="请输入申报人姓名" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<!-- 快捷操作按钮 -->
|
||||
<el-row :gutter="10" class="mb-[10px]">
|
||||
<el-col :span="12">
|
||||
<el-card shadow="hover" class="quick-action-card">
|
||||
<div class="quick-action" @click="showPendingApprovals">
|
||||
<el-icon class="quick-icon"><Clock /></el-icon>
|
||||
<span>待我审批</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card shadow="hover" class="quick-action-card">
|
||||
<div class="quick-action" @click="showMyApprovals">
|
||||
<el-icon class="quick-icon"><User /></el-icon>
|
||||
<span>我已审批</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 表格区域 -->
|
||||
<el-card shadow="never" class="button-card table-card">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 批量操作按钮暂时隐藏 -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Check"
|
||||
:disabled="multiple"
|
||||
@click="handleBatchApprove"
|
||||
v-hasPermi="['cw:approval:leader']"
|
||||
>批量通过</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Close"
|
||||
:disabled="multiple"
|
||||
@click="handleBatchReject"
|
||||
v-hasPermi="['cw:approval:leader']"
|
||||
>批量退回</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['cw:approval:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="approvalList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="申报编号" align="center" prop="applicationNo" v-if="columns[0].visible" width="180">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" @click="openDetailDialog(scope.row)">{{ scope.row.applicationNo }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申报人" align="center" prop="applicantName" v-if="columns[2].visible" width="120" />
|
||||
<el-table-column label="申报部门" align="center" prop="departmentName" v-if="columns[3].visible" width="150" />
|
||||
<el-table-column label="总投资(万元)" align="center" prop="totalInvestment" v-if="columns[4].visible" width="120">
|
||||
<template #default="scope">
|
||||
<span class="amount-text">{{ formatAmount(scope.row.totalInvestment) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批状态" align="center" prop="nodeStatus" v-if="columns[5].visible" width="120">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="cw_approval_status" :value="scope.row.nodeStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交时间" align="center" prop="startTime" v-if="columns[6].visible" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.startTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="查看详情" placement="top">
|
||||
<el-button link type="info" icon="View" @click="openDetailDialog(scope.row)" v-hasPermi="['cw:approval:query']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="审批操作" placement="top" v-if="scope.row.nodeStatus === 'waiting'">
|
||||
<el-button link type="success" icon="Check" @click="openApprovalDialog(scope.row)" v-hasPermi="['cw:approval:leader']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="审批历史" placement="top">
|
||||
<el-button link type="primary" icon="Clock" @click="handleApprovalHistory(scope.row)" v-hasPermi="['cw:approval:query']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
<!-- 项目详情对话框 -->
|
||||
<el-dialog :title="detailDialog.title" v-model="detailDialog.visible" width="1000px" append-to-body>
|
||||
<ApplicationSummary v-if="currentApplication && currentApplication.id" :application-id="currentApplication.id" />
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="detailDialog.visible = false">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 审批对话框 -->
|
||||
<el-dialog :title="approvalDialog.title" v-model="approvalDialog.visible" width="600px" append-to-body>
|
||||
<el-form ref="approvalFormRef" :model="approvalForm" :rules="approvalRules" label-width="100px">
|
||||
<el-form-item label="申报编号">
|
||||
<span>{{ currentApplication.applicationNo }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称">
|
||||
<span>{{ currentApplication.projectName }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="申报人">
|
||||
<span>{{ currentApplication.applicantName }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="总投资">
|
||||
<span>{{ formatAmount(currentApplication.totalInvestment) }} 万元</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批决定" prop="approvalResult" required>
|
||||
<el-radio-group v-model="approvalForm.approvalResult">
|
||||
<el-radio label="approve">通过(提交财务)</el-radio>
|
||||
<el-radio label="reject">退回申请人</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="approvalComment">
|
||||
<el-input
|
||||
v-model="approvalForm.approvalComment"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请输入审批意见"
|
||||
maxlength="500"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="approvalDialog.visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitApproval" :loading="approvalDialog.loading">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 审批历史对话框 -->
|
||||
<el-dialog title="审批历史" v-model="historyDialog.visible" width="800px" append-to-body>
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
v-for="(record, index) in approvalHistory"
|
||||
:key="index"
|
||||
:timestamp="parseTime(record.endTime || record.startTime)"
|
||||
:type="getTimelineType(record.approveAction)"
|
||||
>
|
||||
<el-card>
|
||||
<h4>{{ record.nodeName }}</h4>
|
||||
<p><strong>审批人:</strong>{{ record.approverName }}</p>
|
||||
<p><strong>审批结果:</strong>
|
||||
<el-tag :type="getApprovalResultType(record.approveAction)">
|
||||
{{ getApprovalResultText(record.approveAction) }}
|
||||
</el-tag>
|
||||
</p>
|
||||
<p v-if="record.approveOpinion"><strong>审批意见:</strong>{{ record.approveOpinion }}</p>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="historyDialog.visible = false">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPendingApprovals,
|
||||
getMyApprovals,
|
||||
getApprovalHistory,
|
||||
exportApprovalRecord
|
||||
} from "@/api/cw/approvalRecord";
|
||||
import { leaderApproveApplication, batchLeaderApproveApplication } from "@/api/cw/leaderApproval";
|
||||
import { useDict } from "@/utils/dict";
|
||||
import ApplicationSummary from "../application/summary.vue";
|
||||
|
||||
export default {
|
||||
name: 'CwLeaderApproval',
|
||||
components: {
|
||||
ApplicationSummary
|
||||
},
|
||||
dicts: ['cw_approval_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 审批列表
|
||||
approvalList: [],
|
||||
// 动画配置
|
||||
animate: {
|
||||
searchAnimate: {
|
||||
enter: 'animate__animated animate__fadeIn',
|
||||
leave: 'animate__animated animate__fadeOut'
|
||||
}
|
||||
},
|
||||
// 字典数据
|
||||
cw_approval_status: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
applicationNo: '',
|
||||
projectName: '',
|
||||
applicantName: ''
|
||||
},
|
||||
// 列信息
|
||||
columns: [
|
||||
{ key: 0, label: `申报编号`, visible: true },
|
||||
{ key: 1, label: `项目名称`, visible: true },
|
||||
{ key: 2, label: `申报人`, visible: true },
|
||||
{ key: 3, label: `申报部门`, visible: true },
|
||||
{ key: 4, label: `总投资`, visible: true },
|
||||
{ key: 5, label: `审批状态`, visible: true },
|
||||
{ key: 6, label: `提交时间`, visible: true }
|
||||
],
|
||||
// 审批对话框
|
||||
approvalDialog: {
|
||||
visible: false,
|
||||
title: '',
|
||||
loading: false
|
||||
},
|
||||
// 详情对话框
|
||||
detailDialog: {
|
||||
visible: false,
|
||||
title: ''
|
||||
},
|
||||
// 历史记录对话框
|
||||
historyDialog: {
|
||||
visible: false
|
||||
},
|
||||
// 当前申报信息
|
||||
currentApplication: {},
|
||||
// 当前申报ID
|
||||
currentApplicationId: null,
|
||||
// 审批表单
|
||||
approvalForm: {
|
||||
applicationId: null,
|
||||
approvalResult: '',
|
||||
approvalComment: ''
|
||||
},
|
||||
// 审批表单验证
|
||||
approvalRules: {
|
||||
approvalResult: [
|
||||
{ required: true, message: "请选择审批结果", trigger: "change" }
|
||||
],
|
||||
approvalComment: [
|
||||
{ required: true, message: "请输入审批意见", trigger: "blur" },
|
||||
{ min: 5, max: 500, message: "审批意见长度在 5 到 500 个字符", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
// 审批历史数据
|
||||
approvalHistory: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询审批列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 默认显示当前用户的待审批记录
|
||||
getPendingApprovals(this.queryParams).then(response => {
|
||||
this.approvalList = response.data || [];
|
||||
this.total = this.approvalList.length;
|
||||
this.loading = false;
|
||||
}).catch(error => {
|
||||
console.error('获取待审批列表失败:', error);
|
||||
this.loading = false;
|
||||
this.$modal.msgError('获取待审批列表失败');
|
||||
});
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeSubmitTime = [];
|
||||
this.resetForm("queryFormRef");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
/** 快捷操作 */
|
||||
showPendingApprovals() {
|
||||
console.log('=== 🔍 查询待我审批 ===');
|
||||
this.loading = true;
|
||||
|
||||
getPendingApprovals({}).then(response => {
|
||||
console.log('✅ 待审批数据获取成功:', response.data);
|
||||
this.approvalList = response.data || [];
|
||||
this.total = this.approvalList.length;
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess(`查询到 ${this.total} 条待审批记录`);
|
||||
}).catch(error => {
|
||||
console.error('❌ 获取待审批列表失败:', error);
|
||||
this.loading = false;
|
||||
this.$modal.msgError('获取待审批列表失败');
|
||||
});
|
||||
},
|
||||
|
||||
showMyApprovals() {
|
||||
console.log('=== 🔍 查询我已审批 ===');
|
||||
this.loading = true;
|
||||
|
||||
getMyApprovals({}).then(response => {
|
||||
console.log('✅ 已审批数据获取成功:', response.data);
|
||||
this.approvalList = response.data || [];
|
||||
this.total = this.approvalList.length;
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess(`查询到 ${this.total} 条已审批记录`);
|
||||
}).catch(error => {
|
||||
console.error('❌ 获取已审批列表失败:', error);
|
||||
this.loading = false;
|
||||
this.$modal.msgError('获取已审批列表失败');
|
||||
});
|
||||
},
|
||||
|
||||
/** 多选框选中数据 */
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.applicationId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
console.log('提取的项目申报ID:', this.ids);
|
||||
},
|
||||
|
||||
/** 打开详情对话框 */
|
||||
openDetailDialog(row) {
|
||||
this.currentApplication = row;
|
||||
this.detailDialog.title = `项目申报详情 - ${row.applicationNo}`;
|
||||
this.detailDialog.visible = true;
|
||||
},
|
||||
|
||||
/** 打开审批对话框 */
|
||||
openApprovalDialog(row) {
|
||||
this.resetApprovalForm();
|
||||
this.currentApplication = row;
|
||||
this.currentApplicationId = row.applicationId;
|
||||
this.approvalForm.applicationId = row.applicationId;
|
||||
this.approvalDialog.title = `分管领导审批 - ${row.applicationNo}`;
|
||||
this.approvalDialog.visible = true;
|
||||
},
|
||||
|
||||
/** 重置审批表单 */
|
||||
resetApprovalForm() {
|
||||
this.approvalForm = {
|
||||
applicationId: null,
|
||||
approvalResult: '',
|
||||
approvalComment: ''
|
||||
};
|
||||
},
|
||||
|
||||
/** 提交审批 */
|
||||
submitApproval() {
|
||||
this.$refs["approvalFormRef"].validate(valid => {
|
||||
if (valid) {
|
||||
this.approvalDialog.loading = true;
|
||||
|
||||
leaderApproveApplication(this.approvalForm).then(response => {
|
||||
this.$modal.msgSuccess("审批成功");
|
||||
this.approvalDialog.visible = false;
|
||||
this.approvalDialog.loading = false;
|
||||
this.getList();
|
||||
}).catch(error => {
|
||||
console.error('审批失败:', error);
|
||||
this.approvalDialog.loading = false;
|
||||
this.$modal.msgError('审批失败');
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/** 批量审批通过 */
|
||||
handleBatchApprove() {
|
||||
if (this.ids.length === 0) {
|
||||
this.$modal.msgError('请至少选择一条记录');
|
||||
return;
|
||||
}
|
||||
|
||||
this.$modal.confirm('确认要批量通过选中的申报吗?').then(() => {
|
||||
const batchData = this.ids.map(applicationId => ({
|
||||
applicationId: applicationId,
|
||||
approvalResult: 'approve',
|
||||
approvalComment: '分管领导批量审批通过'
|
||||
}));
|
||||
|
||||
batchLeaderApproveApplication(batchData).then(response => {
|
||||
this.$modal.msgSuccess("批量审批成功");
|
||||
this.getList();
|
||||
this.ids = [];
|
||||
this.multiple = true;
|
||||
}).catch(error => {
|
||||
console.error('批量审批失败:', error);
|
||||
this.$modal.msgError('批量审批失败');
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/** 批量退回 */
|
||||
handleBatchReject() {
|
||||
if (this.ids.length === 0) {
|
||||
this.$modal.msgError('请至少选择一条记录');
|
||||
return;
|
||||
}
|
||||
|
||||
this.$modal.confirm('确认要批量退回选中的申报吗?').then(() => {
|
||||
const batchData = this.ids.map(applicationId => ({
|
||||
applicationId: applicationId,
|
||||
approvalResult: 'reject',
|
||||
approvalComment: '分管领导审批退回,请修改后重新提交'
|
||||
}));
|
||||
|
||||
batchLeaderApproveApplication(batchData).then(response => {
|
||||
this.$modal.msgSuccess("批量退回成功");
|
||||
this.getList();
|
||||
this.ids = [];
|
||||
this.multiple = true;
|
||||
}).catch(error => {
|
||||
console.error('批量退回失败:', error);
|
||||
this.$modal.msgError('批量退回失败');
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/** 审批历史 */
|
||||
handleApprovalHistory(row) {
|
||||
getApprovalHistory(row.applicationId).then(response => {
|
||||
this.approvalHistory = response.data || [];
|
||||
this.historyDialog.visible = true;
|
||||
}).catch(error => {
|
||||
console.error('获取审批历史失败:', error);
|
||||
this.$modal.msgError('获取审批历史失败');
|
||||
});
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('cw/approval/export', {
|
||||
...this.queryParams
|
||||
}, `leader_approval_${new Date().getTime()}.xlsx`);
|
||||
},
|
||||
|
||||
/** 格式化金额 */
|
||||
formatAmount(amount) {
|
||||
if (!amount) return '0.00';
|
||||
return Number(amount).toFixed(2);
|
||||
},
|
||||
|
||||
/** 获取时间线类型 */
|
||||
getTimelineType(action) {
|
||||
switch (action) {
|
||||
case 'approve': return 'success';
|
||||
case 'reject': return 'danger';
|
||||
case 'submit': return 'primary';
|
||||
default: return 'info';
|
||||
}
|
||||
},
|
||||
|
||||
/** 获取审批结果类型 */
|
||||
getApprovalResultType(action) {
|
||||
switch (action) {
|
||||
case 'approve': return 'success';
|
||||
case 'reject': return 'danger';
|
||||
case 'submit': return 'primary';
|
||||
default: return 'info';
|
||||
}
|
||||
},
|
||||
|
||||
/** 获取审批结果文本 */
|
||||
getApprovalResultText(action) {
|
||||
switch (action) {
|
||||
case 'approve': return '通过';
|
||||
case 'reject': return '退回';
|
||||
case 'submit': return '提交';
|
||||
default: return '待处理';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.quick-action-card {
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
.quick-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
|
||||
.quick-icon {
|
||||
font-size: 24px;
|
||||
margin-right: 8px;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: var(--el-text-color-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.search-btn-container {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.table-card {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.amount-text {
|
||||
font-weight: 600;
|
||||
color: var(--el-color-success);
|
||||
}
|
||||
|
||||
.el-timeline-item {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.animate__animated {
|
||||
animation-duration: 0.3s;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user