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

电子政务应用

开发平台:

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