| | |
| | | countData: {}, |
| | | countDataList: {}, |
| | | hasNext: true, |
| | | loading: false, |
| | | show: false, |
| | | show1: false, |
| | | year: null, |
| | |
| | | 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 : '' |
| | | optType: this.active === 1 ? 1 : this.active === 2 ? -1 : '', |
| | | type: this.type === 1 ? 0 : this.type === 2 ? 1 : this.type === 4 ? 2 : '' |
| | | }, |
| | | page: this.currentPage |
| | | }).then(function (res) { |
| | |
| | | this.$u.api.shopSummary({ |
| | | 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 : '' |
| | | optType: this.active === 1 ? 1 : this.active === 2 ? -1 : '', |
| | | type: this.type === 1 ? 0 : this.type === 2 ? 1 : this.type === 4 ? 2 : '' |
| | | }).then(function (res) { |
| | | if (res.code == 200) { |
| | | _this2.countDataList = res.data; |
| | |
| | | }); |
| | | }, |
| | | comfirmDate: function comfirmDate(flag) { |
| | | var _this4 = this; |
| | | if (flag) { |
| | | if (new Date(this.tempEndDate + " 00:00:00").getTime() < new Date(this.tempStartDate + " 00:00:00").getTime()) { |
| | | if (!this.tempStartDate || !this.tempEndDate) { |
| | | return uni.showToast({ |
| | | title: '日期范围不正确', |
| | | icon: 'error' |
| | | title: '请选择开始和结束时间', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | if (new Date(this.tempEndDate + " 00:00:00").getTime() <= new Date(this.tempStartDate + " 00:00:00").getTime()) { |
| | | return uni.showToast({ |
| | | title: '开始时间必须小于截止时间', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | this.startDate = this.tempStartDate; |
| | | this.endDate = this.tempEndDate; |
| | | this.show1 = false; |
| | | setTimeout(function () { |
| | | _this4.getFirstPageData(); |
| | | }, 300); |
| | | } else { |
| | | this.startDate = null; |
| | | this.endDate = null; |
| | | this.tempStartDate = this.defaultStartDate; |
| | | this.tempEndDate = this.defaultEndDate; |
| | | this.tempStartDate = null; |
| | | this.tempEndDate = null; |
| | | this.show1 = false; |
| | | setTimeout(function () { |
| | | _this4.getFirstPageData(); |
| | | }, 300); |
| | | } |
| | | this.getFirstPageData(); |
| | | this.show1 = false; |
| | | }, |
| | | openShow: function openShow() { |
| | | this.tempActive = this.active; |
| | |
| | | this.show = true; |
| | | }, |
| | | comfirm: function comfirm(flag) { |
| | | var _this5 = this; |
| | | if (flag) { |
| | | this.active = this.tempActive; |
| | | this.type = this.tempType; |
| | | this.show = false; |
| | | this.wordsWidth = 250; |
| | | if (this.active === 0 && this.type === 0) { |
| | | this.words = '全部'; |
| | |
| | | } |
| | | this.words = t1 + t2; |
| | | } |
| | | this.getFirstPageData(); |
| | | this.show = false; |
| | | setTimeout(function () { |
| | | _this5.getFirstPageData(); |
| | | }, 300); |
| | | } else { |
| | | this.tempActive = 0; |
| | | this.tempType = 0; |
| | | this.active = 0; |
| | | this.type = 0; |
| | | this.words = '全部'; |
| | | this.show = false; |
| | | setTimeout(function () { |
| | | _this5.getFirstPageData(); |
| | | }, 300); |
| | | } |
| | | }, |
| | | formattedDateTime: function formattedDateTime(currentDate) { |
| | |
| | | getFirstPageData: function getFirstPageData() { |
| | | this.currentPage = 0; |
| | | this.hasNext = true; |
| | | this.loading = false; |
| | | this.total = 0; |
| | | this.dataList = []; |
| | | this.getShopPage(); |