From 3f716ee18182d7abc39f64e1bb0d181262e4fc94 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Mon, 18 May 2026 17:08:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=80=E5=9C=A8=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/activities/ActivityList.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/views/activities/ActivityList.vue b/src/views/activities/ActivityList.vue index daf0591..6e67b77 100644 --- a/src/views/activities/ActivityList.vue +++ b/src/views/activities/ActivityList.vue @@ -627,15 +627,23 @@ function validateBookingFormInternal(): boolean { } const yStart = sessionDatetimeYmdPart(startN) const yEnd = sessionDatetimeYmdPart(endN) - if (!yStart || !yEnd || yStart !== yEnd) { + if (!yStart || !yEnd) { + Message.warning(`第 ${i + 1} 行请填写场次开始与场次结束时间`) + return false + } + if (rt === 'online' && yStart !== yEnd) { Message.warning(`第 ${i + 1} 行场次开始与场次结束须为同一天内`) return false } const actStart = String(form.start_at || '').trim().slice(0, 10) const actEnd = String(form.end_at || '').trim().slice(0, 10) if (/^\d{4}-\d{2}-\d{2}$/.test(actStart) && /^\d{4}-\d{2}-\d{2}$/.test(actEnd)) { - if (yStart < actStart || yStart > actEnd) { - Message.warning(`第 ${i + 1} 行场次日期须落在活动日期 ${actStart}~${actEnd} 范围内`) + const startOut = yStart < actStart || yStart > actEnd + const endOut = yEnd < actStart || yEnd > actEnd + if (startOut || endOut) { + Message.warning( + `第 ${i + 1} 行场次开始与结束的日期须落在活动日期 ${actStart}~${actEnd} 范围内`, + ) return false } }