From faaf4ce0e117cd3f841fd06003e3dfdb2d0f7ebb Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期三, 05 十一月 2025 15:13:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0' into 2.0

---
 cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js b/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js
index 25d24db..56181ad 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js
@@ -1336,7 +1336,6 @@
 TSite.removeTimeSlot = function(btn) {
     $(btn).closest('tr').remove();
 }
-
 /**
  * 检查时段是否重叠
  */
@@ -1346,12 +1345,12 @@
         var parts = time.split(':');
         return parseInt(parts[0]) * 60 + parseInt(parts[1]);
     };
-    
+
     var s1 = toMinutes(start1);
     var e1 = toMinutes(end1);
     var s2 = toMinutes(start2);
     var e2 = toMinutes(end2);
-    
+
     // 检查重叠:时段1的结束时间 > 时段2的开始时间 且 时段1的开始时间 < 时段2的结束时间
     return (e1 > s2 && s1 < e2);
 }
@@ -1362,7 +1361,7 @@
 TSite.validateNoTimeOverlap = function() {
     var bookingTimeSlots = [];
     var walkinTimeSlots = [];
-    
+
     // 收集订场时段
     $("#booking_price_tbody tr").each(function() {
         var index = $(this).data('index');
@@ -1372,7 +1371,7 @@
             bookingTimeSlots.push({start: startTime, end: endTime});
         }
     });
-    
+
     // 收集散客时段
     $("#walkin_price_tbody tr").each(function() {
         var index = $(this).data('index');
@@ -1382,7 +1381,7 @@
             walkinTimeSlots.push({start: startTime, end: endTime});
         }
     });
-    
+
     // 检查订场时段之间是否重叠
     for (var i = 0; i < bookingTimeSlots.length; i++) {
         for (var j = i + 1; j < bookingTimeSlots.length; j++) {
@@ -1390,14 +1389,14 @@
                 bookingTimeSlots[i].start, bookingTimeSlots[i].end,
                 bookingTimeSlots[j].start, bookingTimeSlots[j].end
             )) {
-                Feng.error("订场价格表中存在重叠的时段:" + 
+                Feng.error("订场价格表中存在重叠的时段:" +
                     bookingTimeSlots[i].start + "-" + bookingTimeSlots[i].end + " 与 " +
                     bookingTimeSlots[j].start + "-" + bookingTimeSlots[j].end);
                 return false;
             }
         }
     }
-    
+
     // 检查散客时段之间是否重叠
     for (var i = 0; i < walkinTimeSlots.length; i++) {
         for (var j = i + 1; j < walkinTimeSlots.length; j++) {
@@ -1405,17 +1404,16 @@
                 walkinTimeSlots[i].start, walkinTimeSlots[i].end,
                 walkinTimeSlots[j].start, walkinTimeSlots[j].end
             )) {
-                Feng.error("散客价格表中存在重叠的时段:" + 
+                Feng.error("散客价格表中存在重叠的时段:" +
                     walkinTimeSlots[i].start + "-" + walkinTimeSlots[i].end + " 与 " +
                     walkinTimeSlots[j].start + "-" + walkinTimeSlots[j].end);
                 return false;
             }
         }
     }
-    
+
     return true;
 }
-
 /**
  * 保存所有数据(基本信息+价格配置)
  */
@@ -1425,7 +1423,10 @@
         Feng.error("请先点击【生成价格表】按钮生成价格配置表!");
         return;
     }
-    
+    // 验证时段不重叠
+    if (!TSite.validateNoTimeOverlap()) {
+        return;
+    }
     // 验证人群选择
     var bookingChecked = $("#audience_booking").is(':checked');
     var walkinChecked = $("#audience_walkin").is(':checked');
@@ -1443,12 +1444,12 @@
             return;
         }
     }
-    
+
     // 验证时段不重叠
     if (!TSite.validateNoTimeOverlap()) {
         return;
     }
-    
+
     // 收集价格数据
     var priceDTOS = TSite.collectPriceData();
     

--
Gitblit v1.7.1