|
|
|
|
@ -1,5 +1,14 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="budget-submission-form">
|
|
|
|
|
<!--
|
|
|
|
|
该表单的数据来源说明:
|
|
|
|
|
- formData:由组件的data中定义,并在created生命周期钩子中通过initFormData方法初始化。
|
|
|
|
|
- initFormData会根据传入的packageData(预算包数据)填充科室、年度、分配金额、子项名称、大项目名称等字段。
|
|
|
|
|
- 子项名称和大项目名称通过API getPackageProjectNames(packageId) 异步获取。
|
|
|
|
|
- 其他如departmentName、budgetYear、allocatedAmount等直接从packageData对象中获取。
|
|
|
|
|
- formRules:为表单校验规则,通常在data中静态定义。
|
|
|
|
|
这些数据确保表单展示的内容与后端预算包及相关项目信息保持同步。
|
|
|
|
|
-->
|
|
|
|
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="120px">
|
|
|
|
|
|
|
|
|
|
<!-- 基本信息 -->
|
|
|
|
|
@ -1247,12 +1256,22 @@ export default {
|
|
|
|
|
console.warn('获取项目名称失败:', error.message)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log('this.packageData.level:', this.packageData.level)
|
|
|
|
|
// 加载父级package的submission信息
|
|
|
|
|
this.parentSubmissionInfo = {
|
|
|
|
|
application_basis: (this.packageData.parent && this.packageData.parent.application_basis) || '',
|
|
|
|
|
application_purpose: (this.packageData.parent && this.packageData.parent.application_purpose) || '',
|
|
|
|
|
application_reason: (this.packageData.parent && this.packageData.parent.application_reason) || '',
|
|
|
|
|
project_content: (this.packageData.parent && this.packageData.parent.project_content) || ''
|
|
|
|
|
if (this.packageData.level == 2) {
|
|
|
|
|
this.parentSubmissionInfo = {
|
|
|
|
|
application_basis: (this.packageData.application_basis) || '',
|
|
|
|
|
application_purpose: (this.packageData.application_purpose) || '',
|
|
|
|
|
application_reason: (this.packageData.application_reason) || '',
|
|
|
|
|
project_content: (this.packageData.project_content) || ''
|
|
|
|
|
}
|
|
|
|
|
} else if (this.packageData.level == 3) {
|
|
|
|
|
this.parentSubmissionInfo = {
|
|
|
|
|
application_basis: (this.packageData.parent.submission && this.packageData.parent.submission.application_basis) || '',
|
|
|
|
|
application_purpose: (this.packageData.parent.submission && this.packageData.parent.submission.application_purpose) || '',
|
|
|
|
|
application_reason: (this.packageData.parent.submission && this.packageData.parent.submission.application_reason) || '',
|
|
|
|
|
project_content: (this.packageData.parent.submission && this.packageData.parent.submission.project_content) || ''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 调试信息
|
|
|
|
|
|