Commit 6065f9d5 authored by 徐俊's avatar 徐俊

xujun

parent 23317b61
......@@ -69,8 +69,8 @@ export default {
data() {
return {
invisibleTotalBudget: [],
invisibleApplyFunds: [0, 2, 3, 4],
invisibleSelfFunds: [0, 1, 3, 4],
invisibleApplyFunds: [0, 2, 3, 4, 5, 6, 7, 8, 9],
invisibleSelfFunds: [0, 1, 2, 7, 8, 9],
};
},
props: {
......@@ -83,35 +83,81 @@ export default {
},
created() {},
methods: {
//资金来源计算
// //资金来源计算
// 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('资金支出总数不能大于资金来源总数!')
// },
//一、资金来源合计
calTotalFund() {
this.budget[0].totalBudget = this.budget[0].applyFunds + this.budget[0].selfFunds
},
//(一)财政资金
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)
this.budget[0].applyFunds = this.budget[1].applyFunds
},
//资金支出计算
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)
//(二)自筹资金
calSelfFee() {
this.budget[2].selfFunds = this.budget[3].selfFunds + this.budget[4].selfFunds + this.budget[5].selfFunds + this.budget[6].selfFunds
this.budget[0].selfFunds = this.budget[2].selfFunds
this.calRowTotalAmount(2)
},
//1.设备费
calEquipment() {
this.budget[9].applyFunds = this.budget[10].applyFunds + this.budget[11].applyFunds + this.budget[12].applyFunds + this.budget[13].applyFunds
this.budget[9].selfFunds = this.budget[10].selfFunds + this.budget[11].selfFunds + this.budget[12].selfFunds + this.budget[13].selfFunds
this.calRowTotalAmount(9)
},
//直接费计算
//(一)直接费用
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)
this.calEquipment()
this.budget[8].applyFunds = this.budget[9].applyFunds + this.budget[14].applyFunds + this.budget[15].applyFunds + this.budget[16].applyFunds + this.budget[17].applyFunds + this.budget[18].applyFunds + this.budget[19].applyFunds + this.budget[20].applyFunds + this.budget[21].applyFunds
this.budget[8].selfFunds = this.budget[9].selfFunds + this.budget[14].selfFunds + this.budget[15].selfFunds + this.budget[16].selfFunds + this.budget[17].selfFunds + this.budget[18].selfFunds + this.budget[19].selfFunds + this.budget[20].selfFunds + this.budget[21].selfFunds
this.calRowTotalAmount(8)
},
//二、支出预算合计
calFundPayment() {
this.calDirectFee()
this.budget[7].applyFunds = this.budget[8].applyFunds + this.budget[22].applyFunds
this.budget[7].selfFunds = this.budget[8].selfFunds + this.budget[22].selfFunds
this.calRowTotalAmount(7)
},
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.calSelfFee()
this.calTotalFund()
this.calFundPayment()
if (this.budget[0].totalBudget < this.budget[7].totalBudget)
this.$message.info('资金支出总数不能大于资金来源总数!')
},
}
},
};
</script>
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