📄 suborder.asp
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/ChkPurview.asp"-->
<%
'订单管理:SubOrder.asp
'用户限权检查
Dim Action,crs,csql,Pro_Name
Action = Trim(Request("Action"))
%>
<html>
<head>
<title>订单管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/mobile_sale.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function ShowPro(id) {
var url = "../product/ShowProInfo.asp?ID=" + id ;
window.open(url,"","scrollbars=yes,resizable=no, width=800,height=500");
}
function ShowUser(id) {
var url = "../User/ShowUserInfo.asp?ID=" + id ;
window.open(url,"","scrollbars=yes,resizable=no, width=800,height=500");
}
//-->
</script>
<style type="text/css">
<!--
.style1 {font-weight: bold}
-->
</style>
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="topbg">
<td height="22" colspan="2" align="center"><strong>订单管理</strong></td>
</tr>
<tr class="tdbg">
<td width="70" height="30"><strong>管理导航:</strong></td>
<td height="30">
<%
if GetUserGPower <> 9999 then
Response.write "<a href=""SubOrder.asp"">我的订单</a>"
Response.write " | <a href=""SubOrder_wrt.asp?Action=Add"">添加订单</a>"
end if
if GetUserGPower = 99 then
Response.write " | <a href=""FX_SubOrder.asp"">县分销点订单</a>"
Response.write " | <a href=""FX_SubOrder.asp?Chk=0"">未审核订单</a>"
end if
if GetUserGPower = 999 then
Response.write " | <a href=""FS_SubOrder.asp"">市分销点订单</a>"
Response.write " | <a href=""X_SubOrder.asp"">县级订单</a>"
Response.write " | <a href=""X_SubOrder.asp?Chk=0"">未审核订单</a>"
end if
if GetUserGPower = 9999 then
Response.write "<a href=""S_SubOrder.asp"">订单列表</a>"
Response.write " | <a href=""S_SubOrder.asp?Chk=0"">订单审核</a>"
end if
%>
</td>
</tr>
</table>
<%
if Action="Del" then '删除
call DelAdmin()
else
call main()
end if
Call Conn_End(Conn)
sub main()
'/////////////////////////////////////////////
Sql = "Select * from T_SubOrder where UserID="&GetUserID&" order by InTime desc;"
'Response.Write sql
Call sql_open(Rs,Sql,Conn,1,1)
Call page_code(Rs,20)
If Not Rs.Eof Then
IsFor=True
Else
IsFor=False
Response.write "<center><b><font color=red>暂无内容!</font></b></center>"
End IF
%>
<br>
<table width='100%' border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr align="center" class="topbg">
<td>订单主题</td>
<td>产品名称/型号</td>
<td>颜色</td>
<td>申购数量</td>
<td>要求到货日期</td>
<td>申购人</td>
<td>申购时间</td>
<td>订单状态</td>
<td>发货</td>
<td width="150" height="22"> 操 作</td>
</tr>
<%
For i= 1 to Rs.PageSize
If Rs.Eof Then Exit For
csql = "Select * from T_Product where Pro_ID="&cstr(Rs("Pro_ID"))&""
Call sql_open(crs,csql,conn,1,1)
If crs.eof and crs.bof then
Pro_Name = "<font color='#FF0000'>无产品</font>"
else
Pro_Name = crs("Pro_MC")
end if
%>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td><a href="SubOrder_Show.asp?Sel=5&ID=<%=Rs("SubOrderID")%>"><%=Rs("SubOrderTitle")%></a></td>
<td align="center"><a href="javascript:ShowPro('<%=Rs("Pro_ID")%>')" title="查看产品信息"><%=Pro_Name%></a></td>
<td align="center"><%=Rs("Pro_col")%></td>
<td align="center"><%=Rs("SubOrderTotal")%></td>
<td align="center"><%=Rs("toTime")%></td>
<td align="center"><a href="javascript:ShowUser('<%=Rs("UserID")%>')" title="查看用户信息"><%=Rs("UserName")%></a></td>
<td align="center"><%=Format_Time(Rs("InTime"), 8)%></td>
<td align="center"><%
if Rs("IsChk")=0 then
Response.Write("<font color='#0000FF'>未审核</font>")
elseif Rs("IsChk")=1 then
Response.Write("已审核")
elseif Rs("IsChk")=2 then
Response.Write("<font color='#FF0000'>拒绝</font>")
end if
%></td>
<td align="center"><%
if Rs("IsOutOrder")=0 then
Response.write "<font color='#0000FF'>未发货</font>"
else
Response.write "<font color='#0000FF'>已发货</font>"
Response.write Rs("OutNum")&"次"
end if
%></td>
<td align="center">
<%
response.write "<a href=""SubOrder_Show.asp?Sel=5&ID="&Rs("SubOrderID")&""">查看</a>"
if Rs("IsChk")<>1 then
if Rs("UserID")=GetUserID then
response.write " | <a href='SubOrder_wrt.asp?Action=Modify&ID="&Rs("SubOrderID")&"'>修改</a>"
response.write " | <a href='S_SubOrder.asp?Action=Del&ID=" &Rs("SubOrderID")& "' onClick=""return confirm('确定要删除此订单吗?');"">删除</a>"
end if
end if
%>
</td>
</tr>
<%
Rs.MoveNext
Next
%>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="200" height="30"> </td>
<td width="300"><%If IsFor Then Call page_code_down(Rs,"","条记录") %></td>
</tr>
</table></td>
</tr></table><br>
<%
Call Rs_End(Rs)
end sub
sub DelAdmin()
dim SubOrderID
SubOrderID=trim(Request("ID"))
if SubOrderID="" then
Call Msg("请指定删除的内容", 1,"")
exit sub
end if
if instr(SubOrderID,",")>0 then
SubOrderID=replace(SubOrderID," ","")
Sql="Select * from T_SubOrder where UserID="&GetUserID&" and IsChk<>1 and SubOrderID in (" & SubOrderID & ")"
else
SubOrderID=clng(SubOrderID)
sql="select * from T_SubOrder where UserID="&GetUserID&" and IsChk<>1 and SubOrderID=" & SubOrderID
end if
' Response.write sql
' Response.end
Call sql_open(Rs,Sql,Conn,1,3)
do while not rs.eof
rs.delete
rs.update
rs.movenext
loop
Call Rs_End(Rs)
call main()
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -