📄 sells_record_frame.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GB2312"%>
<jsp:directive.page import="com.captainli.bean.SellsBean"/>
<jsp:directive.page import="com.captainli.struts.form.LoginForm"/>
<jsp:directive.page import="com.captainli.util.VerComData"/>
<jsp:directive.page import="com.captainli.dboperation.VercomDA"/>
<jsp:directive.page import="java.util.ArrayList"/>
<jsp:directive.page import="com.captainli.dboperation.SellsDA"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="../css/sys.css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
}
a:link {
color: #1A438E;
text-decoration: underline;
}
a:visited {
text-decoration: underline;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: underline;
}
.style1 { color: #1A438E;
font-size: 12px;
}
.style2 { color:#FF0000;
font-size: 12px;
}
.button1 {font:normal 12px/120% Verdana,'宋体';height:18px;
border-left:1px red solid;
border-top:1px red solid;
border-right:1px red solid;
border-bottom:1px red solid;
background: #dddddd;}
-->
</style>
</head>
<%
//获得登录者信息
LoginForm form = (LoginForm)session.getAttribute("users");
//获得审核权限//获得删除权限(红冲单据)
VerComData dataVer = new VercomDA().selectVerCom(form.getL_username());
%>
<%
int w_id = 0;
String s_no = "";
ArrayList arrySells = null;
%>
<%
if(request.getParameter("w_id") != null){
if(request.getParameter("w_id").toString().equals("0")){
arrySells = new SellsDA().showSells();
}else{
arrySells = new SellsDA().showSellsByW_id(Integer.parseInt(request.getParameter("w_id")));
}
}else{
arrySells = new SellsDA().showSells();
}
%>
<%
if(request.getParameter("s_no") != null){
if(request.getParameter("s_no").toString().equals("")){
arrySells = new SellsDA().showSells();
}else{
s_no = request.getParameter("s_no").toString();
arrySells = new SellsDA().showSellsByP_no(request.getParameter("s_no").toString());
}
}else if(request.getParameter("w_id")==null){
arrySells = new SellsDA().showSells();
}
%>
<%
if(request.getParameter("start_time") != null && request.getParameter("end_time") != null){
String starttime = request.getParameter("start_time").toString();
String endtime = request.getParameter("end_time").toString();
arrySells = new SellsDA().showSellsByS_no(starttime, endtime);
}
%>
<%
int intPageSize; //一页显示的记录数
int intRowCount; //记录总数
int intPageCount;//总页数
int intPage; //待显示页码
String strPage; //请求页码
//设置一页显示的记录数
intPageSize = 10;
//取得显示的页码
strPage = request.getParameter("page");
if(strPage == null){//刚打开网页的时候,表明没有参数,此时显示第1页数据
intPage = 1;
}
else{//将字符串转换成整型
intPage = Integer.parseInt(strPage);
//if(intPage <= 1)
// intPage = 1;
}
//获取记录总数
intRowCount = arrySells.size();
//记算总页数
intPageCount = (intRowCount + intPageSize-1) / intPageSize;
int startNum = (intPage - 1) * intPageSize;//当前页起始索引
int endNum = startNum + intPageSize;//当前页结束索引
if(endNum >= arrySells.size()){
endNum = arrySells.size();
}
%>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/system/r_1.gif" alt="" /></td>
<td width="100%" background="../images/system/r_0.gif"><table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> 出库记录查询</td>
<td align="right"> </td>
</tr>
</table></td>
<td><img src="../images/system/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<tr align="center">
<td class="category" width="241">出库单据编号</td>
<td width="206" height="30" class="category">出库时间</td>
<td width="70" class="category">数量</td>
<td width="128" class="category">出货单价(元)</td>
<td width="128" class="category">总金额(元)</td>
<td width="155" class="category">单据冲红</td>
</tr><%
for(int i = startNum;i < endNum;i++){
SellsBean bean = (SellsBean)arrySells.get(i);
%>
<tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''" onDblClick="javascript:var win=window.open('sells_record_show.jsp?s_id=<%= bean.getS_id() %>','详细信息','width=853,height=470,top=176,left=161,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes'); win.focus()">
<td align="center"><%= bean.getS_no() %></td>
<td align="center" height="25"><%= bean.getS_time() %></td>
<td align="center"><%= bean.getS_quantity() %></td>
<td align="center"><%= bean.getS_price() %></td>
<td align="center"><%= bean.getS_amount() %></td>
<td align="center"><%if(dataVer.isV_bb()){ %><input name="Submit" type="button" class="button1" value=" 单据冲红 " onclick="javascript:window.location.href='../sells.do?method=sellsChongHong&s_id=<%= bean.getS_id() %>';"><%}else{ %>---<%} %></td>
</tr><%} %>
<tr>
<td colspan="12" height="30" class="category"><table cellpadding=0 cellspacing=0 width="100%">
<tr>
<td width="20%" align="left" style="color:#FF0000;"> 双击查看销售出库单</td>
<td width="80%" align="right"><table cellpadding=0 cellspacing=0 width="100%">
<tr>
<td width="20%" align="left" style="color:#FF0000;"> </td>
<td width="80%" align="right"> 第<%= intPage%>页 共<%= intPageCount%>页
<% //以下是分页的“上一页”“下一页”,有上一页就有链接,没有就为文字,下一页同理 %>
<% if(intPage > 1){ %>
<a href="sells_record_frame.jsp?page=<%= intPage-1%>&w_id=<%= w_id %>&s_no=<%= s_no %>">上一页</a>
<% }else{ %>
上一页
<%}%>
<% if(intPage < intPageCount){ %>
<a href="sells_record_frame.jsp?page=<%= intPage+1%>&w_id=<%= w_id %>&s_no=<%= s_no %>">下一页</a>
<% }else{ %>
下一页
<%}%></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td><img src="../images/system/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/system/r_3.gif" alt="" /></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -