From a5ffafdb1aea4f1a17c16f8998c3662f92976202 Mon Sep 17 00:00:00 2001
From: guoxing <1369478551@qq.com>
Date: Thu, 21 Dec 2023 09:29:25 +0800
Subject: [PATCH] 2023-12-21
---
src/views/marketingCard/pickupCardSet.vue | 41 ++++++++++++++++++++---
1 file changed, 37 insertions(+), 4 deletions(-)
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)