diff --git a/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue b/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue index d3ab2be5..c2815b6b 100644 --- a/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue +++ b/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue @@ -113,8 +113,7 @@ export default { // console.log(res); }) }, - - filterBtn() {}, + reset() { this.startTime = '', this.endTime = '' @@ -122,6 +121,15 @@ export default { selectConfirm() { this.start = this.startTime, this.end = this.endTime + let startTmp = this.start.split("-"); + let endTmp = this.end.split("-"); + let stT = new Date(startTmp[0], startTmp[1], startTmp[2]); + let edT = new Date(endTmp[0], endTmp[1], endTmp[2]); + if (stT.getTime() >= edT.getTime()) { + this.$u.toast("开始日期不能大于或等于结束日期!"); + this.filterShow = true + return + } this.filterShow = false this.getList() }, diff --git a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue index 0556722a..8ceb01ee 100644 --- a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue +++ b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue @@ -281,8 +281,6 @@ export default { onShow() { document.title = "宣发统计"; - }, - created() { this.getBrokenDate(); this.getData(); this.getColData(); @@ -301,7 +299,6 @@ export default { if (index == 3) { this.timeSelect = index; this.customShow = true; - this.showStart = false; this.showEnd = false; } else { @@ -326,11 +323,10 @@ export default { this.detailType = this.timeSelect; this.start = this.startTime; this.end = this.endTime; - this.getBrokenDate(); } else { this.detailType = this.timeSelect; - this.getBrokenDate(); } + this.getBrokenDate(); this.filterShow = false; }, @@ -344,6 +340,15 @@ export default { handleTime() { this.start = this.startTime; this.end = this.endTime; + let startTmp = this.start.split("-"); + let endTmp = this.end.split("-"); + let stT = new Date(startTmp[0], startTmp[1], startTmp[2]); + let edT = new Date(endTmp[0], endTmp[1], endTmp[2]); + if (stT.getTime() >= edT.getTime()) { + this.$u.toast("开始日期不能大于或等于结束日期!"); + this.customShow = true + return + } this.customShow = false; },