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

📄 equipment_use_add.jsp

📁 非常完整的Java开发的网络办公系统
💻 JSP
字号:

<%@ taglib uri="/vnex.tld" prefix="vnex" %>
<%@ taglib uri="/vnex_organization.tld" prefix="org" %>
<%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
<%@ page import="com.vnex.intranet.pub.BaseJdbcDAO" %>
<%@ page import="com.vnex.intranet.util.TimeStamp" %>
<%@ page import="java.sql.Timestamp" %>
<%@ page import="java.util.Calendar" %>
<jsp:useBean id="equipmentProxy" class="com.vnex.intranet.equipment.proxy.EquipmentProxyBean" scope="session" /> 
<jsp:useBean id="useValue" class="com.vnex.intranet.equipment.value.EquipmentUseRecordValueBean" scope="session" />
<jsp:setProperty name="useValue" property="*" />

<%
	String equipmentId = request.getParameter("equipmentId");
	String equipmentCode = request.getParameter("equipmentCode");
	int month=-1;
	Timestamp lastDay = equipmentProxy.findLastUseDate(Integer.parseInt(equipmentId));
	Calendar cal = TimeStamp.convertTimestampToCalendar(lastDay);
	String strLastDay = "" + cal.get(Calendar.YEAR) + "-";
	month = cal.get(Calendar.MONTH)+1;
	if (month < 10)
	  	strLastDay = strLastDay + "0" +  month + "-";
	else 
		strLastDay = strLastDay + month + "-";
	if (cal.get(Calendar.DAY_OF_MONTH) < 10)
		strLastDay = strLastDay + "0" +  cal.get(Calendar.DAY_OF_MONTH);
	else
		strLastDay = strLastDay  +  cal.get(Calendar.DAY_OF_MONTH);	
	
	session.removeAttribute("useValue");
		
%>
<script Language="JavaScript" src="/vnex/util/Popup.js"></script>
<script language="JavaScript" src="/vnex/util/validate.js"></script>
<script language="javaScript">



function toUseAddSuccess(form)
{
	if ( form.startDay.value.length == 0 )
	{
		alert ("请选择日期!");
		return false;
	}
	
	if ("<%=strLastDay%>" > form.startDay.value)
	{
		alert("现在最后一个使用者的开始日期是<%=strLastDay%>,\n请选择一个在此日期之后的日期!");
		return false;
	}
	
	if (form.useDeptId.value == "-2")
	{
		alert("请选择使用部门!");
		form.useDeptId.focus();
		return false;		
	}
	if (form.usePersonId.value == "-1")
	{
		alert ("请选择使用人!");
		form.usePersonId.focus();
		return false;
	}
	form.action="/mainctrl/equipmentUseAddSuccess?equipmentId=<%=equipmentId%>&equipmentCode=<%=equipmentCode%>";
	form.submit();

}
function toUseList(form)
{
	form.action="/mainctrl/equipmentUseList?equipmentId=<%=equipmentId%>&equipmentCode=<%=equipmentCode%>";
	form.submit();
}
function change(form)
{	
	form.action="/mainctrl/equipmentUseAdd?equipmentId=<%=equipmentId%>&equipmentCode=<%=equipmentCode%>";	
	form.submit();
	
}

</script>
<!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>

<DIV align=center>
<form name="form1" method="post" action="">
   
    <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 bgcolor="#666666"> 
                    <td  colspan="2" height="15"><font class="strongw"><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/equipmentSearchResult"><font color="#FFFFFF">固定资产管理</font></a>&gt;&gt;<a href="/mainctrl/equipmentDetail?equipmentId=<%= equipmentId%>"><font color="#FFFFFF">固定资产详细信息</font></a>&gt;&gt;添加使用记录</font>
                  </tr>
                  <tr> 
                    <td width="115" bgcolor="#e0e0e0"> 
                      <font  class="strong">&nbsp;开始使用日期:</font>
                    </td>
                    <td width="477" bgcolor="#e0e0e0"> 
                      <input type="text" name="startDay" readonly size="30" class="text" value="<%= useValue.getStartDay()%>" >
                      <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择日期" onClick="fPopUpCalendarDlg(startDay);return false">&nbsp;*&nbsp;(注:带*为必填内容)
                    </td>
                  </tr>
                  <tr> 
                    <td width="115" bgcolor="#fafafa"><font  class="strong">&nbsp;使用部门:</font></td>
                    <td width="477" bgcolor="#fafafa">                    	
                        <select name="useDeptId" class=choice onChange=change(form1)>
                        <option value="-2">-请选择-</option>
	                    <org:DivisionList noRoot="false">
	                    <vnex:items select='<%= useValue.getUseDeptId()+"" %>' >
	                    <option value=<org:DivisionAttribute attribute="id"/> <org:DivisionAttribute attribute="isSelected"/> >
	                    <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/>
	                    </option>
	                    </vnex:items>
	                    </org:DivisionList>
	                    </select>&nbsp;*
                    </td>
                  </tr>
                  <tr> 
                    <td width="115" bgcolor="#e0e0e0"><font  class="strong">&nbsp;使用者:</font></td>
                    <td width="477" bgcolor="#e0e0e0"> 
                      	<select name="usePersonId">
	                    	<option value=-1>-请选择-</option>
		                    <hr:EmployeeList divisionId='<%= useValue.getUseDeptId()%>'>		            		            
				            <vnex:items  select ='<%= useValue.getUsePersonId()+""%>'>
				            <option value="<hr:EmployeeAttribute attribute="id" />" <hr:EmployeeAttribute attribute="isSelected"/> >
				            <hr:EmployeeAttribute attribute='<%= null %>' />
				            </option>
				            </vnex:items>		           
				            </hr:EmployeeList> 	           
			            </select>
                      </td>
                  </tr>
                  <tr bgcolor="#fafafa" align="center"> 
                    <td colspan="2" height="30"> 
                      <input type="button" name="Submit" value="保存" class="file"  onclick="toUseAddSuccess(form1)">
                      &nbsp;&nbsp;<input type="reset" name="Submit3" value="重置" class="file" > 
                        &nbsp;&nbsp;<input type="button" name="Submit2" class="file" value="放弃" onclick="toUseList(form1)">  
                    </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>

⌨️ 快捷键说明

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