📄 receivequery.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "report","read"
set objcheck=nothing%>
<%
sysid=1
set connsalequery=server.createobject("adodb.connection")
connsalequery.open connstring
if request("strfield")<>"" then
strwhere =strwhere&" and "&request("strfield")&" like '%"&Request.Form("strvalue")&"%'"
end if
if Request.Form("namesearch")<>"" then
strwhere =strwhere&" and owner='"&Request.Form("namesearch")&"'"
else
strwhere =strwhere &"and (owner='"&session("loginid")&"' or owner in(select userid from v_userreportto_all where reportto='"&session("loginid")&"'))"
end if
if Request.Form("FdateSearch")<>"" then
strFdate=Request.Form("FdateSearch")
strwhere=strwhere&" and collectionverifydate>='"&cdate(strFdate)&"'"
else
strFdate=date()-7
strwhere=strwhere&" and collectionverifydate>='"&cdate(strFdate)&"'"
end if
if Request.Form("EdateSearch")<>"" then
strEdate=Request.Form("EdateSearch")
strwhere=strwhere&" and collectionverifydate<='"&cdate(strEdate)&"'"
else
strEdate=date()
strwhere=strwhere&" and collectionverifydate<='"&cdate(strEdate)&"'"
end if
if Request.Form("TransNameSearch")="send" then
strwhere=strwhere&" and Transactcode='发货单发货'"
elseif Request.Form("TransNameSearch")="return" then
strwhere=strwhere&" and Transactcode='发货单退货'"
end if
if Request.Form("CollectionStat")="Collected" then
strwhere=strwhere&" and collectionstatus='已收'"
elseif Request.Form("CollectionStat")="Collecting" then
strwhere=strwhere&" and collectionstatus='未收'"
end if
if Request.Form("InvoiceStat")="Invoiced" then
strwhere=strwhere&" and invoicestatus='已开'"
elseif Request.Form("InvoiceStat")="Invoicing" then
strwhere=strwhere&" and invoicestatus='未开'"
elseif Request.Form("InvoiceStat")="NoInvoice" then
strwhere=strwhere&" and invoice=0"
end if
if request("Orderby")<>"" then
strOrderby=request("Orderby")
else
strOrderby="collectionverifydate"
end if
Set rssalequery=Server.CreateObject("ADODB.Recordset")
sql="SELECT * FROM v_SalesStatandQuery where 1=1 "&strwhere&" and sysaccountid="&sysid
sql=sql &" ORDER BY "&strOrderby
'response.write sql
rssalequery.open sql,connsalequery,1,1
alls=rssalequery.Recordcount
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../global.css" rel=stylesheet type=text/css>
<style type="text/css"></style>
<title>销售查询</title>
<script language=javascript>
window.top.frames (1).document.location='../left.asp?type=stat';
</script>
</head>
<SCRIPT language=JavaScript>
function showit(tr1length){
for (var i=1;i<=tr1length;i++){
var objname = 'tr1'+i;
var objname2 = 'tr2'+i;
if (eval(objname+'.style.display=="block"') == true)
{
eval(objname+'.style.display="none";');
eval(objname2+'.style.display="none";');
eval('a.style.display="block";');
eval('b.style.display="none";');
eval('c.style.display="none";');
}
else
{
eval(objname+'.style.display="block";');
eval(objname2+'.style.display="block";');
eval('a.style.display="none";');
eval('b.style.display="block";');
eval('c.style.display="block";');
}
}
}
function opensubwin(attrstr,targ1)
{
var tempwin=window.open(targ1,null,attrstr);
tempwin.location.href=targ1;
tempwin.opener=this;
}
function submit1(){
window.form1.submit();
return true;
}
function submit3(){
if (form1.StatMethod.value=="aboutdelivery"){
link="salesquery.asp";
document.location.href=link;
}
if (form1.StatMethod.value=="aboutrecieve"){
link="receivequery.asp";
document.location.href=link;
}
if (form1.StatMethod.value=="aboutinvoice"){
link="invoicequery.asp";
document.location.href=link;
}
}
</SCRIPT>
<script language=javascript src="../tools/newcalendar.js"></script>
<body leftmargin="10" rightmargin="10" topmargin="10">
<table align="center" border="0" cellPadding="0" width="100%" style="font-size:10pt">
<form id=form1 name=form1 action="" method=post>
<tr><td>
<select name="strfield">
<option value="" <%if request("strfield")="" then Response.Write "selected"%>>--选择查询条件--</option>
<option value=Model <%if request("strfield")="Model" then Response.Write "selected"%>>型号</option>
<option value=OrderAccount <%if request("strfield")="OrderAccount" then Response.Write "selected"%>>客户</option>
<option value=deliveryNo <%if request("strfield")="deliveryno" then Response.Write "selected"%>>发货单号</option>
<option value=OrderNum <%if request("strfield")="OrderNum" then Response.Write "selected"%>>合同号</option>
</select>
<input type="text" name="strvalue" value="<%=request("strvalue")%>">
从<input name=FdateSearch size=10 language=javascript id=dupdatetime value='<%=strFdate%>' readonly><% call AddImg("date")%>
<input type = hidden name=clicksource>
<input type = hidden name=clickresult >
到<input name=EdateSearch size=10 language=javascript id=dupdatetime2 value='<%=strEdate%>' readonly><% call AddImg("date2")%>
<select name=TransNameSearch size=1 LANGUAGE=javascript onchange="submit1()">
<option value="" <%if request("TransNameSearch")="" then Response.Write " selected"%>>含退货</option>
<option value="send" <%if request("TransNameSearch")="send" then Response.Write " selected"%>>所有发货</option>
<option value="return" <%if request("TransNameSearch")="return" then Response.Write " selected"%>>所有退货</option>
</select>
<select name=nameSearch size=1 ID=Select1 LANGUAGE=javascript onchange="submit1()">
<option value="">--选择销售员--</option>
<%getsubordinate Request.Form("namesearch")%>
</select>
<input type=submit name="Search" value="提交"></td></tr>
</form1>
</table>
<table cellspacing=0 cellpadding=0 width="100%" border=0>
<tbody>
<tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -