| | |
| | | data.isCanBeBooked= reservation; |
| | | console.log("看看是否可预约值") |
| | | console.log(reservation); |
| | | if (reservation==1){ |
| | | if (reservation == 1) { |
| | | 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; |
| | | |
| | | } |
| | | |
| | | |
| | | if (data.typeName === "智慧场地"){ |
| | | console.log("===========这是智慧球场") |
| | | var value1 = data.appointmentEndTime; |
| | | var lastTwoDigits1 = value1.slice(-2); |
| | | |
| | | console.log("====="+data.appointmentStartTime) |
| | | 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; |
| | | |
| | | 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; |
| | | 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 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) { |