Commit bab4a7eb authored by wangxl's avatar wangxl

55

parent dcec4a2d
<template>
<div>
<a-row>
<a-col :span="24">
<div class="tb-title">
<span>项目经费 <strong>(单位:万元)</strong></span>
</div>
</a-col>
</a-row>
<a-row>
<a-col :span="6" class="bg-gray">
预算科目
</a-col>
<a-col :span="3" class="bg-gray">
总预算数
</a-col>
<a-col :span="5" class="bg-gray">
省级财政资金
</a-col>
<a-col :span="5" class="bg-gray">
自筹资金
</a-col>
<a-col :span="5" class="bg-gray">
备注
</a-col>
</a-row>
<div v-for="(item, index) in budget" :key="'budget' + index" class="row_center">
<a-row v-if="item.type ==='count'">
<a-col :span="6" :style="'text-align: left;padding-left:'+left(item.level)+'px'">
{{item.budgetName}}
</a-col>
<a-col :span="3">
{{Count(item.source,'totalBudget',index)}}
</a-col>
<a-col :span="5">
<span v-if="!!!item.show||item.show === 'applyFunds'">{{Count(item.source,'applyFunds',index)}}</span>
</a-col>
<a-col :span="5">
{{Count(item.source,'selfFunds',index)}}
</a-col>
<a-col :span="5">
<a-input v-model="item.calculationBasis" :maxLength="100" style="width: 80%;" />
</a-col>
</a-row>
<a-row v-else>
<a-col :span="6" :style="'text-align: left;padding-left:'+left(item.level)+'px'">
{{item.budgetName}}
</a-col>
<a-col :span="3">
{{Count1(index, item.applyFunds, item.selfFunds)}}
</a-col>
<a-col :span="5">
<a-input-number v-model="item.applyFunds" :min="0" :step="0.01" style="width: 80%" v-if="!!!item.show||item.show === 'applyFunds'" />
</a-col>
<a-col :span="5">
<a-input-number v-model="item.selfFunds" :min="0" :step="0.01" style="width: 80%" v-if="!!!item.show||item.show === 'selfFunds'" />
</a-col>
<a-col :span="5">
<a-input v-model="item.calculationBasis" :maxLength="100" style="width: 80%;" />
</a-col>
</a-row>
</div>
</div>
</template>
<script>
import { budgetList } from "@/views/report/project/config"
export default {
name: "fundEdit",
data () {
return {
budget: budgetList()
};
},
props: {
// budget: {
// type: Array,
// default: () => {
// return []
// }
// },
},
created () {
},
methods: {
Count (source, type, index) {
if (!source || !source.length) {
return 0.00
}
let applyFunds = 0.00
let selfFunds = 0.00
source.forEach(i => {
applyFunds = parseFloat(applyFunds + this.budget[i].applyFunds)
selfFunds = parseFloat(selfFunds + this.budget[i].selfFunds)
})
if (type === 'applyFunds') {
this.budget[index].applyFunds = applyFunds.toFixed(2)
return applyFunds.toFixed(2)
} else if (type === 'selfFunds') {
this.budget[index].selfFunds = selfFunds.toFixed(2)
return selfFunds.toFixed(2)
} else {
this.budget[index].totalBudget = (applyFunds + selfFunds).toFixed(2)
return parseFloat(applyFunds + selfFunds).toFixed(2)
}
},
Count1 (index, applyFunds, selfFunds) {
this.budget[index].totalBudget = (applyFunds + selfFunds).toFixed(2)
return (applyFunds + selfFunds).toFixed(2)
},
left (l) {
switch (l) {
case 1:
return 4;
case 2:
return 12;
case 3:
return 20;
case 4:
return 30;
}
return 0;
}
},
};
</script>
......@@ -573,6 +573,9 @@
</template>
<script>
import fundEdit from '@/views/report/project/components/fundEdit'
import documentView from '@/views/components/common/documentView'
import previewFile from '@/views/components/common/previewFile'
import { getType } from '@/views/utils/auth'
......@@ -640,7 +643,7 @@ import cascaderSelect from '@/views/components/common/cascaderSelect'
export default {
name: 'projectEdit',
components: {
projectMemberEdit, cooperativeUnitsEdit, budgetEdit, fundPlanEdit, projectKpiEdit, fileEdit, previewFile, documentView, cascaderSelect, deviceEdit, projStageGoalsEdit, manufactureEdit, unitPaymentEdit, projectSubEdit, participateUnitsEdit
fundEdit, projectMemberEdit, cooperativeUnitsEdit, budgetEdit, fundPlanEdit, projectKpiEdit, fileEdit, previewFile, documentView, cascaderSelect, deviceEdit, projStageGoalsEdit, manufactureEdit, unitPaymentEdit, projectSubEdit, participateUnitsEdit
},
props: {
value: {
......
const budgetList = () => {
return [{
type: 'count',
id: '',
budgetId: '',
budgetName: '一、来源预算合计',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [1, 2],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(一)市卫健委科技经费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: 'govBudget'
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(二)单位自筹经费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: 'unitBudget'
}, {
type: 'count',
id: '',
budgetId: '',
budgetName: '二、支出预算合计',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(一)材料费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(二)测试化验加工费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(三)差旅费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(四)会议费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(五)培训费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(六)出版/文献/信息传播/知识产权事务费及翻译费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(七)专家咨询费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(八)劳务费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(九)管理费',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: ''
}, {
type: 'ins',
id: '',
budgetId: '',
budgetName: '(十)其他费用',
totalBudget: 0.00,
govBudget: 0.00,
unitBudget: 0.00,
remark: '',
// 数据总和来源
source: [],
disabled: ''
}]
return [
{
id: null,
level: 1,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe01",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "一、资金来源合计",
source: [1, 2],
show: null,
type: 'count'
},
{
id: null,
level: 2,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe02",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "(一)财政资金",
source: null,
show: 'applyFunds',
type: 'ins'
},
{
id: null,
level: 2,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe03",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "(二)自筹资金",
source: [3, 4, 5, 6],
show: 'selfFunds',
type: 'count'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe04",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "1.承担单位自有货币资金",
source: null,
show: 'selfFunds',
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe05",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "2.从银行获得的贷款",
source: null,
show: 'selfFunds',
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe06",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "3.其他财政拨款",
source: null,
show: 'selfFunds',
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe07",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "4.其他资金",
source: null,
show: 'selfFunds',
type: 'ins'
},
{
id: null,
level: 1,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe08",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "二、支出预算合计",
source: [8, 22],
show: null,
type: 'count'
},
{
id: null,
level: 2,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe09",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "(一)直接费用",
source: [9, 14, 15, 16, 17, 18, 19, 20, 21],
show: null,
type: 'count'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe10",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "1.设备费",
source: [10, 11, 12, 13],
show: null,
type: 'count'
},
{
id: null,
level: 4,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe11",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "(1)设备购置费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 4,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe12",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "(2)试制设备费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 4,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe13",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "(3)设备改造费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 4,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe14",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "(4)设备租赁费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe15",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "2.材料费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe16",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "3.燃料动力费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe17",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "4.测试化验加工费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe18",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "5.差旅费/会议费/国际合作交流费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe19",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "6.劳务费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe20",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "7.专家咨询费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe21",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "8.出版/文献/信息传播/知识产权\n事务费",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 3,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe22",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "9.其他支出",
source: null,
show: null,
type: 'ins'
},
{
id: null,
level: 2,
budgetId: "3b1f57d3-6aec-4129-aef5-702a1accfe23",
objectId: null,
totalBudget: 0.00,
applyFunds: 0.00,
selfFunds: 0.00,
calculationBasis: "",
budgetName: "(二)间接费用\r\n",
source: null,
show: null,
type: 'ins'
}
]
}
const titleList = [{ title: '主任医师', key: '0caa997f-e1d9-4412-9589-acc8ff7f5fb8' },
{ title: '主任技师', key: 'bc904c24-d2a1-4393-b693-047bd4f958ce' },
......
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