From a830a73fd10a21e3793c79a35be4e532de124c6f Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期二, 17 十月 2023 17:25:16 +0800 Subject: [PATCH] 10.17.1 --- cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js | 83 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 82 insertions(+), 1 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 14fbd63..8b9c64e 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 @@ -170,7 +170,10 @@ ajax.start(); }; TSite.oneChangeYys = function(e){ - var oneId=$(e).val(); + + var oneId= $("input[name='pt']:checked").val() + + console.log("===========oneId=========="+oneId) var SelectValue=""; var getSelectValueMenbers = $("input[name='pt']:checked").each(function(j) { if (j >= 0) { @@ -182,6 +185,12 @@ } var ajax = new $ax(Feng.ctxPath + "/tSite/getChangeOne", function(data){ if(data!=null){ + // var content1 = '<option value="0">平台</option>'; + if (typeof(oneId) != "undefined") { + $("#yys").prop('disabled', true); + } + + var content='<option value="">选择门店</option>'; $.each(data, function(k,v) { content += "<option value='"+v.id+"'>"+v.name+"</option>"; @@ -189,8 +198,20 @@ $("#store").empty().append(content); } }); + + if (typeof(oneId) == "undefined"){ + console.log("===============") + + var button = document.getElementById("yys"); + button.removeAttribute("disabled"); + + } + ajax.set("oneId",oneId); ajax.start(); + + + }; // 场地管理首页 选择对应的省市 // 传1是场地管理首页 传2是场地管理添加页面 @@ -442,6 +463,66 @@ console.log(data.typeName) + + 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) { if (j >= 0) { -- Gitblit v1.7.1