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

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