📄 checklist.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "popayment","read"
sysid=1
dim conn
dim rs
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
if Request("strfield")<>"" then
if Request("strfield")<>"lastmoddate" then
strwhere=" and "&request("strfield")&" like '%"&request("strvalue")&"%'"
else
strwhere=" and "&request("strfield")&"='"&request("strvalue")&"'"
end if
end if
if Request.Form("strfield")<>"" then
if Request.Form("strfield")<>"lastmoddate" then
strwhere=" and "&request("strfield")&" like '%"&request.form("strvalue")&"%'"
else
strwhere=" and "&request("strfield")&"='"&request.form("strvalue")&"'"
end if
end if
if Request("paymentamount")<>"" then
if Request("paymentamount")="0" then
strwhere=strwhere&" and paymentamount=0"
else
strwhere=strwhere&" and paymentamount<>0"
end if
elseif Request.Form("paymentamount")<>"" then
if Request.Form("paymentamount")="0" then
strwhere=strwhere&" and paymentamount=0"
else
strwhere=strwhere&" and paymentamount<>0"
end if
end if
if Request("invoiceamount")<>"" then
if Request("invoiceamount")="0" then
strwhere=strwhere&" and invoiceamount=0"
else
strwhere=strwhere&" and invoiceamount<>0"
end if
elseif Request.Form("invoiceamount")<>"" then
if Request.Form("invoiceamount")="0" then
strwhere=strwhere&" and invoiceamount=0"
else
strwhere=strwhere&" and invoiceamount<>0"
end if
end if
if Request("dueamount")<>"" then
if Request("dueamount")="0" then
strwhere=strwhere&" and dueamount=0"
else
strwhere=strwhere&" and dueamount<>0"
end if
elseif Request.Form("dueamount")<>"" then
if Request.Form("dueamount")="0" then
strwhere=strwhere&" and dueamount=0"
else
strwhere=strwhere&" and dueamount<>0"
end if
end if
if Request.QueryString("orderbyfield")<>"" then
'排序字段改变返回第一页
if session("orderbyfield")<>Request.QueryString("orderbyfield") then
tofirstpage=true
else
tofirstpage=false
end if
'翻页时保持排序方式,不翻页循环改变升序/降序
if request("turnpage")="" then
if request("orderby")="" or request("orderby")="desc" then
session("orderby")="asc"
else
session("orderby")="desc"
end if
strwhere=strwhere & " order by "&Request.QueryString("orderbyfield")&" "&session("orderby")
else
if request("orderbyfield")<>"" then
strwhere=strwhere & " order by "&Request.QueryString("orderbyfield")&" "&session("orderby")
end if
end if
'保存当前排序字段
session("orderbyfield")=Request.QueryString("orderbyfield")
else
'strwhere=strwhere & " order by lastmoddate desc,accountlevel desc"
end if
if objcheck.CheckUserFunction2("popayment","edit") then
rs.Open "SELECT * FROM v_AccountPaymentAndInoviceCheckResult_po where sysaccountid="&sysid&" "&strwhere,conn,1,1
'搜索时用
selecttablename="v_AccountPaymentAndInoviceCheckResult_po where sysaccountid="&sysid
else
rs.Open "SELECT * FROM v_AccountPaymentAndInoviceCheckResult_po where (Accountcreator='"&session("loginid")&"' or Accountowner in(select userid from v_userreportto_all where reportto='"&session("loginid")&"')) and sysaccountid="&sysid&" "&strwhere,conn,1,1
'搜索时用
selecttablename="v_AccountPaymentAndInoviceCheckResult_po where (Accountcreator='"&session("loginid")&"' or Accountowner in(select userid from v_userreportto_all where reportto='"&session("loginid")&"')) and sysaccountid="&sysid
end if
if Request.QueryString("CurPage") = "" or Request("CurPage") = 0 or tofirstpage=true then
CurPage = 1
else
CurPage = cint(Request.QueryString("CurPage"))
end If
if not Rs.eof then
Rs.PageSize=session("PageSize")
Rs.AbsolutePage=CurPage
else
CurPage=0
end if
%>
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>对帐</title>
</head>
<SCRIPT language=JavaScript>
function showit(objname,imgn){
if (eval(objname+'.style.display=="block"') == true)
{
eval(objname+'.style.display="none";');
eval('IMG'+objname+'.style.display="block";');
eval('IMG1'+objname+'.style.display="none";');
//alert('IMG'+objname+'.src = "../images/button2.gif";');
//eval('IMG'+objname+'.src = "../images/button2.gif";');
}
else
{
eval(objname+'.style.display="block";');
eval('IMG'+objname+'.style.display="none";');
eval('IMG1'+objname+'.style.display="block";');
//alert('IMG'+objname+'.src = "../images/button1.gif";');
//eval('IMG'+objname+'.src = "../images/button1.gif";');
}
}
function relativeinput_onchange()
{
if (form1.strfield.value=='lastmoddate'){
dateformat.style.display='block';
}
if (form1.strfield.value!='lastmoddate'){
dateformat.style.display='none';
}
if (form1.strfield.value!="accounttype"&&form1.strfield.value!="owner"&&form1.strfield.value!="industry"&&form1.strfield.value!="province1"){
strvalue1.style.display='block';
strvalue2.style.display='none';
strvalue3.style.display='none';
strvalue4.style.display='none';
strvalue5.style.display='none';
form1.strvalue2.value="";
form1.strvalue3.value="";
form1.strvalue4.value="";
form1.strvalue5.value="";
}
if (form1.strfield.value=="owner"){
strvalue1.style.display='none';
strvalue2.style.display='none';
strvalue3.style.display='block';
strvalue4.style.display='none';
strvalue5.style.display='none';
form1.strvalue1.value="";
form1.strvalue2.value="";
form1.strvalue4.value="";
form1.strvalue5.value="";
}
if (form1.strfield.value=="industry"){
strvalue1.style.display='none';
strvalue2.style.display='none';
strvalue3.style.display='none';
strvalue4.style.display='block';
strvalue5.style.display='none';
form1.strvalue1.value="";
form1.strvalue2.value="";
form1.strvalue3.value="";
form1.strvalue5.value="";
}
if (form1.strfield.value=="province1"){
strvalue1.style.display='none';
strvalue2.style.display='none';
strvalue3.style.display='none';
strvalue4.style.display='none';
strvalue5.style.display='block';
form1.strvalue1.value="";
form1.strvalue2.value="";
form1.strvalue3.value="";
form1.strvalue4.value="";
}
}
function GetStrValue()
{
if (form1.strfield.value!="accounttype"&&form1.strfield.value!="owner"&&form1.strfield.value!="industry"&&form1.strfield.value!="province1"){
form1.strvalue.value=form1.strvalue1.value;
}
if (form1.strfield.value=="accounttype"){
form1.strvalue.value=form1.strvalue2.value;
}
if (form1.strfield.value=="owner"){
form1.strvalue.value=form1.strvalue3.value;
}
if (form1.strfield.value=="industry"){
form1.strvalue.value=form1.strvalue4.value;
}
if (form1.strfield.value=="province1"){
form1.strvalue.value=form1.strvalue5.value;
}
if (form1.strfield.value=='lastmoddate'){
if(form1.strvalue.value==""){
alert("请输入搜索日期!");
return false;
}
if(CheckDate(document.form1.strvalue.value)){
alert("请输入正确格式的日期!");
return false;
}
}
form1.submit();
}
</SCRIPT>
<body leftmargin="10" rightmargin="10" topmargin="10">
<form name="form1" method="post" action="checklist.asp" onsubmit="return GetStrValue();">
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10%">
<select name="strfield" onchange="relativeinput_onchange();">
<option value=account <%if request("strfield")="account" then Response.Write "selected"%>>客户</option>
<option value=siccode <%if request("strfield")="siccode" then Response.Write "selected"%>>客户代码</option>
<option value=paymentamount <%if request("strfield")="paymentamount" then Response.Write "selected"%>>应付帐余额</option>
<option value=invoiceamount <%if request("strfield")="invoiceamount" then Response.Write "selected"%>>发票余额</option>
<option value=invoiceamount <%if request("strfield")="dueamount" then Response.Write "selected"%>>应付超标</option>
<option value=username <%if request("strfield")="username" then Response.Write "selected"%>>销售员</option>
</select></td>
<td width="18%">
<div id=strvalue1 <%if request("strfield")<>"accounttype" and request("strfield")<>"owner" and request("strfield")<>"industry" and request("strfield")<>"province1" or request("strfield")="" then response.write "style=display:block" else response.write "style=display:none" end if%>>
<input type="text" name="strvalue1" value="<%=request("strvalue1")%>">
</div>
</td>
<td width="53%"> <select name="paymentamount">
<option value="" <%if request("paymentamount")="" then Response.Write "selected"%>>应付余额</option>
<option value="0" <%if request("paymentamount")="0" then Response.Write "selected"%>>应付余额=0</option>
<option value="-1" <%if request("paymentamount")="-1" then Response.Write "selected"%>>应付余额<>0</option>
</select> <select name="invoiceamount">
<option value="" <%if request("invoiceamount")="" then Response.Write "selected"%>>开票余额</option>
<option value="0" <%if request("invoiceamount")="0" then Response.Write "selected"%>>开票余额=0</option>
<option value="-1" <%if request("invoiceamount")="-1" then Response.Write "selected"%>>开票余额<>0</option>
</select> <select name="dueamount">
<option value="" <%if request("dueamount")="" then Response.Write "selected"%>>超标余额</option>
<option value="0" <%if request("dueamount")="0" then Response.Write "selected"%>>超标余额=0</option>
<option value="-1" <%if request("dueamount")="-1" then Response.Write "selected"%>>超标余额<>0</option>
</select>
<input type=hidden name="strvalue" value="<%=request("strvalue")%>" >
<input type=image src="../images/button_submit.gif" style="cursor:hand" border=0>
<%
if CurPage<=1 then
Response.Write "<a href='checklist.asp?turnpage=yes&orderby="&session("orderby")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage=1'><img src='../images/button_start.gif' border=0></a> "
else
Response.Write "<a href='checklist.asp?turnpage=yes&orderby="&session("orderby")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage=1'><img src='../images/button_start.gif' border=0></a> "
Response.Write "<a href='checklist.asp?turnpage=yes&orderby="&session("orderby")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage="&CurPage-1&"'><img src='../images/button_backward.gif' border=0></a> "
end if
if CurPage>=RS.PageCount then
Response.Write "<a href='checklist.asp?turnpage=yes&orderby="&session("orderby")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage="&RS.PageCount&"'><img src='../images/button_end.gif' border=0></a>"
else
Response.Write "<a href='checklist.asp?turnpage=yes&orderby="&session("orderby")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage="&CurPage+1&"'><img src='../images/button_forward.gif' border=0></a> "
Response.Write "<a href='checklist.asp?turnpage=yes&orderby="&session("orderby")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage="&RS.PageCount&"'><img src='../images/button_end.gif' border=0></a>"
end if
%>
</td><td width=19%><div id=dateformat <%if request("strfield")="lastmoddate" then response.write "style=display:block" else response.write "style=display:none" end if%>>日期输入格式提示:YYYY-MM-DD</div></td>
</tr>
<tr>
<td height="25" colspan=4><strong><font size="2" class=title>应付帐与发票对帐列表</font></strong></td>
</tr>
<tr >
<td height="16" colspan="4" background="../images/title.gif"> </td>
</tr>
<tr><td colspan="4" height=4></td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DECFAD">
<tr bgcolor="#EFEFEF">
<td height=15 align=center><a href="checklist.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=account&orderby=<%=session("orderby")%>">客户</a></td>
<td width="15%" height="15" align=center><a href="checklist.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=paymentamount&orderby=<%=session("orderby")%>">应付帐余额</a></td>
<td width="15%" height="15" align=center><a href="checklist.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=invoiceamount&orderby=<%=session("orderby")%>">发票余额</a></td>
<td width="15%" height="15" align=center><a href="checklist.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=dueamount&orderby=<%=session("orderby")%>">应付超标</a></td>
<td width="15%" height="15" align=center><a href="checklist.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=owner&orderby=<%=session("orderby")%>">销售员</a></td>
</tr>
<%
set account=rs("account")
set accountid=rs("accountid")
set paymentamount=rs("paymentamount")
set invoiceamount=rs("invoiceamount")
set dueamount=rs("dueamount")
set username=rs("username")
i=1:do while not rs.EOF and i<=session("pagesize")%>
<tr bgcolor="#FFFFFF">
<td align=center height=18><a href="javascript:opensubwin3('../account/accountdetail.asp?accountid=<%=accountid%>','客户<%=accountid%>','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=600,height=400,top=150,left=160');"><%=account%></a></td>
<td align=center><a href="popaymentcheck.asp?accountid=<%=accountid%>" title="应付对帐"><%=formatnumber(paymentamount,2)%></a></td>
<td align=center><a href="poinvoicecheck.asp?accountid=<%=accountid%>" title="发票对帐"><%=formatnumber(invoiceamount,2)%></a></td>
<td align=center><%=formatnumber(dueamount,2)%></td>
<td align=center><%=username%></td>
<%
i=i+1
rs.MoveNext
loop
%>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr height="50"><td>第<%=CurPage%>页 / 共<%=RS.PageCount%>页 / 记录数:<%=Rs.RecordCount%>条
</td></tr></table>
<%
rs.Close
set rs=nothing
conn.Close
set conn=nothing
set objcheck=nothing
%>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -