modify_safe_driving.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:9k
源码类别:
电子政务应用
开发平台:
Java
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_vehicle_automobile.tld" prefix="vnex_auto" %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="java.util.*"%>
- <%@ page import="com.vnex.intranet.util.*" %>
- <%@ page import="java.math.BigDecimal" %>
- <%@ page import="com.vnex.intranet.pub.BusinessSession"%>
- <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="svb" class="com.vnex.intranet.vehicle.driver.value.SafetyDrivingValueBean" scope="page" />
- <%
- String timeS = request.getParameter("timeS");
- String id = request.getParameter("id");
- int sdId = Integer.parseInt( id );
- svb = driverProxy.getSafetyDrivingInfo( sdId );
- %>
- <!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/util/validate.js"></script>
- <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
- <script language=JavaScript>
- function listSafetyDriving(form)
- {
- form.action="/mainctrl/driver/listSafetyDriving";
- form.submit();
- }
- function deleteSafetyDriving(form)
- {
- if(confirm("是否要删除当前记录?"))
- {
- form.action="/mainctrl/driver/deleteSafetyDriving";
- form.submit();
- }
- }
- function modifySafetyDrivingSucess(form)
- {
- if( checkIt(form) )
- {
- form.action="/mainctrl/driver/modifySafetyDrivingSucess";
- form.submit();
- }
- }
- function checkIt(form)
- {
- if(isInvalidateLen(form.safetyExamination.value,100))
- {
- alert("安全考核不能超过10个字符");
- form.safetyExamination.focus();
- return false;
- }
- if(isInvalidateLen(form.bonus.value,10))
- {
- alert("奖金不能超过10个字符");
- form.bonus.focus();
- return false;
- }
- if ( !(isFloat(form.bonus.value)) || Number(form.bonus.value)<=0)
- {
- alert("奖金必须是大于0的数字!");
- form.bonus.focus();
- return false;
- }
- if(isInvalidateLen(form.note.value, 800))
- {
- alert("你的说明过长了,它只能容纳200个汉字或800个英文字符");
- form.note.focus();
- return false;
- }
- return true;
- }
- </script>
- <DIV align=center>
- <form name="myform" method="post" action="">
- <input type="hidden" name="timeS" value="<%= timeS %>">
- <input type="hidden" name="id" value="<%= svb.getId() %>">
- <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/listDrivingFee"><font color="#FFFFFF">车辆行驶费用</font></a>>><a href="/mainctrl/driver/listSafetyDriving"><font color="#FFFFFF">驾驶员安全行驶奖统计</font></a>>>修改安全行驶奖信息
- </font></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong"> 时间</font>: </td>
- <td align="left" width="487"><%= svb.getYear() %>年<%= svb.getMonth() %>月 </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 驾驶员</font>: </td>
- <td width="487"> <%= FieldUtil.filterScriptTag(svb.getEmpName()) %></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"><font class="strong"> 车辆:</font></td>
- <td width="487"> <%= FieldUtil.filterScriptTag(svb.getAutomobileSerialNo()) %> </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 上月公里表底</font>:
- </td>
- <td width="487">
- <%
- BigDecimal bidDec = new BigDecimal( svb.getBaseOdometer() );
- out.println( bidDec.setScale(4, BigDecimal.ROUND_UP ) );
- %> 公里</td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong"> 本月底公里表</font>:
- </td>
- <td align="left" width="487">
- <%
- bidDec = new BigDecimal( svb.getOdometer() );
- out.println( bidDec.setScale(4, BigDecimal.ROUND_UP ) );
- %> 公里</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 总计行走公里</font>:
- </td>
- <td width="487"><%
- bidDec = new BigDecimal( svb.getOdometer() - svb.getBaseOdometer() );
- out.println( bidDec.setScale(4, BigDecimal.ROUND_UP ) );
- %>公里</td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100" height="14"> <font class="strong"> 耗油:</font>
- </td>
- <td align="left" width="487" height="14"> <%= svb.getOil() %>升</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100" bgcolor="#fafafa"><font class="strong"> 元/公里:</font></td>
- <td align="left" width="487">
- <%
- if ( ( svb.getOdometer() - svb.getBaseOdometer() ) == 0 )
- bidDec = new BigDecimal( 0.0 );
- else
- bidDec = new BigDecimal( svb.getOilFee()/( svb.getOdometer() - svb.getBaseOdometer() ) );
- out.println( bidDec.setScale(3, BigDecimal.ROUND_UP ) );
- %> 元/公里</td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong"> 安全考核</font>:
- </td>
- <td align="left" width="487">
- <input type="text" name="safetyExamination" class="file" size="24" value=<%= FieldUtil.filterQuotTag(svb.getSafetyExamination()) %>>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"><font class="strong"> 奖金:</font></td>
- <td align="left" width="487">
- <input type="text" name="bonus" class="file" size="6" value="<%bidDec = new BigDecimal( svb.getBonus() );out.println( bidDec.setScale(3, BigDecimal.ROUND_UP ) );%>">元
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong"> 备注:</font></td>
- <td width="487">
- <textarea name="note" cols="59" rows="4"><%= FieldUtil.filterQuotTag(svb.getNote()) %></textarea>
- </td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td colspan="2" height="30">
- <div align="center">
- <input type="button" name="Button" value="保存" class="file" onClick="modifySafetyDrivingSucess(this.form)">
- <input type="button" name="Button" value="删除" class="file" onClick="deleteSafetyDriving(this.form)">
- <input type="reset" name="Button2" value="重置" class="file">
- <input type="button" name="Submit2" value="放弃" class="file" onClick="listSafetyDriving(this.form)">
- </div>
- </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>