📄 p_suboutorder_sok.asp
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/ChkPurview.asp"-->
<%
if GetUserGPower<>9999 then
Call Msg("您没有权限访问此页",1,"")
end if
Dim Action
Dim stype,Pro_ID,CCityID,CityID,CountyID
Dim fromTime,toTime
Action = Trim(Request("Action"))
stype = Trim(Request("stype"))
if stype="" then
Call Msg("不明参d数", 1,"")
end if
if cint(stype)<>1 and cint(stype)<>2 then
Call Msg("不明参数!", 1,"")
end if
if stype=1 then
CityID = Trim(Request("CCityID"))
else
CityID = Trim(Request("CityID"))
end if
CountyID = Trim(Request("CountyID"))
Pro_ID = Trim(Request("Pro_ID"))
fromTime = Request("fromTime")
toTime = Request("toTime")
if fromTime ="" or toTime = "" then
Call Msg("不明参数!!", 1,"")
end if
fromTime = RequestTime(fromTime)
toTime = RequestTime(toTime)
%>
<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");
}
function ShowSubOutOrder(id) {
var url = "ShowSubOutOrderInfo.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">
<%
Response.write "<a href=""P_subOutOrder.asp"">发货列表</a>"
Response.write " | <a href=""P_subOutOrder_s.asp"">发货统计</a>"
Response.write " | <a href=""P_SubOutOrder_wrt.asp"">我要发货</a>"
%>
</td>
</tr>
</table>
<%
if Action="Del" then '删除
call DelAdmin()
else
call main()
end if
Call Conn_End(Conn)
sub main()
'/////////////////////////////////////////////
Sql = "Select * from T_SubOutOrder where UserPower="&GetUserGPower&" and "
if Pro_ID<>0 then
Sql = Sql + " Pro_ID = "&cstr(Pro_ID)&" and"
end if
if stype = 1 then
if CityID<>0 then
Sql = Sql + " CityID = "&cstr(CityID)&" and"
end if
elseif stype = 2 then
Sql = Sql + " CityID = "&cstr(CityID)&" and CountyID = " &cstr(CountyID)& " and"
end if
Sql = Sql + " convert(varchar(10),InTime,120) between '"&fromTime&"' and '"&toTime&"' order by InTime desc;"
'Response.Write sql
Call sql_open(Rs,Sql,Conn,1,1)
Call page_code(Rs,50)
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 width="200" height="22">操 作</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 align="center"><a href="javascript:ShowPro('<%=Rs("Pro_ID")%>')" title="查看产品信息"><%=Rs("Pro_Name")%></a></td>
<td align="center"><%=Rs("Pro_Price")%></td>
<td align="center"><%=Rs("Pro_Num")%></td>
<td align="center"><%=Rs("Pro_Money")%></td>
<td align="center">
<%
Dim CityName,CountyName
Dim crs,csql
csql = "Select * from City where CityID="&Cstr(Rs("CityID"))&""
call sql_open(crs,csql,Conn,1,1)
if crs.eof and crs.bof then
CityName = "无"
else
CityName = crs("CityName")
end if
call rs_end(crs)
Response.write CityName
'县级收货
csql = "Select * from County where CountyID="&Cstr(Rs("CountyID"))&""
call sql_open(crs,csql,Conn,1,1)
if crs.eof and crs.bof then
CountyName = " "
else
CountyName = crs("CountyName")
end if
call rs_end(crs)
Response.write " "&CountyName
csql = "Select * from T_User where UserID="&Cstr(Rs("InChk_UserID"))&""
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:ShowUser('"&Rs("InChk_UserID")&"')"" title='查看用户信息'><font color='#0000FF'>"&crs("UserName")&"</font></a>"
end if
call rs_end(crs)
%></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">
<%
response.write "<a href=""javascript:ShowSubOutOrder('"&Rs("OutOrder_ID")&"')"" title=""查看订单"">查看</a>"
if Rs("IsChk")=0 or Rs("IsChk")=2 then
response.write "<a href='P_SubOutOrder_edit.asp?ID="&Rs("OutOrder_ID")&"'>修改</a> | "
response.write "<a href='P_SubOutOrder.asp?Action=Del&ID=" &Rs("OutOrder_ID")& "' onClick=""return confirm('确定要删除此发货单吗?');"">删除</a>"
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,"&stype="&stype&"&pro_id="&Pro_ID&"&CityID="&CityID&"&CountyID="&CountyID&"&fromTime="&fromTime&"&toTime="&toTime&"","条记录") %></td>
</tr>
</table></td>
</tr></table><br>
<br>
<%
end sub
sub DelAdmin()
dim OutOrder_ID
OutOrder_ID=trim(Request("ID"))
if OutOrder_ID="" then
Call Msg("请指定删除的内容", 1,"")
exit sub
end if
if instr(OutOrder_ID,",")>0 then
OutOrder_ID=replace(OutOrder_ID," ","")
Sql="Select * from T_SubOutOrder where OutOrder_ID in (" & OutOrder_ID & ")"
else
OutOrder_ID=clng(OutOrder_ID)
sql="select * from T_SubOutOrder where OutOrder_ID=" & OutOrder_ID
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 + -