x_customer_lyl_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. keyword=request.getParameter("keyword");
  13. if(keyword==null){
  14. keyword="";
  15. }else{
  16. keyword=getGBString(keyword);
  17. }
  18.  String c_id="";
  19.  String admin_username="";
  20.  String customer_name="";
  21.  c_id=request.getParameter("c_id");
  22.    sql = "select KUNNR,NAME1 from ZSD_KNA1 ";
  23.    sql = sql + " where c_id="+c_id;
  24.    rs=smt.executeQuery(sql);
  25. while(rs.next()){
  26. admin_username =rs.getString("KUNNR");
  27. customer_name   =rs.getString("NAME1");
  28. }
  29. %>
  30. <HTML>
  31. <HEAD>
  32. <TITLE>+ + 翔鹭石化 + +</TITLE>
  33. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
  34. <link href="../style.css" rel="stylesheet" type="text/css">
  35. </HEAD>
  36. <BODY BGCOLOR=#CFE7F3 vlink="#666666" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 >
  37. <table width="778" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  38.         <tr> 
  39.           <img src="../images/in1p_CRM1.gif" width="778" height="90"></td>
  40.         </tr>
  41.   <tr> 
  42.     <td width="26" height="26"><img src="../images/indl1.gif" width="26" height="26"></td>
  43.     <td width="165" height="26"><img src="../images/in1t2.gif" width="165" height="26"></td>
  44.     <td height="26" align="right"><img src="../images/in1tblk.gif" width="585" height="26"></td>
  45.   </tr>
  46.  
  47. </table>
  48. <table width="778" height="300" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  49.   <tr> 
  50.     <td>&nbsp;</td>
  51.     <td align="right" valign="top" bgcolor="f0f0f0">
  52. <!--子目录-->
  53. <%@include file="x_s2menu.jsp"%>
  54. <!--子目录-->
  55.       <table width="100%" cellspacing="0" cellpadding="0" >
  56.         <tr> 
  57.           <td><img src="../images/in1left.gif" width="165" height="100">
  58.         </tr>
  59.       </table>
  60.   </td>      
  61.     <td align="center" valign="top">
  62.         <table width="80%">
  63.   <tr>
  64.     <td >
  65.   <p align="center"><strong><font size="+2"><%=customer_name%></font></strong></p>
  66. </td>
  67.   </tr>
  68.   <tr>
  69.     <td >
  70.   <p align="center"><strong><font size="3">月履约率</font></strong></p>
  71. </td>
  72.   </tr>   
  73.   
  74.   <form name="frm_search" action="x_customer_lyl_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,KUNNR1,ZYEAR,ZMONTH,Wmeng,FKIMG,lyl,ERDAT,ERZET from ZSD_LYL ";
  102. sql = sql + " where (kunnr1='"+admin_username+"')and(me_ver='cn') order by ZYEAR DESC,ZMONTH DESC ";
  103.                    if(keyword.length()!=0)
  104.  {
  105.                     sql = "select c_id,KUNNR1,ZYEAR,ZMONTH,Wmeng,FKIMG,lyl,ERDAT,ERZET from ZSD_LYL ";
  106.        sql = sql + " where (ZYEAR like '%"+keyword+"%')and(kunnr1='"+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="80" align="center"><strong><font color="#0000FF">出货量(TON)</font></strong></td>
  121.    <td width="50" align="center"><strong><font color="#0000FF">履约率</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("KUNNR1")%></td>
  134.    <td align="center"><%=rs.getString("ZYEAR")%></td>
  135.    <td align="center"><%=rs.getString("ZMONTH")%></td>
  136.    <%
  137.    c01 = rs.getString("WMENG");
  138.    i01 = rs.getInt("WMENG");
  139.    %>
  140.    <td align="center" >
  141.    <% if(i01==0){%>
  142.    --
  143.    <%}
  144.    else {
  145.    %>
  146.    <%=c01%>
  147.    <% }%></td>
  148.    <td align="center"><%=rs.getString("FKIMG")%></td>
  149.    <td align="center"><font color="#ff3300">
  150.    <% if(i01==0){%>
  151.    --
  152.    <%}
  153.    else {
  154.    %>
  155.    <%=rs.getString("LYL")%>%
  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_lyl_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>