auto_basic_add.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:23k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page import="java.util.*" %>
- <%@ page import="com.vnex.intranet.vehicle.loader.*" %>
- <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <script language=JavaScript>
- function checkChar(str)
- {
- var i,j,strTemp;
- strTemp=""<>/\'%&";
- for (i=0;i<str.length;i++)
- {
- j=strTemp.indexOf(str.charAt(i));
- if (j!=-1)
- {
- return false;
- }
- }
- return true;
- }
- function save()
- {
- if(check())
- {
- document.form1.action="/mainctrl/manage/autoBasicAddSave";
- document.form1.submit();
- }
- }
- function can()
- {
- document.form1.action="/mainctrl/manage/autoBasicList";
- document.form1.submit();
- }
- function check()
- {
- if (document.form1.carCertNo.value.length<=0)
- {
- alert("车牌号长度要大于0 ");
- document.form1.carCertNo.focus();
- return false;
- }
- /*
- if(!checkChar(document.form1.carCertNo.value))
- {
- alert("请不要在车牌号中加入"<>/\'%&这样的字符");
- document.form1.carCertNo.focus();
- return false;
- }
- */
- if (document.form1.engineNo.value.length<=0)
- {
- alert("发动机号长度要大于0 ");
- document.form1.engineNo.focus();
- return false;
- }
- /*
- if(!checkChar(document.form1.engineNo.value))
- {
- alert("请不要在发动机号中加入"<>/\'%&这样的字符");
- document.form1.engineNo.focus();
- return false;
- }
- */
- if (document.form1.frameNo.value.length<=0)
- {
- alert("车架号长度要大于0 ");
- document.form1.frameNo.focus();
- return false;
- }
- /*
- if(!checkChar(document.form1.frameNo.value))
- {
- alert("请不要在车架号中加入"<>/\'%&这样的字符");
- document.form1.frameNo.focus();
- return false;
- }
- */
- if (document.form1.producer.value.length<=0)
- {
- alert("生产厂商长度要大于0 ");
- document.form1.producer.focus();
- return false;
- }
- /*
- if(!checkChar(document.form1.producer.value))
- {
- alert("请不要在生产厂商中加入"<>/\'%&这样的字符");
- document.form1.producer.focus();
- return false;
- }
- */
- if (document.form1.brand.value.length<=0)
- {
- alert("厂牌长度要大于0 ");
- document.form1.brand.focus();
- return false;
- }
- /*
- if(!checkChar(document.form1.brand.value))
- {
- alert("请不要在厂牌中加入"<>/\'%&这样的字符");
- document.form1.brand.focus();
- return false;
- }
- */
- if (document.form1.carType.value.length<=0)
- {
- alert("型号长度要大于0 ");
- document.form1.carType.focus();
- return false;
- }
- /*
- if(!checkChar(document.form1.carType.value))
- {
- alert("请不要在型号中加入"<>/\'%&这样的字符");
- document.form1.carType.focus();
- return false;
- }
- */
- if (document.form1.ssPurchaseDate.value.length<=0)
- {
- alert("购买日期长度要大于0 ");
- document.form1.ssPurchaseDate.focus();
- return false;
- }
- if (!isFloat(document.form1.price.value)||parseFloat(document.form1.price.value)<0)
- {
- alert("价格长度要大于0 ");
- document.form1.price.focus();
- return false;
- }
- if (document.form1.ssCheckDate.value.length<=0)
- {
- alert("年检日期长度要大于0 ");
- document.form1.ssCheckDate.focus();
- return false;
- }
- if (!isInteger(document.form1.passengerNum.value)||parseInt(document.form1.passengerNum.value)<0)
- {
- alert("核定载客人数是整数且要大于0 ");
- document.form1.passengerNum.focus();
- return false;
- }
- if (!isFloat(document.form1.elements["length"].value)||parseFloat(document.form1.elements["length"].value)<0)
- {
- alert("长度必须是数字且要大于0 ");
- document.form1.elements["length"].focus();
- return false;
- }
- if (!isFloat(document.form1.width.value)||parseFloat(document.form1.width.value)<0)
- {
- alert("宽度必须是数字且要大于0 ");
- document.form1.width.focus();
- return false;
- }
- if (!isFloat(document.form1.height.value)||parseFloat(document.form1.height.value)<0)
- {
- alert("高度必须是数字且要大于0 ");
- document.form1.height.focus();
- return false;
- }
- if (!isFloat(document.form1.wheelBase.value)||parseFloat(document.form1.wheelBase.value)<0)
- {
- alert("轮距必须是数字且要大于0 ");
- document.form1.wheelBase.focus();
- return false;
- }
- if (!isFloat(document.form1.tread.value)||parseFloat(document.form1.tread.value)<0)
- {
- alert("轴距必须是数字且要大于0 ");
- document.form1.tread.focus();
- return false;
- }
- if (!isFloat(document.form1.minFloor.value)||parseFloat(document.form1.minFloor.value)<0)
- {
- alert("最小离地间隙必须是数字且要大于0 ");
- document.form1.minFloor.focus();
- return false;
- }
- if (!isFloat(document.form1.weight.value)||parseFloat(document.form1.weight.value)<0)
- {
- alert("整备质量必须是数字且要大于0 ");
- document.form1.weight.focus();
- return false;
- }
- if (!isFloat(document.form1.totalWeight.value)||parseFloat(document.form1.totalWeight.value)<0)
- {
- alert("总质量必须是数字且要大于0 ");
- document.form1.totalWeight.focus();
- return false;
- }
- // if (!isFloat(document.form1.minRadius.value)||parseFloat(document.form1.minRadius.value)<0)
- // {
- // alert("最小转弯半径必须是数字且要大于0 ");
- // document.form1.minRadius.focus();
- // return false;
- // }
- if (!isFloat(document.form1.exhaust.value)||parseFloat(document.form1.exhaust.value)<0)
- {
- alert("排量必须是数字且要大于0 ");
- document.form1.exhaust.focus();
- return false;
- }
- if (!isFloat(document.form1.tankCubage.value)||parseFloat(document.form1.tankCubage.value)<0)
- {
- alert("油箱容积必须是数字且要大于0 ");
- document.form1.tankCubage.focus();
- return false;
- }
- if (!isFloat(document.form1.accelerate.value)||parseFloat(document.form1.accelerate.value)<0)
- {
- alert("0-100Km/h加速时间必须是数字且要大于0 ");
- document.form1.accelerate.focus();
- return false;
- }
- if (!isFloat(document.form1.turn.value)||parseFloat(document.form1.turn.value)<0)
- {
- alert("最大扭矩必须是数字且要大于0 ");
- document.form1.turn.focus();
- return false;
- }
- if (document.form1.purpose.value.length > 50)
- {
- alert("用途字段长度要小于50个字母 ");
- document.form1.purpose.focus();
- return false;
- }
- /*
- if(!checkChar(document.form1.purpose.value))
- {
- alert("请不要在用途中加入"<>/\'%&这样的字符");
- document.form1.purpose.focus();
- return false;
- }
- */
- return true;
- }
- function checkDotLen(str)
- {
- alert("str = " + str);
- dot = str.indexOf(".")
- len = str.length();
- after = str.subString(dot,len);
- alert("after = " + after);
- if (after.length>0)
- {
- return false;
- }
- return true;
- }
- function getTime(obj)
- {
- fPopUpCalendarDlg(obj);
- var val = obj.value;
- val = val.substring(val.indexOf("-")+1, val.length);
- obj.value = val;
- }
- </script>
- <DIV align=center>
- <form name="form1" method="post">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center"><br>
- <!--个人信息开始 -->
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr bgcolor="#fafafa">
- <td>
- <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td colspan="6" bgcolor="#666666"><font class="strongw"> <a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>>><a href="/mainctrl/manage/autoBasicList"><font color="#FFFFFF">车辆管理</font></a>>>新增车辆情况
- </font></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="113"><font class="strong"> 车辆类型:</font></td>
- <td colspan="5">
- <select size="1" name="typeId" value="0" style="width=140">
- <%
- Hashtable hash = VehicleLoader.getAllAutomobileType();
- Enumeration enum = hash.keys();
- if(enum != null)
- {
- while(enum.hasMoreElements())
- {
- String key = (String)enum.nextElement();
- String s = (String)hash.get(key);
- %>
- <option value="<%= key%>"><%= s%> <%}}%>
- </select> * (注:带*为必填内容)
- </td>
- </tr>
- <tr>
- <td width="113" bgcolor="#fafafa"><font class="strong"> 所属部门:</font></td>
- <td bgcolor="#fafafa" colspan="5">
- <select size="1" name="departmentId" class=choice >
- <org:DivisionList>
- <vnex:items>
- <option value=<org:DivisionAttribute attribute="id"/> >
- <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/>
- </option>
- </vnex:items>
- </org:DivisionList>
- </select> *
- </td>
- </tr>
- <tr>
- <td width="113" bgcolor="#e0e0e0"><font class="strong"> 车牌号:</font></td>
- <td bgcolor="#e0e0e0" colspan="5">
- <input type="text" name="carCertNo" class=text size="24" maxlength="24"> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 发动机号:</font> </td>
- <td colspan="5">
- <input type="text" name="engineNo" class=text size="24" maxlength="24"> *
- </td>
- </tr>
- <tr>
- <td width="113" bgcolor="#e0e0e0"><font class="strong"> 车架号:</font></td>
- <td bgcolor="#e0e0e0" colspan="5">
- <input type="text" name="frameNo" class=text size="24" maxlength="24"> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 生产厂商:</font></td>
- <td colspan="5">
- <input type="text" name="producer" class=text size="24" maxlength="24"> *
- </td>
- </tr>
- <tr>
- <td width="113" bgcolor="#e0e0e0"><font class="strong"> 厂牌:</font></td>
- <td bgcolor="#e0e0e0" colspan="5">
- <input type="text" name="brand" class=text size="24" maxlength="24"> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 型号:</font></td>
- <td colspan="5">
- <input type="text" name="carType" class=text size="24" maxlength="24"> *
- </td>
- </tr>
- <tr>
- <td width="113" bgcolor="#e0e0e0"><font class="strong"> 车门数:</font></td>
- <td bgcolor="#e0e0e0" colspan="5">
- <select name="carDoorNum">
- <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>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 核定载客:<font class="strong"></font></font></td>
- <td colspan="5">
- <input type="text" name="passengerNum" class=text size="6" maxlength="4"> *
- </td>
- </tr>
- <tr>
- <td width="113" bgcolor="#e0e0e0"><font class="strong"> 驾驶室前排共乘几人:</font></td>
- <td bgcolor="#e0e0e0" colspan="5">
- <select name="cabCapacity">
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- </select>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 购买日期:</font></td>
- <td colspan="5">
- <input type="text" name="ssPurchaseDate" class=text size="24" readonly>
- <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(ssPurchaseDate);return false;" width="16" height="16">
- </td>
- </tr>
- <tr>
- <td width="113" bgcolor="#e0e0e0"><font class="strong"> 购买价格:</font></td>
- <td bgcolor="#e0e0e0" colspan="5">
- <input type="text" name="price" class=text size="6" maxlength="10">(万元) *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 年检日期:</font></td>
- <td colspan="5">
- <input type="text" name="ssCheckDate" class=text size="24" readonly>
- <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="getTime(ssCheckDate);return false;" width="16" height="16">
- </td>
- </tr>
- <tr>
- <td width="113" bgcolor="#e0e0e0"><font class="strong"> 颜色:</font></td>
- <td bgcolor="#e0e0e0" colspan="5">
- <input type="text" name="color" class=text size="24" maxlength="24"> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 配置:</font></td>
- <td colspan="5">
- <input type="text" name="decoration" class=text size="72" maxlength="50"> *
- </td>
- </tr>
- <tr>
- <td width="113" bgcolor="#e0e0e0"><font class="strong"> 用途:</font></td>
- <td bgcolor="#e0e0e0" colspan="5">
- <textarea name="purpose" cols="59" rows="4"></textarea>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 可以预约:</font></td>
- <td colspan="5">
- <input type="checkbox" name="isBooking" value=1>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td colspan="6"> <font class="strong"> 技术参数:</font>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"> <font class="strong"> 长(mm):</font>
- </td>
- <td width="84">
- <input type="text" name="length" class=text size="12" maxlength="12"> *
- </td>
- <td width="84"><font class="strong">宽(mm):</font></td>
- <td width="89">
- <input type="text" name="width" class=text size="12" maxlength="12"> *
- </td>
- <td width="83"><font class="strong">高(mm):</font></td>
- <td width="110">
- <input type="text" name="height" class=text size="12" maxlength="12"> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="113"><font class="strong"> 轮距 (前后)(mm):</font>
- </td>
- <td colspan="5">
- <input type="text" name="wheelBase" class=text size="6" maxlength="6"> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 轴距(mm):</font></td>
- <td colspan="5">
- <input type="text" name="tread" class=text size="6" maxlength="6"> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="113"><font class="strong"> 最小离地间隙(mm):</font></td>
- <td colspan="5">
- <input type="text" name="minFloor" class=text size="6" maxlength="6"> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 整备质量(kg):</font></td>
- <td colspan="5">
- <input type="text" name="weight" class=text size="6" maxlength="6"> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="113"><font class="strong"> 最小转弯半径(m):</font></td>
- <td colspan="5">
- <input type="text" name="minRadius" class=text size="6" maxlength="6">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 排量(mL):</font></td>
- <td colspan="5">
- <input type="text" name="exhaust" class=text size="6" maxlength="6"> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="113"><font class="strong"> 最大功率(kw):</font></td>
- <td colspan="5">
- <input type="text" name="power" class=text size="6" maxlength="6"> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"><font class="strong"> 发动机型式:</font></td>
- <td colspan="5">
- <input type="text" name="engineType" class=text size="72" maxlength="60"> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="113"> <font class="strong" > 油箱容积(L):</font>
- </td>
- <td colspan="5">
- <input type="text" name="tankCubage" class=text size="6" maxlength="6"> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"> <font class="strong"> 总质量(kg):</font>
- </td>
- <td colspan="5">
- <input type="text" name="totalWeight" class=text size="6" maxlength="6"> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="113"> <font class="strong"> 缸径/行程(mmXmm):
- </font> </td>
- <td colspan="5">
- <input type="text" name="journey" class=text size="24" maxlength="24"> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="113"> <font class="strong"> 0-100Km/h加速时间(s):</font></td>
- <td colspan="5">
- <input type="text" name="accelerate" class=text size="6" maxlength="3"> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="113"> <font class="strong"> 最大扭矩(N.m):</font>
- </td>
- <td colspan="5">
- <input type="text" name="turn" class=text size="24" maxlength="24"> *
- </td>
- </tr>
- <tr align="center" bgcolor="#fafafa">
- <td colspan="6" height="30">
- <input type="button" name="Submit22" value="保存" class="file" onClick="save()">
-
- <input type="reset" name="Submit222" value="重置" class="file">
-
- <input type="button" name="Submit2222" value="放弃" class="file" onClick="can()">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form>
- </DIV>
- </BODY>
- </HTML>
- </BODY>
- </HTML>