From 28a60b0977d66b75fb9a2c3306840bc18ec271f6 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期二, 19 八月 2025 17:51:18 +0800
Subject: [PATCH] 会员支付相关

---
 cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js |  157 ++++++++++++++++++++++++++-------------------------
 1 files changed, 80 insertions(+), 77 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 ad0f640..24328af 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
@@ -24,13 +24,7 @@
         {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'},
         {
             title: '所属运营商', field: 'operator', visible: objectType==3?false:true, align: 'center', valign: 'middle',
-            formatter: function(value, row, index) {
-                if (!value || value.trim() === '' || value.trim() === 0) {
-                    return '平台';
-                } else {
-                    return value;
-                }
-            }
+
         },
         {
             title: '省', field: 'province', visible: objectType === 1 ? true : false, align: 'center', valign: 'middle', width: '20%',
@@ -170,17 +164,25 @@
     ajax.start();
 };
 TSite.oneChangeYys = function(e){
-
     var oneId = $(e).val();
-
     var checkbox = document.querySelector('input[name="pt"]');
     if (checkbox.checked) {
         oneId=0;
         console.log("选中是平台");
-    } else {
+    }else{
+        oneId = 1;
         console.log("运营商");
         console.log(oneId)
-
+    }
+    if (oneId == "1"){
+        oneId = $("#yys").val()
+        if (oneId==""){
+            oneId = 1
+        }
+        console.log("看看选择之后")
+        console.log(oneId)
+        var button = document.getElementById("yys");
+        button.removeAttribute("disabled");
     }
     var ajax = new $ax(Feng.ctxPath + "/tSite/getChangeOne", function(data){
         if(data!=null){
@@ -195,8 +197,6 @@
                 $("#yys").prop('disabled', false);
             }
 
-            console.log("看看返回数据")
-            console.log(data)
             var content='<option value="">选择门店</option>';
             $.each(data, function(k,v) {
                 content += "<option value='"+v.id+"'>"+v.name+"</option>";
@@ -205,13 +205,7 @@
         }
     });
 
-    if (typeof(oneId) == "undefined"){
-        console.log("===============")
-        oneId = $("#yys").val()
-        var button = document.getElementById("yys");
-        button.removeAttribute("disabled");
 
-    }
 
     ajax.set("oneId",oneId);
     ajax.start();
@@ -447,6 +441,7 @@
         imgs:"",
         reservation:"",
         isCanBeBooked:"",
+        type:"",
 
     };
     data.province            = $("#pCode").val()
@@ -476,64 +471,75 @@
     data.isCanBeBooked= reservation;
     console.log("看看是否可预约值")
     console.log(reservation);
-    if (reservation==1){
-
-
-    if (data.typeName === "智慧场地"){
-        console.log("===========这是智慧球场")
-
-        console.log("====="+data.appointmentStartTime)
-
-        var value = data.appointmentStartTime;
-        var lastTwoDigits = value.slice(-2);
-
-        if (lastTwoDigits === "00" || lastTwoDigits === "15" || lastTwoDigits === "30" || lastTwoDigits === "45") {
-            console.log("Last two digits are 00, 15, 30, or 45");
+    var checkbox = document.querySelector('input[name="pt"]');
+    console.log(checkbox)
+    if (checkbox!=null){
+        if (checkbox.checked) {
+            data.type = 1
+            console.log("选中是平台");
+            data.operatorId = 0;
         } else {
-            Feng.error("智慧场地的可预约时间段是15分钟的倍数")
-            return;
-
-        }
-
-
-        var value1 = data.appointmentEndTime;
-        var lastTwoDigits1 = value1.slice(-2);
-
-        if (lastTwoDigits1 === "00" || lastTwoDigits1 === "15" || lastTwoDigits1 === "30" || lastTwoDigits1 === "45") {
-            console.log("Last two digits are 00, 15, 30, or 45");
-        } else {
-            Feng.error("智慧场地的可预约时间段是15分钟的倍数")
-            return;
-
-        }
-
-
-    }else {
-        console.log("===========这是普通球场")
-
-        console.log("====="+data.appointmentStartTime)
-        var value = data.appointmentStartTime;
-        var lastTwoDigits = value.slice(-2);
-
-        if (lastTwoDigits === "00" || lastTwoDigits === "30" ) {
-            console.log("Last two digits are 00, 15, 30, or 45");
-        } else {
-            Feng.info("普通场地可预约时间段需是30分钟的倍数")
-            return;
-        }
-
-
-        var value1 = data.appointmentEndTime;
-        var lastTwoDigits1 = value1.slice(-2);
-
-        if (lastTwoDigits1 === "00"|| lastTwoDigits1 === "30" ) {
-            console.log("Last two digits are 00, 15, 30, or 45");
-        } else {
-            Feng.info("普通场地可预约时间段需是30分钟的倍数")
-            return;
-
+            console.log("运营商");
+            data.type = 2;
         }
     }
+
+    if (reservation == 1) {
+        if (data.typeName === "智慧场地") {
+            console.log("===========这是智慧球场")
+
+            console.log("=====" + data.appointmentStartTime)
+
+            var value = data.appointmentStartTime;
+            var lastTwoDigits = value.slice(-2);
+
+            if (lastTwoDigits === "00" || lastTwoDigits === "15" || lastTwoDigits === "30" || lastTwoDigits === "45") {
+                console.log("Last two digits are 00, 15, 30, or 45");
+            } else {
+                Feng.error("智慧场地的可预约时间段是15分钟的倍数")
+                return;
+
+            }
+
+
+            var value1 = data.appointmentEndTime;
+            var lastTwoDigits1 = value1.slice(-2);
+
+            if (lastTwoDigits1 === "00" || lastTwoDigits1 === "15" || lastTwoDigits1 === "30" || lastTwoDigits1 === "45") {
+                console.log("Last two digits are 00, 15, 30, or 45");
+            } else {
+                Feng.error("智慧场地的可预约时间段是15分钟的倍数")
+                return;
+
+            }
+
+
+        } else {
+            console.log("===========这是普通球场")
+
+            console.log("=====" + data.appointmentStartTime)
+            var value = data.appointmentStartTime;
+            var lastTwoDigits = value.slice(-2);
+
+            if (lastTwoDigits === "00" || lastTwoDigits === "30") {
+                console.log("Last two digits are 00, 15, 30, or 45");
+            } else {
+                Feng.info("普通场地可预约时间段需是30分钟的倍数")
+                return;
+            }
+
+
+            var value1 = data.appointmentEndTime;
+            var lastTwoDigits1 = value1.slice(-2);
+
+            if (lastTwoDigits1 === "00" || lastTwoDigits1 === "30") {
+                console.log("Last two digits are 00, 15, 30, or 45");
+            } else {
+                Feng.info("普通场地可预约时间段需是30分钟的倍数")
+                return;
+
+            }
+        }
     }
     var SelectValue="";
     var getSelectValueMenbers = $("input[name='pt']:checked").each(function(j) {
@@ -550,9 +556,6 @@
         SelectValue= yys
     }
     data.operatorId= SelectValue;
-
-
-
     let num24 = $('input[name="name1"]');
     var nextName="";
     for (let i = 0; i < num24.length; i++) {

--
Gitblit v1.7.1