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