From d6997d515bcd3c9d57515f2f9b4858398482b83f Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Mon, 18 Jul 2022 11:35:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=97=A5=E6=9C=9F=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=A4=A7=E4=BA=8E=E6=88=96=E7=AD=89=E4=BA=8E=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E6=97=A5=E6=9C=9F=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppCooperationPropaganda.vue | 12 ++++++++++-- .../AppPropagandaStatistics.vue | 15 ++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) 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; },