81,094
社区成员
发帖
与我相关
我的任务
分享
<%@ page contentType="text/html;charset=gb2312" language="java"%>
<%@ page import="java.io.*,java.sql.*"%>
<jsp:useBean id="rst" scope="page" class="com.mingri.dbconn.DBResult"/>
<jsp:useBean id="qu" scope="page" class="com.mingri.info.QuestString"/>
<jsp:useBean id="trans" scope="page" class="com.mingri.chinese.ToChinese"/>
<html>
<title>查询</title>
<link href="../CSS/style.css" rel="stylesheet" type="text/css">
<body bgcolor="#F2F2F2">
<%
String table="tb_sell",httpFile="xsxxquest.jsp";
String date="xsdate";
String pages=request.getParameter("pages");
String cif=request.getParameter("cif");
String ccif=request.getParameter("ccif");
String qvalue=trans.trans(request.getParameter("qvalue"));
String andor=request.getParameter("andor");
String sdate=request.getParameter("sdate");//获得表单中查询起始时间
String edate=request.getParameter("edate");//获得表单中查询截止时间
qu.setCcif(ccif);qu.setCif(cif);qu.setQValue(qvalue);
qu.setAndor(andor); qu.setSdate(sdate); qu.setEdate(edate);
String strCount=qu.getCount(table);
//调用Bean中getDateCount()方法来获得在用户调教的时间段里查询到的记录总数
String strCount=qu.getDateCount(table,date);
if(pages==null||pages.equals("null")){
pages="0";
}
qu.setQuerySql(httpFile,pages,strCount);
//用来获得在表tb_sell中在用户提交的时间段里查询到的记录的结果集
ResultSet rs=rst.getResult((String)qu.getDateString(table,date));
int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize();
while(rs.next()){
if(i>(Page-1)*pagesize-1){
%>
<table width="500" height="140" border="1" align="center" cellpadding="-1" cellspacing="0">
<tr bgcolor="#DDDDDD">
<td width="202" height="27" bgcolor="#FFFFC1"><font color="#336699">销售票号:
<%=rs.getString("ID")%></font></td>
<td width="202" bgcolor="#FFFFC1"><font color="#336699">药品编号:
<%=rs.getString("spid")%></font></td>
<td width="202" bgcolor="#FFFFC1"><font color="#336699">药品名称:
<%=rs.getString("spname")%></font></td>
</tr>
<tr bgcolor="#DDDDDD">
<td width="195" height="27" bgcolor="#FFFFC1"><font color="#336699">简称:
<%=rs.getString("jc")%></font></td>
<td width="202" bgcolor="#FFFFC1"><font color="#336699">产地:
<%=rs.getString("cd")%></font></td>
<td width="202" bgcolor="#FFFFC1"><font color="#336699">规格:
<%=rs.getString("gg")%></font></td>
</tr>
<tr bgcolor="#DDDDDD">
<td width="202" height="29" bgcolor="#FFFFC1"><font color="#336699">包装:
<%=rs.getString("bz")%></font></td>
<td width="202" bgcolor="#FFFFC1"><font color="#336699">单价:
<%=rs.getString("dj")%></font></td>
<td width="202" bgcolor="#FFFFC1"><font color="#336699">数量:
<%=rs.getString("sl")%></font></td>
</tr>
<tr bgcolor="#DDDDDD">
<td width="202" height="26" bgcolor="#FFFFC1"><font color="#336699">金额:
<%=rs.getString("je")%></font></td>
<td width="202" bgcolor="#FFFFC1"><font color="#336699">客户全称:
<%=rs.getString("khname")%></font></td>
<td width="202" bgcolor="#FFFFC1"><font color="#336699">销售日期:
<%=rs.getString("xsdate").substring(0,10)%></font></td>
</tr>
<tr bgcolor="#DDDDDD">
<td width="202" bgcolor="#FFFFC1"><font color="#336699">操作员:
<%=rs.getString("czy")%></font></td>
<td width="202" bgcolor="#FFFFC1"><font color="#336699">经手人:
<%=rs.getString("jsr")%></font></td>
<td width="202" bgcolor="#FFFFC1"><font color="#336699">结算方式:
<%=rs.getString("jsfs")%></font></td>
</tr>
</table><br>
<%}i++;}
rs.close();
String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+
"&andor="+qu.getAndor()+"&sdate="+qu.getSdate()+"&edate="+qu.getEdate();
qu.setStr_parameter(str_parameter);
%>
<%=qu.pageFooter()%>
</form>
</table>
</body>
</html>