From 640ff18d2d7f4be02ddb7f8f75e899f05545eb98 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 05 二月 2024 11:56:52 +0800
Subject: [PATCH] 更新bug修改

---
 cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js |   88 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 74 insertions(+), 14 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js b/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js
index 4456b15..d6208e9 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js
@@ -63,19 +63,27 @@
         }
     })
     ajax.set("date",$('#time').val());
+    var siteId = document.getElementById("siteId");
+    var siteName = siteId.options[siteId.selectedIndex].text;
+    ajax.set("siteName",siteName);
+
+    var halfId = document.getElementById("half");
+    var halfName = halfId.options[halfId.selectedIndex].text;
+    ajax.set("halfName",halfName);
+
     ajax.start()
 
-    var ajax1 = new $ax(Feng.ctxPath + "/ball/halfName/"+ $('#siteId').val(), function(data){
-        console.log("================"+data)
-        if(data!=null){
-            let htmlStr = '';
-            for (let i = 0; i < data.length; i++) {
-                htmlStr += '<option value="' + data[i] + '">' + data[i] + '</option>'
-            }
-            $("#half").empty().append(htmlStr);
-        }
-    })
-    ajax1.start()
+    // var ajax1 = new $ax(Feng.ctxPath + "/ball/halfName/"+ $('#siteId').val(), function(data){
+    //     console.log("================"+data)
+    //     if(data!=null){
+    //         let htmlStr = '';
+    //         for (let i = 0; i < data.length; i++) {
+    //             htmlStr += '<option value="' + data[i] + '">' + data[i] + '</option>'
+    //         }
+    //         $("#half").empty().append(htmlStr);
+    //     }
+    // })
+    // ajax1.start()
 
 
 
@@ -83,6 +91,43 @@
 
 };
 
+
+CoursePackageInfo.queryHalf = function (a) {
+    var ajax1 = new $ax(Feng.ctxPath + "/ball/halfName/"+ $('#siteId').val(), function(data){
+        console.log("================"+data)
+        if(data!=null){
+            let htmlStr = '';
+            for (let i = 0; i < data.length; i++) {
+                htmlStr += '<option value="' + data[i] + '">' + data[i] + '</option>'
+            }
+
+            $("#half").empty().append(htmlStr);
+        }
+    })
+    ajax1.start()
+
+
+    var ajax2 = new $ax(Feng.ctxPath + "/ball/nextName/"+ $('#siteId').val(), function(data){
+        console.log("================"+data)
+        if(data!=null){
+            let htmlStr = '';
+            if (data.length>0){
+            for (let i = 0; i < data.length; i++) {
+                htmlStr += '<option value="' + data[i] + '">' + data[i] + '</option>'
+            }
+                $("#nextSite1").show()
+                $("#nextSite").empty().append(htmlStr);
+
+
+            }else {
+                $("#nextSite1").hidden()
+                $("#nextSite").empty()
+            }
+        }
+    })
+    ajax2.start()
+
+}
 
 
 CoursePackageInfo.addTime1 = function (a) {
@@ -172,7 +217,7 @@
 
 // 去除最后一个逗号
     values = values.slice(0, -1);
-
+    console.log("看看预约时间段")
     console.log(values);
 
     var times = values;
@@ -244,7 +289,12 @@
     ajax.set("city",city);
     ajax.set("cityCode",cityCode);
     ajax.set("storeId",storeId);
-    ajax.set("isHalf",type);
+    if (type ==1){
+        ajax.set("isHalf",2);
+    }else {
+        ajax.set("isHalf",1);
+
+    }
     ajax.set("siteId",siteId);
     ajax.set("nextName",site);
     ajax.set("halfName",half);
@@ -650,7 +700,7 @@
             htmlStr += '玩湃币支付:<input class="paiCoin" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 币&nbsp;&nbsp;&nbsp;&nbsp;\n';
         }
     htmlStr += '<button type="button" class="btn btn-info " onclick="CoursePackageInfo.openDia('+i+')" id="ensure">\n' +
-        '    <i class="fa fa-check"></i>&nbsp;优惠卷\n' +
+        '    <i class="fa fa-check"></i>&nbsp;优惠券\n' +
         '</button>';
 
     htmlStr += '</span> <i class="fa fa-trash-o" style="font-size:24px" onclick="removePrice(this)"></i>\n' +
@@ -673,6 +723,10 @@
 
 
 $(function () {
+
+
+
+
     $('#provinceCode').change(function () {
         let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryCity", function (data) {
             let htmlStr = '';
@@ -698,6 +752,12 @@
 
     $('#storeId').change(function () {
         querySite();
+        CoursePackageInfo.queryHalf();
+
+    })
+    $('#siteId').change(function () {
+        if ($('#time').val()!="")
+        CoursePackageInfo.addTime();
     })
 
     $('input[name="payType"]').click(function () {

--
Gitblit v1.7.1