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

📄 collection.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
📖 第 1 页 / 共 2 页
字号:
if (form1.strfield.value=="username"){
	strvalue1.style.display='none';
	strvalue2.style.display='block';
	form1.strvalue1.value="";
	}
if (form1.strfield.value!="username"){
	strvalue1.style.display='block';
	strvalue2.style.display='none';
	form1.strvalue2.value="";
	}
}
function GetStrValue()
{
if (form1.strfield.value!="username"){
	form1.strvalue.value=form1.strvalue1.value;
	}
if (form1.strfield.value=="username"){
	form1.strvalue.value=form1.strvalue2.value;
	}
	if (form1.strfield.value=='receiveddate'){
		if(form1.strvalue.value==""){
			alert("请输入搜索日期!");
			return false;
			}
		if(CheckDate(document.form1.strvalue.value)){
			alert("请输入正确格式的日期!");
			return false;
			}
		}
form1.submit();
}
</SCRIPT>

<body leftmargin="10" rightmargin="0" topmargin="10">
<form name="form1" method="post" action="collection.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=ordernum <%if request("strfield")="ordernum" then Response.Write "selected"%>>合同号</option>
          <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=username <%if request("strfield")="username" then Response.Write "selected"%>>销售员</option>
          <option value=amount <%if request("strfield")="amount" then Response.Write "selected"%>>金额</option>
          <option value=receiveddate <%if request("strfield")="receiveddate" then Response.Write "selected"%>>收款日期</option>
	<option value=collectiontype <%if request("strfield")="collectiontype" then Response.Write "selected"%>>收款类型</option>
	<option value=paymentid <%if request("strfield")="paymentid" then Response.Write "selected"%>>预收款</option>
        </select></td>
      <td width="18%"> <div id=strvalue1 <%if request("strfield")<>"username" 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>
        <div id=strvalue2 <%if request("strfield")="username" then response.write "style=display:block" else response.write "style=display:none" end if%>> 
          <select name="strvalue2" class="stedit">
            <option value="">--请选择销售员--</option>
            <%getgrouptype selecttablename,"username",request("strvalue2")%>
          </select>
        </div></td>
      <td width="52%"> <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='collection.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>&nbsp;"
		else
		    Response.Write "<a href='collection.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>&nbsp;"
		    Response.Write "<a href='collection.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>&nbsp;"
		end if
   		if CurPage>=RS.PageCount then
			Response.Write "<a href='collection.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='collection.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>&nbsp;"
			Response.Write "<a href='collection.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
		%>
        从 <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")%>
      </td>
      <td width=20%><div id=dateformat <%if request("strfield")="receiveddate" then response.write "style=display:block" else response.write "style=display:none" end if%>>
          <div align="right">日期输入格式提示:YYYY-MM-DD</div>
        </div>
      </td>
    </tr>
    <tr> 
      <td height="25" colspan=3><strong><font class=title>收款列表</font></strong> 
        &nbsp;&nbsp;<a href="javascript:opensubwin('resizable=no, scrollbars=no, left= 200, top=150, menubar=no, location=no, toolbar=no ,width=450, height=300','newcollection.asp');"><img src="../images/button_new.gif" border=0></a></td>
      <td height="25"><div align="right">跳到 
          <input type="text" name="gotopage" size=2>
          <input type="button" name="Submit" value="go" onClick="window.location='collection.asp?CurPage='+form1.gotopage.value">
        </div></td>
    </tr>
    <tr > 
      <td height="16" colspan="4" background="../images/title.gif">&nbsp;</td>
    </tr>
    <tr> 
      <td height=4 colspan=4></td>
    </tr>
  </table>
  <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="DECFAD">
    <tr bgcolor="efefef"> 
      <td width="7%" align=center height="22">操作</td>
      <td width="12%" align=center><a href="collection.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=paymentno&orderby=<%=session("orderby")%>">应收编号</a></td>
      <td align=center><a href="collection.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=ordernum&orderby=<%=session("orderby")%>">合同号</a></td>
      <td align=center><a href="collection.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=account&orderby=<%=session("orderby")%>">客户</a></td>
      <td width="10%"  align=center><a href="collection.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=amount&orderby=<%=session("orderby")%>">收款金额</a></td>
      <td width="10%" align=center><a href="collection.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=collectiontype&orderby=<%=session("orderby")%>">收款类型</a></td>
      <td width="10%" align=center><a href="collection.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=receiveddate&orderby=<%=session("orderby")%>">收款日期</a></td>
      <td width="10%" align=center><a href="collection.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=username&orderby=<%=session("orderby")%>">销售员</a></td>
      <td width="10%" align=center><a href="collection.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=createname&orderby=<%=session("orderby")%>">创建人</a></td>
    </tr>
    <%i=1
	do while not rs.EOF and i<=session("pagesize")%>
    <tr bgcolor="#FFFFFF"> 
      <td align=center  height="22" nowrap> 
        <% 
