|
|
@@ -21,11 +21,17 @@
|
|
|
|
|
|
<view>
|
|
|
<view class="active-title-box">
|
|
|
- <picker mode="date" fields="year" @change="bindDateChange" class="picker-class" style="margin-left: 2%; width: 15%;">
|
|
|
- <view class="uni-input display-between items-center">{{dateYear}}年<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
|
|
|
+ <picker :range="arrayYear" :value="dateYear" @change="bindDateChange" class="picker-class" style="margin-left: 2%; width: 15%;">
|
|
|
+ <view class="uni-input display-between items-center">
|
|
|
+ <view>{{dateYear}}<text v-if="dateYear!=='全部'">年</text></view>
|
|
|
+ <image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image>
|
|
|
+ </view>
|
|
|
</picker>
|
|
|
<picker :range="arrayMonth" :value="dateMonth" @change="bindDateMonthChange" class="picker-class" style="margin-left: 2%; width: 10%;">
|
|
|
- <view class="uni-input display-between items-center" style="color: #707070;">{{dateMonth}}月<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
|
|
|
+ <view class="uni-input display-between items-center" style="color: #707070;">
|
|
|
+ <view>{{dateMonth}}<text v-if="dateMonth!=='全部'">月</text></view>
|
|
|
+ <image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image>
|
|
|
+ </view>
|
|
|
</picker>
|
|
|
<picker @change="bindPickerChange" :value="branchValue" :range="branchArray" :range-key="'name'">
|
|
|
<view class="uni-input">{{branchValue}}</view>
|
|
|
@@ -76,9 +82,10 @@ export default {
|
|
|
mixins: [MescrollMixin], // 使用mixin
|
|
|
data() {
|
|
|
return {
|
|
|
- dateYear:'全',
|
|
|
- dateMonth:'全',
|
|
|
- arrayMonth:["1", "2","3", "4","5", "6","7", "8","9", "10","11", "12"],
|
|
|
+ dateYear:'全部',
|
|
|
+ arrayYear:[],
|
|
|
+ dateMonth:'全部',
|
|
|
+ arrayMonth:['全部',"1","2","3","4","5","6","7","8","9","10","11","12"],
|
|
|
userHeadImg: getApp().globalData.user_headUrl,
|
|
|
userNickName:getApp().globalData.user_name,
|
|
|
userPhone:getApp().globalData.user_phone.substr(0, 3) + '****' + getApp().globalData.user_phone.substr(7),
|
|
|
@@ -97,8 +104,16 @@ export default {
|
|
|
onLoad(option) {
|
|
|
this.getUserInfoBranch()
|
|
|
this.getActiveInfoBranch()
|
|
|
+ this.makeYearArr()
|
|
|
},
|
|
|
methods: {
|
|
|
+ makeYearArr(){
|
|
|
+ let nowYear = new Date().getFullYear(),yearList = ['全部'];
|
|
|
+ for(let i = 0; i < 10 ; i ++){
|
|
|
+ yearList.push(nowYear--)
|
|
|
+ }
|
|
|
+ this.arrayYear = yearList;
|
|
|
+ },
|
|
|
pageRefresh(object) {
|
|
|
if (object) {
|
|
|
this.getActiveList(this.branchId)
|
|
|
@@ -216,7 +231,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
bindDateChange(e){
|
|
|
- this.dateYear = e.target.value;
|
|
|
+ this.dateYear = this.arrayYear[e.target.value];
|
|
|
this.getActiveList(this.branchId)
|
|
|
},
|
|
|
bindDateMonthChange(e){
|