📄 lost.jsp
字号:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>jb-aptech毕业设计项目</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=request.getContextPath() %>/html/css/style.css" rel="stylesheet" type="text/css">
<script src="<%=request.getContextPath() %>/html/script/common.js"></script>
<script type="text/javascript">
function doSearch(){
document.forms['pageForm'].action="<%=request.getContextPath()%>/report.do?method=toLost";
document.forms['pageForm'].submit();
}
</script>
</head>
<body>
<div class="page_title">客户流失分析</div>
<div class="button_bar">
<button class="common_button" onclick="help('');">帮助</button>
<button class="common_button" onclick="doSearch();">查询</button>
</div>
<html:form action="/report" method="post" styleId="pageForm">
<table class="query_form_table">
<tr>
<th>客户</th>
<td><html:text property="lost.cuscondition"/></td>
<th>客户经理</th>
<td><html:text property="lost.mancondition"/></td>
</tr>
</table>
<br />
<table class="data_list_table">
<tr>
<th height="28">编号</th>
<th height="28">年份</th>
<th height="28">客户</th>
<th height="28">客户经理</th>
<th height="28">流失原因</th>
</tr>
<c:if test="${lostlist==null}">
<div style="color: red;font-size: 12px;">没有记录</div>
</c:if>
<c:forEach items="${lostlist}" var="list"><tr>
<td class="list_data_text">${list.lostId }</td>
<td class="list_data_text">
<logic:notEmpty name="lostlist" scope="request">
<bean:write name="list" property="lostDatetime" format="yyyy"/>
</logic:notEmpty>
</td>
<td class="list_data_text">${list.customers.customersName }</td>
<td class="list_data_ltext">${list.customers.customersManager.linkManName }</td>
<td class="list_data_text">${list.lostCause }</td>
</tr>
</c:forEach>
<tr>
<th colspan="100" class="pager">
<div class="pager">
<logic:empty name="lostlist" scope="request"><div style="color: red;">没有记录</div></logic:empty>
<logic:notEmpty name="lostlist" scope="request">
共
${count }条记录 每页显示<html:text property="lost.maxResults"
style="width:20px;" />条
第<html:text property="lost.pageNo" style="width:20px;" />页 / 共${pages }页
<input type="hidden" name="lastNo" value="${pages }" />
<a href="javascript:page_first();">第一页</a>
<a href="javascript:page_pre();">上一页</a>
<a href="javascript:page_next();">下一页</a>
<a href="javascript:page_last();">最后一页</a>
<button onclick="javascript:page_go();">
GO
</button>
<script>
function page_go()
{
page_validate();
document.forms['pageForm'].action = "<%=request.getContextPath()%>/report.do?method=toLost";
document.forms['pageForm'].submit();
}
function page_first()
{
document.forms['pageForm'].action = "<%=request.getContextPath()%>/report.do?method=toLost";
document.forms['pageForm'].elements["lost.pageNo"].value = 1;
document.forms['pageForm'].submit();
}
function page_pre()
{
var pageNo = document.forms['pageForm'].elements["lost.pageNo"].value;
document.forms['pageForm'].elements["lost.pageNo"].value = parseInt(pageNo) - 1;
page_validate();
document.forms['pageForm'].action = "<%=request.getContextPath()%>/report.do?method=toLost";
document.forms['pageForm'].submit();
}
function page_next()
{
var pageNo = document.forms['pageForm'].elements["lost.pageNo"].value;
document.forms['pageForm'].elements["lost.pageNo"].value = parseInt(pageNo) + 1;
page_validate();
document.forms['pageForm'].action = "<%=request.getContextPath()%>/report.do?method=toLost";
document.forms['pageForm'].submit();
}
function page_last()
{
var lastNo = document.forms['pageForm'].elements["lastNo"].value;
document.forms['pageForm'].elements["lost.pageNo"].value = lastNo;
document.forms['pageForm'].action = "<%=request.getContextPath()%>/report.do?method=toLost";
document.forms['pageForm'].submit();
}
function page_validate()
{
var pageTotal = document.forms['pageForm'].elements["lastNo"].value;
var pageNo = document.forms['pageForm'].elements["lost.pageNo"].value;
if (pageNo<1)pageNo=1;
if (pageNo>pageTotal)pageNo=pageTotal;
document.forms['pageForm'].elements["lost.pageNo"].value = pageNo;
var recTotal = 18;
var pageSize = document.forms['pageForm'].elements["lost.maxResults"].value;
if (pageSize<1)pageSize=1;
document.forms['pageForm'].elements["lost.maxResults"].value = pageSize;
}
</script>
</logic:notEmpty>
</div>
</th>
</tr>
</table>
</html:form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -