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

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