showcompanies2.jsp

来自「开源项目CRM之OpenCustomer」· JSP 代码 · 共 175 行

JSP
175
字号
<%-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the OpenCustomer CRM.
   -
   - The Initial Developer of the Original Code is
   - Thomas Bader (Bader & Jene Software-Ingenieurb黵o).
   - Portions created by the Initial Developer are Copyright (C) 2005
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Thomas Bader <thomas.bader@bader-jene.de>
   -
   - ***** END LICENSE BLOCK ***** --%>
   
<%@ include file="/tiles/page.jsp" %>

<%@ page import="org.opencustomer.application.db.dao.crm.custom.CompanyListDAO" %>
<%@ page import="org.opencustomer.application.web.module.crm.company.Constants" %>
<%@ page import="org.opencustomer.application.auth.Right" %>

<tiles:insert definition="standard">
	<tiles:put name="page.title"><bean:message key="domain.crm.company.showCompanies2.headLine"/></tiles:put>
	<tiles:put name="navigation.3" value="/module/crm/company/navigation3.jsp"/>
	<tiles:put name="page.content">
		
	<script language="JavaScript" type="text/javascript">
	<!--
		function edit(i) {
			document.location="<%=response.encodeURL(request.getContextPath()+"/crm/company/edit.do?id=")%>"+i;
		}
	//-->
	</script>
		
	<html:form action="/crm/company/showCompanies2" styleClass="list">
		<html:hidden property="sort"/>

		<fieldset class="search">
			<legend><bean:message key="default.group.search"/></legend>
			<table class="search">
				<colgroup>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
				</colgroup>
				
				<tr>
					<td>
						<buj:label property="companyTypeId" errorStyleId="error"><bean:message key="entity.crm.company.companyName"/></buj:label>
						<html:text property="companyName" styleId="companyName"/>
					</td>
					<td>
						<buj:label property="companyTypeId" errorStyleId="error"><bean:message key="entity.crm.companyType"/></buj:label>
						<html:select property="companyTypeId" styleId="companyTypeId">
							<html:option value="0"><bean:message key="default.select.all"/></html:option>
							<html:options collection="<%=Constants.COMPANY_LIST2_COMPANYTYPE_LIST%>" property="id" labelProperty="name"/>
						</html:select>
					</td>
					<td>
						<buj:label property="sectorId" errorStyleId="error"><bean:message key="entity.crm.sector"/></buj:label>
						<html:select property="sectorId" styleId="sectorId">
							<html:option value="0"><bean:message key="default.select.all"/></html:option>
							<html:options collection="<%=Constants.COMPANY_LIST2_SECTOR_LIST%>" property="id" labelProperty="name"/>
						</html:select>
					</td>
					<td>
						<buj:label property="companyStateId" errorStyleId="error"><bean:message key="entity.crm.companyState"/></buj:label>
						<html:select property="companyStateId" styleId="companyStateId">
							<html:option value="0"><bean:message key="default.select.all"/></html:option>
							<html:options collection="<%=Constants.COMPANY_LIST2_COMPANYSTATE_LIST%>" property="id" labelProperty="name"/>
						</html:select>
					</td>
					<td>
						<buj:label property="lastContactDate" errorStyleId="error"><bean:message key="domain.crm.company.showCompanies2.lastContactDate"/></buj:label><br/>
						<table class="double"><tr>
							<td><html:text property="lastContactDateStart" styleId="lastContactDate"/></td>
							<td class="divider">-</td>
							<td><html:text property="lastContactDateEnd"/></td>
						</tr></table>
					</td>
				</tr>
			</table>
			<div class="action">
				<html:image property="doSearch" pageKey="icon.search.url" styleClass="default"/>
				<html:image property="doResetSearch" pageKey="icon.searchClean.url" titleKey="icon.searchClean.text" altKey="icon.searchClean.text"/>
				<html:image property="doSearch" pageKey="icon.search.url" titleKey="icon.search.text" altKey="icon.search.text"/>
			</div>
		</fieldset>
		<buj:authenticate right="<%=Right.CRM_COMPANIES_WRITE.getLabel()%>">
		<fieldset class="listAction">
			<html:link action="/crm/company/edit" titleKey="icon.add.text">
				<html:img styleClass="action" altKey="icon.add.text" titleKey="icon.add.text" pageKey="icon.add.url"/>
			</html:link>
		</fieldset>		
		</buj:authenticate>
		<fieldset class="list">
			<legend>
				<buj:paginationInfo 
					textKey="domain.crm.person.company.showCompanies.pagination" 
					name="crm.overview.companyListScroll" 
					scope="request"/>
			</legend>
			<div class="pagination">
				<buj:paginationMenu 
					name="crm.overview.companyListScroll" 
					scope="request"/>
			</div>
			<table class="result">
				<colgroup>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
				</colgroup>
				<tr>
					<th>
						<buj:sort
	  					 	messageKey="entity.crm.company.companyName"
							property="<%=String.valueOf(CompanyListDAO.SORT_COMPANY_NAME)%>"/>
					</th>
					<th>
						<buj:sort
	  					 	messageKey="entity.crm.companyType"
							property="<%=String.valueOf(CompanyListDAO.SORT_COMPANY_TYPE)%>"/>
					</th>
					<th>
						<buj:sort
	  					 	messageKey="entity.crm.sector"
							property="<%=String.valueOf(CompanyListDAO.SORT_SECTOR)%>"/>
					</th>
					<th>
						<buj:sort
	  					 	messageKey="entity.crm.companyState"
							property="<%=String.valueOf(CompanyListDAO.SORT_COMPANY_STATE)%>"/>
					</th>
					<th>
						<buj:sort
	  					 	messageKey="domain.crm.company.showCompanies2.lastContactDate"
							property="<%=String.valueOf(CompanyListDAO.SORT_LAST_CONTACT_DATE)%>"/>
					</th>
				</tr>
				<logic:iterate id="data" indexId="index" name="crm.overview.companyList" scope="request">
				<tr class="<buj:rowSwap name="index" number="3" odd="rowOdd" even="rowEven"/>" onmouseover="this.className='rowActive';" onmouseout="this.className='<buj:rowSwap name="index" number="3" odd="rowOdd" even="rowEven"/>'">
					<td onclick="edit(<bean:write name="data" property="id" scope="page"/>);"><bean:write name="data" property="companyName" scope="page"/></td>
					<td onclick="edit(<bean:write name="data" property="id" scope="page"/>);"><bean:write name="data" property="companyTypeName" scope="page"/></td>
					<td onclick="edit(<bean:write name="data" property="id" scope="page"/>);"><bean:write name="data" property="sectorName" scope="page"/></td>
					<td onclick="edit(<bean:write name="data" property="id" scope="page"/>);"><bean:write name="data" property="companyStateName" scope="page"/></td>
					<td onclick="edit(<bean:write name="data" property="id" scope="page"/>);"><bean:write name="data" property="lastContactDate" scope="page" formatKey="format.date.datetime"/></td>
				</tr>
				</logic:iterate>
				<logic:notPresent name="index" scope="page">
				<tr class="noRow">
					<td colspan="5"><bean:message key="default.message.noEntries"/></td>
				</tr>
				</logic:notPresent>
			</table>
		</fieldset>
	</html:form>
		
	</tiles:put>	
</tiles:insert>

⌨️ 快捷键说明

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