equipment_repair_add.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:6k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%
  3.   int equipment;
  4.   equipment = (new Integer(request.getParameter("equipmentId"))).intValue();
  5. %>
  6. <script Language="JavaScript" src="/vnex/util/Popup.js"></script>
  7. <script language="JavaScript" src="/vnex/util/validate.js"></script>
  8. <script language=JavaScript>
  9. function isDataValid()
  10. {
  11. if (myForm.repairer.value.length > 50)
  12. {
  13. alert("维修者应少于50个字符!");
  14. myForm.repairer.focus();
  15. return false;
  16. }
  17. if (myForm.repairReason.value.length > 50)
  18. {
  19. alert("维修原因应少于50个字符!");
  20. myForm.repairReason.focus();
  21. return false;
  22. }
  23. if (myForm.result.value.length > 50)
  24. {
  25. alert("维修结果应少于50个字符!");
  26. myForm.result.focus();
  27. return false;
  28. }
  29. if (myForm.beginDay.value == "")
  30. {
  31. alert("请选择送修日期!");
  32. return false;
  33. }
  34. if (!(isFloat(myForm.expense.value)))
  35. {
  36. alert("费用必须是数字,而且不准为空!");
  37. myForm.expense.focus();
  38. return false;
  39. }
  40. else
  41. {
  42.     if (Number(myForm.expense.value) > 99999999.99 || Number(myForm.expense.value)< -99999999.99)
  43.     {
  44.      alert("费用必须在-99999999.99和99999999.99之间");
  45.      myForm.expense.focus();
  46.      return false;
  47.     }
  48. }
  49. return true;
  50. }
  51. function toSuccess()
  52. {
  53. if (isDataValid())
  54. {
  55. myForm.action="/mainctrl/equipmentRepairAddSuccess?equipmentId=<%=request.getParameter("equipmentId")%>";
  56. myForm.submit();
  57. }
  58. }
  59. </script>
  60. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  61. <HTML>
  62. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  63. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  64. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  65. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  66. <DIV align=center>
  67. <form name="myForm" method="post" action="">
  68.    
  69.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  70.     <TBODY> 
  71.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  72.     <TR> 
  73.         <TD colSpan=3 align="center"><br>  
  74.           <!--个人信息开始 -->
  75.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  76.             <tr bgcolor="#fafafa"> 
  77.               <td> 
  78.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  79.                   <tr bgColor="#666666" > 
  80.                     <td  colspan="2" height="15"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>&gt;&gt;<a href="/mainctrl/equipmentSearchResult"><font color="#FFFFFF">固定资产管理</font></a>&gt;&gt;<a href="/mainctrl/equipmentDetail?equipmentId=<%= equipment%>"><font color="#FFFFFF">固定资产详细信息</font></a>&gt;&gt;添加维修记录</font>
  81.                     </td>
  82.                   </tr>
  83.                   <tr bgcolor="#e0e0e0"> 
  84.                     <td width="131"> 
  85.                       <div align="left"><font  class="strong">&nbsp;送修日期:</font></div>
  86.                     </td>
  87.                     <td  width="469"> 
  88.                       <input type="text" name="beginDay" readonly size="24" class="text" >
  89.                       <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择日期" onClick="fPopUpCalendarDlg(beginDay);return false">&nbsp;*&nbsp;(注:带*为必填内容)
  90.                     </td>
  91.                   </tr>
  92.                   <tr bgcolor="#fafafa"> 
  93.                     <td width="131"><font  class="strong">&nbsp;维修者:</font></td>
  94.                     <td  width="469"><font  class="strong"><font  class="strong">
  95.                       <input type="text" name="repairer" class="file" size="24">
  96.                       </font></font> </td>
  97.                   </tr>
  98.                   <tr bgcolor="#e0e0e0"> 
  99.                     <td width="131"><font  class="strong">&nbsp;送修原因:</font></td>
  100.                     <td  width="469"><font  class="strong"><font  class="strong"> 
  101.                       <textarea name="repairReason" cols="35" rows="3"></textarea>                      
  102.                       </font></font></td>
  103.                   </tr>
  104.                   <tr bgcolor="#fafafa"> 
  105.                     <td width="131"> 
  106.                       <div align="left"><font  class="strong">&nbsp;维修费用:</font></div>
  107.                     </td>
  108.                     <td  width="469"><font  class="strong"> 
  109.                       <input type="text" name="expense" size="24" class="file">
  110.                       元</font> </td>
  111.                   </tr>
  112.                   <tr bgcolor="#e0e0e0"> 
  113.                     <td width="131"> 
  114.                       <div align="left"><font  class="strong">&nbsp;维修结果: </font></div>
  115.                     </td>
  116.                     <td  width="469"><font size="2"><font  class="strong"><font  class="strong"> 
  117.                       <font  class="strong">
  118.                       <textarea name="result" cols="35" rows="3"></textarea>                      
  119.                       </font></font></font></font></td>
  120.                   </tr>
  121.                   <tr bgcolor="#fafafa"> 
  122.                     <td colspan="2"> 
  123.                       <div align="center"> 
  124.                         <input type="button" name="Submit" value="保存" class="file"  onclick=toSuccess()>
  125.                         &nbsp;&nbsp;<input type="reset" name="Submit3" value="重置" class="file" >
  126.                         &nbsp;&nbsp;<input type="button" name="Submit2" class="file" value="放弃" onclick="location='/mainctrl/equipmentRepairList?equipmentId=<%=equipment%>'">
  127.                       </div>
  128.                     </td>
  129.                   </tr>
  130.                 </table>
  131.               </td>
  132.             </tr>
  133.           </table>
  134.           
  135.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  136.        </TD>
  137.      </TR>
  138.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  139.     </TBODY> 
  140.   </TABLE>
  141.     <BR>
  142.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  143. </form>
  144. </DIV>
  145. </BODY>
  146. </HTML>