|
@@ -8,7 +8,9 @@
|
|
<div class="panlen">
|
|
<div class="panlen">
|
|
<div class="items">
|
|
<div class="items">
|
|
<div style="height: 2px;"></div>
|
|
<div style="height: 2px;"></div>
|
|
- {{datetime}}年度
|
|
|
|
|
|
+ <picker mode="date" :start="new Date(entryDate).getFullYear()" :end="new Date().getFullYear()" fields="year" :value="datetime" @change="DateChange">
|
|
|
|
+ {{datetime}}年度
|
|
|
|
+ </picker>
|
|
</div>
|
|
</div>
|
|
<div style="text-align: center;margin-top: 10px;">
|
|
<div style="text-align: center;margin-top: 10px;">
|
|
<span style="font-size: 13px;color: #FFFFFF;">历年年假剩余天数:</span><span style="margin-left:10px ;font-size: 13px;color: #FFFFFF;">{{lyearDay}}天</span>
|
|
<span style="font-size: 13px;color: #FFFFFF;">历年年假剩余天数:</span><span style="margin-left:10px ;font-size: 13px;color: #FFFFFF;">{{lyearDay}}天</span>
|
|
@@ -67,41 +69,47 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
userUrl:'/sys/weixin/myVacation',
|
|
userUrl:'/sys/weixin/myVacation',
|
|
- datetime:null,
|
|
|
|
|
|
+ datetime:new Date().getFullYear(),
|
|
yearDay:0,
|
|
yearDay:0,
|
|
lyearDay:0,
|
|
lyearDay:0,
|
|
txcount:0,
|
|
txcount:0,
|
|
|
|
+ entryDate:null,
|
|
availableDay:0,
|
|
availableDay:0,
|
|
data:[],
|
|
data:[],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- var date=new Date();
|
|
|
|
- this.datetime=date.getFullYear();
|
|
|
|
- var id=this.$store.getters.userid;
|
|
|
|
- var deptid=uni.getStorageSync('id');
|
|
|
|
- if(deptid!=null&&deptid!=""){
|
|
|
|
- id=deptid;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.$http.get(this.userUrl,{params:{userid:id}}).then(res=>{
|
|
|
|
- console.log(res);
|
|
|
|
- this.yearDay=res.data.yearCount;
|
|
|
|
- this.availableDay=res.data.syYearCount;
|
|
|
|
- this.txcount=res.data.txCount;
|
|
|
|
- this.lyearDay=res.data.lsyYearCount;
|
|
|
|
- if(""!=res.data.vacationsBody &&res.data.vacationsBody!=null){
|
|
|
|
- this.data=res.data.vacationsBody;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }).catch(err => {
|
|
|
|
- console.log(err);
|
|
|
|
- });
|
|
|
|
|
|
+ this.query();
|
|
|
|
|
|
},methods:{
|
|
},methods:{
|
|
-
|
|
|
|
|
|
+ query(){
|
|
|
|
+ var id=this.$store.getters.userid;
|
|
|
|
+ var deptid=uni.getStorageSync('id');
|
|
|
|
+ if(deptid!=null&&deptid!=""){
|
|
|
|
+ id=deptid;
|
|
|
|
+ }
|
|
|
|
+ this.$http.get(this.userUrl,{params:{userid:id,year:this.datetime}}).then(res=>{
|
|
|
|
+ this.yearDay=res.data.yearCount;
|
|
|
|
+ this.availableDay=res.data.syYearCount;
|
|
|
|
+ this.txcount=res.data.txCount;
|
|
|
|
+ this.lyearDay=res.data.lsyYearCount;
|
|
|
|
+ this.entryDate=res.data.entry;
|
|
|
|
+ if(""!=res.data.vacationsBody &&res.data.vacationsBody!=null){
|
|
|
|
+ this.data=res.data.vacationsBody;
|
|
|
|
+ }else{
|
|
|
|
+ this.data=[];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ console.log(err);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ DateChange(e) {
|
|
|
|
+ this.datetime = e.detail.value
|
|
|
|
+ this.query();
|
|
|
|
+ },
|
|
ret(){
|
|
ret(){
|
|
this.$Router.push({name:'index'})
|
|
this.$Router.push({name:'index'})
|
|
},
|
|
},
|