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

📄 findfundok.asp

📁 这是去年开发的中移鼎讯手机进销存系统 大家
💻 ASP
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/ChkPurview.asp"-->
<%
Dim stype,Pro_ID,sUserName,fromTime,toTime
Dim fm,tm,fd,td
Dim fT,tT
Dim Pro_Name,UserID
stype	= trim(Request("stype"))
Pro_ID	= trim(Request("Pro_ID"))
sUserName	= trim(Request("sUserName"))

fromTime	= trim(Request("fromTime"))
toTime		= trim(Request("toTime"))
'\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
if stype=1 or stype=4 then
	if fromTime="" or totime="" then
		Response.Write("您没有选择有效日期")
		Response.end
	end if
end if

if stype=2 or stype=4then
	if Pro_ID="" then
		Response.Write("您没有选择所有搜索的产品")
		Response.end
	end if
end if

if stype=3 or stype=4 then
	if sUserName="" then
		Response.Write("您没有输入所要搜索的用户名")
		Response.end
	end if
end if



if stype=1 or stype=4 then
	fT = split(fromTime,"-")
	tT = split(toTime,"-")
	
	''月处理,fm,tm
	if Len(fT(1))=1 then
		fm = "0"&fT(1)
	else
		fm = fT(1)
	end if
	if Len(fT(2))=1 then
		fd = "0"&fT(2)
	else
		fd = fT(2)
	end if
	''日处理,fd,td
	if Len(tT(1))=1 then
		tm = "0"&tT(1)
	else
		tm = tT(1)
	end if
	if Len(tT(2))=1 then
		td = "0"&tT(2)
	else
		td = tT(2)
	end if
	
	fromTime =trim(fT(0)&"-"&fm&"-"&fd)
	
	toTime =trim(tT(0)&"-"&tm&"-"&td)

end if
Dim UserGID,CityID,CountyID
Dim crs,csql
%>


<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">
</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">
	<a href="Fund.asp">回笼资金管理</a>&nbsp;|&nbsp;
	<a href="Fund.asp?T=1">今日回笼资金</a>
	<%
	if GetUserGPower=9999 then
		Response.Write "&nbsp;|&nbsp;<a href='FindFund.asp?Action=Add'>回笼资金统计</a>"
	end if
	if GetUserGPower=9 then
		Response.Write "&nbsp;|&nbsp;<a href='Fund.asp?Action=Add'>资金回笼添加</a>"
	end if
	%>
	
	</td>
  </tr>
</table>
<br>
<%
Dim Rs1,Sql1
Select Case stype
	case 1	'按时间找
		Response.write "您所要统计的是<font color='#0000FF'>"&fromTime&"</font>到<font color='#0000FF'>"&toTime&"</font>的所有回笼资金情况"
		sql = "Select * from V_Fund where convert(varchar(10),InTime,120) between  '"&fromTime&"' and '"&toTime&"'"
	case 2	'按产品找
		Sql1 = "select * from T_Product where Pro_ID="&Cstr(Pro_ID)&""
		Call sql_open(Rs1,Sql1,Conn,1,1)
		if Rs1.eof and Rs1.bof then
			Response.write "没有您所要查找的产品"
			Response.end
		else
			Pro_Name = Rs1("Pro_MC")
		end if
		Call Rs_end(Rs1)
		Response.write "您所要统计的是<font color='#0000FF'>"&Pro_Name&"</font>的所有回笼资金情况"
		sql = "Select * from V_Fund where Pro_ID="&cstr(Pro_ID)&""
	case 3	'按用户名
'------------------------------------------------------------------------------

Sql1 = "select * from T_User where UserName='"&sUserName&"'"
Call sql_open(Rs1,Sql1,Conn,1,1)
if Rs1.eof and Rs1.bof then
	Response.write "没有您所要查找的用户名"
	Response.end
