⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xsjzquest.asp

📁 《网上商品交易系统》 开发及测试环境 操作系统:Windows 2000 Server 后台数据库:SQL Server 2000 Web服务器:IIS 5.0  《网上商品交易系统》
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/sell.asp" -->
<%
MMColParam = "%"
if (Request.Form("qvalue")   <> "") then MMColParam = Request.Form("qvalue")  
varcif = "khname"
if (Request.Form("cif")  <> "") then varcif = Request.Form("cif") 
varccif = "="
if (Request.Form("ccif")  <> "") then varccif = Request.Form("ccif") 
varandor = "and"
if (Request.Form("andor") <> "") then varandor = Request.Form("andor")
varsdate = "2000-01-01"
if (Request.Form("sdate") <> "") then varsdate = Request.Form("sdate")
varedate = date()
if (Request.Form("edate") <> "") then varedate = Request.Form("edate")
set rsjzinfo = Server.CreateObject("ADODB.Recordset")
'根据不同情况设置查询条件
if varccif = "LIKE" then
	sql = "SELECT *  FROM dbo.tab_selljz  WHERE " + Replace(varcif, "'", "''") +_
	" " + Replace(varccif, "'", "''") + "  '%" + Replace(MMColParam, "'", "''") +_
	"%' " + Replace(varandor, "'", "''") + " jkdate BETWEEN '" +_
	Replace(varsdate, "'", "''") + "' AND '" + Replace(varedate, "'", "''") + "'"
else
	if varccif = "ALL" then
		sql = "SELECT *  FROM dbo.tab_selljz"
	else
		sql = "SELECT *  FROM dbo.tab_selljz  WHERE " + Replace(varcif, "'", "''") +_
		 " " + Replace(varccif, "'", "''") + "  '" + Replace(MMColParam, "'", "''") +_
		 "' " + Replace(varandor, "'", "''") + " jkdate BETWEEN '" +_
		 Replace(varsdate, "'", "''") + "' AND '" + Replace(varedate, "'", "''") + "'"
	end if
end if
rsjzinfo.open sql,conn,1,3
%>
<script language="JavaScript">
function cgcx()   //用户点击"查询"按钮时执行的操作
{ form1.hbz.value="1";
form1.submit();}
</script>
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>	
//转换日期格式				
function DoDateTime(str, nNamedFormat, nLCID)				
	dim strRet								
	dim nOldLCID								
										
	strRet = str								
	If (nLCID > -1) Then							
		oldLCID = Session.LCID						
	End If									
										
	On Error Resume Next							
										
	If (nLCID > -1) Then							
		Session.LCID = nLCID						
	End If									
										
	If ((nLCID < 0) Or (Session.LCID = nLCID)) Then				
		strRet = FormatDateTime(str, nNamedFormat)			
	End If									
										
	If (nLCID > -1) Then							
		Session.LCID = oldLCID						
	End If									
										
	DoDateTime = strRet							
End Function									
</SCRIPT>									
<html>
<head>
<title>网上商品交易系统--销售结账查询!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet">
</head>
<body bgcolor="#FFFFFF" text="#000000" background="../../images/bg.gif">
<script language="JavaScript">
function listall()   //用户点击"显示全部数据"按钮时执行的操作
{form1.ccif.value = "ALL";
form1.submit();}
</script>
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="311">
  <tr> 
    <td height="40"> 
      <h2 style="filter:glow(color=#ccccff,strength=5);height:1pt"align="center">
	  <font size="2" color=#000099> 
        销售结账信息查询</font></h2>
    </td>
  </tr>
  <tr> 
    <td valign="top"> 
      <table width="590" border="0" cellspacing="-2" cellpadding="-2" height="247">
        <tr> 
          <td width="20" height="28">&nbsp;</td>
          <td width="570" height="28"> 
            <form name="form1" method="post" action="">
              <div align="left">请选择查询条件: 
                <select name="cif">
                  <option value="khname" selected>客户名称</option>
                  <option value="xsid">销售票号</option>
                </select>
                <select name="ccif">
                  <option value="=" selected>等于</option>
                  <option value="LIKE">LIKE</option>
                  <option value="ALL">ALL</option>
                </select>
                <input type="text" name="qvalue" size="34">
                <select name="andor">
                  <option value="AND" selected>AND</option>
                  <option value="OR">OR</option>
                </select>
                <br>
                <br>
                请输入查询日期:从 
                <input type="text" name="sdate" size="16" value="<%=DateAdd("M",-1,date())%>">
                <input type="text" name="edate" size="16" value="<%=date()%>">
                <input type="button" name="Submit" value="查询" onClick="cgcx()">
                <input type="button" name="Submit2" value="显示全部数据" onClick="listall()">
                <input type="hidden" name="hbz" value="0">
              </div>
            </form>
          </td>
        </tr>
        <tr> 
          <td height="78" colspan="2"> 
              <%While NOT rsjzinfo.EOF%>
            <table width="590" border="0" cellspacing="-2" cellpadding="-2">
              <tr> 
                <td>&nbsp;</td>
              </tr>
            </table>
            <table width="590" border=1 bordercolor=#ffffff bordercolordark=#ffffff 
                  bordercolorlight=#0099ff cellpadding=-1 cellspacing=0 height="27" align="center">
              <tr bgcolor="#dddddd"> 
                <td width="155" bgcolor="#D9ECFF"><font color="#336699">销售票号:<%=(rsjzinfo.Fields.Item("xsid").Value)%></font></td>
                <td colspan="2" bgcolor="#D9ECFF"><font color="#336699">客户全称:<%=(rsjzinfo.Fields.Item("khname").Value)%></font></td>
                <td bgcolor="#D9ECFF" width="166"><font color="#336699">结款日期:<%= DoDateTime((rsjzinfo("jkdate")), 1, -1) %></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="155" bgcolor="#D9ECFF" height="2"><font color="#336699">本次结款:<%=(rsjzinfo.Fields.Item("bcjk").Value)%></font></td>
                <td width="127" bgcolor="#D9ECFF" height="2"><font color="#336699">余额:<%=(rsjzinfo.Fields.Item("ye").Value)%></font></td>
                <td bgcolor="#D9ECFF" width="132" height="2"><font color="#336699">经手人:<%=(rsjzinfo.Fields.Item("jsr").Value)%></font></td>
                <td bgcolor="#D9ECFF" width="166" height="2"><font color="#336699">操作员:<%=(rsjzinfo.Fields.Item("czy").Value)%></font></td>
              </tr>
            </table>
            <% rsjzinfo.MoveNext()
			Wend%>
            <table width="590" border="0" cellspacing="-2" cellpadding="-2">
              <tr> 
                <td width="197">&nbsp; </td>
                <td width="393">&nbsp; 
                  <div align="right">
				  <%'显示记录总数%> 
                    <% If Not rsjzinfo.EOF Or Not rsjzinfo.BOF Then %>
                    <font color="#00CCFF">共 <%=(rsjzinfo.recordcount)%> 条记录</font> 
                    <% End If%>
                  </div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -