auto_repair_add.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:8k
源码类别:
电子政务应用
开发平台:
Java
- <%@jsp:include file="/vnex/head.jsp"%>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="java.util.*" %>
- <%@ page import="com.vnex.intranet.vehicle.loader.*" %>
- <%@ taglib uri="/vnex_vehicle_automobile.tld" prefix="vnex_automobile" %>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%
- int id = Integer.parseInt(request.getParameter("automobileId"));
- %>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <script language=JavaScript>
- function checkChar(str)
- {
- var i,j,strTemp;
- strTemp=""<>/\'%&";
- for (i=0;i<str.length;i++)
- {
- j=strTemp.indexOf(str.charAt(i));
- if (j!=-1)
- {
- return false;
- }
- }
- return true;
- }
- function save()
- {
- if(check())
- {
- document.form1.action="/mainctrl/manage/autoRepairAddSave?automobileId="+<%=id%>;
- document.form1.submit();
- }
- }
- function can()
- {
- document.form1.action="/mainctrl/manage/autoRepairList?automobileId="+<%=id%>;
- document.form1.submit();
- }
- function check()
- {
- var begin = document.form1.ssBeginDate.value;
- var beginTime = begin.split("-");
- beginYear = beginTime[0];
- beginMonth = beginTime[1];
- beginDay = beginTime[2];
- begin = beginYear + beginMonth + beginDay;
- var end = document.form1.ssEndDate.value;
- var endTime = end.split("-");
- endYear = endTime[0];
- endMonth = endTime[1];
- endDay = endTime[2];
- end = endYear + endMonth + endDay;
- if(begin.length!=8)
- {
- alert("送修日期必须填写 ");
- return false;
- }
- if(end.length!=8)
- {
- alert("修复时间必须填写 ");
- return false;
- }
- if(begin >= end||(document.form1.ssBeginDate.value.length<=0)||(document.form1.ssEndDate.value.length<=0))
- {
- alert("修复日期要大于送修日期 ");
- document.form1.ssBeginDate.focus();
- return false;
- }
- if (document.form1.sender.value.length<=0||(isWhitespace(document.form1.sender.value)))
- {
- alert("送修者长度要大于0 ");
- document.form1.sender.focus();
- return false;
- }
- /*
- if(!checkChar(document.form1.sender.value))
- {
- alert("请不要在送修者中加入"<>/\'%&这样的字符");
- document.form1.sender.focus();
- return false;
- }
- */
- if (document.form1.repairer.value.length<=0||(isWhitespace(document.form1.repairer.value)))
- {
- alert("维修厂家长度要大于0 ");
- document.form1.repairer.focus();
- return false;
- }
- /*
- if(!checkChar(document.form1.repairer.value))
- {
- alert("请不要在维修厂家中加入"<>/\'%&这样的字符");
- document.form1.repairer.focus();
- return false;
- }
- */
- if (document.form1.reason.value.length<=0||(isWhitespace(document.form1.reason.value)))
- {
- alert("送修原因长度要大于0 ");
- document.form1.reason.focus();
- return false;
- }
- /*
- if(!checkChar(document.form1.reason.value))
- {
- alert("请不要在送修原因中加入"<>/\'%&这样的字符");
- document.form1.reason.focus();
- return false;
- }
- */
- if (!isFloat(document.form1.cost.value)||parseFloat(document.form1.cost.value)<=0||(document.form1.cost.value.length<=0))
- {
- alert("维修费用必须是数字且要大于0 ");
- document.form1.cost.focus();
- return false;
- }
- return true;
- }
- </script>
- <DIV align=center>
- <form name="form1" method="post">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center"><br>
- <!--个人信息开始 -->
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr bgcolor="#fafafa">
- <td>
- <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td colspan="3" height="12" bgcolor="#666666"><font class="strongw"> <a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>>>新增维修记录
- </font> </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="115"> <font class="strong"> 送修日期:</font>
- </td>
- <td colspan="2" width="477">
- <input type="text" name="ssBeginDate" class=text size="24" value="" readonly>
- <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(ssBeginDate);return false" width="16" height="16">
- * (注:带*为必填内容) </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="115"><font class="strong"> 修复日期:<font class="strong"></font></font></td>
- <td colspan="2" width="477">
- <input type="text" name="ssEndDate" class=text size="24" value="" readonly>
- <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(ssEndDate);return false" width="16" height="16">
- *</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="115"><font class="strong"> 送修者:</font><font class="strong"></font></td>
- <td colspan="2" width="477">
- <input type="text" name="sender" class="file" size="24" maxlength="24"> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="115"><font class="strong"> 维修厂家:</font></td>
- <td colspan="2" width="477">
- <input type="text" name="repairer" class="file" size="24" maxlength="24"> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="115"><font class="strong"> 送修原因:</font></td>
- <td colspan="2" width="477">
- <input type="text" name="reason" class="file" size="72" maxlength="40"> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="115"> <font class="strong"> 维修费用:</font>
- </td>
- <td colspan="2" width="477">
- <input type="text" name="cost" class="file" size="6" maxlength="8"> *
- 元 </td>
- </tr>
- <tr bgcolor="#fafafa" align="center">
- <td colspan="3" height="30">
- <input type="button" name="Submit" value="保存" class="file" onclick="save()">
- <input type="reset" name="Submit2" class="file" value="重置" >
- <input type="button" name="Submit22" class="file" value="放弃" onClick="can()">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form>
- </DIV>
- </BODY>
- </HTML>
- </BODY>
- </HTML>