|
|
|
|
@ -271,7 +271,7 @@
|
|
|
|
|
:on-remove="(file, fileList) => handleEconomicUploadRemove(fileList, scope.row)"
|
|
|
|
|
:on-error="handleUploadError"
|
|
|
|
|
multiple
|
|
|
|
|
:limit="5"
|
|
|
|
|
:limit="99"
|
|
|
|
|
>
|
|
|
|
|
<el-button size="mini" type="primary" icon="el-icon-upload">上传附件</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
@ -334,31 +334,101 @@
|
|
|
|
|
<i class="el-icon-money" />
|
|
|
|
|
申请资金汇总
|
|
|
|
|
</div>
|
|
|
|
|
<el-row :gutter="16" class="amount-grid">
|
|
|
|
|
<el-col v-for="field in fundAmountFields" :key="field.key" :xs="24" :sm="12" :md="8">
|
|
|
|
|
<el-form-item :label="field.label">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="field.target[field.key]"
|
|
|
|
|
:readonly="isViewMode"
|
|
|
|
|
inputmode="decimal"
|
|
|
|
|
@blur="normalizeAmountField(field.target, field.key)"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="16">
|
|
|
|
|
<el-col :xs="24" :sm="12">
|
|
|
|
|
<el-form-item label="旧项目合同编号">
|
|
|
|
|
<el-input v-model="formData.fundApplication.oldProject.contractNumber" :readonly="isViewMode" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :xs="24" :sm="12">
|
|
|
|
|
<el-form-item label="固定资产">
|
|
|
|
|
<el-checkbox v-model="formData.fundApplication.newProject.hasFixedAssets" :disabled="isViewMode">新项目包含</el-checkbox>
|
|
|
|
|
<el-checkbox v-model="formData.fundApplication.oldProject.hasFixedAssets" :disabled="isViewMode">旧项目包含</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<div class="fund-summary-table-container">
|
|
|
|
|
<el-table :data="fundApplicationRows" border class="fund-summary-table" style="width: 100%;">
|
|
|
|
|
<el-table-column label="新项目" align="center">
|
|
|
|
|
<el-table-column label="项目总额(万元)" width="150" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.newProject.totalAmount" :readonly="isViewMode" inputmode="decimal" @blur="normalizeAmountField(scope.row.newProject, 'totalAmount')" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="分年度申请资金(万元)" align="center">
|
|
|
|
|
<el-table-column :label="formData.budgetYear || '当年'" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.newProject.yearCurrent" :readonly="isViewMode" inputmode="decimal" @blur="normalizeAmountField(scope.row.newProject, 'yearCurrent')" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column :label="nextBudgetYearLabel" width="130" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.newProject.yearNext" :readonly="isViewMode" inputmode="decimal" @blur="normalizeAmountField(scope.row.newProject, 'yearNext')" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="含固定资产(打√)" align="center">
|
|
|
|
|
<el-table-column label="是" width="60" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-checkbox
|
|
|
|
|
:value="scope.row.newProject.hasFixedAssets === true"
|
|
|
|
|
:disabled="isViewMode"
|
|
|
|
|
aria-label="新项目包含固定资产"
|
|
|
|
|
@change="handleFixedAssetOptionChange(scope.row.newProject, true, $event)"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="否" width="60" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-checkbox
|
|
|
|
|
:value="scope.row.newProject.hasFixedAssets === false"
|
|
|
|
|
:disabled="isViewMode"
|
|
|
|
|
aria-label="新项目不包含固定资产"
|
|
|
|
|
@change="handleFixedAssetOptionChange(scope.row.newProject, false, $event)"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="老项目" align="center">
|
|
|
|
|
<el-table-column label="合同总额(万元)" width="150" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.oldProject.contractTotal" :readonly="isViewMode" inputmode="decimal" @blur="normalizeAmountField(scope.row.oldProject, 'contractTotal')" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="往年累计安排资金(万元)" width="170" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.oldProject.previousYearsTotal" :readonly="isViewMode" inputmode="decimal" @blur="normalizeAmountField(scope.row.oldProject, 'previousYearsTotal')" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="上年结余资金(万元)" width="150" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.oldProject.previousYearBalance" :readonly="isViewMode" inputmode="decimal" @blur="normalizeAmountField(scope.row.oldProject, 'previousYearBalance')" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="合同或任务书编号" width="180" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.oldProject.contractNumber" :readonly="isViewMode" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column :label="`申请${formData.budgetYear || '当年'}`" width="140" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.oldProject.yearCurrent" :readonly="isViewMode" inputmode="decimal" @blur="normalizeAmountField(scope.row.oldProject, 'yearCurrent')" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="含固定资产(打√)" align="center">
|
|
|
|
|
<el-table-column label="是" width="60" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-checkbox
|
|
|
|
|
:value="scope.row.oldProject.hasFixedAssets === true"
|
|
|
|
|
:disabled="isViewMode"
|
|
|
|
|
aria-label="老项目包含固定资产"
|
|
|
|
|
@change="handleFixedAssetOptionChange(scope.row.oldProject, true, $event)"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="否" width="60" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-checkbox
|
|
|
|
|
:value="scope.row.oldProject.hasFixedAssets === false"
|
|
|
|
|
:disabled="isViewMode"
|
|
|
|
|
aria-label="老项目不包含固定资产"
|
|
|
|
|
@change="handleFixedAssetOptionChange(scope.row.oldProject, false, $event)"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
<el-alert
|
|
|
|
|
v-if="!isNewProjectAmountValid"
|
|
|
|
|
title="新项目总额必须等于本年和下年金额合计"
|
|
|
|
|
@ -879,7 +949,7 @@ export default {
|
|
|
|
|
totalAmount: '0.0000',
|
|
|
|
|
yearCurrent: '0.0000',
|
|
|
|
|
yearNext: '0.0000',
|
|
|
|
|
hasFixedAssets: false
|
|
|
|
|
hasFixedAssets: null
|
|
|
|
|
},
|
|
|
|
|
oldProject: {
|
|
|
|
|
contractTotal: '0.0000',
|
|
|
|
|
@ -887,7 +957,7 @@ export default {
|
|
|
|
|
previousYearBalance: '0.0000',
|
|
|
|
|
contractNumber: '',
|
|
|
|
|
yearCurrent: '0.0000',
|
|
|
|
|
hasFixedAssets: false
|
|
|
|
|
hasFixedAssets: null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
summaryPerformanceIndicators: [],
|
|
|
|
|
@ -942,17 +1012,13 @@ export default {
|
|
|
|
|
.map(item => item.departmentName)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
fundAmountFields() {
|
|
|
|
|
const fund = this.formData.fundApplication
|
|
|
|
|
return [
|
|
|
|
|
{ label: '新项目总额(万元)', target: fund.newProject, key: 'totalAmount' },
|
|
|
|
|
{ label: '新项目本年(万元)', target: fund.newProject, key: 'yearCurrent' },
|
|
|
|
|
{ label: '新项目下年(万元)', target: fund.newProject, key: 'yearNext' },
|
|
|
|
|
{ label: '旧项目合同总额(万元)', target: fund.oldProject, key: 'contractTotal' },
|
|
|
|
|
{ label: '旧项目前年累计(万元)', target: fund.oldProject, key: 'previousYearsTotal' },
|
|
|
|
|
{ label: '旧项目前年余额(万元)', target: fund.oldProject, key: 'previousYearBalance' },
|
|
|
|
|
{ label: '旧项目本年(万元)', target: fund.oldProject, key: 'yearCurrent' }
|
|
|
|
|
]
|
|
|
|
|
fundApplicationRows() {
|
|
|
|
|
return [this.formData.fundApplication]
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
nextBudgetYearLabel() {
|
|
|
|
|
const currentYear = parseInt(this.formData.budgetYear, 10)
|
|
|
|
|
return Number.isFinite(currentYear) ? `${currentYear + 1}年` : '下一年'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
currentYearMonthlyTotal() {
|
|
|
|
|
@ -1090,7 +1156,9 @@ export default {
|
|
|
|
|
submissionDate: submission.submissionDate,
|
|
|
|
|
economicItems: submission.economicItems || [],
|
|
|
|
|
performanceIndicators: submission.performanceIndicators || [],
|
|
|
|
|
implementationSchedule: submission.implementationSchedule || ''
|
|
|
|
|
implementationSchedule: submission.implementationSchedule || '',
|
|
|
|
|
implementationScheduleDetail: submission.implementationScheduleDetail || {},
|
|
|
|
|
fundApplication: submission.fundApplication || {}
|
|
|
|
|
})))
|
|
|
|
|
|
|
|
|
|
// 检查并提示缺少绩效指标数据
|
|
|
|
|
@ -1103,22 +1171,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.formData.executeDepartmentCount = this.formData.departmentSubmissions.length
|
|
|
|
|
|
|
|
|
|
// 使用后端返回的经济分类汇总数据,如果没有则自动生成
|
|
|
|
|
if (data.economicSummary && data.economicSummary.length > 0) {
|
|
|
|
|
this.$set(this.formData, 'economicSummary', data.economicSummary.map(item => ({
|
|
|
|
|
categoryId: item.categoryId,
|
|
|
|
|
categoryName: item.categoryName,
|
|
|
|
|
totalAmount: item.totalAmount,
|
|
|
|
|
departmentCount: item.departmentCount,
|
|
|
|
|
summaryCalculationBasis: '', // 默认为空,需要用户填写
|
|
|
|
|
fileList: [],
|
|
|
|
|
basisList: item.departments ? item.departments.map(dept => ({ department: dept, basis: '' })) : []
|
|
|
|
|
})))
|
|
|
|
|
} else {
|
|
|
|
|
// 自动生成经济分类汇总(向后兼容)
|
|
|
|
|
this.generateEconomicSummary(this.formData.departmentSubmissions)
|
|
|
|
|
}
|
|
|
|
|
this.generateEconomicSummary(this.formData.departmentSubmissions)
|
|
|
|
|
this.aggregateFundApplication(this.formData.departmentSubmissions)
|
|
|
|
|
this.aggregateImplementationScheduleAmounts(this.formData.departmentSubmissions)
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('获取执行科室填报数据失败:', error)
|
|
|
|
|
@ -1140,16 +1195,17 @@ export default {
|
|
|
|
|
if (economicMap.has(key)) {
|
|
|
|
|
const existing = economicMap.get(key)
|
|
|
|
|
existing.totalAmount = addMoney(existing.totalAmount, amount)
|
|
|
|
|
// 检查是否已存在该科室的记录
|
|
|
|
|
const existingDept = existing.basisList.find(dept => dept.department === submission.departmentName)
|
|
|
|
|
if (existingDept) {
|
|
|
|
|
existingDept.amount = addMoney(existingDept.amount, amount)
|
|
|
|
|
existingDept.basis = item.calculationBasis // 更新测算依据
|
|
|
|
|
existingDept.basis = [existingDept.basis, item.calculationBasis].filter(Boolean).join('\n')
|
|
|
|
|
existingDept.files.push(...this.normalizeFileList(item.files || []))
|
|
|
|
|
} else {
|
|
|
|
|
existing.basisList.push({
|
|
|
|
|
department: submission.departmentName,
|
|
|
|
|
amount: amount,
|
|
|
|
|
basis: item.calculationBasis
|
|
|
|
|
basis: item.calculationBasis,
|
|
|
|
|
files: this.normalizeFileList(item.files || [])
|
|
|
|
|
})
|
|
|
|
|
existing.departmentCount += 1
|
|
|
|
|
}
|
|
|
|
|
@ -1159,13 +1215,14 @@ export default {
|
|
|
|
|
categoryName: item.categoryName,
|
|
|
|
|
totalAmount: amount,
|
|
|
|
|
departmentCount: 1,
|
|
|
|
|
summaryCalculationBasis: '', // 默认为空,需要用户填写
|
|
|
|
|
summaryCalculationBasis: '',
|
|
|
|
|
fileList: [],
|
|
|
|
|
expanded: false, // 初始状态为收起
|
|
|
|
|
basisList: [{
|
|
|
|
|
department: submission.departmentName,
|
|
|
|
|
amount: amount,
|
|
|
|
|
basis: item.calculationBasis
|
|
|
|
|
basis: item.calculationBasis,
|
|
|
|
|
files: this.normalizeFileList(item.files || [])
|
|
|
|
|
}]
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
@ -1173,8 +1230,81 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 转换为数组格式并确保响应式更新
|
|
|
|
|
this.$set(this.formData, 'economicSummary', Array.from(economicMap.values()))
|
|
|
|
|
const summary = Array.from(economicMap.values()).map(item => ({
|
|
|
|
|
...item,
|
|
|
|
|
summaryCalculationBasis: item.basisList
|
|
|
|
|
.map(detail => `${detail.department}:${detail.basis || '-'}`)
|
|
|
|
|
.join('\n\n'),
|
|
|
|
|
fileList: this.mergeFileLists(...item.basisList.map(detail => detail.files))
|
|
|
|
|
}))
|
|
|
|
|
this.$set(this.formData, 'economicSummary', summary)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
aggregateFundApplication(submissions) {
|
|
|
|
|
const values = (section, key) => submissions.map(submission => {
|
|
|
|
|
const application = submission.fundApplication || {}
|
|
|
|
|
const source = application[section] || {}
|
|
|
|
|
return source[key] || '0.0000'
|
|
|
|
|
})
|
|
|
|
|
const fund = this.formData.fundApplication
|
|
|
|
|
fund.newProject.totalAmount = sumMoney(values('newProject', 'totalAmount'))
|
|
|
|
|
fund.newProject.yearCurrent = sumMoney(values('newProject', 'yearCurrent'))
|
|
|
|
|
fund.newProject.yearNext = sumMoney(values('newProject', 'yearNext'))
|
|
|
|
|
fund.oldProject.contractTotal = sumMoney(values('oldProject', 'contractTotal'))
|
|
|
|
|
fund.oldProject.previousYearsTotal = sumMoney(values('oldProject', 'previousYearsTotal'))
|
|
|
|
|
fund.oldProject.previousYearBalance = sumMoney(values('oldProject', 'previousYearBalance'))
|
|
|
|
|
fund.oldProject.yearCurrent = sumMoney(values('oldProject', 'yearCurrent'))
|
|
|
|
|
|
|
|
|
|
// 固定资产不是可求和字段:只有一个执行科室时才继承其选择,多科室时由牵头科室自行选择。
|
|
|
|
|
if (submissions.length === 1) {
|
|
|
|
|
const application = submissions[0].fundApplication || {}
|
|
|
|
|
const newProject = application.newProject || {}
|
|
|
|
|
const oldProject = application.oldProject || {}
|
|
|
|
|
fund.newProject.hasFixedAssets = Boolean(newProject.hasFixedAssets)
|
|
|
|
|
fund.oldProject.hasFixedAssets = Boolean(oldProject.hasFixedAssets)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleFixedAssetOptionChange(project, hasFixedAssets, checked) {
|
|
|
|
|
// 两个勾选框互斥;点击当前已选项时维持选择,避免出现“是/否”都未选的状态。
|
|
|
|
|
if (checked) {
|
|
|
|
|
this.$set(project, 'hasFixedAssets', hasFixedAssets)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
aggregateImplementationScheduleAmounts(submissions) {
|
|
|
|
|
const detail = this.formData.implementationScheduleDetail
|
|
|
|
|
const values = key => submissions.map(submission =>
|
|
|
|
|
(submission.implementationScheduleDetail || {})[key] || '0.0000'
|
|
|
|
|
)
|
|
|
|
|
detail.currentYearAmount = sumMoney(values('currentYearAmount'))
|
|
|
|
|
for (let month = 1; month <= 12; month++) {
|
|
|
|
|
const key = `currentYearMonth${month}`
|
|
|
|
|
detail[key] = sumMoney(values(key))
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
mergeFileLists(...fileLists) {
|
|
|
|
|
const seen = new Set()
|
|
|
|
|
return fileLists.reduce((files, fileList) => files.concat(fileList || []), []).filter(file => {
|
|
|
|
|
const fileId = file.fileId || file.id
|
|
|
|
|
if (!fileId || seen.has(fileId)) return false
|
|
|
|
|
seen.add(fileId)
|
|
|
|
|
return true
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
mergeSavedEconomicSummary(savedItems) {
|
|
|
|
|
const items = savedItems || []
|
|
|
|
|
items.forEach(savedItem => {
|
|
|
|
|
const economicItem = this.formData.economicSummary.find(item => item.categoryId === savedItem.categoryId)
|
|
|
|
|
if (economicItem) {
|
|
|
|
|
this.$set(economicItem, 'summaryCalculationBasis', savedItem.summaryCalculationBasis || savedItem.summary_calculation_basis || '')
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(savedItem, 'files') || Object.prototype.hasOwnProperty.call(savedItem, 'file_list')) {
|
|
|
|
|
this.$set(economicItem, 'fileList', this.normalizeFileList(savedItem.files || savedItem.file_list || []))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
normalizeSummaryMoney(value) {
|
|
|
|
|
@ -1249,14 +1379,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
// 填充经济分类汇总数据(如果有传递)
|
|
|
|
|
if (data.economicSummary && data.economicSummary.length > 0) {
|
|
|
|
|
// 将已有的汇总测算依据应用到当前的经济分类汇总中
|
|
|
|
|
data.economicSummary.forEach(savedItem => {
|
|
|
|
|
const economicItem = this.formData.economicSummary.find(item => item.categoryId === savedItem.categoryId)
|
|
|
|
|
if (economicItem) {
|
|
|
|
|
this.$set(economicItem, 'summaryCalculationBasis', savedItem.summaryCalculationBasis || '')
|
|
|
|
|
this.$set(economicItem, 'fileList', this.normalizeFileList(savedItem.files || []))
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.mergeSavedEconomicSummary(data.economicSummary)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 如果经济分类汇总数据不完整,或需要更详细的数据,再调用API补充
|
|
|
|
|
@ -1270,16 +1393,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
// 补充经济分类汇总数据(如果lead_submission中没有完整数据)
|
|
|
|
|
if (apiData.economicSummary && apiData.economicSummary.length > 0) {
|
|
|
|
|
apiData.economicSummary.forEach(savedItem => {
|
|
|
|
|
const economicItem = this.formData.economicSummary.find(item => item.categoryId === savedItem.categoryId)
|
|
|
|
|
if (economicItem && !economicItem.summaryCalculationBasis) {
|
|
|
|
|
// 只在没有数据时补充
|
|
|
|
|
this.$set(economicItem, 'summaryCalculationBasis', savedItem.summaryCalculationBasis || '')
|
|
|
|
|
}
|
|
|
|
|
if (economicItem) {
|
|
|
|
|
this.$set(economicItem, 'fileList', this.normalizeFileList(savedItem.files || []))
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.mergeSavedEconomicSummary(apiData.economicSummary)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 补充绩效指标数据(如果lead_submission中没有)
|
|
|
|
|
@ -1325,23 +1439,13 @@ export default {
|
|
|
|
|
|
|
|
|
|
// 填充经济分类汇总数据
|
|
|
|
|
if (data.economicSummary && data.economicSummary.length > 0) {
|
|
|
|
|
// 使用新格式的数据
|
|
|
|
|
data.economicSummary.forEach(savedItem => {
|
|
|
|
|
const economicItem = this.formData.economicSummary.find(item => item.categoryId === savedItem.categoryId)
|
|
|
|
|
if (economicItem) {
|
|
|
|
|
this.$set(economicItem, 'summaryCalculationBasis', savedItem.summaryCalculationBasis || '')
|
|
|
|
|
this.$set(economicItem, 'fileList', this.normalizeFileList(savedItem.files || []))
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.mergeSavedEconomicSummary(data.economicSummary)
|
|
|
|
|
} else if (data.economic_summary && data.economic_summary.length > 0) {
|
|
|
|
|
// 向后兼容老格式
|
|
|
|
|
data.economic_summary.forEach(savedItem => {
|
|
|
|
|
const economicItem = this.formData.economicSummary.find(item => item.categoryId === savedItem.categoryId)
|
|
|
|
|
if (economicItem) {
|
|
|
|
|
this.$set(economicItem, 'summaryCalculationBasis', savedItem.summary_calculation_basis || '')
|
|
|
|
|
this.$set(economicItem, 'fileList', this.normalizeFileList(savedItem.files || savedItem.file_list || []))
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.mergeSavedEconomicSummary(data.economic_summary.map(item => ({
|
|
|
|
|
...item,
|
|
|
|
|
categoryId: item.categoryId || item.category_id,
|
|
|
|
|
files: item.files || item.file_list || []
|
|
|
|
|
})))
|
|
|
|
|
}
|
|
|
|
|
} else if (response && !response.errcode) {
|
|
|
|
|
// 处理老格式的响应(向后兼容)
|
|
|
|
|
@ -1363,12 +1467,11 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (data.economic_summary && data.economic_summary.length > 0) {
|
|
|
|
|
data.economic_summary.forEach(savedItem => {
|
|
|
|
|
const economicItem = this.formData.economicSummary.find(item => item.categoryId === savedItem.categoryId)
|
|
|
|
|
if (economicItem) {
|
|
|
|
|
this.$set(economicItem, 'summaryCalculationBasis', savedItem.summary_calculation_basis || '')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.mergeSavedEconomicSummary(data.economic_summary.map(item => ({
|
|
|
|
|
...item,
|
|
|
|
|
categoryId: item.categoryId || item.category_id,
|
|
|
|
|
files: item.files || item.file_list || []
|
|
|
|
|
})))
|
|
|
|
|
}
|
|
|
|
|
} else if (response && response.errcode) {
|
|
|
|
|
// 如果是新建模式,不显示错误
|
|
|
|
|
@ -1845,6 +1948,29 @@ export default {
|
|
|
|
|
margin: 15px 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fund-summary-table-container {
|
|
|
|
|
margin: 15px 0;
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fund-summary-table {
|
|
|
|
|
min-width: 1440px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fund-summary-table >>> .el-table__header th {
|
|
|
|
|
background-color: #f5f7fa;
|
|
|
|
|
color: #606266;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fund-summary-table >>> .el-table__cell {
|
|
|
|
|
padding: 8px 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fund-summary-table >>> .el-input__inner {
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.economic-table,
|
|
|
|
|
.performance-table {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|