📄 default.asp
字号:
<!--#include file="../Session.asp"-->
<html>
<head>
<title>订单管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/site.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
Dim KeyWords,KeyWords2,KeyWords3
KeyWords=trim(request("KeyWords"))
KeyWords2=trim(request("KeyWords2"))
KeyWords3=trim(request("KeyWords3"))
state=request("state")
if KeyWords<>"" then
sql="select * from OrderForm where name like '%"&KeyWords&"%' or Address like '%"&KeyWords&"%' or member like '%"&KeyWords&"%' or tel like '%"&KeyWords&"%' order by Date desc"
elseif KeyWords2<>"" then
sql="select * from OrderForm where id in(select OrderFormId from OrderList where TradeName like '%"&KeyWords2&"%') order by Date desc"
elseif KeyWords3<>"" then
if IsNumeric(KeyWords3)=False then
response.Write "<script language=javascript>alert('订单号只能是整数!');history.go(-1);</script>"
response.End
end if
sql="select * from OrderForm where id="&KeyWords3&" order by Date desc "
else
if state<>""then
sql="select * from OrderForm where "&state&" order by Date desc"
else
sql="select * from OrderForm order by Date desc "
end if
end if
Set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,3,1
if rs.eof then
'此处不可用“自动返回”--删除所有订单后进入死循环
Response.write "<table width=90% border=0 cellspacing=0 cellpadding=0><tr><td height=500 align=center valign=middle>"
response.write "目前没有订单!<br><br><A href=javascript:window.history.go(-1)>返回</a></td></tr></table>"
response.end
end if
rs.pagesize = 15
if request("page")="" or IsNumeric(request("page"))=False then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if%>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr valign="middle">
<td height="50" align="center" class="tdstyle"><font color="#000000" size="3"><strong>订单管理</strong></font></td>
</tr>
</table>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="?">
<tr>
<td width="33%" height="30" align="center" class="tdstyle"> 按客户信息:
<input name="KeyWords" type="text" class="input1" size="10">
<input name="Submit22" type="submit" class="button" value="查 找">
</td>
<td width="33%" height="30" align="center" class="tdstyle">按订单内产品名称:
<input name="KeyWords2" type="text" class="input1" size="10">
<input name="Submit2" type="submit" class="button" value="查 找">
</td>
<td width="33%" height="30" align="center" class="tdstyle">按订单号:
<input name="KeyWords3" type="text" class="input1" id="KeyWords3" size="6"> <input name="Submit23" type="submit" class="button" value="查 找">
</td>
</tr>
</form>
<form name="form2" method="post" action="?">
<tr>
<td width="100%" height="30" align="center" colspan="3" class="tdstyle">按订单状态:
<input type="radio" name="state" value="State=1">尚未受理
<input type="radio" name="state" value="State=2">已支付
<input type="radio" name="state" value="State=3">货已发
<input type="radio" name="state" value="State>3">货已到
<input type="radio" name="state" value="State>0">有效
<input type="radio" name="state" value="State=0">作废
<input name="Submit3" type="submit" class="button" value="查 找">
</td>
</tr>
</form>
</table>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
<tr valign="middle" align="center">
<td width="30%" height="25" class="tdstyle"><strong>订单编号</strong>(年月日-时分秒)</td>
<td width="30%" class="tdstyle"><strong>订单状态</strong></td>
<td width="10%" class="tdstyle"><strong>作费订单</strong></td>
<td width="10%" class="tdstyle"><strong>发 货</strong></td>
<td width="10%" class="tdstyle"><strong>订单信息</strong></td>
<td width="10%" class="tdstyle"><strong>删 除</strong></td>
</tr>
<%i=1
do while not rs.eof and i<=rs.pagesize
Id=rs("Id")%>
<tr valign="middle" align="center">
<td class="tdstyle"><%=rs("BillNo")%></td>
<td class="tdstyle">
<%Dim FormState
FormState=rs("State")
if FormState=0 then
response.write "<font color=3399CC>已经作费</font> [等待系统删除]"
elseif FormState=1 then%><font color=3399CC>等待处理</font> [<a href=../Sorry.asp title=款项确认 onclick="return confirm('您确定此订单的款项已经到帐了吗?\n\n此操作不可逆,请慎重!')"><font color=#FF0000><B>¥</B></font></A>]
<%elseif FormState=2 then
response.write "<font color=3399CC>等待处理</font> [款已到]"
elseif FormState=3 then
response.write "<font color=3399CC>已经发货</font> [等待收货]"
elseif FormState=4 then
response.write "<font color=3399CC>货已到</font> [未评价]"
elseif FormState=5 then
response.write "<font color=3399CC>货已到</font> [已评价]"
else
response.write "<font color=#FF0000>状态不明</font>"
end if%>
</td>
<td class="tdstyle"><%if FormState=1 then%><input name="submit" type="button" class="button3" value="作废" onClick="if(confirm('您确定要作费此订单吗?\n\n此操作不可逆,请慎重!')) location.href='../Sorry.asp'"><%else%>不可操作<%end if%></td>
<td class="tdstyle"><input name="submit" type="button" class="button2" value="操 作" onClick="window.location='View.asp?id=<%=id%>&KeyWords=<%=request("KeyWords")%>&KeyWords2=<%=request("KeyWords2")%>&KeyWords3=<%=request("KeyWords3")%>&state=<%=request("state")%>&FormState=<%=FormState%>&page=<%=page%>'"></td>
<td class="tdstyle"><input name="submit" type="button" class="button2" value="修 改" onClick="window.location='../Sorry.asp'"></td>
<td class="tdstyle"><input name="submit" type="button" class="button2" value="删 除" onClick="if(confirm('您确定要删除吗?')) location.href='del.asp?id=<%=id%>&memberid=<%=rs("memberid")%>&page=<%=page%>'"></td>
</tr>
<%i=i+1
rs.MoveNext
loop%>
<tr valign="middle" align="center">
<form name=form method=post action="?KeyWords=<%=request("KeyWords")%>&KeyWords2=<%=request("KeyWords2")%>&KeyWords3=<%=request("KeyWords3")%>&state=<%=request("state")%>">
<td height="30" colspan="8" class="tdstyle">
<%if rs.recordcount<>0 then
if page-1 mod 10=0 then
p=(page-1) \ 10
else
p=(page-1) \ 10
end if
response.write "页次:"& page &"/"& rs.pagecount &"页 每页"& rs.pagesize &" 共"& rs.recordcount &"条记录"&_
" 分页:"
if p*10>0 then response.write "<a href='?KeyWords="&KeyWords&"&KeyWords2="&KeyWords2&"&KeyWords3="&KeyWords3&"&state="&state&"&page="&p*10&"' title=上十页>[<<]</a> "
uming_i=1
for ii=p*10+1 to P*10+10
if ii=page then
response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "
else
response.write "<a href='?KeyWords="&KeyWords&"&KeyWords2="&KeyWords2&"&KeyWords3="&KeyWords3&"&state="&state&"&page="&ii&"'>["+Cstr(ii)+"]</a> "
end if
if ii=rs.pagecount then exit for
uming_i=uming_i+1
next
if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?KeyWords="&KeyWords&"&KeyWords2="&KeyWords2&"&KeyWords3="&KeyWords3&"&state="&state&"&page="&ii&"' title=下十页>[>>]</a> "
response.write(" 跳页:<input type=text name=page size=2 maxlength=3 class=input1> <input type=submit name=Submit value=Go class=button>")
end if%>
</td>
</form>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -