📄 contr.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!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=gb2312">
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css">
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/Pager.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/js/PageCtl1.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/js/reptlost.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/DAOCSTService.js'></script>
<script type="text/javascript" src='<%=request.getContextPath()%>/js/s1.js'></script>
<script type="text/javascript">
var tab1 = new TablePage('tab1','TBody1', 'pgCtl', 'orders_linecst_customer');
//以下是可选的
tab1.dateformat="yyyy年MM月dd日"; //如果包含日期列,这里可以定义日期的显示格式
tab1.sqlFilter="select cst_customer.cust_name,coun=sum(odd_count*odd_price) "+
"from orders_line,cst_customer where odd_order_id in "+
"(select odr_id from orders where cust_id=cst_customer.cust_no"+
" and orders.odr_date like '%%')"+
"group by cst_customer.cust_name"; //查询条件
tab1.pagesize=10; //每页多少行
tab1.wait='waitCtl'; //等待的提示
tab1.default_callback=function over() //显示完成以后的回调函数
{
waitCtl.style.display = 'none';
};
function searchCust(){
//alert(document.getElementById('year').value);
//alert(document.getElementById('name').value);
var year = document.getElementById('year').value;
var name = document.getElementById('name').value;
tab1.sqlFilter ="select cst_customer.cust_name,coun=sum(odd_count*odd_price) "+
"from orders_line,cst_customer where odd_order_id in "+
"(select odr_id from orders where cust_id=cst_customer.cust_no"+
" and orders.odr_date like '%"+year+"%' "+
"and cst_customer.cust_name like '%"+name+"%')"+
"group by cst_customer.cust_name";
tab1.go(1);
}
function shose(id)
{
$('qq1'+id).style.background='#6ec2fd';
$('qq2'+id).style.background='#6ec2fd';
$('qq3'+id).style.background='#6ec2fd';
}
function go(id)
{
$('qq1'+id).style.background='eeeeff';
$('qq2'+id).style.background='eeeeff';
$('qq3'+id).style.background='eeeeff';
}
</script>
</head>
<body onload="javascript:{tab1.go(1);smanPromptList('name')}">
<div class="page_title">客户贡献分析</div>
<div class="button_bar">
<button class="common_button" onclick="helpq3();">帮助</button>
<button class="common_button" onclick="searchCust()">查询</button>
</div>
<table class="query_form_table">
<tr>
<th>客户名称</th>
<td><input type="text" id="name"/></td>
<th>年份</th>
<td>
<select id="year">
<option value="">全部</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
</select>
</td>
</tr>
</table>
<br />
<table class="data_list_table">
<tr>
<th>编号</th>
<th>客户名称</th>
<th>订单金额(元)</th>
</tr>
<tbody id="TBody1">
<tr id="template" style="display:none" onmouseenter="shose(this.id.substring(8))" onmouseleave="go(this.id.substring(8))">
<td class="list_data_number" id="qq1"+template.id.substring(8)><span id="template:numb"/></td><!-- 列的命名规则采用template:列属性 -->
<td class="list_data_text" id="qq2"+template.id.substring(8)><span id="template:cust_name"/></td>
<td class="list_data_number" id="qq3"+template.id.substring(8)><span id="template:coun"/></td>
</tr>
</tbody>
<!-- 表格的分页控制部分 -->
<tr id="reveal" style="display:none"><td align="center" colspan="8">没有找到你所需要的数据</td></tr>
<tr>
<th colspan="100" class="pager">
<div align="left" id="waitCtl">正在加载...</div>
<div id="pgCtl" class="pager">
</th>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -