modify_fee.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="java.math.BigDecimal" %>
- <%@ page import="com.vnex.intranet.util.*" %>
- <%@ 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="dvb" class="com.vnex.intranet.vehicle.driver.value.DrivingFeeValueBean" scope="page" />
- <%
- String timeS = request.getParameter("timeS");
- String id = request.getParameter("id");
- int dfId = Integer.parseInt( id );
- dvb = driverProxy.getDrivingFeeInfo( dfId );
- %>
- <!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 listDrivingFee(form)
- {
- form.action="/mainctrl/driver/listDrivingFee";
- form.submit();
- }
- function modifyDrivingFeeSucess(form)
- {
- if( checkIt(form) )
- {
- form.action="/mainctrl/driver/modifyDrivingFeeSucess";
- form.submit();
- }
- }
- function checkIt(form)
- {
- if(isInvalidateLen(form.odometer.value,10))
- {
- alert("里程表不能超过10个字符");
- form.odometer.focus();
- return false;
- }
- if ( !(isFloat(form.odometer.value)) || Number(form.odometer.value)<=0)
- {
- alert("里程表必须是大于0的数字!");
- form.odometer.focus();
- return false;
- }
- if(isInvalidateLen(form.oil.value,10))
- {
- alert("月用油不能超过10个字符");
- form.oil.focus();
- return false;
- }
- if ( !(isFloat(form.oil.value)) || Number(form.oil.value)<=0)
- {
- alert("月用油必须是大于0的数字!");
- form.oil.focus();
- return false;
- }
- if(isInvalidateLen(form.oilFee.value,10))
- {
- alert("金额不能超过10个字符");
- form.oilFee.focus();
- return false;
- }
- if ( !(isFloat(form.oilFee.value)) || Number(form.oilFee.value)<=0)
- {
- alert("金额必须是大于0的数字!");
- form.oilFee.focus();
- return false;
- }
- if(isInvalidateLen(form.drivingFee.value,10))
- {
- alert("行驶费用不能超过10个字符");
- form.drivingFee.focus();
- return false;
- }
- if ( !(isFloat(form.drivingFee.value)) || Number(form.drivingFee.value)<=0)
- {
- alert("行驶费用必须是大于0的数字!");
- form.drivingFee.focus();
- return false;
- }
- if(isInvalidateLen(form.maintainFee.value,10))
- {
- alert("月维修费不能超过10个字符");
- form.maintainFee.focus();
- return false;
- }
- if ( !(isFloat(form.maintainFee.value)) || Number(form.maintainFee.value)<=0)
- {
- alert("月维修费必须是大于0的数字!");
- form.maintainFee.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="id" value="<%= dvb.getId() %>">
- <input type="hidden" name="empId" value="<%= dvb.getEmpId() %>">
- <input type="hidden" name="automobileId" value="<%= dvb.getAutomobileId() %>">
- <input type="hidden" name="year" value="<%= dvb.getYear() %>">
- <input type="hidden" name="month" value="<%= dvb.getMonth() %>">
- <input type="hidden" name="timeS" value="<%= timeS %>">
- <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>>>修改车辆月行驶费用
- </font></td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 时间</font>: </td>
- <td align="left" width="487"><%= dvb.getYear() %>年<%= dvb.getMonth() %>月 </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong"> 驾驶员</font>: </td>
- <td width="487"> <%= FieldUtil.filterScriptTag(dvb.getEmpName()) %></td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"><font class="strong"> 车辆:</font></td>
- <td width="487" bgcolor="#fafafa"> <%= FieldUtil.filterScriptTag(dvb.getAutomobileSerialNo()) %></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong"> 里程底表</font>:
- </td>
- <td width="487"> <%= dvb.getBaseOdometer() %>公里</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 里程表</font>: </td>
- <td align="left" width="487">
- <input type="text" name="odometer" class="file" size="24" value="<%BigDecimal bidDec = new BigDecimal( dvb.getOdometer());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">
- <input type="text" name="oil" class="file" size="6" value="<%= dvb.getOil() %>">升
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 金额</font>: </td>
- <td align="left" width="487">
- <input type="text" name="oilFee" class="file" size="6" value="<% bidDec = new BigDecimal(dvb.getOilFee()); 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="drivingFee" class="file" size="6" value="<%bidDec = new BigDecimal(dvb.getDrivingFee()); out.println( bidDec.setScale(3, BigDecimal.ROUND_UP ) );%>">元
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"> <font class="strong"> 月维修费</font>:
- </td>
- <td align="left" width="487">
- <input type="text" name="maintainFee" class="file" size="6" value="<%bidDec = new BigDecimal(dvb.getMaintainFee());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(dvb.getNote()) %></textarea>
- </td>
- </tr>
- <tr bgcolor="#fafafa" align="center">
- <td colspan="2" height="30">
- <input type="button" name="Button" value="保存" class="file" onClick="modifyDrivingFeeSucess(this.form)">
- <input type="reset" name="Submit2" value="重置" class="file">
- <input type="button" name="Submit22" value="放弃" class="file" onClick="listDrivingFee(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>