equipment_advancedsearch.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:17k
源码类别:
电子政务应用
开发平台:
Java
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
- <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="java.lang.*"%>
- <%@ page import="java.util.Collection"%>
- <%@ page import="java.util.Iterator"%>
- <%@ page import="java.util.Vector"%>
- <%@ page import="java.util.Calendar"%>
- <%@ page import="com.vnex.intranet.util.TimeStamp"%>
- <%@ page import="com.vnex.intranet.equipment.value.UserValueBean"%>
- <%@ page import="com.vnex.intranet.equipment.value.*"%>
- <jsp:useBean id="equipmentProxy" class="com.vnex.intranet.equipment.proxy.EquipmentProxyBean" scope="session" />
- <jsp:useBean id="equipmentASValue" class="com.vnex.intranet.equipment.value.EquipmentValueBean" scope="session" />
- <jsp:setProperty name="equipmentASValue" property="*" />
- <%!
- Collection list = null;
- Collection list2 = null;
- Collection listUsePerson = null;
- Collection listBuyPerson = null;
- Iterator ite = null;
- UserValueBean user = null;
- int i = -1;
- String fromTime = "";
- String toTime = "";
- Calendar cal = null;
- int m = -1;
- int d = -1;
- String year = "";
- String month = "";
- String day = "";
- %>
- <%
- session.removeAttribute("equipmentASValue");
- session.removeAttribute("equipmentValueView");
- if (equipmentASValue.getTerm() == -1)
- equipmentASValue.setTerm(0);
- if (equipmentASValue.getQuantity() == -1)
- equipmentASValue.setQuantity(0);
- if (request.getParameter("categoryId") != null)
- equipmentASValue.setCategoryId(new Integer(request.getParameter("categoryId")).intValue());
- if (request.getParameter("categoryName") != null)
- equipmentASValue.setCategoryName(request.getParameter("categoryName"));
- %>
- <HTML><jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <script Language="JavaScript" src="/vnex/util/Popup.js"></script>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <script language=JavaScript>
- function isNumberValid()
- {
- if (!(isFloat(myForm.minPrice.value)) && myForm.minPrice.value != "")
- {
- alert("价格必须必须是数字!");
- return false;
- }
- if (!(isFloat(myForm.maxPrice.value)) && myForm.maxPrice.value != "")
- {
- alert("价格必须必须是数字!");
- return false;
- }
- if (!(isInteger(myForm.STerm.value)) && myForm.STerm.value != "")
- {
- alert("使用期限必须是整数!");
- return false;
- }
- return true;
- }
- function includeInvalid(str)
- {
- if (str.indexOf("'") == -1)
- return false
- else
- return true;
- }
- function isDataValid()
- {
- if (! isNumberValid())
- return false;
- var price=0.0;
- minprice = myForm.minPrice.value;
- if (minprice < 0 && minprice != "")
- {
- alert("价格必须大于0");
- return false;
- }
- maxprice = myForm.maxPrice.value;
- if (maxprice < 0 && maxprice != "")
- {
- alert("价格必须大于0");
- return false;
- }
- if (minprice != "" && maxprice != "" && minprice > maxprice)
- {
- alert("最低价格必须小于最高价格");
- return false;
- }
- if (includeInvalid(myForm.equipmentName.value))
- {
- alert("设备名称包含非法字符");
- return false;
- }
- if (includeInvalid(myForm.equipmentCode.value))
- {
- alert("资产编号包含非法字符");
- return false;
- }
- if (includeInvalid(myForm.purpose.value))
- {
- alert("用途包含非法字符");
- return false;
- }
- if (includeInvalid(myForm.model.value))
- {
- alert("型号包含非法字符");
- return false;
- }
- if (includeInvalid(myForm.configure.value))
- {
- alert("配置包含非法字符");
- return false;
- }
- if (includeInvalid(myForm.supplier.value))
- {
- alert("供应者包含非法字符");
- return false;
- }
- if (includeInvalid(myForm.place.value))
- {
- alert("放置地点包含非法字符");
- return false;
- }
- if (includeInvalid(myForm.categoryName.value))
- {
- alert("资产类别包含非法字符");
- return false;
- }
- if (myForm.beginDay.value != "" && myForm.endDay.value != "")
- {
- if (myForm.beginDay.value > myForm.endDay.value)
- {
- alert("购买日期的选择范围开始日期不应在结束日期之后!");
- return false;
- }
- }
- return true;
- }
- function change(select)
- {
- if (isNumberValid())
- {
- myForm.action="/mainctrl/equipmentAdvancedSearch?fromSelf=1";
- myForm.submit();
- }
- }
- function toSuccess()
- {
- if (isDataValid())
- {
- myForm.action="/mainctrl/equipmentAdvancedSearchResult?set=1";
- myForm.submit();
- }
- }
- function toCategory()
- {
- myForm.action="/mainctrl/equipmentSaveCondition?pageName=equipmentAdvancedSearch";
- myForm.submit();
- }
- function toSearch()
- {
- searchForm.action="/mainctrl/equipmentSearchResult";
- searchForm.submit();
- }
- </script>
- <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="myForm" method="post" action="/mailctrl/equipmentAdvancedSearchResult">
- <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>
- <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/equipmentSearchResult"><font color="#FFFFFF">固定资产管理</font></a>>>高级查询</font></td>
- </tr>
- <tr>
- <td width="149" bgcolor="#fafafa">
- <div align="left"><b><font class="strong" > 资产类别:</font></b></div>
- </td>
- <td width="443" bgcolor="#fafafa">
- <input type="hidden" name="categoryId" size="8" class="file" value="<%= equipmentASValue.getCategoryId()%>">
- <input type="text" name="categoryName" size="24" readonly class="file" value="<%= equipmentASValue.getCategoryName()%>">
- <input type="button" name="Submit3" value="选择" class="file" onClick= toCategory()>
- </td>
- </tr>
- <tr>
- <td width="149" bgcolor="#e0e0e0">
- <div align="left"><b><font class="strong" > 名称:</font> </b></div>
- </td>
- <td width="443" bgcolor="#e0e0e0"><font class="strong"><font class="strong">
- <input type="text" name="equipmentName" size="24" class="file" value="<%= equipmentASValue.getEquipmentName()%>">
- </font></font> </td>
- </tr>
- <tr>
- <td width="149" bgcolor="#FaFaFa">
- <div align="left"><b><font class="strong"> 用途: </font></b></div>
- </td>
- <td width="443" bgcolor="#FaFaFa"><font class="strong">
- <font class="strong">
- <input type="text" name="purpose" size="24" class="file" value="<%= equipmentASValue.getPurpose()%>">
- </font></font></td>
- </tr>
- <tr>
- <td width="149" bgcolor="#e0e0e0">
- <div align="left"><b><font class="strong"><font class="strong"> 型号:<font class="strong">
- </font> </font></font></b></div>
- </td>
- <td width="443" bgcolor="#e0e0e0"><font class="strong"><font class="strong">
- <input type="text" name="model" class="file" size="24" value="<%= equipmentASValue.getModel()%>">
- </font></font></td>
- </tr>
- <tr>
- <td width="149" bgcolor="#fafafa"><b><font class="strong"><font class="strong"> 配置:</font></font></b></td>
- <td width="443" bgcolor="#fafafa"><font class="strong"><font class="strong">
- <input type="text" name="configure" size="24" class="file" value="<%= equipmentASValue.getConfigure()%>">
- </font></font></td>
- </tr>
- <tr>
- <td width="149" bgcolor="#e0e0e0"><b><font class="strong"><font class="strong"> 资产编号:</font></font></b></td>
- <td width="443" bgcolor="#e0e0e0"><font class="strong"><font class="strong">
- <input type="text" name="equipmentCode" size="24" class="file" size="4" value="<%= equipmentASValue.getEquipmentCode()%>">
- </font></font></td>
- </tr>
- <tr>
- <td width="149" bgcolor="#fafafa">
- <div align="left"><b><font class="strong"> 购买价格:</font></b></div>
- </td>
- <td width="443" bgcolor="#fafafa">
- <input type="text" name="minPrice" class="file" size="24" value="<%= equipmentASValue.getMinPrice()%>">
- 元<font class="strong"> -
- <input type="text" name="maxPrice" class="file" size="24" value="<%= equipmentASValue.getMaxPrice()%>">
- </font>元</td>
- </tr>
- <tr>
- <td width="149" bgcolor="#e0e0e0">
- <div align="left"><b><font class="strong"> 使用者:</font></b></div>
- </td>
- <td width="443" bgcolor="#e0e0e0">
- <select name="useDeptId" class=choice onChange=change(this)>
- <option value = -1>全部部门</option>
- <org:DivisionList> <vnex:items select='<%= equipmentASValue.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>
- <select name="usePersonId">
- <option value=-1>-请选择-</option>
- <hr:EmployeeList divisionId='<%= equipmentASValue.getUseDeptId()%>'>
- <vnex:items select ='<%= equipmentASValue.getUsePersonId()+""%>'>
- <option value="<hr:EmployeeAttribute attribute="id" />"
- <hr:EmployeeAttribute attribute="isSelected"/> > <hr:EmployeeAttribute attribute='<%= null %>' />
- </option>
- </vnex:items> </hr:EmployeeList>
- </select>
- </td>
- </tr>
- <tr>
- <td width="149" bgcolor="#fafafa">
- <div align="left"><b><font class="strong"> 购买日期:</font></b></div>
- </td>
- <td width="443" bgcolor="#fafafa">
- 从:
- <input type="text" name="beginDay" readonly size="18" class="text" value="<%= equipmentASValue.getBeginDay()%>" >
- <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择日期" onClick="fPopUpCalendarDlg(beginDay);return false">
- 到:
- <input type="text" name="endDay" readonly size="18" class="text" value="<%=equipmentASValue.getEndDay()%>" >
- <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择日期" onClick="fPopUpCalendarDlg(endDay);return false">
- </td>
- </tr>
- <tr>
- <td width="149" bgcolor="#e0e0e0"><b><font class="strong"> 购买者:</font></b></td>
- <td width="443" bgcolor="#e0e0e0">
- <select name="buyDeptId" class=choice onChange=change(this)>
- <option value = -1>全部部门</option>
- <org:DivisionList> <vnex:items select='<%= equipmentASValue.getBuyDeptId()+"" %>' > <option value=
- <org:DivisionAttribute attribute="id"/> <org:DivisionAttribute attribute="isSelected"/> >
- <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/> </option>
- </vnex:items> </org:DivisionList>
- </select>
- <select name="buyPersonId">
- <option value=-1>-请选择-</option>
- <hr:EmployeeList divisionId='<%= equipmentASValue.getBuyDeptId()%>'>
- <vnex:items select ='<%= equipmentASValue.getBuyPersonId()+""%>'>
- <option value="<hr:EmployeeAttribute attribute="id" />"
- <hr:EmployeeAttribute attribute="isSelected"/> > <hr:EmployeeAttribute attribute='<%= null %>' />
- </option>
- </vnex:items> </hr:EmployeeList>
- </select>
- </td>
- </tr>
- <tr>
- <td width="149" bgcolor="#fafafa"><b><font class="strong"> 供应者:</font></b></td>
- <td width="443" bgcolor="#fafafa"><font class="strong"><font class="strong">
- <input type="text" name="supplier" class="file" size="24" value="<%= equipmentASValue.getSupplier()%>">
- </font></font></td>
- </tr>
- <tr>
- <td width="149" bgcolor="#e0e0e0">
- <div align="left"><b><font class="strong"> 放置地点:</font></b></div>
- </td>
- <td width="443" bgcolor="#e0e0e0"><font class="strong"><font class="strong">
- <input type="text" name="place" class="file" size="24" value="<%= equipmentASValue.getPlace()%>">
- </font></font> </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="149">
- <div align="left"><b><font class="strong"> 估计使用期限:</font></b></div>
- </td>
- <td width="443">
- <input type="text" name="STerm" class="file" size="24" value="<%= equipmentASValue.getSTerm()%>">
- 月</td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="149">
- <div align="left"><b><font class="strong"> 有无维修记录:</font></b></div>
- </td>
- <td width="443">
- <div align="left">
- <input type="radio" name="repaired" value="1" <%=((equipmentASValue.getRepaired()==1)?("checked"):("unchecked"))%>>
- 有
- <input type="radio" name="repaired" value="0" <%=((equipmentASValue.getRepaired()==0)?("checked"):("unchecked"))%>>
- 无
- <input type="radio" name="repaired" value="-1" <%=((equipmentASValue.getRepaired()==-1)?("checked"):("unchecked"))%>>
- 不指定 </div>
- </td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#fafafa">
- <div align="center"><br>
- <input type="button" name="Submit" value="查询" class="file" onclick=toSuccess()>
- <input type="reset" name="Submit2" value="重置" class="file">
- <input type="button" name="Submit3" value="返回" class="file" onClick="location='/mainctrl/equipmentSearchResult'">
- </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" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form>
- </DIV>
- </BODY>
- </HTML>