else
	UserID = Rs1("UserID")
	UserGID = Rs1("UserGID")
	CityID = Rs1("CityID")
	CountyID = Rs1("CountyID")
	if UserGID=5 then
		Response.write "您所要统计的是所有用户回笼资金情况"
		sql = "Select * from V_Fund"
	elseif UserGID=6 then		'市级用户,则找出市分销商以及市辖县的分销商。
		csql= "Select County.*,City.* from County Inner join City on County.CityID=City.CityID where City.CityID="&Cstr(CityID)&""
		Call sql_open(crs,csql,Conn,1,1)
		if crs.eof and crs.bof then
			Response.write "此用户异常"
			Response.end			
		else
			Response.write "您所要统计的是<font color='#0000FF'>"&crs("CityName")&"</font>所有用户资金回笼情况"
		end if
		call Rs_end(crs)
		sql = "Select T_Fund.*,T_User.* from T_Fund Inner join T_User on T_Fund.UserID=T_User.UserID where CityID="&Cstr(CityID)&" order by T_Fund.FundID desc;"
	elseif UserGID=7 then
		csql= "Select County.*,City.* from County Inner join City on County.CityID=City.CityID where County.CountyID="&Cstr(CountyID)&""
		Call sql_open(crs,csql,Conn,1,1)
		if crs.eof and crs.bof then
			Response.write "此用户异常"
			Response.end			
		else
			Response.write "您所要统计的是<font color='#0000FF'>"&crs("CountyName")&"</font>所有用户资金回笼情况"
		end if
		call Rs_end(crs)
		sql = "Select T_Fund.*,T_User.* from T_Fund Inner join T_User on T_Fund.UserID=T_User.UserID where CountyID="&Cstr(CountyID)&" order by T_Fund.FundID desc;"
	elseif UserGID=8 then
		Response.write "您所要统计的是用户名为<font color='#0000FF'>"&sUserName&"</font>的资金回笼情况"
		sql = "Select * from V_Fund where UserID="&cstr(UserID)&""
	else
		Response.write "此用户异常"
		Response.end
	end if
end if	
'------------------------------------------------------------------------------	

	case 4	'全部
		Sql1 = "select * from T_Product where Pro_ID="&Cstr(Pro_ID)&""
		Call sql_open(Rs1,Sql1,Conn,1,1)
		if Rs1.eof and Rs1.bof then
			Response.write "没有您所要查找的产品"
			Response.end
		else
			Pro_Name = Rs1("Pro_MC")
		end if
		Call Rs_end(Rs1)
'=============================================================================

Sql1 = "select * from T_User where UserName='"&sUserName&"'"
Call sql_open(Rs1,Sql1,Conn,1,1)
if Rs1.eof and Rs1.bof then
	Response.write "没有您所要查找的用户名"
	Response.end
else
	UserID = Rs1("UserID")
	UserGID = Rs1("UserGID")
	CityID = Rs1("CityID")
	CountyID = Rs1("CountyID")
	if UserGID=5 then
		Response.write "您所要统计的是从<font color='#0000FF'>"&fromTime&"</font>到<font color='#0000FF'>"&toTime&"</font>所有用户<font color='#0000FF'>"&Pro_Name&"</font>回笼资金情况"
		sql = "Select * from V_Fund where Pro_ID="&cstr(Pro_ID)&" and convert(varchar(10),InTime,120) between  '"&fromTime&"' and '"&toTime&"'"
	elseif UserGID=6 then		'市级用户,则找出市分销商以及市辖县的分销商。
		csql= "Select County.*,City.* from County Inner join City on County.CityID=City.CityID where City.CityID="&Cstr(CityID)&""
		Call sql_open(crs,csql,Conn,1,1)
		if crs.eof and crs.bof then
			Response.write "此用户异常"
			Response.end			
		else
			Response.write "您所要统计的是从<font color='#0000FF'>"&fromTime&"</font>到<font color='#0000FF'>"&toTime&"</font>,<font color='#0000FF'>"&crs("CityName")&"</font>所有用户的<font color='#0000FF'>"&Pro_Name&"</font>回笼资金情况"
		
			'Response.write "您所要统计的是<font color='#0000FF'>"&crs("CityName")&"</font>所有用户资金回笼情况"
		end if
		call Rs_end(crs)
		'sql = "Select T_Fund.*,T_User.* from T_Fund Inner join T_User on T_Fund.UserID=T_User.UserID where CityID="&Cstr(CityID)&" order by T_Fund.FundID desc;"
		sql = "Select * from V_Fund where Pro_ID="&cstr(Pro_ID)&" and CityID="&Cstr(CityID)&" and convert(varchar(10),InTime,120) between  '"&fromTime&"' and '"&toTime&"'"
	elseif UserGID=7 then
		csql= "Select County.*,City.* from County Inner join City on County.CityID=City.CityID where County.CountyID="&Cstr(CountyID)&""
		Call sql_open(crs,csql,Conn,1,1)
		if crs.eof and crs.bof then
			Response.write "此用户异常"
			Response.end			
		else
			Response.write "您所要统计的是从<font color='#0000FF'>"&fromTime&"</font>到<font color='#0000FF'>"&toTime&"</font>,<font color='#0000FF'>"&crs("CountyName")&"</font>所有用户的<font color='#0000FF'>"&Pro_Name&"</font>回笼资金情况"
			'Response.write "您所要统计的是<font color='#0000FF'>"&crs("CountyName")&"</font>所有用户资金回笼情况"
		end if
		call Rs_end(crs)
		sql = "Select * from V_Fund where Pro_ID="&cstr(Pro_ID)&" and CountyID="&Cstr(CountyID)&" and convert(varchar(10),InTime,120) between  '"&fromTime&"' and '"&toTime&"'"		
		'sql = "Select T_Fund.*,T_User.* from T_Fund Inner join T_User on T_Fund.UserID=T_User.UserID where CountyID="&Cstr(CountyID)&" order by T_Fund.FundID desc;"
	elseif UserGID=8 then
		'Response.write "您所要统计的是用户名为<font color='#0000FF'>"&sUserName&"</font>的资金回笼情况"
		Response.write "您所要统计的是从<font color='#0000FF'>"&fromTime&"</font>到<font color='#0000FF'>"&toTime&"</font>,用户名为<font color='#0000FF'>"&sUserName&"</font>的<font color='#0000FF'>"&Pro_Name&"</font>回笼资金情况"
		'sql = "Select * from V_Fund where UserID="&cstr(UserID)&""
		sql = "Select * from V_Fund where Pro_ID="&cstr(Pro_ID)&" and UserID="&cstr(UserID)&" and convert(varchar(10),InTime,120) between  '"&fromTime&"' and '"&toTime&"'"
	else
		Response.write "此用户异常"
		Response.end
	end if
