| | |
| | | }; |
| | | TSite.oneChangeYys = function(e){ |
| | | |
| | | var oneId; |
| | | var oneId = $(e).val(); |
| | | |
| | | var checkbox = document.querySelector('input[name="pt"]'); |
| | | if (checkbox.checked) { |
| | | oneId=0; |
| | | console.log("选中是平台"); |
| | | } else { |
| | | oneId = $("#yys").val(); |
| | | console.log("运营商"); |
| | | console.log(oneId) |
| | | |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getChangeOne", function(data){ |
| | | if(data!=null){ |
| | | // var content1 = '<option value="0">平台</option>'; |
| | | console.log("看看oneId") |
| | | console.log(oneId) |
| | | if (oneId == 0) { |
| | | console.log("锁住") |
| | | $("#yys").prop('disabled', true); |
| | |
| | | halfName:"", |
| | | introduce:"", |
| | | imgs:"", |
| | | introduce:"", |
| | | ids:"" |
| | | reservation:"", |
| | | |
| | | }; |
| | | data.province = $("#pCode").val() |
| | | data.city = $("#cCode").val() |
| | |
| | | |
| | | |
| | | console.log(data.typeName) |
| | | |
| | | var reservation= $("input[name='reservation']:checked").val(); |
| | | data.reservation= reservation; |
| | | console.log("看看是否可预约值") |
| | | console.log(reservation); |
| | | if (reservation==1){ |
| | | |
| | | |
| | | if (data.typeName === "智慧场地"){ |
| | |
| | | return; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | var SelectValue=""; |
| | | var getSelectValueMenbers = $("input[name='pt']:checked").each(function(j) { |
| | | if (j >= 0) { |
| | |
| | | } |
| | | } |
| | | data.nextName= nextName; |
| | | |
| | | |
| | | var ishalf= $("input[name='ishalf']:checked").val(); |
| | | data.ishalf= ishalf; |
| | | |
| | | var halfName=""; |
| | | if (reservation==1) { |
| | | if(ishalf==1){ |
| | | let cashPriceOne = $("#cashPriceOne").val() |
| | | if(cashPriceOne=='' ){ |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | data.halfName= halfName; |
| | | data.ids= $("#ids").val(); |
| | | |
| | | let introduce ; |
| | | if (objectType==1){ |
| | | introduce = TSite.editor.getContent(); |
| | |
| | | Feng.info("请输入场地名称") |
| | | return; |
| | | } |
| | | |
| | | if (reservation==1){ |
| | | if($("#start-time").val()=='' ){ |
| | | Feng.info("请输入可预约时间段 开始时间") |
| | | return; |
| | |
| | | if($("#playPaiCoin").val()==''){ |
| | | Feng.info("请输入玩湃币价格") |
| | | return; |
| | | } |
| | | } |
| | | if($("#insuranceEndTime").val()==''){ |
| | | Feng.info("请输入场地责任险有效期") |
| | |
| | | type: "GET", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | success: function (response) { |
| | | if (reservation==1) { |
| | | rStime = response.startTime; |
| | | sh = rStime.split(':')[0];// 门店经营开始时间:小时 |
| | | sm = rStime.split(':')[1];// 门店经营开始时间:分钟 |
| | |
| | | Feng.error("至少预约半个小时"); |
| | | return; |
| | | } |
| | | } |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/tSite/addSite" , |
| | | type: "POST", |