c_customer_order_list.jsp
资源名称:shihua.rar [点击查看]
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:9k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
JavaScript
- <%@ page contentType="text/html;charset=gb2312"%>
- <%@include file="../include/checkadmin.jsp"%>
- <%@page import="java.sql.*"%>
- <%@include file="../include/db_conn.jsp"%>
- <%@include file="../include/const.jsp"%>
- <%@include file="../include/isNotInteger.jsp"%>
- <%!String keyword;%>
- <%!String keyword2;%>
- <%
- keyword=request.getParameter("keyword");
- if(keyword==null){
- keyword="";
- }else{
- keyword=getGBString(keyword);
- }
- keyword2=request.getParameter("keyword2");
- if(keyword2==null){
- keyword2="";
- }else{
- keyword2=getGBString(keyword2);
- }
- String admin_username;
- String customer_name="";
- //获取客户名称
- admin_username = (String)session.getAttribute("admin_username");
- sql="SELECT NAME1 FROM ZSD_KNA1 where KUNNR="+admin_username;
- //out.print(sql);
- rs=smt.executeQuery(sql);
- while(rs.next()){
- customer_name =rs.getString("NAME1");
- }
- %>
- <HTML>
- <HEAD>
- <TITLE>+ + 翔鹭石化 + +</TITLE>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
- <link href="../style.css" rel="stylesheet" type="text/css">
- </HEAD>
- <BODY BGCOLOR=#CFE7F3 vlink="#666666" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 >
- <table width="778" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
- <tr>
- <img src="../images/in1p_CRM1.gif" width="778" height="90"></td>
- </tr>
- <tr>
- <td width="26" height="26"><img src="../images/indl1.gif" width="26" height="26"></td>
- <td width="165" height="26"><img src="../images/in1t2.gif" width="165" height="26"></td>
- <td height="26" align="right"><img src="../images/in1tblk.gif" width="585" height="26"></td>
- </tr>
- </table>
- <table width="778" height="300" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
- <tr>
- <td> </td>
- <td align="right" valign="top" bgcolor="f0f0f0">
- <!--子目录-->
- <%@include file="s2menu.jsp"%>
- <!--子目录-->
- <table width="100%" cellspacing="0" cellpadding="0" >
- <tr>
- <td><img src="../images/in1left.gif" width="165" height="100">
- </tr>
- </table>
- </td>
- <td align="center" valign="top">
- <table width="80%">
- <tr>
- <td >
- <p align="center"><strong><font size="+2"><%=customer_name%></font></strong></p>
- </td>
- </tr>
- <tr>
- <td >
- <p align="center"><strong><font size="3">订单欠交信息</font></strong></p>
- </td>
- </tr>
- <form name="frm_search" action="c_customer_order_list.jsp" method="post">
- <tr>
- <td align="left" bgcolor="#ffffff" height=20>请输入查询条件: 年月 <input type="text" size="5" name="keyword"> 订单号 <input type="text" size="15" name="keyword2"> <input type="submit" name="s1" value="搜 索" style="width:60px;height:22px;"></td>
- </tr>
- </form>
- </table>
- <!--新闻列表-->
- <%
- String column_id="3";
- String column_title;
- int intPageSize; //一页显示的记录数
- int intRowCount; //记录总数
- int intPageCount; //总页数
- int intPage; //待显示页码
- String strPage;
- int i;
- //版本控制
- intPageSize = 8; //设置一页显示的记录数
- strPage = request.getParameter("page"); //取得待显示页码
- if(isNotInteger(strPage)){//表明在QueryString中没有page这一个参数,此时显示第一页数据
- intPage = 1;
- }
- else{//将字符串转换成整型
- intPage = java.lang.Integer.parseInt(strPage);
- if(intPage<1) intPage = 1;
- }
- sql = "select YEARMONTH,c_id,VBELN,POSNR,ERDAT1,KWMENG,MENGE,zzsl,qjsl,ERDAT,ERZET,ARKTX,KUNNR from V_ZSD_ORDER ";
- sql = sql + " where (kunnr='"+admin_username+"')and(me_ver='cn') order by YEARMONTH DESC";
- if((keyword.length()!=0)&&(keyword2.length()!=0))
- {
- sql = "select YEARMONTH,c_id,VBELN,POSNR,ERDAT1,KWMENG,MENGE,zzsl,qjsl,ERDAT,ERZET,ARKTX,KUNNR from V_ZSD_ORDER ";
- sql = sql + " where (YEARMONTH like '%"+keyword+"%')and(VBELN like '%"+keyword2+"%')and(kunnr='"+admin_username+"')and(me_ver='cn') order by YEARMONTH DESC ";
- }
- if((keyword.length()!=0)&&(keyword2.length()==0))
- {
- sql = "select YEARMONTH,c_id,VBELN,POSNR,ERDAT1,KWMENG,MENGE,zzsl,qjsl,ERDAT,ERZET,ARKTX,KUNNR from V_ZSD_ORDER ";
- sql = sql + " where (YEARMONTH like '%"+keyword+"%')and(kunnr='"+admin_username+"')and(me_ver='cn') order by YEARMONTH DESC ";
- }
- if((keyword.length()==0)&&(keyword2.length()!=0))
- {
- sql = "select YEARMONTH,c_id,VBELN,POSNR,ERDAT1,KWMENG,MENGE,zzsl,qjsl,ERDAT,ERZET,ARKTX,KUNNR from V_ZSD_ORDER ";
- sql = sql + " where (VBELN like '%"+keyword2+"%')and(kunnr='"+admin_username+"')and(me_ver='cn') order by YEARMONTH DESC ";
- }
- rs=smt.executeQuery(sql);
- rs.last();
- intRowCount = rs.getRow(); //获取记录总数
- intPageCount = (intRowCount+intPageSize-1) / intPageSize; //记算总页数
- if(intPage>intPageCount) intPage = intPageCount; //调整待显示的页码
- %>
- <table border="1" cellpadding="2" cellspacing="0" class="p9" bordercolor="#cccccc" bordercolordark="#FFFFFF" bordercolorlight="#cccccc" width="100%">
- <tr>
- <td width="40" height="25" align="center"><strong><font color="#0000FF">年月</font></strong></td>
- <td width="60" align="center"><strong><font color="#0000FF">订单号码</font></strong></td>
- <td width="15" align="center"><strong><font color="#0000FF">编<br>号</font></strong></td>
- <td width="60" align="center"><strong><font color="#0000FF">出货时间</font></strong></td>
- <td width="60" align="center"><strong><font color="#0000FF">订单量<br>(TON)</font></strong></td>
- <td width="60" align="center"><strong><font color="#0000FF">出货量<br>(TON)</font></strong></td>
- <td width="40" align="center"><strong><font color="#0000FF">终止<br>交货量</font></strong></td>
- <td width="50" align="center"><strong><font color="#0000FF">欠交量<br>(TON)</font></strong></td>
- <td width="80" align="center"><strong><font color="#0000FF">商品名称</font></strong></td>
- <td width="80" align="center"><strong><font color="#0000FF">最后更新<br>时间</font></strong></td>
- </tr>
- <%
- if(intPageCount>0){
- //将记录指针定位到待显示页的第一条记录上
- rs.absolute((intPage-1) * intPageSize + 1);
- //显示数据
- i = 0;
- while(i<intPageSize && !rs.isAfterLast()){
- %>
- <tr>
- <td height="25" align="center"><%=rs.getString("YEARMONTH")%></td>
- <!-- <td align="center" ><a href="c_customer_order_detail.jsp?c_id=<%=rs.getInt("c_id")%>" target="_blank">
- <font color="#0033FF"><%=rs.getString("VBELN").trim()%></font>
- </a></td> -->
- <td ><font color="#ff6600"><%=rs.getString("VBELN").trim()%></font></td>
- <td align="center" ><%=rs.getInt("POSNR")%></td>
- <td align="center" ><%=rs.getDate("ERDAT1")%></td>
- <td ><%=rs.getString("KWMENG").trim()%></td>
- <td ><%=rs.getString("MENGE").trim()%></td>
- <td><%=rs.getString("zzsl").trim()%></td>
- <td align="center"><font color="#ff6600"><%=rs.getString("qjsl")%></font></td>
- <td align="center"><%=rs.getString("ARKTX")%></td>
- <td width="80" align="center"><%=rs.getDate("ERDAT")%> <%=rs.getTime("ERZET")%></td>
- </tr>
- <%
- rs.next();
- i++;
- }
- }
- rs.close();
- %>
- <!--新闻列表-->
- </table>
- <br>
- <table width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td align="right">
- <div align="center"> <strong>分页显示:</strong> <FONT color=red>第<%=intPage%>页
- 共<%=intPageCount%>页 | 总<%=intRowCount%>条</FONT>
- <%@include file="../include/showpage.jsp"%>
- 转到第
- <input type="text" name="goto_page1" value=<%=intPage%> class=box1 size=3 maxlength=3>
- 页
- <input style="height:19;WIDTH: 42px;" class="s02" hideFocus type="button" value="Go" name="cmd_goto" onclick="javascript:viewPage(document.all.goto_page1.value);">
- </div>
- </span> <form action="c_customer_order_list.jsp" method=post name="frm_page">
- <input type="hidden" name="page">
- <input type="hidden" name="column_id" value=<%=column_id%>>
- <input type="hidden" name="keyword" value=<%=keyword%>>
- <input type="hidden" name="keyword2" value=<%=keyword2%>>
- </form>
- </td>
- </tr>
- </table></td>
- </tr>
- </table>
- <table width="778" align="center" cellpadding="0" cellspacing="0" bgcolor="#999999">
- <tr>
- <td><img src="../images/spacer.gif" width="1" height="1"></td>
- </tr>
- </table>
- <%@include file="../include/bottom02.jsp"%>
- </BODY>
- </HTML>