Commit 6d805f8f authored by 徐俊's avatar 徐俊

xujun

parent 3e852170
......@@ -146,7 +146,7 @@ export default {
}
},
created() {
//this.calTotalFee()
this.calTotalFee()
},
methods: {
FeeChange (index) {
......@@ -177,6 +177,16 @@ export default {
this.FeeChange(index)
},
calTotalFee() {
if (!this.budgetList || this.budgetList.length < 9) {
this.totalYearValue1 = 0
this.totalYearValue2 = 0
this.totalYearValue3 = 0
this.totalYearValue4 = 0
this.totalYearValue5 = 0
this.totalFee = 0
return
}
this.totalYearValue1 = this.budgetList[0].yearValue1 + this.budgetList[1].yearValue1 + this.budgetList[2].yearValue1 + this.budgetList[8].yearValue1
this.totalYearValue2 = this.budgetList[0].yearValue2 + this.budgetList[1].yearValue2 + this.budgetList[2].yearValue2 + this.budgetList[8].yearValue2
this.totalYearValue3 = this.budgetList[0].yearValue3 + this.budgetList[1].yearValue3 + this.budgetList[2].yearValue3 + this.budgetList[8].yearValue3
......@@ -250,7 +260,9 @@ export default {
budgetList: {
handler(budgetList) {
this.calTotalFee()
}
},
deep: true,
immediate: true // 新增
}
}
}
......
......@@ -142,6 +142,14 @@ export default {
this.FeeChange(index)
},
calTotalFee() {
if (!this.budgetList || this.budgetList.length < 9) {
this.totalYearValue1 = 0
this.totalYearValue2 = 0
this.totalYearValue3 = 0
this.totalFee = 0
return
}
this.totalYearValue1 = this.budgetList[0].yearValue1 + this.budgetList[1].yearValue1 + this.budgetList[2].yearValue1 + this.budgetList[8].yearValue1
this.totalYearValue2 = this.budgetList[0].yearValue2 + this.budgetList[1].yearValue2 + this.budgetList[2].yearValue2 + this.budgetList[8].yearValue2
this.totalYearValue3 = this.budgetList[0].yearValue3 + this.budgetList[1].yearValue3 + this.budgetList[2].yearValue3 + this.budgetList[8].yearValue3
......@@ -206,7 +214,9 @@ export default {
budgetList: {
handler(budgetList) {
this.calTotalFee()
}
},
deep: true,
immediate: true // 新增
}
}
}
......
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