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

📄 x_chk_suborder.asp

📁 这是去年开发的中移鼎讯手机进销存系统 大家
💻 ASP
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/ChkPurview.asp"-->
<%
'市公司审批县公司订单
Dim Action,crs,csql,Pro_Name
Dim rsm,sqlm
Dim Total
Dim CountyID,Chk
Action	=	Trim(request("Action"))
CountyID	=	Trim(request("CountyID"))
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 "&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><br>
<%
Dim Rst,Sqlt,k
if GetUserGPower=999 then
%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr> 
    <td width="70" height="30" align="center" class="topbg"><strong>按县列表:</strong></td>
    <td height="30">
	<%

		Sqlt = "Select County.*,City.* from County Inner join City on City.CityID=County.CityID where City.CityID='"&cstr(GetCityID)&"' order by County.CountyID 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 CountyID="&cstr(rst("CountyID"))&" and IsChk=0 and SupChk_UserGPower=999"
			'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=X_Chk_SubOrder.asp?CountyID="&Rst("CountyID")&">"&Rst("CountyName")&"</a>&nbsp;"
				else
					Response.write "<a href=X_Chk_SubOrder.asp?CountyID="&Rst("CountyID")&" title=""有未审批订单""><font color='#FF0000'>"&Rst("CountyName")&"</font></a>&nbsp;"
				end if
			Rst.movenext
			If Rst.eof then Exit For
		Next
		Call Rs_End(Rst)
	%>	
	</td>
  </tr>
</table><br>
<%
end if
'/////////////////////////////////////////////
%>

<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="120" height="22"> 操 作</td>
  </tr>
	<%

	if CountyID="" then
		Sql = "Select * from T_SubOrder where UserGPower=99 and SupChk_UserGPower=999 and CityID="&GetCityID&"  order by InTime desc;"
	else
		Sql = "Select * from T_SubOrder where UserGPower=99 and SupChk_UserGPower=999 and CityID="&GetCityID&" and CountyID="&CountyID&"  order by InTime desc;"
	end if		
'	Response.Write Sql
	Call sql_open(Rs,Sql,Conn,1,1)
	if Rs.eof and Rs.bof then
		Response.write "<tr class=""tdbg""><td colspan=""8""  align=""center""  height=""40""><font color=""#FF0000"">没有未审批订单</font></td></tr>"
	else
		Do while not Rs.eof
	%>
  <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td><a href="SubOrder_Show.asp?Sel=3&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"><%=Rs("toTime")%></td>
	<td align="center"><%=Rs("RecName")%></td>
	<td align="center"><%=Format_Time(Rs("InTime"),9)%></td>
    <td align="center"><%
	
	if Rs("SupChk_UserGPower")=9999 then
		Response.Write("已审批")
	else
		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='#FF0000'>部分审批</font>")			
		end if
	end if

	%></td>
    <td align="center">

	
      <%
	if Rs("SupChk_UserGPower")=9999 then
		response.write "<a href=""SubOrder_Show.asp?Sel=3&ID="&Rs("SubOrderID")&""">查看</a>"
	elseif Rs("SupChk_UserGPower")=999 then
		if Rs("IsChk")=0 or Rs("IsChk")=2  then
			response.write "<a href=""SubOrder_Show.asp?Sel=3&ID="&Rs("SubOrderID")&""">审批</a>"
		elseif Rs("IsChk")=1 then
			response.write "<a href=""SubOrder_Show.asp?Sel=3&ID="&Rs("SubOrderID")&""">查看</a>"
		end if
	
	end if		

	if Rs("IsChk")=1 then
		if Rs("UserID")=GetUserID then
			response.write "&nbsp;|&nbsp;<a href='SubOrder_wrt.asp?Action=Modify&ID="&Rs("SubOrderID")&"'>修改</a>"
		end if
	end if

%>	
	</td>
  </tr>
	<%
		Rs.movenext
		Loop
	end if
	Call rs_end(Rs)
	%>
</table>
<br>
<%
Call Conn_End(Conn)
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -