From c88fe3ea9fd8bd1ea556b4769a1a0cd6c9b5661d Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 05 三月 2025 11:38:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 admin/src/views/business/trainTime.vue |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/admin/src/views/business/trainTime.vue b/admin/src/views/business/trainTime.vue
index e8c8222..e240702 100644
--- a/admin/src/views/business/trainTime.vue
+++ b/admin/src/views/business/trainTime.vue
@@ -9,9 +9,13 @@
         <el-input v-model="searchForm.companyName" placeholder="璇疯緭鍏ョ粍缁囧悕绉�" @keypress.enter.native="search"></el-input>
       </el-form-item>
       <el-form-item label="鍩硅寮�濮嬫椂闂�" prop="eventType">
-        <el-date-picker @change="seleTime" v-model="time" type="datetimerange" format="yyyy-MM-dd HH:mm:ss"
+        <!-- <el-date-picker @change="seleTime" v-model="time" type="datetimerange" format="yyyy-MM-dd HH:mm:ss"
           value-format="yyyy-MM-dd HH:mm:ss" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡">
-        </el-date-picker>
+        </el-date-picker> -->
+        <el-date-picker type="datetime" v-model="searchForm.sendStartDate" value-format="yyyy-MM-dd HH:mm:ss"
+          placeholder="璇烽�夋嫨寮�濮嬫椂闂�" @change="changeRadio" />
+        <el-date-picker type="datetime" v-model="searchForm.sendEndDate" value-format="yyyy-MM-dd HH:mm:ss"
+          placeholder="璇烽�夋嫨缁撴潫鏃堕棿" @change="changeRadio" />
       </el-form-item>
       <el-radio-group v-model="searchForm.radio" size="small" @input="changeRadio">
         <el-radio-button label="0">褰撳ぉ</el-radio-button>
@@ -90,15 +94,19 @@
       if (e === '0') {
         this.searchForm.sendStartDate = timeForMat(0)[0]
         this.searchForm.sendEndDate = timeForMat(0)[1]
-        this.time = timeForMat(0)
       } else if (e === '1') {
         this.searchForm.sendStartDate = timeForMat(6)[0]
         this.searchForm.sendEndDate = timeForMat(6)[1]
-        this.time = timeForMat(6)
       } else if (e === '2') {
         this.searchForm.sendStartDate = timeForMat(29)[0]
         this.searchForm.sendEndDate = timeForMat(29)[1]
-        this.time = timeForMat(29)
+      } else {
+        this.searchForm.radio = ''
+      }
+      if (this.searchForm.sendStartDate && this.searchForm.sendEndDate && new Date(this.searchForm.sendStartDate).getTime() > new Date(this.searchForm.sendEndDate).getTime()) {
+        this.$message.error('寮�濮嬫椂闂翠笉鑳藉ぇ浜庣粨鏉熸椂闂�')
+        this.searchForm.sendStartDate = ''
+        return
       }
       this.search()
     },

--
Gitblit v1.9.3