| | |
| | | methods:{ |
| | | bindChange1 (e) { |
| | | this.tempStartDate = e.detail.value || null |
| | | if (this.tempStartDate && this.tempEndDate) { |
| | | if (new Date(this.tempStartDate + ' 00:00:00') > new Date(this.tempEndDate + ' 00:00:00')) { |
| | | this.tempStartDate = this.tempEndDate |
| | | uni.showToast({ title: '开始日期不能大于结束日期', icon: 'none' }) |
| | | } |
| | | } |
| | | }, |
| | | bindChange2 (e) { |
| | | this.tempEndDate= e.detail.value || null |
| | | this.tempEndDate = e.detail.value || null |
| | | if (this.tempStartDate && this.tempEndDate) { |
| | | if (new Date(this.tempStartDate + ' 00:00:00') > new Date(this.tempEndDate + ' 00:00:00')) { |
| | | this.tempEndDate = this.tempStartDate |
| | | uni.showToast({ title: '开始日期不能大于结束日期', icon: 'none' }) |
| | | } |
| | | } |
| | | }, |
| | | formatter(type, value) { |
| | | if (type === 'year') { |
| | |
| | | this.hasNext = true |
| | | this.dataList=[] |
| | | } |
| | | console.log('page') |
| | | console.log({ |
| | | startTime: this.startDate || this.defaultStartDate, |
| | | endTime: this.endDate || this.defaultEndDate, |
| | | type: this.type === 1?0:(this.type === 2?1:(this.type === 3?2:'')), |
| | | optType: this.active === 1?1:(this.active === 2?-1:'') |
| | | }) |
| | | this.$u.api.driverPage({ |
| | | capacity: 10, |
| | | model: { |
| | | startTime: this.startDate || this.defaultStartDate, |
| | | endTime: this.endDate || this.defaultEndDate, |
| | | type: this.active === 1?0:(this.active===2?1:''), |
| | | objType: this.type === 1?16:( this.type === 2?17:( this.type === 3?25: (this.type === 4?1: ''))), |
| | | type: this.type === 1?0:(this.type === 2?1:(this.type === 3?2:'')), |
| | | optType: this.active === 1?1:(this.active === 2?-1:'') |
| | | }, |
| | | page: this.currentPage |
| | | }).then(res => { |
| | |
| | | }, |
| | | comfirmDate(flag){ |
| | | if (flag) { |
| | | if (!this.tempStartDate || !this.tempEndDate) { |
| | | return uni.showToast({ |
| | | title: '请选择起止日期', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | if(new Date(this.tempEndDate+" 00:00:00").getTime() < new Date(this.tempStartDate+" 00:00:00").getTime()){ |
| | | return uni.showToast({ |
| | | title:'日期范围不正确', |
| | |
| | | } else { |
| | | this.startDate = null |
| | | this.endDate = null |
| | | this.tempStartDate = this.defaultStartDate |
| | | this.tempEndDate = this.defaultEndDate |
| | | this.tempStartDate = null |
| | | this.tempEndDate = null |
| | | } |
| | | this.getFirstPageData() |
| | | this.getShopSummary() |