'//////////////// Add Menu List Start /////////////////////////
AddPopupMenu1 true,true,false,false,false,false,false,false,_
				"newcollection.asp?id=", _
				"../delete.asp?amount="&rs("amount")&"&account="&rs("account")&"&ordernum="&rs("ordernum")&"&collectionid=",_
				"",_
				"",_				
				"",_
				"",_				
				"",_
				"menuCollection"&rs("collectionid")
'/////////////// Menu List End	
%>
        <img src="../images/edit.gif" border="0" id="Collection<%=rs("collectionid")%>" align=absMiddle height=16  width=16 onMouseOver="ShowMenu('Collection<%=rs("collectionid")%>','menuCollection<%=rs("collectionid")%>','<%=rs("collectionid")%>')" onMouseOut="HideMenu('menuCollection<%=rs("collectionid")%>')"></td>
      <td align=center><a href="javascript:opensubwin3('../payment/paymentdetail.asp?paymentid=<%=rs("paymentid")%>','payment<%=rs("paymentid")%>','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=600,height=400,top=150,left=160');"><%=rs("paymentno")%></a></td>
      <td align=center><a href="javascript:opensubwin3('../order/orderdetail.asp?orderid=<%if rs("orderid")<>"" then response.Write(rs("orderid")) else response.Write(rs("porderid"))%>','客户<%if rs("orderid")<>"" then response.Write(rs("orderid")) else response.Write(rs("porderid"))%>','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=600,height=400,top=150,left=160');"><%if rs("ordernum")<>"" then response.Write(rs("ordernum")) else response.Write(rs("pordernum"))%></a></td>
      <td align=center><a href="javascript:opensubwin3('../account/accountdetail.asp?accountid=<%=rs("accountid")%>','客户<%=rs("accountid")%>','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=600,height=400,top=150,left=160');"><%=rs("account")%></a></td>
      <td align=center><%=formatnumber(rs("amount"),2)%></td>
      <td align=center><%=rs("collectiontype")%></td>
      <td align=center><%=rs("receiveddate")%></td>
      <td align=center><%=rs("username")%></td>
      <td align=center><%=rs("createname")%></td>
    </tr>
    <%
  i=i+1
  rs.MoveNext
  loop
  
  totalamount=0
  if i>1 then
  	rs.movefirst
	do while not rs.eof
		totalamount=ccur(totalamount)+ccur(rs("amount"))
	rs.movenext
	loop
  end if
%>
  </table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr height="50">
      <td>第<%=CurPage%>页&nbsp;/&nbsp;共<%=RS.PageCount%>页&nbsp;/&nbsp;记录数:<%=Rs.RecordCount%>条 
        &nbsp;&nbsp;&nbsp;&nbsp;总金额:<%if totalamount<>"" then response.Write(formatnumber(totalamount,2)) else response.Write(0)%> </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 + -