📄 sx_suborder_list.asp
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/ChkPurview.asp"-->
<%
'订单列表 SubOrder/SX_SubOrder_List.asp
Dim Action,crs,csql,Pro_Name
Dim rsm,sqlm
Dim Total
Dim CityID,Chk
Action = Trim(request("Action"))
CityID = Trim(request("CityID"))
if CityID = "" then
CityID = 1
end if
Chk = trim(request("Chk"))
if Chk="" then
Chk=1000
end if
%>
<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>
</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=""SX_Chk_SubOrder.asp"">订单审批</a>"
Response.write " | <a href=""SX_SubOrder_List.asp"">订单列表</a>"
end if
if GetUserGPower = 999 then
Response.write "<a href=""SubOrder_wrt.asp"">添加订单</a>"
Response.write " | <a href=""My_SubOrder_List.asp"">市公司订单</a>"
Response.write " | <a href=""X_Chk_SubOrder.asp"">县级待审批订单</a>"
Response.write " | <a href=""X_SubOrder_List.asp"">县级订单列表</a>"
Response.write " | <a href=""SF_SubOrder_List.asp?Chk=0"">分销点待审批订单</a>"
Response.write " | <a href=""SF_SubOrder_List.asp?Chk=1"">分销点订单列表</a>"
end if
if GetUserGPower = 99 then
Response.write "<a href=""SubOrder_wrt.asp"">添加订单</a>"
Response.write " | <a href=""My_SubOrder_List.asp"">县公司订单</a>"
Response.write " | <a href=""XF_SubOrder_List.asp?Chk=0"">分销点待审批订单</a>"
Response.write " | <a href=""XF_SubOrder_List.asp?Chk=1"">分销点订单列表</a>"
end if
if GetUserGPower = 9 then
Response.write "<a href=""SubOrder_wrt.asp"">添加订单</a>"
Response.write " | <a href=""My_SubOrder_List.asp"">我的订单</a>"
end if
%>
</td>
</tr>
</table>
<%
Dim Rst,Sqlt,k
if GetUserGPower=9999 then
%><br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr>
<td width="100" height="30" align="center" class="topbg"><strong>按地市列表:</strong></td>
<td height="30">
<%
Sqlt="Select CityID,CityName from City order by CityID asc;"
Call sql_open(Rst,Sqlt,Conn,1,1)
for k=0 to Rst.recordcount
sqlm = "Select SUM(SubOrderTotal) as Total from T_SubOrder where CityID="&cstr(rst("CityID"))&" and (IsChk=0 or IsChk=3) and SupChk_UserGPower=9999"
'Response.Write sqlm
Call sql_open(rsm,sqlm,conn,1,1)
'Response.Write sqlm&"<br>"
Total = rsm("Total")
if Total="" or isnull(Total) then
Total=0
else
Total=Rsm("Total")
end if
call rs_end(rsm)
if Total=0 then
Response.write "<a href=SX_SubOrder_List.asp?CityID="&Rst("CityID")&">"&Rst("CityName")&"</a> "
else
Response.write "<a href=SX_SubOrder_List.asp?CityID="&Rst("CityID")&" title=""有未审批订单""><font color='#FF0000'>"&Rst("CityName")&"</font></a> "
end if
Rst.movenext
If Rst.eof then Exit for
Next
Call Rs_End(Rst)
%>
</td>
</tr>
</table>
<%
end if
if Action="Del" then '删除
call DelAdmin()
else
call main()
end if
Call Conn_End(Conn)
sub main()
'/////////////////////////////////////////////
if CityID="" then
if Chk = 0 then
Sql = "Select * from T_SubOrder where SupChk_UserGPower=9999 and (UserGPower=999 or UserGPower=99) and IsChk=0 order by InTime desc;"
else
Sql = "Select * from T_SubOrder where SupChk_UserGPower=9999 and (UserGPower=999 or UserGPower=99) order by InTime desc;"
end if
else
if Chk = 0 then
Sql = "Select * from T_SubOrder where SupChk_UserGPower=9999 and (UserGPower=999 or UserGPower=99) and CityID="&CityID&" and IsChk=0 order by InTime desc;"
else
Sql = "Select * from T_SubOrder where SupChk_UserGPower=9999 and (UserGPower=999 or UserGPower=99) and CityID="&CityID&" order by InTime desc;"
end if
end if
'Response.Write sql
Call sql_open(Rs,Sql,Conn,1,1)
Call page_code(Rs,40)
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 height="22">订单主题</td>
<td>产品名称/型号</td>
<td>申购数量</td>
<td>审批数</td>
<td>要求到货日期</td>
<td>收货人</td>
<td>申购时间</td>
<td>订单状态</td>
</tr>
<%
For i= 1 to Rs.PageSize
If Rs.Eof Then Exit For
%>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td><a href="SX_SubOrder_Show.asp?ID=<%=Rs("SubOrderID")%>"><%=Rs("SubOrderTitle")%></a></td>
<td align="center">
<%
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
Response.Write("<font color='#FF0000'>无此产品</font>")
else
response.Write "<a href=""javascript:ShowPro('"&rs("Pro_ID")&"')"" title=""查看产品信息"">"&crs("Pro_MC")&"<font color='#0000FF'>("&rs("Pro_col")&")</font></a>"
end if
call rs_end(crs)
%></td>
<td align="center"><%=Rs("SubOrderTotal")%></td>
<td align="center"><font color="#0000FF"><%=Rs("Chk_SubOrderTotal")%></font></td>
<td align="center"><%=Rs("toTime")%></td>
<td align="center"><%=Rs("RecName")%></td>
<td align="center"><%=Format_Time(Rs("InTime"), 9)%></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>")
elseif Rs("IsChk")=3 then
Response.Write("<font color='#0000FF'>部分审批</font>")
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,"&CityID="&CityID&"","条记录") %></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 IsChk<>1 and SubOrderID in (" & SubOrderID & ")"
else
SubOrderID=clng(SubOrderID)
sql="select * from T_SubOrder where IsChk<>1 and SubOrderID=" & SubOrderID
end if
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 + -