|
@@ -13,7 +13,14 @@
|
|
|
<slot>
|
|
<slot>
|
|
|
|
|
|
|
|
<view class="select-item-box">
|
|
<view class="select-item-box">
|
|
|
- <view class="title">按月份</view>
|
|
|
|
|
|
|
+ <view class="title">选日期</view>
|
|
|
|
|
+ <view class="item-child_box" >
|
|
|
|
|
+ <view class="admin-button-com mini-btn default custom" @click="showDatePicker(2)">{{startDate || '选择日期'}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="select-item-box">
|
|
|
|
|
+ <view class="title">选月份</view>
|
|
|
<picker mode="date" :value="date" :start="startDate" :end="endDate" fields="month" @change="bindMonthChange" >
|
|
<picker mode="date" :value="date" :start="startDate" :end="endDate" fields="month" @change="bindMonthChange" >
|
|
|
<view class="item-child_box">
|
|
<view class="item-child_box">
|
|
|
<view class="admin-button-com mini-btn default custom" >{{showMonth||'选择月份'}}</view>
|
|
<view class="admin-button-com mini-btn default custom" >{{showMonth||'选择月份'}}</view>
|
|
@@ -22,7 +29,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="select-item-box">
|
|
<view class="select-item-box">
|
|
|
- <view class="title">快捷</view>
|
|
|
|
|
|
|
+ <view class="title">快捷选项</view>
|
|
|
<view class="item-child_box">
|
|
<view class="item-child_box">
|
|
|
<button
|
|
<button
|
|
|
v-for="(item,index) in getDictionariesInfo.dateDefaultOption"
|
|
v-for="(item,index) in getDictionariesInfo.dateDefaultOption"
|
|
@@ -35,7 +42,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="select-item-box">
|
|
<view class="select-item-box">
|
|
|
- <view class="title">自定义</view>
|
|
|
|
|
|
|
+ <view class="title">选时段</view>
|
|
|
<view class="item-child_box" >
|
|
<view class="item-child_box" >
|
|
|
<view class="admin-button-com mini-btn default custom" @click="showDatePicker(0)">{{startDate || '选择开始日期'}}</view>
|
|
<view class="admin-button-com mini-btn default custom" @click="showDatePicker(0)">{{startDate || '选择开始日期'}}</view>
|
|
|
<view class="admin-button-com mini-btn default custom" @click="showDatePicker(1)">{{endDate || '选择结束日期'}}</view>
|
|
<view class="admin-button-com mini-btn default custom" @click="showDatePicker(1)">{{endDate || '选择结束日期'}}</view>
|
|
@@ -128,12 +135,18 @@ export default {
|
|
|
this.dateIndex = index
|
|
this.dateIndex = index
|
|
|
},
|
|
},
|
|
|
confirmPicker(e) {//选择
|
|
confirmPicker(e) {//选择
|
|
|
- if(this.dateIndex == 0){
|
|
|
|
|
|
|
+ this.showPicker = false;
|
|
|
|
|
+ if(this.dateIndex == 0){
|
|
|
|
|
+ this.startDate = e.value
|
|
|
|
|
+ }else if(this.dateIndex == 1){
|
|
|
|
|
+ this.endDate = e.value
|
|
|
|
|
+ }else if(this.dateIndex == 2){
|
|
|
this.startDate = e.value
|
|
this.startDate = e.value
|
|
|
- }else{
|
|
|
|
|
this.endDate = e.value
|
|
this.endDate = e.value
|
|
|
- }
|
|
|
|
|
- this.showPicker = false;
|
|
|
|
|
|
|
+ this.customDateConfirm()
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.endDate = e.value
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
customDateConfirm() {
|
|
customDateConfirm() {
|
|
|
if(this.$util.isEmpty(this.startDate)){
|
|
if(this.$util.isEmpty(this.startDate)){
|
|
@@ -145,7 +158,7 @@ export default {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
this.dropdownShow = false
|
|
this.dropdownShow = false
|
|
|
- this.defaultDateName = '自定义'
|
|
|
|
|
|
|
+ this.defaultDateName = this.startDate == this.endDate ? this.startDate : '选时段'
|
|
|
this.$emit('selectDateFn',{searchTime:'custom',startTime:this.startDate,endTime:this.endDate})
|
|
this.$emit('selectDateFn',{searchTime:'custom',startTime:this.startDate,endTime:this.endDate})
|
|
|
},
|
|
},
|
|
|
cancelPicker(){
|
|
cancelPicker(){
|