📄 destine.jsp
字号:
<%@ page language="java" contentType="text/html; charset=gbk"
pageEncoding="gbk"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title>Insert title here</title>
<style type="text/css">
<!--
.STYLE1 {font-size: 18px}
.STYLE2 {font-size: 16px}
.STYLE3 {color: #FF0000}
.STYLE4 {color: #000000}
-->
</style>
<script type="text/javascript" language="javascript">
function isEmpty(id,div,label){
var eid = document.getElementById(id);
if(eid.value.length==0){
document.getElementById(div).innerHTML=label+"不能为空";
return false;
}
document.getElementById(div).innerHTML="";
return true;
}
function isNumber(id,div,label){
var s = document.getElementById(id).value;
var regu = "^[0-9]+$";
var re = new RegExp(regu);
if (s.search(re) != -1) {
document.getElementById(div).innerHTML="";
return true;
}
document.getElementById(div).innerHTML=label+"只能是数字";
return false;
}
function checkInsuranceNum(id,div,label){
var s = document.getElementById(id).value;
var b = true;
if(s.length!=0){
b = isNumber(id,div,label);
}
return b;
}
function checkPhone(id,div,label){
var b = false;
if(isEmpty(id,div,label)){
b = isNumber(id,div,label);
}
return b;
}
function checkPassengerNum(){
var adultNum = parseInt(document.getElementById("adultNum").value);
var childNum = parseInt(document.getElementById("childNum").value);
var babyNum = parseInt(document.getElementById("babyNum").value);
if(adultNum<childNum+babyNum){
document.getElementById("passengerNumDiv").innerHTML="每个成年人只能带一个儿童或婴儿";
return false;
}
document.getElementById("passengerNumDiv").innerHTML="";
return true;
}
function check(){
var bContactPerson = isEmpty("contactPerson","contactPersonDiv","联系人姓名");
var bContactPhone = checkPhone('contactPhone','contactPoneDiv','联系人电话');
var bInsuranceNum = checkInsuranceNum('insuranceNum','insuranceNumDiv','保险数量');
if(bContactPerson&&bInsuranceNum&&bContactPhone&&checkPassengerNum()){
return true;
}
return false;
}
</script>
</head>
<body>
<html:form action="/destineTicketAction.do?act=1" method="post" onsubmit="return check();">
<table width="934" height="95" border="1" align="center">
<tr>
<th height="31" colspan="11" scope="col"><div align="left" class="STYLE1">航程信息</div></th>
</tr>
<tr>
<td width="97" height="28"><div align="center">日期</div></td>
<td width="92"><div align="center">航空公司</div></td>
<td width="67"><div align="center">航班号</div></td>
<td width="80"><div align="center">起飞</div></td>
<td width="76"><div align="center">降落</div></td>
<td width="55"><div align="center">价格</div></td>
<td width="76"><div align="center">机建/燃油</div></td>
<td width="71"><div align="center">成人单价</div></td>
<td width="66"><div align="center">儿童单价</div></td>
<td width="65"><div align="center">婴儿单价</div></td>
</tr>
<tr>
<td height="26"><bean:write name="fight" property="leaveDate"/> </td>
<td><bean:write name="fight" property="fightName"/> </td>
<td><bean:write name="fight" property="fightNo"/> </td>
<td><bean:write name="fight" property="leaveCity"/>\<bean:write name="fight" property="leaveTime"/> </td>
<td><bean:write name="fight" property="arriveCity"/>\<bean:write name="fight" property="arriveTime"/> </td>
<td>${0.9*fight.price } </td>
<td><bean:write name="fight" property="fuelRate"/>\<bean:write name="fight" property="buildRate"/> </td>
<td>${0.9*fight.price+fight.fuelRate+fight.buildRate } </td>
<td>${fight.price*0.8} </td>
<td>${fight.price*0.1} </td>
</tr>
</table>
<p> </p>
<table width="931" height="121" border="1" align="center">
<tr>
<th height="27" colspan="2" scope="col"><div align="left"><span class="STYLE2">登机人列表</span></div></th>
</tr>
<tr>
<td width="357" height="27">乘机人数:成人
<label>
<select name="adultNum" id="adultNum">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
儿童
<select name="childNum" id="childNum">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
婴儿
<select name="babyNum" id="babyNum">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
</label></td>
<td width="558"><div id="passengerNumDiv" style="display:block;color:red"/> </td>
</tr>
<tr>
<td height="28" colspan="2">儿童价格为全价的50%,婴儿价格为全价的10%!(儿童、婴儿不需机场建设费!) </td>
</tr>
<tr>
<td height="17" colspan="2">每个成年人只能带一个儿童或婴儿!</td>
</tr>
</table>
<p> </p>
<table width="929" height="69" border="1" align="center">
<tr>
<th colspan="2" scope="col"><div align="left" class="STYLE2">购买保险</div></th>
</tr>
<tr>
<td width="515">单价:
<label>
<input type="text" name="insurancePrice" readonly value="20.0"/>
<span class="STYLE3">* <span class="STYLE4">保险数量:</span></span>
<input type="text" name="insuranceNum" id="insuranceNum" onBlur="checkInsuranceNum('insuranceNum','insuranceNumDiv','保险数量')"/>
</label>
</td>
<td width="398"><div id="insuranceNumDiv" style="display:block;color:red"/> </td>
</tr>
</table>
<p> </p>
<table width="926" height="123" border="1" align="center">
<tr>
<th colspan="2" scope="col"><div align="left"><span class="STYLE2">联系人信息</span></div></th>
</tr>
<tr>
<td width="278">联系人姓名:
<label>
<input type="text" name="contactPerson" id="contactPerson" onBlur="isEmpty('contactPerson','contactPersonDiv','联系人姓名')"/>
<span class="STYLE3">* </span></label></td>
<td width="632" height="32"><div id="contactPersonDiv" style="display:block;color:red"/> </td>
</tr>
<tr>
<td>联系人电话:
<input type="text" name="contactPhone" id="contactPhone" onBlur="checkPhone('contactPhone','contactPoneDiv','联系人电话')"/>
<span class="STYLE3">*</span></td>
<td><div id="contactPoneDiv" style="display:block;color:red"/> </td>
</tr>
</table>
<p> </p>
<table width="926" height="140" border="1" align="center">
<tr>
<th scope="col"><div align="left" class="STYLE2">行程单配送方式</div></th>
</tr>
<tr>
<td><label>
<input type="radio" name="distributeStyle" value="不需要行程单" />
</label>
<label for="rdoTraffic0">不需要行程单</label>
(行程单仅作报销凭证,不是登机的必要凭证)</td>
</tr>
<tr>
<td><label>
<input type="radio" name="distributeStyle" value="送票上门" />
送票上门(仅限深圳地区)</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="distributeStyle" value="快递或平邮 " />
快递或平邮
</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="distributeStyle" value="门市自取" checked/>
</label>
<label for="rdoTraffic3">门市自取</label> <label>
<html:select property="takeSelfAddress">
<logic:present name="addresss">
<logic:iterate id="address" name="addresss">
<html:option value="${address.city}${address.address}">${address.city}${address.address}</html:option>
</logic:iterate>
</logic:present>
</html:select>
</label></td>
</tr>
</table>
<p> </p>
<table width="928" height="63" border="1" align="center">
<tr>
<th scope="col"><div align="left" class="STYLE2">支付方式</div></th>
</tr>
<tr>
<td><label>
<input type="radio" name="payStyle" value=" 在线支付" checked/>
在线支付(支持易宝支付和银联手机支付)
<input type="radio" name="payStyle" value="票到付款" />
票到付款(仅限深圳,异地需加10元快递费)
<input type="radio" name="payStyle" value="银行转帐" />
银行转帐</label></td>
</tr>
<tr><td><html:hidden property="fightId" value="${fight.fightId}"></html:hidden></td></tr>
</table>
<p>
<div align="center">
<input type="submit" name="Submit" value="下一步" />
</div>
</p>
</html:form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -