From a8d70fa376d6a038050e901ef07d18570b8aaec0 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 01 Aug 2025 17:13:00 +0800
Subject: [PATCH] feat:智飞工单 当天日期不能选当前时间之前
---
src/views/tickets/orderLog.vue | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index c649ba7..2fd1979 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -880,6 +880,17 @@
this.form.begin_time = this.formatDate(dateRange[0])
this.form.end_time = this.formatDate(dateRange[1])
+
+ // 如果选中日期包含当前天,那么选中的时间点不能小于当前时间
+ if (this.form.deal_time) {
+ const selectedDate = dayjs(this.form.date_range[0]).format('YYYY-MM-DD')
+ const selectedTime = dayjs(selectedDate + ' ' + this.form.deal_time).toDate()
+ const now = new Date()
+
+ if (selectedDate === dayjs().format('YYYY-MM-DD') && selectedTime < now) {
+ return this.$message.warning('任务时间不能小于当前时间')
+ }
+ }
const submitData = {
...this.form,
--
Gitblit v1.9.3