vehicle_add.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:5k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.util.*"%>
  4. <%@ page import = "cn.js.fan.util.*"%>
  5. <%@ page import = "cn.js.fan.web.*"%>
  6. <%@ page import = "com.redmoon.oa.vehicle.*"%>
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <title>无标题文档</title>
  11. <link href="../common.css" rel="stylesheet" type="text/css">
  12. <style type="text/css">
  13. <!--
  14. .style2 {font-size: 14px}
  15. -->
  16. </style>
  17. <script language="JavaScript" type="text/JavaScript">
  18. <!--
  19. function findObj(theObj, theDoc)
  20. {
  21.   var p, i, foundObj;
  22.   
  23.   if(!theDoc) theDoc = document;
  24.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  25.   {
  26.     theDoc = parent.frames[theObj.substring(p+1)].document;
  27.     theObj = theObj.substring(0,p);
  28.   }
  29.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  30.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  31.     foundObj = theDoc.forms[i][theObj];
  32.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  33.     foundObj = findObj(theObj,theDoc.layers[i].document);
  34.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  35.   
  36.   return foundObj;
  37. }
  38. var GetDate=""; 
  39. function SelectDate(ObjName,FormatDate){
  40. var PostAtt = new Array;
  41. PostAtt[0]= FormatDate;
  42. PostAtt[1]= findObj(ObjName);
  43. GetDate = showModalDialog("../util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:221px;status:no;help:no;");
  44. }
  45. function SetDate()
  46. findObj(ObjName).value = GetDate; 
  47. }
  48. //-->
  49. </script>
  50. </head>
  51. <body>
  52. <%@ include file="vehicle_inc_menu_top.jsp"%>
  53. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  54. <%
  55. if (!privilege.isUserPrivValid(request, "vehicle")) {
  56. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  57. return;
  58. }
  59. %>
  60. <br>
  61. <table width="90%" border="0" align="center" cellPadding="2" cellSpacing="1" bgcolor="#FFFFFF" class="tableframe">
  62.   <form name="form1" action="vehicle_do.jsp?op=add" method="post" encType="multipart/form-data">
  63.     <tbody>
  64.   <tr>
  65. <td colspan="3" class="right-title">添加车辆</td>
  66.   </tr>
  67.       <tr>
  68.         <td noWrap width="80">车牌号:</td>
  69.         <td><input maxLength="100" name="licenseNo" size="20"></td>
  70.         <td width="250" rowSpan="6"><center>暂无照片</center></td>
  71.       </tr>
  72.       <tr>
  73.         <td noWrap>厂牌型号:</td>
  74.         <td><input maxLength="100" name="brand" size="20"></td>
  75.       </tr>
  76.       <tr>
  77.         <td noWrap>发动机号:</td>
  78.         <td><input maxLength="100" name="engineNo" size="20"></td>
  79.       </tr>
  80.       <tr>
  81.         <td noWrap>车辆类型:</td>
  82.         <td><select name="type">
  83. <%
  84.   VehicleTypeDb vtd = new VehicleTypeDb();
  85.   String sql = "select id from vehicle_type";
  86.   Iterator ir = vtd.list(sql).iterator();
  87.   while (ir.hasNext()) {
  88.    vtd = (VehicleTypeDb)ir.next();
  89. %>
  90. <option value="<%=vtd.getId()%>"><%=vtd.getDescription()%></option>
  91. <%}%>
  92.           </select></td>
  93.       </tr>
  94.       <tr>
  95.         <td noWrap>驾驶员:</td>
  96.         <td><input maxLength="100" size="12" name="driver"></td>
  97.       </tr>
  98.       <tr>
  99.         <td noWrap>购买价格:</td>
  100.         <td><input maxLength="25" size="12" name="price"></td>
  101.       </tr>
  102.       <tr>
  103.         <td noWrap>车辆照片上传:</td>
  104.         <td colSpan="2"><input title="选择附件文件" type="file" size="30" name="image"></td>
  105.       </tr>
  106.       <tr>
  107.         <td noWrap>购买日期:</td>
  108.         <td colSpan="2"><input name="buyDate" size="10"><img style="CURSOR: hand" onClick="SelectDate('buyDate', 'yyyy-MM-dd')" src="../images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26">  
  109.           日期格式形如 1999-1-2</td>  
  110.       </tr>
  111.       <tr>
  112.         <td noWrap>当前状态:</td>
  113.         <td colSpan="2"><select name="state">
  114.             <option value="0" selected>可用</option>
  115.             <option value="1">损坏</option>
  116.             <option value="2">报废</option>
  117.           </select></td>
  118.       </tr>
  119.       <tr>
  120.         <td noWrap>备注:</td>
  121.         <td colSpan="2"><textarea name="remark" cols="45" rows="3" wrap="yes" class="BigINPUT" id="remark"></textarea></td>
  122.       </tr>
  123.       <tr>
  124.         <td noWrap align="middle" colSpan="3"><input value="保存" type="submit">&nbsp;&nbsp; 
  125.           <input type="reset" value="重填">&nbsp;&nbsp;</td>
  126.       </tr>
  127.     </tbody>
  128.   </FORM>
  129. </table>
  130. </body>
  131. </html>