end if	
'=============================================================================

		'Response.write "您所要统计的是<font color='#0000FF'>"&fromTime&"</font>到<font color='#0000FF'>"&toTime&"</font>的所有回笼资金情况"
		'sql = "Select * from V_Fund where Pro_ID="&cstr(Pro_ID)&" and UserID="&cstr(UserID)&" and convert(varchar(10),InTime,120) between  '"&fromTime&"' and '"&toTime&"'"
end select


'Response.write "<br>"&Sql
'response.end

	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

%><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="title">
    <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
	
	Dim Rst,Sqlt
	Dim MC,XH,DJ
	Sqlt="Select * from T_Product where Pro_ID="&Cstr(Rs("Pro_ID"))&""
	Call sql_open(Rst,Sqlt,conn,1,1)
	if Rst.eof and Rst.bof then
		MC = "Nothing"
		XH = "Nothing"
		DJ = "Nothing"
	else
		MC = Rst("Pro_MC")
		XH = Rst("Pro_XH")
		DJ = Rst("Pro_DJ")
	end if	
	%>
  <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td><a href="ShowFund.asp?ID=<%=rs("FundID")%>"><%=MC%></a></td>
    <td align="center"><%=XH%></td>
    <td align="center"><%=DJ%></td>
    <td align="center"><%=Rs("Sale_Num")%></td>
    <td align="center"><%=Rs("Price")%></td>
    <td align="center"><%=rs("FundZJ")%></td>
    <td align="center"><%=rs("InTime")%></td>
    <td align="center"><%
	if Rs("IsCheck")=1 then
		Response.write "已审核"
	else
		Response.write "未审核"
	end if
	%></td>
    <td width="150" align="center">
	<%
		If GetUserGPower=9 or GetUserGPower=9999 then
			Response.write "<a href='ShowFund.asp?ID=" & rs("FundID") & "'>查看</a>&nbsp;&nbsp;"
		end if
		
		If GetUserGPower=9 and Rs("IsCheck")=0 then
			Response.write "<a href='Fund.asp?Action=Modify&ID=" & rs("FundID") & "'>修改</a>&nbsp;&nbsp;"
			Response.write "<a href='Fund.asp?Action=Del&ID=" & rs("FundID") & "' 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">&nbsp;</td>
    <td>&nbsp;	</td>
	<td width="300"></td>
  </tr>
</table>
</td>
</tr></table>
<%
call Rs_end(Rs)

%>


</body>
</html>

⌨️ 快捷键说明

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