Commit 8c66eed9 authored by wangxl's avatar wangxl

11

parents 03ee5d29 69ade2cb
......@@ -3,64 +3,63 @@
<a-row>
<a-col :span="24">
<div class="tb-title">
<span>项目经费 <strong>(单位:万元)</strong></span>
<span>项目经费预算表 <strong>(金额单位:万元)</strong></span>
</div>
</a-col>
</a-row>
<a-row>
<a-row type="flex" class="item_inner">
<a-col :span="6" class="bg-gray">
预算科目
<div class="special-middle">
<div>预算科目</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
总预算数
<div class="special-middle">
<div>总预算数</div>
</div>
</a-col>
<a-col :span="5" class="bg-gray">
市卫健委科技经费
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>省级财政资金</div>
</div>
</a-col>
<a-col :span="5" class="bg-gray">
单位自筹经费
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>自筹资金</div>
</div>
</a-col>
<a-col :span="5" class="bg-gray">
备注
<a-col :span="9" class="bg-gray">
<div class="special-middle">
<div>备注</div>
</div>
</a-col>
</a-row>
<template v-for="(item, index) in budget">
<a-row :key="'budget' + index" v-if="item.type ==='count'">
<a-col :span="6">
{{item.budgetName}}
</a-col>
<a-col :span="3">
{{Count(item.source,'totalBudget',index)}}
</a-col>
<a-col :span="5">
{{Count(item.source,'govBudget',index)}}
</a-col>
<a-col :span="5">
{{Count(item.source,'unitBudget',index)}}
</a-col>
<a-col :span="5">
<a-input v-model="item.remark" :maxLength="100" style="width: 80%;" />
</a-col>
</a-row>
<a-row :key="'budget' + index" v-else>
<a-col :span="6">
{{item.budgetName}}
</a-col>
<a-col :span="3">
{{Count1(index, item.govBudget, item.unitBudget)}}
</a-col>
<a-col :span="5">
<a-input-number v-model="item.govBudget" :min="0" :step="0.01" style="width: 80%" :disabled="item.disabled === 'unitBudget'" />
</a-col>
<a-col :span="5">
<a-input-number v-model="item.unitBudget" :min="0" :step="0.01" style="width: 80%" :disabled="item.disabled === 'govBudget'" />
</a-col>
<a-col :span="5">
<a-input v-model="item.remark" :maxLength="100" style="width: 80%;" />
</a-col>
</a-row>
</template>
<a-row v-for="(item, index) in budget" :key="index" type="flex" class="item_inner">
<a-col :span="6" style="text-align: right;">
<div class="special-middle">{{ item.budgetName }}</div>
</a-col>
<a-col :span="3">
<div class="special-middle">{{parseFloat(item.totalBudget).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<a-form-model-item v-if="!invisibleApplyFunds.includes(index)" :prop="'budget.' + index + '.applyFunds'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.applyFunds" @change="outNumberChange(index)" :min="0" :step="0.01" style="width: 80%" />
</a-form-model-item>
<div class="special-middle" v-else>{{parseFloat(item.applyFunds).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<a-form-model-item v-if="!invisibleSelfFunds.includes(index)" :prop="'budget.' + index + '.selfFunds'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.selfFunds" @change="outNumberChange(index)" :min="0" :step="0.01" style="width: 80%" />
</a-form-model-item>
<div class="special-middle" v-else>{{parseFloat(item.selfFunds).toFixed(2)}}</div>
</a-col>
<a-col :span="9">
<a-form-model-item :prop="'budget.' + index + '.calculationBasis'">
<a-input v-model="item.calculationBasis" :maxLength="100" style="width: 90%;" />
</a-form-model-item>
</a-col>
</a-row>
</div>
</template>
<script>
......@@ -69,46 +68,50 @@ export default {
name: "BudgetEdit",
data() {
return {
// budget: this.value,
invisibleTotalBudget: [],
invisibleApplyFunds: [0, 3, 4],
invisibleSelfFunds: [0, 3, 4],
};
},
props: {
budget: {
type: Array,
default: () => {
return []
}
return [];
},
},
},
created() {
},
created() {},
methods: {
// 计算经费合计数值
Count(source, type, index) {
if (!source || !source.length) {
return 0
}
let govBudget = 0, unitBudget = 0
source.forEach(i => {
govBudget = govBudget + this.budget[i].govBudget
unitBudget = unitBudget + this.budget[i].unitBudget
})
if (type === 'govBudget') {
this.budget[index].govBudget = govBudget.toFixed(2)
return govBudget.toFixed(2)
} else if (type === 'unitBudget') {
this.budget[index].unitBudget = unitBudget.toFixed(2)
return unitBudget.toFixed(2)
} else {
this.budget[index].totalBudget = (govBudget + unitBudget).toFixed(2)
return (govBudget + unitBudget).toFixed(2)
}
//资金来源计算
calFundFrom() {
this.budget[0].applyFunds = this.budget[1].applyFunds + this.budget[2].applyFunds
this.budget[0].selfFunds = this.budget[1].selfFunds + this.budget[2].selfFunds
this.calRowTotalAmount(0)
},
//资金支出计算
calFundPayment() {
this.budget[3].applyFunds = this.budget[4].applyFunds + this.budget[8].applyFunds
this.budget[3].selfFunds = this.budget[4].selfFunds + this.budget[8].selfFunds
this.calRowTotalAmount(3)
},
//直接费计算
calDirectFee() {
this.budget[4].applyFunds = this.budget[5].applyFunds + this.budget[6].applyFunds + this.budget[7].applyFunds
this.budget[4].selfFunds = this.budget[5].selfFunds + this.budget[6].selfFunds + this.budget[7].selfFunds
this.calRowTotalAmount(4)
},
calRowTotalAmount(index) {
this.budget[index].totalBudget = this.budget[index].applyFunds + this.budget[index].selfFunds
},
outNumberChange (index) {
this.calRowTotalAmount(index)
this.calDirectFee()
this.calFundPayment()
this.calFundFrom()
if (this.budget[0].totalBudget < this.budget[3].totalBudget)
this.$message.info('资金支出总数不能大于资金来源总数!')
},
Count1(index, govBudget, unitBudget) {
this.budget[index].totalBudget = (govBudget + unitBudget).toFixed(2)
return (govBudget + unitBudget).toFixed(2)
}
},
};
</script>
<template>
<div>
<a-row>
<a-col :span="24">
<div class="tb-title">
<span>项目经费预算表 <strong>(金额单位:万元)</strong></span>
</div>
</a-col>
</a-row>
<a-row type="flex" class="item_inner">
<a-col :span="6" class="bg-gray">
<div class="special-middle">
<div>预算科目</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>总预算数</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>省级财政资金</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>自筹资金</div>
</div>
</a-col>
<a-col :span="9" class="bg-gray">
<div class="special-middle">
<div>备注</div>
</div>
</a-col>
</a-row>
<a-row v-for="(item, index) in budget" :key="index" type="flex" class="item_inner">
<a-col :span="6" style="text-align: right;">
<div class="special-middle">{{ item.budgetName }}</div>
</a-col>
<a-col :span="3">
<div class="special-middle">{{parseFloat(item.totalBudget).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<div class="special-middle">{{parseFloat(item.applyFunds).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<div class="special-middle">{{parseFloat(item.selfFunds).toFixed(2)}}</div>
</a-col>
<a-col :span="9">
<div class="special-middle">{{ item.calculationBasis }}</div>
</a-col>
</a-row>
</div>
</template>
<script>
// 用法 <budget-edit :budget.sync="formData.budget" />
export default {
name: "BudgetInfo",
data() {
return {
};
},
props: {
budget: {
type: Array,
default: () => {
return [];
},
},
},
created() {},
methods: {
},
};
</script>
\ No newline at end of file
<template>
<div>
<a-row type="flex" class="item_inner">
<a-col :span="24" class="bg-gray">
<div class="special-middle">
<div>设备费-购置设备预算明细表</div>
</div>
</a-col>
</a-row>
</div>
</template>
<script>
export default {
name: "EquipmentEdit",
data() {
return {};
},
props: {
equipments: {
type: Array,
default: () => {
return [];
},
},
},
methods: {},
};
</script>
\ No newline at end of file
<template>
<div>
<a-row type="flex" class="item_inner">
<a-col :span="6" class="bg-gray">
<div class="special-middle" style="text-align: right;">
<div>三、分年度用款计划</div>
</div>
</a-col>
<a-col :span="18" class="bg-gray">
<div class="special-middle">
<div></div>
</div>
</a-col>
</a-row>
<a-row type="flex" class="item_inner">
<a-col :span="6" class="bg-gray">
<div class="special-middle" style="text-align: right;">
<div>年度</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>第一年</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>第二年</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>第三年</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>第四年</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>第五年</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>合计</div>
</div>
</a-col>
</a-row>
<a-row v-for="(item, index) in fundPlan" :key="index" type="flex" class="item_inner">
<a-col :span="6" style="text-align: right;">
<div class="special-middle">{{ item.fundName }}</div>
</a-col>
<a-col :span="3">
<a-form-model-item v-if="!invisibleYearValue1.includes(index)" :prop="'fundPlan.' + index + '.yearValue1'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.yearValue1" @change="outNumberChange(index)" :min="0" :step="0.01" style="width: 80%" />
</a-form-model-item>
<div class="special-middle" v-else>{{parseFloat(item.yearValue1).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<a-form-model-item v-if="!invisibleYearValue2.includes(index)" :prop="'fundPlan.' + index + '.yearValue2'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.yearValue2" @change="outNumberChange(index)" :min="0" :step="0.01" style="width: 80%" />
</a-form-model-item>
<div class="special-middle" v-else>{{parseFloat(item.yearValue2).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<a-form-model-item v-if="!invisibleYearValue3.includes(index)" :prop="'fundPlan.' + index + '.yearValue3'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.yearValue3" @change="outNumberChange(index)" :min="0" :step="0.01" style="width: 80%" />
</a-form-model-item>
<div class="special-middle" v-else>{{parseFloat(item.yearValue3).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<a-form-model-item v-if="!invisibleYearValue4.includes(index)" :prop="'fundPlan.' + index + '.yearValue4'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.yearValue4" @change="outNumberChange(index)" :min="0" :step="0.01" style="width: 80%" />
</a-form-model-item>
<div class="special-middle" v-else>{{parseFloat(item.yearValue4).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<a-form-model-item v-if="!invisibleYearValue5.includes(index)" :prop="'fundPlan.' + index + '.yearValue5'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.yearValue5" @change="outNumberChange(index)" :min="0" :step="0.01" style="width: 80%" />
</a-form-model-item>
<div class="special-middle" v-else>{{parseFloat(item.yearValue5).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<a-form-model-item v-if="!invisibleTotalAmount.includes(index)" :prop="'fundPlan.' + index + '.totalAmount'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.totalAmount" @change="outNumberChange(index)" :min="0" :step="0.01" style="width: 80%" />
</a-form-model-item>
<div class="special-middle" v-else>{{parseFloat(item.totalAmount).toFixed(2)}}</div>
</a-col>
</a-row>
</div>
</template>
<script>
export default {
name: "FundPlanEdit",
data() {
return {
invisibleYearValue1: [0],
invisibleYearValue2: [0],
invisibleYearValue3: [0],
invisibleYearValue4: [0],
invisibleYearValue5: [0],
invisibleTotalAmount: [ 0, 1, 2 ],
};
},
props: {
fundPlan: {
type: Array,
default: () => {
return [];
},
},
},
created() {},
methods: {
calYearValue() {
this.fundPlan[0].yearValue1 = this.fundPlan[1].yearValue1 + this.fundPlan[2].yearValue1
this.fundPlan[0].yearValue2 = this.fundPlan[1].yearValue2 + this.fundPlan[2].yearValue2
this.fundPlan[0].yearValue3 = this.fundPlan[1].yearValue3 + this.fundPlan[2].yearValue3
this.fundPlan[0].yearValue4 = this.fundPlan[1].yearValue4 + this.fundPlan[2].yearValue4
this.fundPlan[0].yearValue5 = this.fundPlan[1].yearValue5 + this.fundPlan[2].yearValue5
},
outNumberChange(index) {
this.fundPlan[index].totalAmount = this.fundPlan[index].yearValue1 + this.fundPlan[index].yearValue2 + this.fundPlan[index].yearValue3 + this.fundPlan[index].yearValue4 + this.fundPlan[index].yearValue5
this.calYearValue()
this.fundPlan[0].totalAmount = this.fundPlan[0].yearValue1 + this.fundPlan[0].yearValue2 + this.fundPlan[0].yearValue3 + this.fundPlan[0].yearValue4 + this.fundPlan[0].yearValue5
},
},
};
</script>
\ No newline at end of file
<template>
<div>
<a-row type="flex" class="item_inner">
<a-col :span="6" class="bg-gray">
<div class="special-middle" style="text-align: right;">
<div>三、分年度用款计划</div>
</div>
</a-col>
<a-col :span="18" class="bg-gray">
<div class="special-middle">
<div></div>
</div>
</a-col>
</a-row>
<a-row type="flex" class="item_inner">
<a-col :span="6" class="bg-gray">
<div class="special-middle" style="text-align: right;">
<div>年度</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>第一年</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>第二年</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>第三年</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>第四年</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>第五年</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>合计</div>
</div>
</a-col>
</a-row>
<a-row v-for="(item, index) in fundPlan" :key="index" type="flex" class="item_inner">
<a-col :span="6" style="text-align: right;">
<div class="special-middle">{{ item.fundName }}</div>
</a-col>
<a-col :span="3">
<div class="special-middle">{{parseFloat(item.yearValue1).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<div class="special-middle">{{parseFloat(item.yearValue2).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<div class="special-middle">{{parseFloat(item.yearValue3).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<div class="special-middle">{{parseFloat(item.yearValue4).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<div class="special-middle">{{parseFloat(item.yearValue5).toFixed(2)}}</div>
</a-col>
<a-col :span="3">
<div class="special-middle">{{parseFloat(item.totalAmount).toFixed(2)}}</div>
</a-col>
</a-row>
</div>
</template>
<script>
export default {
name: "FundPlanInfo",
data() {
return {};
},
props: {
fundPlan: {
type: Array,
default: () => {
return [];
},
},
},
created() {},
methods: {},
};
</script>
\ No newline at end of file
......@@ -597,8 +597,12 @@
</a-row>
<!-- 经费预算 -->
<!-- <budget-edit :budget.sync="formData.budget" /> -->
<budget-edit :budget.sync="formData.budget" />
<!-- 分年度用款计划 -->
<fund-plan-edit :fundPlan.sync="formData.fundPlan"/>
<!-- 设备费-购置设备预算明细表 -->
<equipments-edit :equipments.sync="formData.equipments"/>
<!-- 项目课题设置 -->
<project-sub-edit :projectSubList.sync="formData.projectSubList" />
......@@ -619,6 +623,8 @@ import baseSelect from '@/views/components/common/baseSelect'
import projectMemberEdit from '@/views/report/project/components/projectMemberEdit'
import cooperativeUnits from '@/views/report/project/components/cooperativeUnits'
import budgetEdit from '@/views/report/project/components/budgetEdit'
import fundPlanEdit from '@/views/report/project/components/fundPlanEdit'
import equipmentsEdit from '@/views/report/project/components/equipmentsEdit.vue'
import projectSubEdit from '@/views/report/project/components/projectSubEdit'
import managementRuleEdit from '@/views/report/project/components/managementRuleEdit'
import fileEdit from '@/views/report/project/components/fileEdit'
......@@ -635,7 +641,7 @@ const File = { fileName: '', downloadUrl: '', fileExplain: '', downloadId: '' }
export default {
name: 'projectEdit',
components: {
paraMultiSelect, paraSelect, baseSelect, projectMemberEdit, cooperativeUnits, budgetEdit, projectSubEdit, managementRuleEdit, fileEdit
paraMultiSelect, paraSelect, baseSelect, projectMemberEdit, cooperativeUnits, budgetEdit, fundPlanEdit, equipmentsEdit, projectSubEdit, managementRuleEdit, fileEdit
},
props: {
value: {
......@@ -694,6 +700,7 @@ export default {
cooperativeUnits: [],
members: [],
budget: [],
fundPlan:[],
equipments: [],
projectSubList: [],
managementRuleList: [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment