⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 my_suborder_list.asp

📁 这是去年开发的中移鼎讯手机进销存系统 大家
💻 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=""SX_Chk_SubOrder.asp"">订单审批</a>"
	Response.write "&nbsp;|&nbsp;<a href=""SX_SubOrder_List.asp"">订单列表</a>"
end if
if GetUserGPower = 999 then	
	Response.write "<a href=""SubOrder_wrt.asp"">添加订单</a>"
	Response.write "&nbsp;|&nbsp;<a href=""My_SubOrder_List.asp"">市公司订单</a>"
	Response.write "&nbsp;|&nbsp;<a href=""X_Chk_SubOrder.asp"">县级待审批订单</a>"
	Response.write "&nbsp;|&nbsp;<a href=""X_SubOrder_List.asp"">县级订单列表</a>"	
	Response.write "&nbsp;|&nbsp;<a href=""SF_SubOrder_List.asp?Chk=0"">分销点待审批订单</a>"
	Response.write "&nbsp;|&nbsp;<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 "&nbsp;|&nbsp;<a href=""My_SubOrder_List.asp"">县公司订单</a>"
	Response.write "&nbsp;|&nbsp;<a href=""XF_SubOrder_List.asp?Chk=0"">分销点待审批订单</a>"	
	Response.write "&nbsp;|&nbsp;<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 "&nbsp;|&nbsp;<a href=""My_SubOrder_List.asp"">我的订单</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

	%>
  <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">
	<%
	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")&"</a><font color=""#0000FF"">("&Rs("Pro_col")&")<font>"
	end if	
	%></td>
    <td align="center"><%=Rs("SubOrderTotal")%></td>
	<td align="center"><%=Rs("Chk_SubOrderTotal")%></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("UserGPower")=999 then
		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
	elseif Rs("UserGPower")=99 then
		if Rs("SupChk_UserGPower")=9999 then
			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
		elseif Rs("SupChk_UserGPower")=999 then
			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			
		end if
	elseif Rs("UserGPower")=9 then
		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
	end if			
	%></td>
    <td align="center"><%
if Rs("UserGPower")=99 or Rs("UserGPower")=999 then
	if Rs("Chk_SubOrderTotal")=0 then
		Response.write "<font color='#0000FF'>未发货</font>"
	else
		Response.write "<font color='#0000FF'>已发货</font>"
	end if
else
	if Rs("IsOutOrder")=0 then
		Response.write "<font color='#0000FF'>未发货</font>"
	else
		Response.write "<font color='#0000FF'>已发货</font>"
	end if
end if	
	%></td>
    <td align="center">
<%
	response.write "<a href=""SubOrder_Show.asp?Sel=5&ID="&Rs("SubOrderID")&""">查看</a>"
'/////////////////////////////////////////////////////
if Rs("UserGPower")=999 then
	if Rs("IsChk")=0 or Rs("IsChk")=2 then
		response.write "&nbsp;|&nbsp;<a href='SubOrder_wrt.asp?Action=Modify&ID="&Rs("SubOrderID")&"'>修改</a>"
		response.write "&nbsp;|&nbsp;<a href='My_SubOrder_List.asp?Action=Del&ID=" &Rs("SubOrderID")& "' onClick=""return confirm('确定要删除此订单吗?');"">删除</a>"
	end if
elseif Rs("UserGPower")=99 then
	if Rs("SupChk_UserGPower")=999 then
		if Rs("IsChk")=0 or Rs("IsChk")=2 then
			response.write "&nbsp;|&nbsp;<a href='SubOrder_wrt.asp?Action=Modify&ID="&Rs("SubOrderID")&"'>修改</a>"
			response.write "&nbsp;|&nbsp;<a href='My_SubOrder_List.asp?Action=Del&ID=" &Rs("SubOrderID")& "' onClick=""return confirm('确定要删除此订单吗?');"">删除</a>"
		end if
	end if		
elseif Rs("UserGPower")=9 then
	if Rs("IsChk")=0 or Rs("IsChk")=2 then
		response.write "&nbsp;|&nbsp;<a href='SubOrder_wrt.asp?Action=Modify&ID="&Rs("SubOrderID")&"'>修改</a>"
		response.write "&nbsp;|&nbsp;<a href='My_SubOrder_List.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">&nbsp;</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 or IsChk=2) and SubOrderID in (" & SubOrderID & ")"
	else
		SubOrderID=clng(SubOrderID)
		sql="select * from T_SubOrder where UserID="&GetUserID&" and (IsChk=1 or IsChk=2) 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 + -