c_customer_yf_list.jsp
资源名称:shihua.rar [点击查看]
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:7k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
JavaScript
- <%@ page contentType="text/html;charset=gb2312"%>
- <%@include file="../include/checkadmin.jsp"%>
- <%@page import="java.sql.*"%>
- <%@include file="../include/db_conn.jsp"%>
- <%@include file="../include/const.jsp"%>
- <%@include file="../include/isNotInteger.jsp"%>
- <%!String keyword;%>
- <%
- String c01="";
- int i01;
- i01 = 0;
- keyword=request.getParameter("keyword");
- if(keyword==null){
- keyword="";
- }else{
- keyword=getGBString(keyword);
- }
- String admin_username;
- String customer_name="";
- //获取客户名称
- admin_username = (String)session.getAttribute("admin_username");
- sql="SELECT NAME1 FROM ZSD_KNA1 where KUNNR="+admin_username;
- //out.print(sql);
- rs=smt.executeQuery(sql);
- while(rs.next()){
- customer_name =rs.getString("NAME1");
- }
- %>
- <HTML>
- <HEAD>
- <TITLE>+ + 翔鹭石化 + +</TITLE>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
- <link href="../style.css" rel="stylesheet" type="text/css">
- </HEAD>
- <BODY BGCOLOR=#CFE7F3 vlink="#666666" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 >
- <table width="778" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
- <tr>
- <img src="../images/in1p_CRM1.gif" width="778" height="90"></td>
- </tr>
- <tr>
- <td width="26" height="26"><img src="../images/indl1.gif" width="26" height="26"></td>
- <td width="165" height="26"><img src="../images/in1t2.gif" width="165" height="26"></td>
- <td height="26" align="right"><img src="../images/in1tblk.gif" width="585" height="26"></td>
- </tr>
- </table>
- <table width="778" height="300" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
- <tr>
- <td> </td>
- <td align="right" valign="top" bgcolor="f0f0f0">
- <!--子目录-->
- <%@include file="s2menu.jsp"%>
- <!--子目录-->
- <table width="100%" cellspacing="0" cellpadding="0" >
- <tr>
- <td><img src="../images/in1left.gif" width="165" height="100">
- </tr>
- </table>
- </td>
- <td align="center" valign="top">
- <table width="80%">
- <tr>
- <td >
- <p align="center"><strong><font size="+2"><%=customer_name%></font></strong></p>
- </td>
- </tr>
- <tr>
- <td >
- <p align="center"><strong><font size="3">承运商运费</font></strong></p>
- </td>
- </tr>
- <form name="frm_search" action="c_customer_yf_list.jsp" method="post">
- <tr>
- <td align="left" bgcolor="#ffffff" height=20>请输入查询年度:<input type="text" name="keyword"> <input type="submit" name="s1" value="搜 索" style="width:60px;height:22px;"></td>
- </tr>
- </form>
- </table>
- <!--新闻列表-->
- <%
- String column_id="3";
- String column_title;
- int intPageSize; //一页显示的记录数
- int intRowCount; //记录总数
- int intPageCount; //总页数
- int intPage; //待显示页码
- String strPage;
- int i;
- //版本控制
- intPageSize = 12; //设置一页显示的记录数
- strPage = request.getParameter("page"); //取得待显示页码
- if(isNotInteger(strPage)){//表明在QueryString中没有page这一个参数,此时显示第一页数据
- intPage = 1;
- }
- else{//将字符串转换成整型
- intPage = java.lang.Integer.parseInt(strPage);
- if(intPage<1) intPage = 1;
- }
- sql = "select c_id,KUNNR,ZYEAR,ZMONTH,FKIMG,KBETR,NETWR,ERDAT,ERZET from ZSD_YF ";
- sql = sql + " where (kunnr='"+admin_username+"')and(me_ver='cn') order by ZYEAR DESC,ZMONTH DESC ";
- if(keyword.length()!=0)
- {
- sql = "select c_id,KUNNR,ZYEAR,ZMONTH,FKIMG,KBETR,NETWR,ERDAT,ERZET from ZSD_YF ";
- sql = sql + " where (ZYEAR like '%"+keyword+"%')and(kunnr='"+admin_username+"')and(me_ver='cn') order by ZYEAR DESC,ZMONTH DESC ";
- }
- rs=smt.executeQuery(sql);
- rs.last();
- intRowCount = rs.getRow(); //获取记录总数
- intPageCount = (intRowCount+intPageSize-1) / intPageSize; //记算总页数
- if(intPage>intPageCount) intPage = intPageCount; //调整待显示的页码
- %>
- <table border="1" cellpadding="2" cellspacing="0" class="p9" bordercolor="#cccccc" bordercolordark="#FFFFFF" bordercolorlight="#cccccc" width="95%">
- <tr>
- <td height="25" width="55" align="center"><strong><font color="#0000FF">客户编号</font></strong></td>
- <td width="28" align="center"><strong><font color="#0000FF">年度</font></strong></td>
- <td width="28" align="center"><strong><font color="#0000FF">月份</font></strong></td>
- <td width="90" align="center"><strong><font color="#0000FF">销售数量(TON)</font></strong></td>
- <td width="90" align="center"><strong><font color="#0000FF">运费单价(RMB)</font></strong></td>
- <td width="90" align="center"><strong><font color="#0000FF">运费总额(RMB)</font></strong></td>
- <td width="115" align="center"><strong><font color="#0000FF">最后更新时间</font></strong></td>
- </tr>
- <%
- if(intPageCount>0){
- //将记录指针定位到待显示页的第一条记录上
- rs.absolute((intPage-1) * intPageSize + 1);
- //显示数据
- i = 0;
- while(i<intPageSize && !rs.isAfterLast()){
- %>
- <tr>
- <td height="25" width="55" align="center"><%=rs.getString("KUNNR")%></td>
- <td align="center"><%=rs.getString("ZYEAR")%></td>
- <td align="center"><%=rs.getString("ZMONTH")%></td>
- <td align="center"><%=rs.getString("FKIMG")%></td>
- <td align="center">
- <%
- c01=rs.getString("KBETR");
- i01=rs.getInt("KBETR");
- %>
- <% if(i01==0){%>
- --
- <%}
- else {
- %>
- <%=c01%>
- <% }%></td>
- <td align="center"><font color="#ff6600">
- <% if(i01==0){%>
- --
- <%}
- else {
- %>
- <%=rs.getString("NETWR")%>%
- <% }%>
- </font></td>
- <td width="115" align="center"><%=rs.getDate("ERDAT")%> <%=rs.getTime("ERZET")%></td>
- </tr>
- <%
- rs.next();
- i++;
- }
- }
- rs.close();
- %>
- <!--新闻列表-->
- </table>
- <br>
- <table width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td align="right">
- <div align="center"> <strong>分页显示:</strong> <FONT color=red>第<%=intPage%>页
- 共<%=intPageCount%>页 | 总<%=intRowCount%>条</FONT>
- <%@include file="../include/showpage.jsp"%>
- 转到第
- <input type="text" name="goto_page1" value=<%=intPage%> class=box1 size=3 maxlength=3>
- 页
- <input style="height:19;WIDTH: 42px;" class="s02" hideFocus type="button" value="Go" name="cmd_goto" onclick="javascript:viewPage(document.all.goto_page1.value);">
- </div>
- </span> <form action="c_customer_yf_list.jsp" method=post name="frm_page">
- <input type="hidden" name="page">
- <input type="hidden" name="column_id" value=<%=column_id%>>
- <input type="hidden" name="keyword" value=<%=keyword%>>
- </form>
- </td>
- </tr>
- </table></td>
- </tr>
- </table>
- <table width="778" align="center" cellpadding="0" cellspacing="0" bgcolor="#999999">
- <tr>
- <td><img src="../images/spacer.gif" width="1" height="1"></td>
- </tr>
- </table>
- <%@include file="../include/bottom02.jsp"%>
- </BODY>
- </HTML>