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

📄 agentquerydo.asp

📁 蓝芒3.0A最新所有功能完整破解版
💻 ASP
字号:
<% ModuleCode="M1015" %>
<!--#include file="../../Include/Reference.asp"-->
<%
Call PrintPageHead
%>
<!--#include file="../../Include/connect.asp"-->
<%

UAMoney=Request("UAMoney")
UAVoucher=Request("UAVoucher")
ActType=Request("ActType")
Reason=Request("Reason")
OtherInfo=Request("OtherInfo")
FromTime=Request("FromTime")
ToTime=Request("ToTime")
UserID=Request("UserID")

strSQL="Select * from T_DNS_UserAccount where ((UAType='4' and UAStat='2') or (UAType<>'4' and UAStat='1')) "
strQuery=""

if UserID<>"" then
	'strSQL = strSQL & " and UserID like '%" & UserID & "%'"
	strSQL = strSQL & " and UserID =" & UserID 
	strQuery = strQuery & "&UserID=" & UserID
end if

if UAVoucher<>"" then
	strSQL = strSQL & " and UAVoucher='" & UAVoucher & "' or UAID='" & UAVoucher & "'"
	strQuery = strQuery & "&UAVoucher=" & UAVoucher
end if

if ActType<>"" then
	if ActType="0" then
		strSQL = strSQL & " and UAMoney>=0"
	else
		strSQL = strSQL & " and UAMoney<0"
	end if
	strQuery = strQuery & "&ActType=" & ActType
end if

if UAMoney<>"" then
	strSQL = strSQL & " and UAMoney=" & UAMoney & " "
	strQuery = strQuery & "&UAMoney=" & UAMoney
end if

if Reason<>"" then
	strSQL = strSQL & " and Reason like '%" & Reason & "%'"
	strQuery = strQuery & "&Reason=" & Reason
end if

if OtherInfo<>"" then
	strSQL = strSQL & " and OtherInfo like '%" & OtherInfo & "%'"
	strQuery = strQuery & "&OtherInfo=" & OtherInfo
end if

if FromTime<>"" then
	strSQL = strSQL & " and UATime >= '" & FromTime & " 00:00:00'"
	strQuery = strQuery & "&FromTime=" & FromTime
end if

if ToTime<>"" then
	strSQL = strSQL & " and UATime <= '" & ToTime & " 23:59:59'"
	strQuery = strQuery & "&ToTime=" & ToTime
end if
strSQL = strSQL & " order by InTime desc"

'Response.Write strSQL
'Response.End

Set Rs= Server.CreateObject("ADODB.Recordset")
Rs.open strSQL,Cn,1,1
If Rs.Eof Then
	Response.Write "<br><br><P align='center' class='titletext'>没有帐单记录!</p>"
else

records=Rs.recordcount
%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tbody>
      <tr>
        <td height="22" class="titletext"><font color="<%=Opt_Font_TitleColor%>"><strong>财务查询</strong></font></td>
        <td align="right">共 <font color="red"><b><%=Records%></b></font> 个项目
        </td>
      </tr>
    </tbody>
</table>
<!------------------------------------------------------------------------------------->
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="<%=Opt_Table_BGColor%>">
  <tr bgcolor="<%=Opt_TR_BGColor%>" height="24"> 
     <td>凭证编号</td>
     <td>操作</td>
     <td>时间</td>
     <td>金额</td>
     <td>方式/原因</td>
     <td>备注</td>
     <td>用户</td>
  </tr>
<%
line=0
RZ=0
ZC=0
XF=0
HK=0
while (not Rs.eof)
     if line mod 2 =0 Then %>
     <tr bgcolor="<%=Opt_TD_BGColor1%>" height="20">
     <% else %>
     <tr bgcolor="<%=Opt_TD_BGColor2%>" height="20">
     <% end if %>
        <td><a href="AccountView.asp?ID=<%=Rs("UAID")%>" class="a2">
        <%
        if Trim(Rs("UAVoucher"))="" then
        	Response.Write Rs("UAID")
        else
        	Response.Write Rs("UAVoucher")
        end if
        %>
        </a></td>
        <td>
        <%
        if (Rs("UAType")="4" and Rs("UAStat")="2") or (Rs("UAType")="1" and CCur(Rs("UAMoney"))>=0) then
        	HK= HK + CCur(Rs("UAMoney"))
        end if
        if (Rs("UAType")="2" and Rs("UAStat")="1") or (Rs("UAType")="3" and Rs("UAStat")="1") or (Rs("UAType")="1" and CCur(Rs("UAMoney"))<0) then
        	XF= XF - CCur(Rs("UAMoney"))
        end if
        if CCur(Rs("UAMoney"))>=0 then
        	Response.Write "入帐"
        	RZ=RZ + CCur(Rs("UAMoney"))
        else
        	Response.Write "支出"
        	ZC=ZC + CCur(Rs("UAMoney"))
        end if
        %>
        </td>
        <td><%=FormatDateTime(Rs("UATime"),vbShortDate)%></td>
        <td><%=ABS(CCur(Rs("UAMoney")))%></td>
        <td><%=Rs("Reason")%></td>  
        <td>
        <%
        if Len(Rs("OtherInfo"))>16 then
        	Response.Write left(Rs("OtherInfo"),20) & "..."
        else
        	Response.Write Rs("OtherInfo")
        end if
        %>
        </td>
        <td><%=Rs("UserID")%></td>
      </tr>
    <%
	Rs.MoveNext
	line=line+1
wend
%>
</table>
<p align=center>
<strong>
合计:&nbsp;总入帐:<font color="red"><%=RZ%></font>元
&nbsp;总支出:<font color="red"><%=ABS(ZC)%></font>元
&nbsp;总汇款:<font color="red"><%=HK%></font>元
&nbsp;总消费:<font color="red"><%=XF%></font>元
</strong>
</p>
<br>
<!-------------------------------------分页导航--------------------------------------->
<%
end if

Rs.Close
Set Rs=Nothing
Call PrintPageBottom
%>

⌨️ 快捷键说明

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