Commit 8c66eed9 authored by wangxl's avatar wangxl

11

parents 03ee5d29 69ade2cb
...@@ -3,64 +3,63 @@ ...@@ -3,64 +3,63 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<div class="tb-title"> <div class="tb-title">
<span>项目经费 <strong>(单位:万元)</strong></span> <span>项目经费预算表 <strong>(金额单位:万元)</strong></span>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row type="flex" class="item_inner">
<a-col :span="6" class="bg-gray"> <a-col :span="6" class="bg-gray">
预算科目 <div class="special-middle">
<div>预算科目</div>
</div>
</a-col> </a-col>
<a-col :span="3" class="bg-gray"> <a-col :span="3" class="bg-gray">
总预算数 <div class="special-middle">
<div>总预算数</div>
</div>
</a-col> </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>
<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>
<a-col :span="5" class="bg-gray"> <a-col :span="9" class="bg-gray">
备注 <div class="special-middle">
<div>备注</div>
</div>
</a-col> </a-col>
</a-row> </a-row>
<template v-for="(item, index) in budget"> <a-row v-for="(item, index) in budget" :key="index" type="flex" class="item_inner">
<a-row :key="'budget' + index" v-if="item.type ==='count'"> <a-col :span="6" style="text-align: right;">
<a-col :span="6"> <div class="special-middle">{{ item.budgetName }}</div>
{{item.budgetName}}
</a-col> </a-col>
<a-col :span="3"> <a-col :span="3">
{{Count(item.source,'totalBudget',index)}} <div class="special-middle">{{parseFloat(item.totalBudget).toFixed(2)}}</div>
</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>
<a-col :span="3"> <a-col :span="3">
{{Count1(index, item.govBudget, item.unitBudget)}} <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>
<a-col :span="5"> <a-col :span="3">
<a-input-number v-model="item.govBudget" :min="0" :step="0.01" style="width: 80%" :disabled="item.disabled === 'unitBudget'" /> <a-form-model-item v-if="!invisibleSelfFunds.includes(index)" :prop="'budget.' + index + '.selfFunds'" :rules="{required: true, message: '*', trigger: 'blur',}">
</a-col> <a-input-number v-model="item.selfFunds" @change="outNumberChange(index)" :min="0" :step="0.01" style="width: 80%" />
<a-col :span="5"> </a-form-model-item>
<a-input-number v-model="item.unitBudget" :min="0" :step="0.01" style="width: 80%" :disabled="item.disabled === 'govBudget'" /> <div class="special-middle" v-else>{{parseFloat(item.selfFunds).toFixed(2)}}</div>
</a-col> </a-col>
<a-col :span="5"> <a-col :span="9">
<a-input v-model="item.remark" :maxLength="100" style="width: 80%;" /> <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-col>
</a-row> </a-row>
</template>
</div> </div>
</template> </template>
<script> <script>
...@@ -69,46 +68,50 @@ export default { ...@@ -69,46 +68,50 @@ export default {
name: "BudgetEdit", name: "BudgetEdit",
data() { data() {
return { return {
// budget: this.value, invisibleTotalBudget: [],
invisibleApplyFunds: [0, 3, 4],
invisibleSelfFunds: [0, 3, 4],
}; };
}, },
props: { props: {
budget: { budget: {
type: Array, type: Array,
default: () => { default: () => {
return [] return [];
}
}, },
}, },
created() {
}, },
created() {},
methods: { methods: {
// 计算经费合计数值 //资金来源计算
Count(source, type, index) { calFundFrom() {
if (!source || !source.length) { this.budget[0].applyFunds = this.budget[1].applyFunds + this.budget[2].applyFunds
return 0 this.budget[0].selfFunds = this.budget[1].selfFunds + this.budget[2].selfFunds
} this.calRowTotalAmount(0)
let govBudget = 0, unitBudget = 0 },
source.forEach(i => { //资金支出计算
govBudget = govBudget + this.budget[i].govBudget calFundPayment() {
unitBudget = unitBudget + this.budget[i].unitBudget this.budget[3].applyFunds = this.budget[4].applyFunds + this.budget[8].applyFunds
}) this.budget[3].selfFunds = this.budget[4].selfFunds + this.budget[8].selfFunds
if (type === 'govBudget') { this.calRowTotalAmount(3)
this.budget[index].govBudget = govBudget.toFixed(2) },
return govBudget.toFixed(2) //直接费计算
} else if (type === 'unitBudget') { calDirectFee() {
this.budget[index].unitBudget = unitBudget.toFixed(2) this.budget[4].applyFunds = this.budget[5].applyFunds + this.budget[6].applyFunds + this.budget[7].applyFunds
return unitBudget.toFixed(2) this.budget[4].selfFunds = this.budget[5].selfFunds + this.budget[6].selfFunds + this.budget[7].selfFunds
} else { this.calRowTotalAmount(4)
this.budget[index].totalBudget = (govBudget + unitBudget).toFixed(2) },
return (govBudget + unitBudget).toFixed(2) 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> </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,7 +597,11 @@ ...@@ -597,7 +597,11 @@
</a-row> </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" /> <project-sub-edit :projectSubList.sync="formData.projectSubList" />
...@@ -619,6 +623,8 @@ import baseSelect from '@/views/components/common/baseSelect' ...@@ -619,6 +623,8 @@ import baseSelect from '@/views/components/common/baseSelect'
import projectMemberEdit from '@/views/report/project/components/projectMemberEdit' import projectMemberEdit from '@/views/report/project/components/projectMemberEdit'
import cooperativeUnits from '@/views/report/project/components/cooperativeUnits' import cooperativeUnits from '@/views/report/project/components/cooperativeUnits'
import budgetEdit from '@/views/report/project/components/budgetEdit' 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 projectSubEdit from '@/views/report/project/components/projectSubEdit'
import managementRuleEdit from '@/views/report/project/components/managementRuleEdit' import managementRuleEdit from '@/views/report/project/components/managementRuleEdit'
import fileEdit from '@/views/report/project/components/fileEdit' import fileEdit from '@/views/report/project/components/fileEdit'
...@@ -635,7 +641,7 @@ const File = { fileName: '', downloadUrl: '', fileExplain: '', downloadId: '' } ...@@ -635,7 +641,7 @@ const File = { fileName: '', downloadUrl: '', fileExplain: '', downloadId: '' }
export default { export default {
name: 'projectEdit', name: 'projectEdit',
components: { components: {
paraMultiSelect, paraSelect, baseSelect, projectMemberEdit, cooperativeUnits, budgetEdit, projectSubEdit, managementRuleEdit, fileEdit paraMultiSelect, paraSelect, baseSelect, projectMemberEdit, cooperativeUnits, budgetEdit, fundPlanEdit, equipmentsEdit, projectSubEdit, managementRuleEdit, fileEdit
}, },
props: { props: {
value: { value: {
...@@ -694,6 +700,7 @@ export default { ...@@ -694,6 +700,7 @@ export default {
cooperativeUnits: [], cooperativeUnits: [],
members: [], members: [],
budget: [], budget: [],
fundPlan:[],
equipments: [], equipments: [],
projectSubList: [], projectSubList: [],
managementRuleList: [], 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