vehicle_maintenance_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. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  53. <%
  54. if (!privilege.isUserPrivValid(request, "vehicle")) {
  55. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  56. return;
  57. }
  58. %>
  59. <form action="vehicle_maintenance_do.jsp?op=add" method="post" name="form1">
  60.   <table  width="602" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="tableframe">
  61.     <tbody>
  62.       <tr>
  63.         <td height="23" valign="middle" class="right-title" colspan="4"><span>&nbsp;车辆维护记录</span></td>
  64.       </tr>
  65.       <tr>
  66.         <td nowrap width="103">车&nbsp;&nbsp;牌&nbsp;&nbsp;号:</td>
  67.         <td width="150">
  68. <select name="licenseNo">
  69. <%
  70. VehicleDb vd = new VehicleDb();
  71. String sql = "select licenseNo from vehicle";
  72. Iterator ir = vd.list(sql).iterator();
  73. while (ir.hasNext()) {
  74. vd = (VehicleDb)ir.next();
  75. %>
  76. <option value="<%=vd.getLicenseNo()%>"><%=vd.getLicenseNo()%></option>
  77. <%}%>
  78.         </select>
  79. </td>
  80.         <td width="60">维护类型:</td>
  81.         <td width="266"><select name="type">
  82.             <option value="0" selected>维修</option>
  83.             <option value="1">加油</option>
  84.             <option value="2">洗车</option>
  85.             <option value="3">年检</option>
  86.             <option value="4">其它</option>
  87.         </select></td>
  88.       </tr>
  89.       <tr>
  90.         <td nowrap width="103">维护开始日期:</td>
  91.         <td colspan="3"><input name="beginDate" size="20">
  92.             <img style="CURSOR: hand" onClick="SelectDate('beginDate', 'yyyy-MM-dd')" src="../images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26"> 日期格式形如 1999-1-2</td>
  93.       </tr>
  94.       <tr>
  95.         <td nowrap>维护结束日期:</td>
  96.         <td colspan="3"><input name="endDate" size="20">
  97.             <img style="CURSOR: hand" onClick="SelectDate('endDate', 'yyyy-MM-dd')" src="../images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26"> 日期格式形如 1999-1-2</td>
  98.       </tr>
  99.       <tr>
  100.         <td nowrap width="103">维护原因:</td>
  101.         <td colspan="3"><textarea name="cause" cols="60"></textarea>
  102.         </td>
  103.       </tr>
  104.       <tr>
  105.         <td nowrap width="103">经&nbsp;&nbsp;办&nbsp;&nbsp;人:</td>
  106.         <td><input maxlength="100" size="20" name="transactor">
  107.         </td>
  108.         <td nowrap width="60">维护费用:</td>
  109.         <td width="266"><input maxlength="25" size="20" name="expense">
  110.         </td>
  111.       </tr>
  112.       <tr>
  113.         <td nowrap width="103">备  注:</td>
  114.         <td colspan="3"><textarea name="remark" cols="60"></textarea>
  115.         </td>
  116.       </tr>
  117.       <tr>
  118.         <td nowrap align="center" colspan="4"><input name="submit" type="submit" value="保存">
  119.           
  120.           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  121.         <input name="reset" type="reset" value="重填">        </td>
  122.       </tr>
  123.     </tbody>
  124.   </table>
  125. </form>
  126. </body>
  127. </html>