|
@@ -149,12 +149,14 @@
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
- claimDate: '',
|
|
|
+ claimDate: [],
|
|
|
paymentDate:'',
|
|
|
listQuery1: {
|
|
|
page: 1,
|
|
|
size: 1000,
|
|
|
descs: 'id',
|
|
|
+ startTime:'',
|
|
|
+ endTime:''
|
|
|
},
|
|
|
personalStat:{
|
|
|
records:[]
|
|
@@ -162,6 +164,8 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ this.claimDate.push(this.getDefaultStartDate());
|
|
|
+ this.claimDate.push(this.getDefaultEndDate());
|
|
|
this.getPersonalStat();
|
|
|
},
|
|
|
methods: {
|
|
@@ -170,10 +174,29 @@
|
|
|
|
|
|
},
|
|
|
|
|
|
+ getDefaultStartDate() {
|
|
|
+ let currentDate = new Date();
|
|
|
+ let currentYear = currentDate.getFullYear();
|
|
|
+ var currentMonth = String(currentDate.getMonth()).padStart(2, "0");
|
|
|
+ if (currentMonth=='00'){
|
|
|
+ currentYear = currentYear-1;
|
|
|
+ currentMonth = 12
|
|
|
+ }
|
|
|
+ return currentYear + '-' + currentMonth + '-' + '23'
|
|
|
+ },
|
|
|
+
|
|
|
+ getDefaultEndDate() {
|
|
|
+ const currentDate = new Date();
|
|
|
+ const currentYear = currentDate.getFullYear();
|
|
|
+ var currentMonth = String(currentDate.getMonth() + 1).padStart(2, "0");
|
|
|
+ return currentYear + '-' + currentMonth + '-' + '22'
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
|
|
|
resetSearch1() {
|
|
|
this.$router.push({ query: {} });
|
|
|
- this.claimDate = '';
|
|
|
+ this.claimDate = [this.getDefaultStartDate(), this.getDefaultEndDate()];
|
|
|
this.paymentDate= '';
|
|
|
this.listQuery1 = {
|
|
|
current: 1,
|
|
@@ -203,8 +226,14 @@
|
|
|
},
|
|
|
|
|
|
getPersonalStat(){
|
|
|
+ let loadingInstance = this.$loading({ fullscreen: true });
|
|
|
+ if (this.claimDate) {
|
|
|
+ this.listQuery1.startTime = this.claimDate[0] + ' 00:00:00';
|
|
|
+ this.listQuery1.endTime = this.claimDate[1] + ' 23:59:59';
|
|
|
+ }
|
|
|
this.$api.financeClaim.getPersonalStat(this.listQuery1).then(res=>{
|
|
|
if (res.code === 200){
|
|
|
+ loadingInstance.close();
|
|
|
this.personalStat = res.data;
|
|
|
}
|
|
|
})
|