x_customer_yf_list.jsp
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:8k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

JavaScript

  1. <%@ page contentType="text/html;charset=gb2312"%> 
  2. <%@include file="../include/checkadmin.jsp"%>
  3. <%@page import="java.sql.*"%>
  4. <%@include file="../include/db_conn.jsp"%>
  5. <%@include file="../include/const.jsp"%>
  6. <%@include file="../include/isNotInteger.jsp"%>
  7. <%!String keyword;%>
  8. <%
  9.  String c01="";
  10.  int i01;
  11.  i01 = 0;
  12.  
  13. keyword=request.getParameter("keyword");
  14. if(keyword==null){
  15. keyword="";
  16. }else{
  17. keyword=getGBString(keyword);
  18. }
  19.  String c_id="";
  20.  String admin_username="";
  21.  String customer_name="";
  22.  c_id=request.getParameter("c_id");
  23.    sql = "select KUNNR,NAME1 from ZSD_KNA1 ";
  24.    sql = sql + " where c_id="+c_id;
  25.    rs=smt.executeQuery(sql);
  26. while(rs.next()){
  27. admin_username =rs.getString("KUNNR");
  28. customer_name   =rs.getString("NAME1");
  29. }
  30. %>
  31. <HTML>
  32. <HEAD>
  33. <TITLE>+ + 翔鹭石化 + +</TITLE>
  34. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
  35. <link href="../style.css" rel="stylesheet" type="text/css">
  36. </HEAD>
  37. <BODY BGCOLOR=#CFE7F3 vlink="#666666" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 >
  38. <table width="778" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  39.         <tr> 
  40.           <img src="../images/in1p_CRM1.gif" width="778" height="90"></td>
  41.         </tr>
  42.   <tr> 
  43.     <td width="26" height="26"><img src="../images/indl1.gif" width="26" height="26"></td>
  44.     <td width="165" height="26"><img src="../images/in1t2.gif" width="165" height="26"></td>
  45.     <td height="26" align="right"><img src="../images/in1tblk.gif" width="585" height="26"></td>
  46.   </tr>
  47.  
  48. </table>
  49. <table width="778" height="300" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  50.   <tr> 
  51.     <td>&nbsp;</td>
  52.     <td align="right" valign="top" bgcolor="f0f0f0">
  53. <!--子目录-->
  54. <%@include file="x_s2menu.jsp"%>
  55. <!--子目录-->
  56.       <table width="100%" cellspacing="0" cellpadding="0" >
  57.         <tr> 
  58.           <td><img src="../images/in1left.gif" width="165" height="100">
  59.         </tr>
  60.       </table>
  61.   </td>      
  62.     <td align="center" valign="top">
  63.         <table width="80%">
  64.   <tr>
  65.     <td >
  66.   <p align="center"><strong><font size="+2"><%=customer_name%></font></strong></p>
  67. </td>
  68.   </tr>
  69.   <tr>
  70.     <td >
  71.   <p align="center"><strong><font size="3">承运商运费</font></strong></p>
  72. </td>
  73.   </tr>
  74.   <form name="frm_search" action="x_customer_yf_list.jsp" method="post">
  75.     <tr> 
  76.       <td align="left" bgcolor="#ffffff" height=20>请输入查询年度:<input type="text" name="keyword"> <input type="submit" name="s1" value="搜 索" style="width:60px;height:22px;"></td>
  77.     </tr>
  78. <input type="hidden" name="c_id" value=<%=c_id%>>
  79.   </form>   
  80. </table>
  81.        <!--新闻列表-->
  82.        <%
  83.                 String column_id="3";
  84. String column_title;
  85. int intPageSize; //一页显示的记录数
  86. int intRowCount; //记录总数
  87. int intPageCount; //总页数
  88. int intPage; //待显示页码
  89. String strPage;
  90. int i;
  91. //版本控制
  92. intPageSize = 12; //设置一页显示的记录数
  93. strPage = request.getParameter("page"); //取得待显示页码
  94. if(isNotInteger(strPage)){//表明在QueryString中没有page这一个参数,此时显示第一页数据
  95. intPage = 1;
  96. }
  97. else{//将字符串转换成整型
  98. intPage = java.lang.Integer.parseInt(strPage);
  99. if(intPage<1) intPage = 1;
  100. }
  101. sql = "select c_id,KUNNR,ZYEAR,ZMONTH,FKIMG,KBETR,NETWR,ERDAT,ERZET from ZSD_YF ";
  102. sql = sql + " where (kunnr='"+admin_username+"')and(me_ver='cn') order by ZYEAR DESC,ZMONTH DESC ";
  103.                    if(keyword.length()!=0)
  104.  {
  105.                     sql = "select c_id,KUNNR,ZYEAR,ZMONTH,FKIMG,KBETR,NETWR,ERDAT,ERZET from ZSD_YF ";
  106.        sql = sql + " where (ZYEAR like '%"+keyword+"%')and(kunnr='"+admin_username+"')and(me_ver='cn') order by ZYEAR DESC,ZMONTH DESC ";
  107.                      }
  108.      rs=smt.executeQuery(sql);
  109. rs.last();
  110. intRowCount = rs.getRow(); //获取记录总数
  111. intPageCount = (intRowCount+intPageSize-1) / intPageSize; //记算总页数
  112. if(intPage>intPageCount) intPage = intPageCount; //调整待显示的页码
  113. %>
  114.        <table border="1" cellpadding="2" cellspacing="0" class="p9" bordercolor="#cccccc" bordercolordark="#FFFFFF" bordercolorlight="#cccccc" width="95%">
  115.          <tr> 
  116.    <td height="25" width="55" align="center"><strong><font color="#0000FF">客户编号</font></strong></td>
  117.    <td width="28" align="center"><strong><font color="#0000FF">年度</font></strong></td>
  118.    <td width="28" align="center"><strong><font color="#0000FF">月份</font></strong></td>
  119.    <td width="90" align="center"><strong><font color="#0000FF">销售数量(TON)</font></strong></td>
  120.    <td width="90" align="center"><strong><font color="#0000FF">运费单价(RMB)</font></strong></td>
  121.    <td width="90" align="center"><strong><font color="#0000FF">运费总额(RMB)</font></strong></td>
  122.    <td width="115" align="center"><strong><font color="#0000FF">最后更新时间</font></strong></td>
  123.          </tr>               
  124.  <%
  125. if(intPageCount>0){
  126. //将记录指针定位到待显示页的第一条记录上
  127. rs.absolute((intPage-1) * intPageSize + 1);
  128. //显示数据
  129. i = 0;
  130. while(i<intPageSize && !rs.isAfterLast()){
  131. %>        
  132.          <tr> 
  133.    <td height="25" width="55"  align="center"><%=rs.getString("KUNNR")%></td>
  134.    <td align="center"><%=rs.getString("ZYEAR")%></td>
  135.    <td align="center"><%=rs.getString("ZMONTH")%></td>
  136.    <td align="center"><%=rs.getString("FKIMG")%></td>
  137.    <td align="center">
  138.    <%
  139.    c01=rs.getString("KBETR");
  140.    i01=rs.getInt("KBETR");
  141.    %>
  142.    <% if(i01==0){%>
  143.    --
  144.    <%}
  145.    else {
  146.    %>
  147.    <%=c01%>
  148.    <% }%></td>
  149.    <td align="center"><font color="#ff6600">
  150.    <% if(i01==0){%>
  151.    --
  152.    <%}
  153.    else {
  154.    %>
  155.    <%=rs.getString("NETWR")%>%
  156.    <% }%>
  157.    </font></td>
  158.    <td width="115" align="center"><%=rs.getDate("ERDAT")%> <%=rs.getTime("ERZET")%></td>
  159.          </tr>
  160.          <%
  161. rs.next();
  162. i++;
  163. }
  164. }
  165. rs.close();
  166. %>
  167. <!--新闻列表-->
  168.       </table>
  169.       <br>
  170.       <table width="100%" cellspacing="0" cellpadding="0">
  171.         <tr> 
  172.           <td align="right">
  173. <div align="center"> <strong>分页显示:</strong> <FONT color=red>第<%=intPage%>页 
  174.                           共<%=intPageCount%>页 | 总<%=intRowCount%>条</FONT> 
  175.                           <%@include file="../include/showpage.jsp"%>
  176.                           &nbsp;&nbsp; 转到第
  177.                           <input type="text" name="goto_page1" value=<%=intPage%> class=box1 size=3 maxlength=3>
  178.                           页 
  179.                           <input style="height:19;WIDTH: 42px;" class="s02" hideFocus type="button" value="Go" name="cmd_goto" onclick="javascript:viewPage(document.all.goto_page1.value);">
  180.                         </div>
  181.                         </span> <form action="x_customer_yf_list.jsp" method=post name="frm_page">
  182.                           <input type="hidden" name="page">
  183.                           <input type="hidden" name="column_id" value=<%=column_id%>>
  184.                           <input type="hidden" name="keyword" value=<%=keyword%>>
  185.   <input type="hidden" name="c_id" value=<%=c_id%>>
  186.                         </form>
  187. </td>
  188.         </tr>
  189.       </table></td>
  190.   </tr>
  191. </table>
  192. <table width="778" align="center" cellpadding="0" cellspacing="0" bgcolor="#999999">
  193.   <tr> 
  194.     <td><img src="../images/spacer.gif" width="1" height="1"></td>
  195.   </tr>
  196. </table>
  197. <%@include file="../include/bottom02.jsp"%>
  198. </BODY>
  199. </HTML>