|
@@ -1345,8 +1345,36 @@
|
|
|
})
|
|
|
},
|
|
|
getPassYearFormatDate() {
|
|
|
- if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
|
|
|
- var nowDate = new Date()
|
|
|
+ // if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
|
|
|
+ // var nowDate = new Date()
|
|
|
+ // var _date = new Date()
|
|
|
+ // nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
|
|
|
+ // var year = nowDate.getFullYear()
|
|
|
+ // var year1 = _date.getFullYear()
|
|
|
+ // var month = nowDate.getMonth() + 1
|
|
|
+ // var month1 = _date.getMonth() + 1
|
|
|
+ // var strDate = nowDate.getDate()
|
|
|
+ // var strDate1 = _date.getDate()
|
|
|
+ // if (month >= 1 && month <= 9) {
|
|
|
+ // month = '0' + month
|
|
|
+ // }
|
|
|
+ // if (month1 >= 1 && month1 <= 9) {
|
|
|
+ // month1 = '0' + month1
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (strDate >= 0 && strDate <= 9) {
|
|
|
+ // strDate = '0' + strDate
|
|
|
+ // }
|
|
|
+ // if (strDate1 >= 0 && strDate1 <= 9) {
|
|
|
+ // strDate1 = '0' + strDate1
|
|
|
+ // }
|
|
|
+ // this.startDate = year + '-' + month + '-' + strDate
|
|
|
+ // this.endDate = year1 + '-' + month1 + '-' + strDate1
|
|
|
+ // } else {
|
|
|
+ // this.startDate = localStorage.getItem('startDate')
|
|
|
+ // this.endDate = localStorage.getItem('endDate')
|
|
|
+ // }
|
|
|
+ var nowDate = new Date()
|
|
|
var _date = new Date()
|
|
|
nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
|
|
|
var year = nowDate.getFullYear()
|
|
@@ -1370,10 +1398,6 @@
|
|
|
}
|
|
|
this.startDate = year + '-' + month + '-' + strDate
|
|
|
this.endDate = year1 + '-' + month1 + '-' + strDate1
|
|
|
- } else {
|
|
|
- this.startDate = localStorage.getItem('startDate')
|
|
|
- this.endDate = localStorage.getItem('endDate')
|
|
|
- }
|
|
|
this.value2 = [this.startDate, this.endDate]
|
|
|
},
|
|
|
//收款截图
|