| | |
| | | <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> |
| | | |
| | | |
| | |
| | | <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> |
| | |
| | | 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({ |