add_work_record.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:10k
源码类别:
电子政务应用
开发平台:
Java
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_vehicle_driver.tld" prefix="vnex_driver" %>
- <%@ taglib uri="/vnex_vehicle_automobile.tld" prefix="vnex_auto" %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.pub.BusinessSession"%>
- <%@ page import="java.util.*"%>
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <jsp:useBean id="driverProxy" scope="application" class="com.vnex.intranet.vehicle.driver.proxy.DriverProxyBean" />
- <jsp:useBean id="condition" scope="page" class="com.vnex.intranet.vehicle.driver.value.DriverQryBean" />
- <%
- condition.setDriverName( "" );
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <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/util/strUtil.js"></script>
- <script language="JavaScript" src="/vnex/util/validate.js"></script>
- <script language="JavaScript">
- function change(select)
- {
- myform.action="/mainctrl/driver/addDriver";
- myform.submit();
- }
- function addWorkRecordSuccess(form)
- {
- if(checkIt(form))
- {
- form.action="/mainctrl/driver/addWorkRecordSuccess";
- form.submit();
- }
- }
- function listWorkRecord(form)
- {
- form.action="/mainctrl/driver/listWorkRecord";
- form.submit();
- }
- function checkIt(form)
- {
- if(isEmpty(form.dateS.value) || isEmptyStr(form.dateS.value))
- {
- alert("请输入出车日期");
- form.dateS.focus();
- return false;
- }
- if( form.empId.options.length < 1 || form.empId.options.value == -1 )
- {
- alert("请选择司机");
- form.empId.focus();
- return false;
- }
- if( form.automobileId.options.length < 1 || form.automobileId.options.value ==-1)
- {
- alert("请选择车辆");
- form.automobileId.focus();
- return false;
- }
- if(isEmpty(form.boater.value) || isEmptyStr(form.boater.value))
- {
- alert("请输入乘车人");
- form.boater.focus();
- return false;
- }
- if(isInvalidateLen(form.boater.value,100))
- {
- alert("乘车人不能超过25个汉字或100个英文字符");
- form.boater.focus();
- return false;
- }
- if(isInvalidateLen(form.reason.value,100))
- {
- alert("用车事由不能超过25个汉字或100个英文字符");
- form.reason.focus();
- return false;
- }
- if(isEmpty(form.site.value) || isEmptyStr(form.site.value))
- {
- alert("请输入行驶地点");
- form.site.focus();
- return false;
- }
- if(isInvalidateLen(form.site.value,100))
- {
- alert("行驶地点不能超过25个汉字或100个英文字符");
- form.site.focus();
- return false;
- }
- if( ( form.beginHourS.value + form.beginMinuteS.value ) >= ( form.endHourS.value + form.endMinuteS.value ) )
- {
- alert("收车时间应该大于出车时间");
- form.beginHourS.focus();
- return false;
- }
- if(isInvalidateLen(form.sender.value,100))
- {
- alert("派车人不能超过25个汉字或100个英文字符");
- form.sender.focus();
- return false;
- }
- if(isInvalidateLen(form.note.value, 800))
- {
- alert("你的说明过长了,它只能容纳200个汉字或800个英文字符");
- return false;
- }
- return true;
- }
- </script>
- <DIV align=center>
- <form name="myform" method="post" action="">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <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="2" height="15" 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>>><a href="/mainctrl/driver/listWorkRecord"><font color="#FFFFFF">车辆出勤登记</font></a>>>增加车辆出勤记录
- </font></td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 日期</font>: </td>
- <td align="left" width="461">
- <input type="text" name="dateS" readonly size="24" class="text">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(dateS);return false;" width="16" height="16">
- * ( 注:带 * 的为必填内容) </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong"> 司机</font>: </td>
- <td width="461">
- <select name="empId">
- <option value="-1" SELECTED > 请选择</option>
- <vnex_driver:driverList condition="<%= condition %>">
- <vnex:items>
- <option value="<vnex_driver:driverAttribute attribute="id" />" >
- <vnex_driver:driverAttribute attribute="name" />
- </option>
- </vnex:items>
- </vnex_driver:driverList>
- </select>
- * </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"><font class="strong"> 车辆:</font></td>
- <td width="487">
- <select name="automobileId">
- <option value="-1" SELECTED > 请选择</option>
- <vnex_auto:autoList>
- <vnex:items>
- <option value="<vnex_auto:autoAttribute attribute="automobileId" />" <vnex_auto:autoAttribute attribute="isSelected" /> >
- <vnex_auto:autoAttribute attribute="carCertNo" />
- </option>
- </vnex:items>
- </vnex_auto:autoList>
- </select>
- * </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong"> 乘车人</font>: </td>
- <td width="461">
- <input type="text" name="boater" class="file" size="24">
- * </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 用车事由</font>:
- </td>
- <td align="left" width="461">
- <input type="text" name="reason" class="file" size="24">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"><font class="strong"> 行驶地点:</font></td>
- <td align="left" width="461">
- <input type="text" name="site" class="file" size="24">
- * </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 出发时间</font>:
- </td>
- <td align="left" width="461">
- <select name="beginHourS">
- <vnex:hourTag />
- </select>时
- <select name="beginMinuteS">
- <vnex:minuteTag />
- </select>
- 分 * </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"><font class="strong"> 收车时间:</font></td>
- <td align="left" width="461">
- <select name="endHourS">
- <vnex:hourTag />
- </select>时
- <select name="endMinuteS">
- <vnex:minuteTag />
- </select>
- 分 * </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 派车人</font>: </td>
- <td align="left" width="461">
- <input type="text" name="sender" class="file" size="24">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong"> 备注:</font></td>
- <td width="461">
- <textarea name="note" cols="59" rows="4"></textarea>
- </td>
- </tr>
- <tr bgcolor="#fafafa" align="center">
- <td colspan="2" height="30">
- <input type="button" name="Button" value="保存" class="file" onClick="addWorkRecordSuccess(this.form)">
- <input type="reset" name="Submit2" value="重置" class="file">
- <input type="button" name="Submit22" value="放弃" class="file" onClick="listWorkRecord(this.form)">
- </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" />
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>