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

电子政务应用

开发平台:

Java

  1. <%@jsp:include file="/vnex/head.jsp"%>
  2. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  3. <%@ page import="java.util.*" %>
  4. <%@ page import="com.vnex.intranet.vehicle.loader.*" %>
  5. <%@ taglib uri="/vnex_vehicle_automobile.tld" prefix="vnex_automobile" %>
  6. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  7. <%
  8.     int id = Integer.parseInt(request.getParameter("automobileId"));
  9. %>
  10. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  11. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  12. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  13. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  14. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  15. <script language="JavaScript" src="/vnex/validate.js"></script>
  16. <script language=JavaScript>
  17. function checkChar(str)
  18. {
  19.     var i,j,strTemp;
  20.     strTemp=""<>/\'%&";
  21.     for (i=0;i<str.length;i++)
  22.     {
  23.       j=strTemp.indexOf(str.charAt(i));
  24.       if (j!=-1)
  25.       {
  26.         return false;
  27.       }
  28.     }
  29.     return true;
  30. }
  31. function save()
  32. {
  33.     if(check())
  34.     {
  35.       document.form1.action="/mainctrl/manage/autoRepairAddSave?automobileId="+<%=id%>;
  36.       document.form1.submit();
  37.     }
  38. }
  39. function can()
  40. {
  41.   document.form1.action="/mainctrl/manage/autoRepairList?automobileId="+<%=id%>;
  42.   document.form1.submit();
  43. }
  44. function check()
  45. {
  46.     var begin = document.form1.ssBeginDate.value;
  47.     var beginTime = begin.split("-");
  48.     beginYear = beginTime[0];
  49.     beginMonth = beginTime[1];
  50.     beginDay = beginTime[2];
  51.     begin = beginYear + beginMonth + beginDay;                    
  52.                     
  53.     var end = document.form1.ssEndDate.value;
  54.     var endTime = end.split("-");    
  55.     endYear = endTime[0];
  56.     endMonth = endTime[1];
  57.     endDay = endTime[2];    
  58.     end = endYear + endMonth + endDay;
  59.     
  60.         
  61.     if(begin.length!=8)
  62.     {
  63.         alert("送修日期必须填写 ");
  64.         return false;        
  65.     }
  66.     if(end.length!=8)
  67.     {
  68.         alert("修复时间必须填写 ");
  69.         return false;        
  70.     }   
  71.     
  72.     if(begin >= end||(document.form1.ssBeginDate.value.length<=0)||(document.form1.ssEndDate.value.length<=0))
  73.     {
  74.         alert("修复日期要大于送修日期 ");
  75.         document.form1.ssBeginDate.focus(); 
  76.         return false;
  77.     }
  78.     if (document.form1.sender.value.length<=0||(isWhitespace(document.form1.sender.value)))
  79.     {
  80.         alert("送修者长度要大于0 ");
  81.         document.form1.sender.focus(); 
  82.         return false;        
  83.     }
  84.     
  85. /*
  86.     if(!checkChar(document.form1.sender.value))
  87.     {
  88.         alert("请不要在送修者中加入"<>/\'%&这样的字符");
  89.         document.form1.sender.focus();
  90.         return false;
  91.     }
  92. */    
  93.     if (document.form1.repairer.value.length<=0||(isWhitespace(document.form1.repairer.value)))
  94.     {
  95.         alert("维修厂家长度要大于0 ");
  96.         document.form1.repairer.focus(); 
  97.         return false;        
  98.     }
  99. /*    
  100.     if(!checkChar(document.form1.repairer.value))
  101.     {
  102.         alert("请不要在维修厂家中加入"<>/\'%&这样的字符");
  103.         document.form1.repairer.focus();
  104.         return false;
  105.     }
  106. */
  107.         
  108.     if (document.form1.reason.value.length<=0||(isWhitespace(document.form1.reason.value)))
  109.     {
  110.         alert("送修原因长度要大于0 ");
  111.         document.form1.reason.focus(); 
  112.         return false;        
  113.     }
  114. /*    
  115.     if(!checkChar(document.form1.reason.value))
  116.     {
  117.         alert("请不要在送修原因中加入"<>/\'%&这样的字符");
  118.         document.form1.reason.focus();
  119.         return false;
  120.     }
  121. */                
  122.     if (!isFloat(document.form1.cost.value)||parseFloat(document.form1.cost.value)<=0||(document.form1.cost.value.length<=0))
  123.     {
  124.         alert("维修费用必须是数字且要大于0 ");
  125.         document.form1.cost.focus(); 
  126.         return false;        
  127.     }
  128.             
  129.     return true;
  130. }
  131. </script>
  132. <DIV align=center>
  133. <form name="form1" method="post">
  134.    
  135.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  136.     <TBODY>
  137.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  138.     <TR> 
  139.         <TD colSpan=3 align="center"><br>
  140.           <!--个人信息开始 -->
  141.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  142.             <tr bgcolor="#fafafa"> 
  143.               <td> 
  144.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  145.                   <tr> 
  146.                     <td colspan="3" height="12" bgcolor="#666666"><font class="strongw">&nbsp;<a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>&gt;&gt;新增维修记录 
  147.                       </font> </td>
  148.                   </tr>
  149.                   <tr bgcolor="#fafafa"> 
  150.                     <td width="115"> <font  class="strong">&nbsp;送修日期:</font> 
  151.                     </td>
  152.                     <td colspan="2" width="477"> 
  153.                       <input type="text" name="ssBeginDate" class=text size="24" value="" readonly>
  154.                       &nbsp;<img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(ssBeginDate);return false" width="16" height="16"> 
  155.                       * (注:带*为必填内容) </td>
  156.                   </tr>
  157.                   <tr bgcolor="#e0e0e0"> 
  158.                     <td width="115"><font  class="strong">&nbsp;修复日期:<font  class="strong"></font></font></td>
  159.                     <td colspan="2" width="477"> 
  160.                       <input type="text" name="ssEndDate" class=text size="24" value="" readonly>
  161.                       &nbsp;<img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(ssEndDate);return false" width="16" height="16"> 
  162.                       *</td>
  163.                   </tr>
  164.                   <tr bgcolor="#fafafa"> 
  165.                     <td width="115"><font  class="strong">&nbsp;送修者:</font><font  class="strong"></font></td>
  166.                     <td colspan="2" width="477"> 
  167.                       <input type="text" name="sender" class="file" size="24" maxlength="24">&nbsp;*
  168.                       </td>
  169.                   </tr>
  170.                   <tr bgcolor="#e0e0e0"> 
  171.                     <td width="115"><font  class="strong">&nbsp;维修厂家:</font></td>
  172.                     <td colspan="2" width="477"> 
  173.                       <input type="text" name="repairer" class="file" size="24" maxlength="24">&nbsp;*
  174.                     </td>
  175.                   </tr>
  176.                   <tr bgcolor="#fafafa"> 
  177.                     <td width="115"><font  class="strong">&nbsp;送修原因:</font></td>
  178.                     <td colspan="2" width="477"> 
  179.                       <input type="text" name="reason" class="file" size="72" maxlength="40">&nbsp;*
  180.                     </td>
  181.                   </tr>
  182.                   <tr bgcolor="#e0e0e0"> 
  183.                     <td width="115"> <font  class="strong">&nbsp;维修费用:</font> 
  184.                     </td>
  185.                     <td colspan="2" width="477"> 
  186.                       <input type="text" name="cost" class="file" size="6" maxlength="8">&nbsp;*
  187.                       元 </td>
  188.                   </tr>
  189.                   <tr bgcolor="#fafafa" align="center"> 
  190.                     <td colspan="3" height="30"> 
  191.                       <input type="button" name="Submit" value="保存" class="file"  onclick="save()">&nbsp;&nbsp; 
  192.                       <input type="reset" name="Submit2" class="file" value="重置" >&nbsp;&nbsp;
  193.                       <input type="button" name="Submit22" class="file" value="放弃" onClick="can()">
  194.                     </td>
  195.                   </tr>
  196.                 </table>
  197.               </td>
  198.             </tr>
  199.           </table>
  200.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  201.        </TD>
  202.      </TR>
  203.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  204.     </TBODY> 
  205.   </TABLE>
  206.     <BR>
  207.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  208. </form>
  209. </DIV>
  210. </BODY>
  211. </HTML>
  212. </BODY>
  213. </HTML>