开始日期不能大于或等于结束日期!

This commit is contained in:
shijingjing
2022-07-18 11:35:11 +08:00
parent 1f729bf860
commit d6997d515b
2 changed files with 20 additions and 7 deletions

View File

@@ -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()
},