|
@@ -40,11 +40,14 @@ export default {
|
|
|
},
|
|
|
created(){
|
|
|
getThisYearPay({token:config.token}).then(res=>{
|
|
|
- if(res.Code == 200){
|
|
|
+ if(res.Code == 200){
|
|
|
+ var currentMonth = new Date().getMonth() + 1
|
|
|
this.curYearPay = parseFloat(res.Result.ThisYearPay)
|
|
|
this.curMonthPay = parseFloat(res.Result.ThismonthPay === '' ? 0 : res.Result.ThismonthPay)
|
|
|
- this.nextMonthPay = parseFloat(res.Result.lastmonthPay)
|
|
|
- this.beforeNextMonthPay = (this.curYearPay - this.curMonthPay - this.nextMonthPay).toFixed(2)
|
|
|
+ if (currentMonth != 1) {
|
|
|
+ this.nextMonthPay = parseFloat(res.Result.lastmonthPay || 0) //上月收费
|
|
|
+ this.beforeNextMonthPay = (this.curYearPay - this.curMonthPay - this.nextMonthPay).toFixed(2)
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|