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 |   41 +++++++++++++++++++++++------------------
 1 files changed, 23 insertions(+), 18 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 d3ede42..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
@@ -164,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){
@@ -189,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>";
@@ -199,12 +205,7 @@
         }
     });
 
-    if (oneId == "1"){
-        console.log("===============")
-        oneId = $("#yys").val()
-        var button = document.getElementById("yys");
-        button.removeAttribute("disabled");
-    }
+
 
     ajax.set("oneId",oneId);
     ajax.start();
@@ -471,14 +472,18 @@
     console.log("看看是否可预约值")
     console.log(reservation);
     var checkbox = document.querySelector('input[name="pt"]');
-    if (checkbox.checked) {
-        data.type = 1
-        console.log("选中是平台");
-        data.operatorId = 0;
-    } else {
-        console.log("运营商");
-        data.type = 2;
+    console.log(checkbox)
+    if (checkbox!=null){
+        if (checkbox.checked) {
+            data.type = 1
+            console.log("选中是平台");
+            data.operatorId = 0;
+        } else {
+            console.log("运营商");
+            data.type = 2;
+        }
     }
+
     if (reservation == 1) {
         if (data.typeName === "智慧场地") {
             console.log("===========这是智慧球场")

--
Gitblit v1.7.1