📄 queryorderdetail.jsp
字号:
<td align=center><input type="checkbox" name="CHECKBOXVAL" value="<bean:write name="hotel" property="hotelInfo.hotelsId" />:<bean:write name="hotel" property="hotelsDetailId" />" class="noborder"/></td>
<td align=center><bean:write name="hotel" property="hotelInfo.hotelname" /> </td>
<td align=center><bean:write name="hotel" property="hotelInfo.hotelsize" /> </td>
<td align="center"><bean:write name="hotel" property="hotelInfo.hotelprice" /></td>
<td align="center"><bean:write name="hotel" property="hotelInfo.hotellevel" /></td>
<td align=center><bean:write name="hotel" property="hotelInfo.hotelfloor" /> </td>
<td align=center><bean:write name="hotel" property="custname" /> </td>
<td align=center><bean:write name="hotel" property="clubInfo.clubLevelName" /> </td>
<td align=center><bean:write name="hotel" property="custcertid" /> </td>
<td align=center><bean:write name="hotel" property="custphone" /> </td>
<td align=center><bean:write name="hotel" property="begintime" /> </td>
<td align=center><bean:write name="hotel" property="endtime" /> </td>
<td align=center><bean:write name="hotel" property="remark" /> </td>
</tr>
</logic:iterate>
<tr class="listContent">
<td align=left colspan=13>
<input type="button" class="button1" value ="预订" onClick="doModify();">
<input type="button" class="button1" value ="退房" onClick="cancle();">
</td>
</tr>
</table>
</div>
</logic:present>
<%} %>
<logic:present name="hotelList">
<%@ include file="../../common/page.jsp"%>
</logic:present>
</html:form>
</body>
</html:html>
<script language="javascript">
function query(){
var items = new CheckItem();
if(document.forms[0].elements["hotelInfo.hotelsize"].value !="")
items.add("1|1|hotelInfo.hotelsize|客房大小|-1");
if(document.forms[0].elements["hotelInfo.hotelprice"].value !="")
items.add("3|1|hotelInfo.hotelprice|客房价格|-1");
if(!checkForm(document.forms[0],items))
return false;
document.forms[0].action="HoteOrderDetailAction.do?method=queryHOrderDetail";
document.forms[0].submit();
}
function doDelete(){
var boxes = document.getElementsByName("CHECKBOXVAL");
var cn = 0;
for (var i = 0; i < boxes.length; i++){
if (!boxes[i].checked){
cn++;
}
}
if(cn == boxes.length){
alert('请选择删除项,谢谢!');
return false;
}
document.forms[0].action="HotelActon.do?method=delHotelInfo";
document.forms[0].submit();
}
function cancle(){
var boxes = document.getElementsByName("CHECKBOXVAL");
var cn = 0;
var cn1 =0;
for (var i = 0; i < boxes.length; i++){
if (!boxes[i].checked){
cn++;
}
}
if(cn == boxes.length){
alert('请选择退订客房,谢谢!');
return false;
}
document.forms[0].action="HoteOrderDetailAction.do?method=cancleInfo&checktype=0";
document.forms[0].submit();
}
function doModify(){
var boxes = document.getElementsByName("CHECKBOXVAL");
var cn = 0;
var i=0;
var value;
for (i = 0; i < boxes.length; i++){
if (boxes[i].checked){
value = boxes[i].value;
cn++;
}
}
if(cn >1){
alert('一次只能预订一个,谢谢!');
return false;
}
if (cn==0){
alert('请选择预订客房,谢谢!');
return false;
}
var sFeatures = "dialogWidth:800px;dialogHeight:600px;status:no;scroll:no;help:no;resizable:yes";
var rtnVal = window.showModalDialog('HoteOrderDetailAction.do?method=initOrdHotel&CHECKBOXVAL='+value, '', sFeatures);
}
function checkinfo(){
var boxes = document.getElementsByName("CHECKBOXVAL");
var cn = 0;
var i=0;
var value;
for (i = 0; i < boxes.length; i++){
if (boxes[i].checked){
value = boxes[i].value;
cn++;
}
}
if(cn >1){
alert('一次只能入住一个,谢谢!');
return false;
}
if (cn==0){
alert('请选择入住客房,谢谢!');
return false;
}
document.forms[0].action="HoteOrderDetailAction.do?method=cancleInfo&checktype=2";
document.forms[0].submit();
}
function changeType(){
if (document.forms[0].elements["querytype"].value == "0"){
window.tr1.style.display='none';
}else{
window.tr1.style.display='';
}
}
function gotoPage(pageNo){
window.location.href="HoteOrderDetailAction.do?method=queryHOrderDetail&pageNo="+pageNo;
}
var oldValue,oldText;
//select下拉框的onkeydown事件,修改下拉框的值
function catch_keydown(sel)
{
switch(event.keyCode)
{
case 13: //回车键
event.returnValue = false;
break;
case 27: //Esc键
sel.options[sel.selectedIndex].text = oldText;
sel.options[sel.selectedIndex].value = oldValue;
event.returnValue = false;
break;
case 8: //空格健
var s = sel.options[sel.selectedIndex].text;
s = s.substr(0,s.length-1);
if (sel.options[sel.selectedIndex].value==sel.options[sel.selectedIndex].text)
{
sel.options[sel.selectedIndex].value=s;
sel.options[sel.selectedIndex].text=s;
}
event.returnValue = false;
break;
}
if (!event.returnValue && sel.onchange)
sel.onchange(sel)
}
//select下拉框的onkeypress事件,修改下拉框的值
function catch_press(sel){
if(sel.selectedIndex>=0){
var s = sel.options[sel.selectedIndex].text + String.fromCharCode(event.keyCode);
if (sel.options[sel.selectedIndex].value==sel.options[sel.selectedIndex].text)
{
sel.options[sel.selectedIndex].value=s;
sel.options[sel.selectedIndex].text=s;
}
event.returnValue = false;
if (!event.returnValue && sel.onchange)
sel.onchange(sel)
}
}
//select下拉框的onfocus事件,保存下拉框原来的值
function catch_focus(sel) {
oldText = sel.options[sel.selectedIndex].value;
oldValue = sel.options[sel.selectedIndex].value;
}
//恢复select下拉列表当前选中的值
function LoadSelect(obj,value)
{
for (var i=0; i< obj.options.length; i++)
if (obj.options[i].value == value)
{
obj.selectedIndex = i;
break;
}
}
//select 选择框鼠标上移时提示选择的内容
function selMouseOver(obj)
{
with (document.all.div_hint)
{
innerText = obj.options[obj.selectedIndex].text;
if (innerText.length > 0)
{
innerText = " " + innerText + " ";
style.display = "block";
style.left = event.clientX + 16;
style.top = event.clientY;
}
}
}
<%
if (null != querytype ){
%>
document.forms[0].elements["querytype"].value =<%=querytype%>;
<%
}
%>
if (document.forms[0].elements["querytype"].value == "0"){
window.tr1.style.display='none';
}else{
window.tr1.style.display='';
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -