From 014d7a35addafbc63689cda7c20bae61951f7852 Mon Sep 17 00:00:00 2001
From: luo <2855143437@qq.com>
Date: 星期一, 09 十月 2023 18:25:19 +0800
Subject: [PATCH] 10.9
---
cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_add.html | 41 ++++++++++++++++++++++++++++++++++++++---
1 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_add.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_add.html
index d64fa91..3ced3d4 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_add.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_add.html
@@ -52,7 +52,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">*上课场地:</label>
<div class="col-sm-4">
- <select class="form-control" id="siteId" name="siteId" onchange="CoursePackageInfo.addTime(this.value)">
+ <select class="form-control" id="siteId" name="siteId" >
<option >请选择场地</option>
@@ -76,7 +76,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">预约时间:</label>
<div class="col-sm-4">
- <input class="form-control" id="time" name="time" type="text" >
+ <input class="form-control" id="time" name="time" type="text" onchange="CoursePackageInfo.addTime()">
</div>
</div>
@@ -248,7 +248,42 @@
elem: '#time'
,lang:"CN",
min:0,
- max:10
+ max:10,
+ format:'yyyy-MM-dd',
+ done:function (a) {
+ console.log("==========="+a)
+ var ajax = new $ax(Feng.ctxPath + "/ball/yuyuetimes/"+ $('#siteId').val(), function(data){
+ console.log("================"+data)
+ if(data!=null){
+ var content='';
+ $.each(data, function(k, v) {
+ var buttonClass = "layui-btn layui-btn-primary";
+ var style = "";
+ if (v.state === 0) {
+ style = "background-color: red;";
+ }
+ var disabledAttribute = v.state === 0 ? "disabled" : "";
+ content += '<button type="button" class="' + buttonClass + '" ' + disabledAttribute + ' style="' + style + '" onclick="toggleColor(this)">' + v.time + '</button>';
+ });
+ $("#ttt2").empty().append(content);
+ }
+ })
+ ajax.set("date",$('#time').val());
+ 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()
+
+ }
});
laydate.render({
--
Gitblit v1.7.1