📄 orders.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>jb-aptech毕业设计项目</title>
<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()%>/dwr/interface/custservice.js'></script>
<!-- 自定义分页控件的客户端js -->
<script type='text/javascript' src='<%=request.getContextPath()%>/js/PageCtl.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/js/s1.js'></script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
<script src="../script/common.js"></script>
<script type="text/javascript" src="js/cust.js"></script>
<script>
var tab = new TablePage('tab','tbody', 'pgCtl', 'orders');
//以下是可选的
tab.dateformat="yyyy年MM月dd日 HH时"; //如果包含日期列,这里可以定义日期的显示格式
tab.sqlFilter=""; //查询条件
tab.pagesize=10; //每页多少行
tab.wait='waitCtl'; //等待的提示
tab.default_callback=function over() //显示完成以后的回调函数
{
waitCtl.style.display = 'none';
};
function onloadord(){
var sus = $('susid').value;
custservice.findCstcustById(sus,function(tomer){
$('odr_customer').innerHTML=tomer.custName;
tab.sqlFilter = " and cust_id ='"+sus+"'";
if($('pagenum').value != ""){
tab.go($('pagenum').value);
}else
tab.go(1);
});
}
function shose(id)
{
$('template:odr_id'+id).style.background='#6ec2fd';
$('template:odr_date'+id).style.background='#6ec2fd';
$('template:odr_addr'+id).style.background='#6ec2fd';
$('template:odr_status'+id).style.background='#6ec2fd';
$('template:order'+id).style.background='#6ec2fd';
}
function go00(id)
{
$('template:odr_id'+id).style.background='eeeeff';
$('template:odr_date'+id).style.background='eeeeff';
$('template:odr_addr'+id).style.background='eeeeff';
$('template:odr_status'+id).style.background='eeeeff';
$('template:order'+id).style.background='eeeeff';
}
</script>
</head>
<body onload="onloadord()">
<input id="susid" type="hidden" value="${param.custId}">
<input type="hidden" id="pagenum" value="${param.pagenum}">
<div class="page_title">客户信息 > 历史订单 </div>
<div class="button_bar">
<button class="common_button" onclick="helpq5();">帮助</button>
<button class="common_button" onclick="goto('list.jsp?pagenum='+$('pagenum').value);">返回</button>
</div>
<table class="query_form_table">
<tr>
<th>客户编号</th>
<td id="odr_id">${param.custId}</td>
<th>客户名称</th>
<td id="odr_customer"></td>
</tr>
</table>
<br />
<table class="data_list_table">
<tr>
<th>订单编号</th>
<th>日期</th>
<th>送货地址</th>
<th>状态</th>
<th>操作</th>
</tr>
<tbody id="tbody">
<tr id="template" style="display:none" ondblclick="goto('orders_detail.jsp?orderId='+this.id.substring(8));" onmouseenter="shose(this.id.substring(8))" onmouseleave="go00(this.id.substring(8))">
<td id="template:odr_id" class="list_data_text">1343445</td>
<td id="template:odr_date" class="list_data_text">2007年11月13日</td>
<td id="template:odr_addr" class="list_data_text">北京海淀区劳动路206号</td>
<td id="template:odr_status" class="list_data_text">未回款</td>
<td id="template:order" class="list_data_op">
<img onclick="goto('orders_detail.jsp?orderId='+this.parentNode.id.substring(14));" title="查看明细" src="images/bt_detail.gif" class="op_button" /></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 + -