📄 count_back.asp
字号:
<td><img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> 顾客退货统计 <a href="excel_back.asp?page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>&order1=<%=request("order1")%>&order2=<%=request("order2")%>&order3=<%=request("order3")%>&order4=<%=request("order4")%>&order5=<%=request("order5")%>&order6=<%=request("order6")%>&order7=<%=request("order7")%>&order8=<%=request("order8")%>&order9=<%=request("order9")%>&order10=<%=request("order10")%>&order11=<%=request("order11")%>&order12=<%=request("order12")%>&order13=<%=request("order13")%>&order14=<%=request("order14")%>&order15=<%=request("order15")%>" target="_blank"><img src="../images/excel.jpg" border="0" align="absmiddle" alt="导出Excel表格"></a></td>
<td align="right">总数量:<b><%=formatnumber(zongshulian,2)%></b>,总金额:<b><%=formatnumber(nowprice,2)%></b> 元 </td>
</tr>
</table>
</td>
<td><img src="../images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<!--startprint-->
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<form name="form1">
<input type="hidden" name="startdate" value="<%=nowstartdate%>">
<input type="hidden" name="enddate" value="<%=nowenddate%>">
<input type="hidden" name="ku" value="<%=nowku%>">
<input type="hidden" name="keyword" value="<%=nowkeyword%>">
<input type="hidden" name="order1" value="<%=request("order1")%>">
<input type="hidden" name="order2" value="<%=request("order2")%>">
<input type="hidden" name="order3" value="<%=request("order3")%>">
<input type="hidden" name="order4" value="<%=request("order4")%>">
<input type="hidden" name="order5" value="<%=request("order5")%>">
<input type="hidden" name="order6" value="<%=request("order6")%>">
<input type="hidden" name="order7" value="<%=request("order7")%>">
<input type="hidden" name="order8" value="<%=request("order8")%>">
<input type="hidden" name="order9" value="<%=request("order9")%>">
<input type="hidden" name="order10" value="<%=request("order10")%>">
<input type="hidden" name="order11" value="<%=request("order11")%>">
<input type="hidden" name="order12" value="<%=request("order12")%>">
<input type="hidden" name="order13" value="<%=request("order13")%>">
<input type="hidden" name="order14" value="<%=request("order14")%>">
<input type="hidden" name="order15" value="<%=request("order15")%>">
<tr align="center">
<td class="category" width="10"><img src="../images/folder_close.gif" style="cursor:hand" onClick="collapseall(this)" /></td>
<td class="category" height="30">
<a href="?order1=<%if request("order1")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">编号<%if request("order1")="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
</td>
<td class="category">
<a href="?order4=<%if request("order4")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">入库时间<%if request("order4")="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
</td>
<td class="category">
<a href="?order5=<%if request("order5")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">经办人<%if request("order5")="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
</td>
<td class="category">
<a href="?order7=<%if request("order7")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">数量<%if request("order7")="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
</td>
<td class="category">
<a href="?order9=<%if request("order9")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">退货金额<%if request("order9")="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
</td>
<td class="category">
<a href="?order10=<%if request("order10")="asc" then%>desc<%else%>asc<%end if%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&ku=<%=nowku%>&keyword=<%=nowkeyword%>" class="title">会员<%if request("order10")="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
</tr>
<%
set rs_buy =server.createobject("ADODB.RecordSet")
rs_buy.open sql,conn,1,3
if not rs_buy.eof then
rs_buy.pagesize=maxrecord
rs_buy.absolutepage=currentpage
for currentrec=1 to rs_buy.pagesize
if rs_buy.eof then
exit for
end if
%>
<tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''" onDblClick="javascript:var win=window.open('../produit/print_back.asp?bianhao=<%=rs_buy("bianhao")%>','详细信息','width=853,height=470,top=176,left=161,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes'); win.focus()">
<td align="center"><img src="../images/folder_close.gif" style="cursor:hand" onClick="collapse(this, 'buy<%=currentrec%>')" /></td>
<td align="center" height="25"><%=rs_buy("bianhao")%></td>
<td align="center"><%=rs_buy("selldate")%></td>
<td align="center">
<%
sql="select * from login where id="&rs_buy("id_login")
set rs_login=conn.execute(sql)
%>
<%if rs_login.eof then%><%=rs_buy("login")%><%else%><%=rs_login("username")%> (<%=rs_login("bianhao")%>)<%end if%>
</td>
<td align="center">
<%
sql="select sum(shulian) from buy where bianhao='"&rs_buy("bianhao")&"' and zu=false"
if nowku<>"" then
sql=sql&" and id_ku="&nowku
end if
if nowkeyword<>"" then
sql=sql&" and (bianhao = '"&nowkeyword&"' or id_huiyuan in (select id from huiyuan where username like '%"&nowkeyword&"%') or id_login in (select id from login where username like '%"&nowkeyword&"%') or title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')"
end if
set rs_sum=conn.execute(sql)
%>
<%=formatnumber(rs_sum(0),2)%>
</td>
<td align="center">
<%
sql="select sum(price*shulian) from buy where bianhao='"&rs_buy("bianhao")&"' and zu=false"
if nowku<>"" then
sql=sql&" and id_ku="&nowku
end if
if nowkeyword<>"" then
sql=sql&" and (bianhao = '"&nowkeyword&"' or id_huiyuan in (select id from huiyuan where username like '%"&nowkeyword&"%') or id_login in (select id from login where username like '%"&nowkeyword&"%') or title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')"
end if
set rs_sum=conn.execute(sql)
%>
<%=formatnumber(rs_sum(0),2)%>
</td>
<td align="center">
<%
sql="select * from huiyuan where id="&rs_buy("id_huiyuan")
set rs_huiyuan=conn.execute(sql)
%>
<%if rs_huiyuan.eof=false then%><%=rs_huiyuan("username")%><%else%>非会员<%end if%>
</td>
</tr>
<%
sql="select * from buy where type=1 and zu=false and bianhao='"&rs_buy("bianhao")&"'"
if nowku<>"" then
sql=sql&" and id_ku="&nowku
end if
if nowkeyword<>"" then
sql=sql&" and (bianhao = '"&nowkeyword&"' or id_huiyuan in (select id from huiyuan where username like '%"&nowkeyword&"%') or id_login in (select id from login where username like '%"&nowkeyword&"%') or title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')"
end if
set rs_buy2=conn.execute(sql)
%>
<tr id="buy<%=currentrec%>" style="display:none;">
<td colspan="16" class="category">
<table align="center" cellpadding="4" cellspacing="1" class="grid" border="1" width="100%">
<tr align="center">
<%if showpic="yes" then%><td width="70">图片</td><%end if%>
<td height="30">货号</td>
<td>产品名称</td>
<td>入货仓库</td>
<td>数量</td>
<td>退货价</td>
<td>金额</td>
</tr>
<%
do while rs_buy2.eof=false
sql="select * from produit where id="&rs_buy2("id_produit")
set rs_produit=conn.execute(sql)
%>
<tr>
<%if showpic="yes" then%><td align="center"><%if rs_produit.eof then%><%if rs_buy2("photo")<>"" then%><a href="../upload/<%=rs_buy2("photo")%>" target="_blank"><img src="../upload/<%=rs_buy2("photo")%>" border="0" width="60"></a><%else%>无图<%end if%><%else%><%if rs_produit("photo")<>"" then%><a href="../upload/<%=rs_produit("photo")%>" target="_blank"><img src="../upload/<%=rs_produit("photo")%>" border="0" width="60"></a><%else%>无图<%end if%><%end if%></td><%end if%>
<td align="center"><%if rs_produit.eof then%><%=rs_buy2("huohao")%><%else%><%=rs_produit("huohao")%><%end if%></td>
<td align="center"><%if rs_produit.eof then%><%=rs_buy2("title")%><%else%><%=rs_produit("title")%><%end if%></td>
<td align="center"><%=rs_buy2("ku")%></td>
<td align="center"><%=formatnumber(rs_buy2("shulian"),2)%></td>
<td align="center"><%=formatnumber(rs_buy2("price"),2)%></td>
<td align="center"><%=formatnumber(rs_buy2("shulian")*rs_buy2("price"),2)%></td>
</tr>
<%
rs_buy2.movenext
loop
%>
</table>
<%=replace(rs_buy("beizhu")&"",chr(13),"<br>")%>
</td>
</tr>
<%
rs_buy.movenext
next
else
%>
<tr align="center" onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
<td colspan="16" height="25" align="center" style="color:red"><b>没有找到记录</b></td>
</tr>
<%
end if
%>
<%
if rs_buy.recordcount>0 then
%>
<tr>
<td colspan="16" height="30" class="category">
<table cellpadding=0 cellspacing=0 width="100%">
<tr>
<td width="20%" align="left" style="color:#FF0000;"> 双击查看打印单</td>
<td width="80%" align="right">
<%=rs_buy.recordcount%> 条信息 共 <%=rs_buy.pagecount%> 页
<%
nowstart=currentpage-3
if nowstart<1 then
nowstart=1
end if
nowend=currentpage+3
if nowend>rs_buy.pagecount then
nowend=rs_buy.pagecount
end if
response.write " <a href='?startdate="&nowstartdate&"&enddate="&nowenddate&"&ku="&nowku&"&keyword="&nowkeyword&"&page=1&order1="&request("order1")&"&order2="&request("order2")&"&order3="&request("order3")&"&order4="&request("order4")&"&order5="&request("order5")&"&order6="&request("order6")&"&order7="&request("order7")&"&order8="&request("order8")&"&order9="&request("order9")&"&order10="&request("order10")&"&order11="&request("order11")&"&order12="&request("order12")&"&order13="&request("order13")&"&order14="&request("order14")&"&order15="&request("order15")&"' class='page'>最前页</a> "
for ipage=nowstart to nowend
if cstr(ipage)=cstr(currentpage) then
response.write " <span style='font-weight:bold;color:#5858E6'>" & ipage &"</span> "
else
response.write " [ <a href='?startdate="&nowstartdate&"&enddate="&nowenddate&"&ku="&nowku&"&keyword="&nowkeyword&"&page="&ipage&"&order1="&request("order1")&"&order2="&request("order2")&"&order3="&request("order3")&"&order4="&request("order4")&"&order5="&request("order5")&"&order6="&request("order6")&"&order7="&request("order7")&"&order8="&request("order8")&"&order9="&request("order9")&"&order10="&request("order10")&"&order11="&request("order11")&"&order12="&request("order12")&"&order13="&request("order13")&"&order14="&request("order14")&"&order15="&request("order15")&"' class='page'>" & ipage &"</a> ] "
end if
next
response.write " <a href='?startdate="&nowstartdate&"&enddate="&nowenddate&"&ku="&nowku&"&keyword="&nowkeyword&"&page="&rs_buy.pagecount&"&order1="&request("order1")&"&order2="&request("order2")&"&order3="&request("order3")&"&order4="&request("order4")&"&order5="&request("order5")&"&order6="&request("order6")&"&order7="&request("order7")&"&order8="&request("order8")&"&order9="&request("order9")&"&order10="&request("order10")&"&order11="&request("order11")&"&order12="&request("order12")&"&order13="&request("order13")&"&order14="&request("order14")&"&order15="&request("order15")&"' class='page'>最后页</a> "
%>
<select name="page" onChange="form1.action='?';form1.submit();">
<%
for x=1 to rs_buy.pagecount
%>
<option value="<%=x%>"<%if currentpage=trim(cstr(x)) then%> selected="selected"<%end if%>><%=x%></option>
<%
next
%>
</select>
</td>
</tr></table></td></tr>
<%end if%>
</form>
</table>
<!--endprint-->
</td>
<td></td>
</tr>
<tr>
<td><img src="../images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/r_3.gif" alt="" /></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -