diff --git a/src/views/active/activity.vue b/src/views/active/activity.vue index da8e87b..8e4d3ef 100644 --- a/src/views/active/activity.vue +++ b/src/views/active/activity.vue @@ -540,11 +540,26 @@ } this.dialogFormVisible = true; + }, + compareDate (d1, d2) { + + let reg = new RegExp('-', 'g') + + return ((new Date(d1.replace(reg, '/'))) > (new Date(d2.replace(reg, '/')))) + }, submitForm(formName) { var that = this; - that.form.start_time = this.dateRange[0] - that.form.end_time = this.dateRange[1] + that.form.start_time = this.dateRange[0]; + that.form.end_time = this.dateRange[1]; + //比较预约截止不能大于活动开始时间 + let checktime = that.compareDate(that.form.start_time,that.form.end_plan); + if(!checktime){ + that.$message.error('截止时间不能晚于开始时间'); + return false; + } + // console.log(a) + // that.form.end_time = that.form.start_time.substring(0, 10) + " " + that.form.end_time; let listUrl = []; for (var m of that.bannersList) { diff --git a/src/views/order/activeorder.vue b/src/views/order/activeorder.vue index e65f485..bdcac1a 100644 --- a/src/views/order/activeorder.vue +++ b/src/views/order/activeorder.vue @@ -218,6 +218,18 @@ title: "类型", type: "type", align: "center" + }, + { + field: "total", + title: "人数", + type: "string", + align:"center" + }, + { + field: "created_at", + title: "下单时间", + type: "string", + align:"center" }, { field: "status", diff --git a/src/views/order/visitorder.vue b/src/views/order/visitorder.vue index 54062de..0d61424 100644 --- a/src/views/order/visitorder.vue +++ b/src/views/order/visitorder.vue @@ -26,6 +26,12 @@