diff --git a/src/views/marketingCard/pickupCardSet.vue b/src/views/marketingCard/pickupCardSet.vue index 099f516..9992035 100644 --- a/src/views/marketingCard/pickupCardSet.vue +++ b/src/views/marketingCard/pickupCardSet.vue @@ -187,8 +187,7 @@
起始日期: + placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" class="item_input">
@@ -420,11 +419,45 @@ }, selectbatchInfo1(val) { console.log('selectbatchInfo1:', val) - this.batchInfo.startDate = val + + if(!this.batchInfo.endDate){ + this.batchInfo.startDate = val + }else{ + if(new Date(this.batchInfo.startDate).getTime()>new Date(this.batchInfo.endDate).getTime()){ + this.$message({ + showClose: true, + type: 'error', + message: '起始日期不能大于结束日期' + }) + this.batchInfo.startDate='' + }else{ + this.batchInfo.startDate = val + } + + } + + }, selectbatchInfo2(val) { console.log('selectbatchInfo2:', val) - this.batchInfo.endDate = val + + if(!this.batchInfo.startDate){ + this.batchInfo.endDate = val + }else{ + if(new Date(this.batchInfo.startDate).getTime()>new Date(this.batchInfo.endDate).getTime()){ + this.$message({ + showClose: true, + type: 'error', + message: '起始日期不能大于结束日期' + }) + this.batchInfo.endDate='' + }else{ + this.batchInfo.endDate = val + } + + } + + // this.batchInfo.endDate = val }, getPageList() { req.recordListPage(this.page)