⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modify_accident.jsp

📁 非常完整的Java开发的网络办公系统
💻 JSP
字号:
<%@ taglib uri="/vnex.tld" prefix="vnex" %>
<%@ taglib uri="/vnex_vehicle_automobile.tld" prefix="vnex_auto" %>
<%@ page errorPage="/vnex/ErrorPage.jsp" %>
<%@ page import="com.vnex.intranet.util.*" %>
<%@ page import="java.sql.Timestamp" %>

<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="avb" class="com.vnex.intranet.vehicle.driver.value.AccidentValueBean" scope="page" /> 

<%      
    String id = request.getParameter("id");
    int accidentId = Integer.parseInt( id );      
    avb = driverProxy.getAccidentInfo( accidentId );                                
%>
<%
 // get the currentTime
  Timestamp tCurrent = new Timestamp(System.currentTimeMillis());
  Calendar calCurrent = TimeStamp.convertTimestampToCalendar(tCurrent); 
  String currentDate = "" + TimeStamp.formatCalendar( TimeStamp.YMD, calCurrent   );
%>

<!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">
var currentDate ="<%=currentDate%>";
function modifyAccidentSuccess(form)
{
    if(checkIt(form))
    {
        form.action="/mainctrl/driver/modifyAccidentSuccess";
        form.submit();
    }
}

function detailAccident(form)
{
    form.action="/mainctrl/driver/detailAccident";
    form.submit();
}

function checkIt(form)
{  
    if(isEmpty(form.timeS.value) || isEmptyStr(form.timeS.value))
    {
        alert("请输入事故日期");
        form.timeS.focus();
        return false;
    }         
    if(!isVNEXDate(form.timeS.value) )
    {
        alert("事故日期非法");
        form.timeS.focus();
        return false;
    }      
    if( currentDate < form.timeS.value )
    {
       alert("事故日期必须是本日或之前");
       form.timeS.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(isEmpty(form.severityLevel.value) || isEmptyStr(form.severityLevel.value))
    {
        alert("请输入事故严重程度");
        form.severityLevel.focus();
        return false;
    }
    if(isInvalidateLen(form.severityLevel.value,100))
    {
        alert("事故严重程度不能超过25个汉字或100个英文字符");
        form.severityLevel.focus();
        return false;
    }    
    if(isInvalidateLen(form.reason.value,100))
    {
        alert("事故原因不能超过25个汉字或100个英文字符");
        form.reason.focus();
        return false;
    }       
    if(isEmpty(form.processResult.value) || isEmptyStr(form.processResult.value))
    {
        alert("请输入处理结果");
        form.processResult.focus();
        return false;
    }
    if(isInvalidateLen(form.processResult.value,100))
    {
        alert("处理结果不能超过25个汉字或100个英文字符");
        form.processResult.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="">
<input type="hidden" name="empId" value="<%=request.getParameter("empId")%>">   
<input type="hidden" name="empName" value="<%= request.getParameter("empName") %>">
<input type="hidden" name="id" value="<%= id %>">
   
    <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">&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;<a href="/mainctrl/driver/listDriver"><font color="#FFFFFF">司机管理</font></a>&gt;&gt;<a href="/mainctrl/driver/detailDriver?empId=<%= request.getParameter("empId") %>"><font color="#FFFFFF">司机详细信息</font></a>&gt;&gt;修改事故记录                     
                      </font></td>
                  </tr>
                  <tr bgcolor="#e0e0e0"> 
                    <td width="115"><font  class="strong">&nbsp;姓名:</font></td>
                    <td colspan="2" width="477"><%= FieldUtil.filterQuotTag(request.getParameter("empName")) %> </td>
                  </tr>
                  <tr bgcolor="#fafafa"> 
                    <td width="115"> <font  class="strong">&nbsp;事故日期:</font> 
                    </td>
                    <td align="left" width="461"> 
                      <input type="text" name="timeS" readonly size="24" class="text" value="<%= avb.getTimeS() %>">
                      &nbsp; <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(timeS);return false;" width="16" height="16"> 
                      *( 注:带 * 的为必填内容)</td>
                  </tr>
                  <tr bgcolor="#e0e0e0"> 
                    <td width="115"><font  class="strong">&nbsp;事故地点:</font></td>
                    <td colspan="2" width="477"> 
                      <input type="text" name="site" class="file" size="24" value="<%= FieldUtil.filterQuotTag(avb.getSite()) %>">
                      * </td>
                  </tr>
                  <tr bgcolor="#fafafa"> 
                    <td width="115"><font  class="strong">&nbsp;使用车辆:</font></td>
                    <td width="487">
                      <select name="automobileId">
                        <vnex_auto:autoList> 
                          <vnex:items select='<%= ""+avb.getAutomobileId() %>' >
                            <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="115"><font  class="strong">&nbsp;严重程度:</font></td>
                    <td colspan="2" width="477"> 
                      <input type="text" name="severityLevel" class="file" size="6" value="<%= FieldUtil.filterQuotTag(avb.getSeverityLevel()) %>">
                      * </td>
                  </tr>
                  <tr bgcolor="#fafafa"> 
                    <td width="115"> <font  class="strong">&nbsp;事故原因:</font> 
                    </td>
                    <td colspan="2" width="477"> 
                      <input type="text" name="reason" class="file" size="72" value="<%= FieldUtil.filterQuotTag(avb.getReason()) %>">
                    </td>
                  </tr>
                  <tr bgcolor="#e0e0e0"> 
                    <td width="115"><font  class="strong">&nbsp;是主要责任人:</font></td>
                    <td colspan="2" width="477"> 
                      <input type="checkbox" name="isResponsible" <% if( avb.getIsResponsible() ==1 ) out.print("checked"); %> value="1">
                    </td>
                  </tr>
                  <tr bgcolor="#fafafa"> 
                    <td width="115"> <font  class="strong">&nbsp;处理结果: </font> 
                    </td>
                    <td colspan="2" width="477"> 
                      <input type="text" name="processResult" class="file" size="24" value="<%= FieldUtil.filterQuotTag(avb.getProcessResult()) %>">
                      * </td>
                  </tr>
                  <tr bgcolor="#e0e0e0"> 
                    <td width="115"> <font  class="strong">&nbsp;其他说明: 
                      </font> </td>
                    <td colspan="2" width="477"> 
                      <textarea name="note" cols="59" rows="4"><%= FieldUtil.filterQuotTag(avb.getNote()) %></textarea>
                    </td>
                  </tr>
                  <tr bgcolor="#fafafa" align="center"> 
                    <td colspan="3" height="30"> 
                      <input type="button" name="Submit" value="保存" class="file"  onclick="modifyAccidentSuccess(this.form)">&nbsp;&nbsp;
                      <input type="reset" name="Submit2" class="file" value="重置">&nbsp;&nbsp;
                      <input type="button" name="Submit22" class="file" value="放弃" onClick="detailAccident(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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -