📄 selllist.asp
字号:
<!--#include file="../conn.asp"-->
<!--#include file="../IsUser.asp"-->
<!--#include file="../Pub_fun.asp"-->
<!--#include file="../scripts/openwindow.js"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>销售列表</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META http-equiv=Pragma content=no-cache>
<META content="MSHTML 6.00.2715.400" name=GENERATOR>
<style type="text/css">
<!--
.style1 {color: #FF6600}
-->
</style>
</HEAD>
<LINK href="../css.css" rel=stylesheet>
<%
'获得传递参数
ListPageSize = request("PageSelect")
''默认为每页显示15条记录
if ListPageSize = "" then
ListPageSize = 15
end if
ListPageSize = Cint(ListPageSize)
SelectPage = request("SelPage")
''默认当前页面为第一页
if SelectPage = "" then
SelectPage = 1
end if
SelectPage = Cint(SelectPage)
''获得查询的字段
SearchOption =request("S_SearchOption")
if SearchOption = "" then
SearchOption = 0
end if
SearchOption = Cint(SearchOption)
''获得查询的关系
SearchRelation = request("S_Relation")
if SearchRelation = "" then
SearchRelation = "包含"
end if
''查询条件中关键字符的处理
SearchText = request("T_SearchText")
SqlSearchText = replace(SearchText,"'","''")
SqlSearchText = replace(SearchText,"[","[[]")
SqlSearchText = replace(SearchText,"]","[]]")
SqlSearchText = replace(SearchText,"%","[%]")
SqlSearchText = replace(SearchText,"_","[_]")
%>
<%
'读取数据库数据
''生成查询条件
if SearchText <> "" then
condition=" "
select case SearchOption
case 0
if SearchRelation = "包含" then
condition=condition&"and selltopic like '%"&SqlSearchText&"%'"
else
condition=condition&"and selltopic not like '%"&SqlSearchText&"%'"
end if
case 1
if SearchRelation = "包含" then
condition=condition&" and sellclientID in (select clientid from client where clientname like '%"& SqlSearchText&"%' )"
else
condition=condition&"and sellclientID in (select clientid from client where clientname not like '%"& SqlSearchText&"%' )"
end if
case 2
if SearchRelation = "包含" then
condition=condition&" and selltouchmanID in (select touchmanID from touchman where touchmanname like '%"& SqlSearchText&"%' )"
else
condition=condition&"and selltouchmanID in (select touchmanID from touchman where touchmanname not like '%"& SqlSearchText&"%' )"
end if
case 3
if SearchRelation = "包含" then
condition=condition&"and SellorderNUm like '%"&SqlSearchText&"%'"
else
condition=condition&"and SellorderNUm not like '%"&SqlSearchText&"%'"
end if
case 4
if SearchRelation = "包含" then
condition=condition&"and Selldetail like '%"&SqlSearchText&"%'"
else
condition=condition&"and Selldetail not like '%"&SqlSearchText&"%'"
end if
end select
end if
Dim Sqlstr
Sqlstr = "SELECT selltopic,Max(sellclientID) as sellclientID,Max(selltouchmanID) as selltouchmanID,selldate,sellorderNum,Selldetail ,SellOpenFlag,max(sellcreatorID) as sellcreatorID,sum(sellmoney) as totalmoney from sell "
Sqlstr =Sqlstr&" where (SellCreatorID="&session("Session_User")&" or SellOpenFlag='1') "&condition
Sqlstr =Sqlstr&" group by selldate,sellorderNum,selltopic,Selldetail,SellOpenFlag order by selldate desc "
set rs=server.createobject("adodb.recordset")
' Sqlstr = "select * from client where ClientCreatorID=" & User_ID & " or ClientOpenFlag = 1 order by ClientID"
rs.open Sqlstr,conn,3
%>
<BODY><BR>
<form action="selllist.asp" method="post" name="sellfm">
<input type="hidden" name="act">
<TABLE width="751" border=0 align=center cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD height="24" width="100"valign="top" bgcolor="#566CDB" ><img src="../images/DispStation_H.gif" width="11" height="24">销售信息列表</TD>
<TD colspan="3" align="right" valign="middle" bgcolor="#DDDDDD" >快速查询:
<select name="S_SearchOption" class="text70" id="S_SearchOption">
<option value="0" <%if SearchOption = "0" then%>selected<% end if %>>销售主题</option>
<option value="1" <%if SearchOption = "1" then%>selected<% end if %>>相关客户</option>
<option value="2" <%if SearchOption = "2" then%>selected<% end if %>>相关联系人</option>
<option value="3" <%if SearchOption = "3" then%>selected<% end if %>>订单/合同号</option>
<option value="4" <%if SearchOption = "4" then%>selected<% end if %>>销售说明 </option>
</select>
<select name="S_Relation" class="text10" id="S_Relation">
<option value="包含" <%if SearchRelation = "包含" then%>selected<% end if %>>包含</option>
<option value="不包含" <%if SearchRelation = "不包含" then%>selected<% end if %>>不包含</option>
</select>
<input name="T_SearchText" type="text" size="15" maxlength="50" value="<%=SearchText%>">
<input name="SearchButton" type="submit" class="button_all" id="Search" value="查询">
<input name="Newstock" onClick="javascript:location.href='sell.asp'" type="button" class="button_with" width="80" value="新建销售">
<input name="BackButton" onClick="javascript:location.href='../menu.asp'" type="button" class="button_all" id="BackButton" value="返回">
</TD>
</TD>
</TR>
<tr>
<td colspan="2" height="5"></td>
</tr>
</TBODY>
</TABLE>
<TABLE width="751" border=0 align=center cellPadding=0 cellSpacing=0 >
<TBODY>
<TR>
<TD align="center" valign="middle" style="border: #99ccff 1px solid " bgcolor="#6699FF">销售时间</TD>
<TD align="center" valign="middle" style="border: #99ccff 1px solid " bgcolor="#6699FF">销售主题</TD>
<TD align="center" valign="middle" style="border: #99ccff 1px solid " bgcolor="#6699FF">相关客户</TD>
<TD align="center" valign="middle" style="border: #99ccff 1px solid " bgcolor="#6699FF">相关联系人</TD>
<TD align="center" valign="middle" style="border: #99ccff 1px solid " bgcolor="#6699FF">订单/合同号</TD>
<TD align="center" valign="middle" style="border: #99ccff 1px solid " bgcolor="#6699FF">总金额</TD>
<TD align="center" valign="middle" style="border: #99ccff 1px solid " bgcolor="#6699FF">是否公开记录</TD>
<TD align="center" valign="middle" style="border: #99ccff 1px solid " bgcolor="#6699FF">操作者</TD>
<TD align="center" valign="middle" style="border: #99ccff 1px solid " bgcolor="#6699FF">销售说明</TD>
</TR>
<%
'显示处理
TotalPages = 1 '总记录的页数,初始化为1
TotalRecords = 0 '总记录数,初始化为0
TotalFlag = 0 '每页显示记录数标志
if not(rs.bof or rs.eof) then
TotalRecords = rs.recordcount
'设置每页记录数
if ListPageSize = 0 then
ListPageSize = TotalRecords
TotalFlag = 1
end if
rs.pagesize = ListPageSize
'设置当前页数
TotalPages = rs.pagecount
if SelectPage > TotalPages then
SelectPage = 1
end if
rs.absolutepage = SelectPage
for i = 1 to ListPageSize
if not(rs.bof or rs.eof) then
%>
<TR>
<TD height="25" align="center" valign="middle" style="border: #99ccff 1px solid " ><%=rs("selldate")%></TD>
<TD height="25" align="center" valign="middle" style="border: #99ccff 1px solid " ><a href="javascript:windowopen650('show_sell_detail.asp?selltopic=<%=trim(rs("selltopic"))%>&selldate=<%=rs("selldate")%>','Datail')"><%=rs("selltopic")%></a></TD>
<TD height="25" align="center" valign="middle" style="border: #99ccff 1px solid " ><%=showclientname(rs("sellclientid"))%></TD>
<TD height="25" align="center" valign="middle" style="border: #99ccff 1px solid " ><%=showtouchmanname(rs("selltouchmanid"))%></TD>
<TD height="25" align="center" valign="middle" style="border: #99ccff 1px solid " ><%=rs("sellorderNum")%></TD>
<TD height="25" align="center" valign="middle" style="border: #99ccff 1px solid " ><%=rs("totalmoney")%></TD>
<TD height="25" align="center" valign="middle" style="border: #99ccff 1px solid " >
<% if rs("SellOpenFlag")=1 then
response.Write("公开")
else
response.Write("不公开")
end if
%>
</TD>
<TD height="25" align="center" valign="middle" style="border: #99ccff 1px solid " ><%=showoperatorname(rs("sellCreatorID"))%></TD>
<TD height="25" align="center" valign="middle" style="border: #99ccff 1px solid " > <%=rs("Selldetail")%></TD>
</TR>
<%
rs.movenext
end if
next
end if
%>
<TR valign="middle">
<TD height="30" colspan="2" > <select name="PageSelect">
<%
'生成下拉列表
for i= 1 to 20
%>
<option <%if ListPageSize = i*5 then%>selected<%end if%> value="<%=i*5%>">每页显示<%=i*5%>条</option>
<%
next
%>
<option <%if TotalFlag = 1 then%>selected<%end if%> value="0">..全部显示..</option>
</select>
</td>
<td colspan="7" align="right">
<%if SelectPage<>1 then%><a href="#" name="FirstPage">首页</a> <a href="#" name="PrePage">上一页</a><%else%>首页 上一页<%end if%> <%if SelectPage<>TotalPages then%><a href="#" name="NextPage"> 下一页</a> <a href="#" name="LastPage">末页</a><%else%> 下一页 末页<%end if%> 当前页数:<%=SelectPage%> 总共页数:<%=TotalPages%> 记录总数:<%=TotalRecords%></TD>
<input name="SelPage" type="hidden" value="<%=SelectPage%>">
<input name="TotalPage" type="hidden" value="<%=TotalPages%>">
</TR>
<tr bgColor=#99ccff >
<td height="10" colspan="9"></td>
</tr>
</TBODY>
</TABLE>
</form>
</BODY></HTML>
<!--查询响应函数-->
<SCRIPT FOR="SearchButton" EVENT="onClick" LANGUAGE="VBScript">
Dim TheForm
Set TheForm = Document.forms("sellfm")
TheForm.SelPage.value = 1
TheForm.submit()
</SCRIPT>
<!--查询响应函数-->
<!--下拉列表响应函数-->
<SCRIPT FOR="PageSelect" EVENT="onChange" LANGUAGE="VBScript">
Dim TheForm
Set TheForm = Document.forms("sellfm")
TheForm.SelPage.value = 1
TheForm.submit()
</SCRIPT>
<!--下拉列表响应函数-->
<!--首页响应函数-->
<SCRIPT FOR="FirstPage" EVENT="onClick" LANGUAGE="VBScript">
Dim TheForm
Set TheForm = Document.forms("sellfm")
TheForm.SelPage.value = 1
TheForm.submit()
</SCRIPT>
<!--首页响应函数-->
<!--下一页页响应函数-->
<SCRIPT FOR="NextPage" EVENT="onClick" LANGUAGE="VBScript">
Dim TheForm
Set TheForm = Document.forms("sellfm")
TheForm.SelPage.value = TheForm.SelPage.value + 1
TheForm.submit()
</SCRIPT>
<!--下一页响应函数-->
<!--上一页响应函数-->
<SCRIPT FOR="PrePage" EVENT="onClick" LANGUAGE="VBScript">
Dim TheForm
Set TheForm = Document.forms("sellfm")
TheForm.SelPage.value = TheForm.SelPage.value - 1
TheForm.submit()
</SCRIPT>
<!--上一页响应函数-->
<!--末页响应函数-->
<SCRIPT FOR="LastPage" EVENT="onClick" LANGUAGE="VBScript">
Dim TheForm
Set TheForm = Document.forms("sellfm")
TheForm.SelPage.value = TheForm.TotalPage.value
TheForm.submit()
</SCRIPT>
<!--末页响应函数-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -