<%temp_search_customer_consume_list_show=site.object_p%>
<!-- object[<%=site.object_p%>]::temp_search_customer_consume_list_show -->
<%
dim mode
dim sort_id
dim porperty_name
dim porperty_value

mode=request("mode")
sort_id=request("sort_id")
if sort_id="" then sort_id=0
if mode="" then mode="sort"
'///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////查询！！
if mode="sort" then
site.Error.info="您不能以这种方式查询订单！"
site.Error.location="back"
site.Error.err()
end if
if mode="property" then
site.temp.search.propertys "customer_consume" ,""," order by customer_consume_addtime desc"
 '导航栏内容
select_content=site.temp.search.select_content
if instr(select_content,"order by")=0 then
select_content=select_content+" and customer_consume_temp=1 and customer_name='"&site.temp.customer.info.reg_name&"'"
else
select_content=replace(select_content,"order by"," and customer_consume_temp=1 and customer_name='"&site.temp.customer.info.reg_name&"' order by ")
end if
end if
'################################################################################################################################################################
'结果分页显示

dim n_pages,n_all,n_pepage,n_page,c

n_pepage=site.object(site.object_p).qu
n_page=int(request("n_page"))
if n_page=0 then n_page=1

c_order="出入金额$customer_consume_sum|出入日期$customer_consume_addtime|出入原因$customer_consume_kind|入/出帐$customer_consume_out,升序$|降序$desc"

c="<table cellpadding='0' align=center cellspacing='0' width='95%' height='20'"&site.object(site.object_p).style&">"
c=c+"	<tr >"
c=c+"	  <td width='90%' align=left colspan=10 background='"&site.object(site.object_p).image&"/dot03.gif' height='1' ></td>"
c=c+"	</tr>"
c=c+"	<tr>"
c=c+"		<td height='30' width='30' align=right>"
c=c+"		<img border='0' src='"&site.object(site.object_p).image&"/dotblue.gif'></td>"
c=c+"		<td height='30' width='30%' style='padding-left:15'>$$customer_consume_out$$ <font color=red> "&site.info.unit_money(1)&" $$customer_consume_sum$$</font></td>"
c=c+"		<td height='30' width='28%'>$$customer_consume_addtime$$</td>"
c=c+"		<td height='30' width='22%'>$$customer_consume_kind$$</td>"
c=c+"		<td height='30' width='15%'><a href='do.asp?tr=customer|order|detail&mark=$$order_mark$$'>查看订单</a></td>"
c=c+"	</tr>"
c=c+"</table>"

c_h="<table cellpadding='0' align=center cellspacing='0' width='95%' bgcolor=#fafafa height='20'"&site.object(site.object_p).style&">"
c_h=c_h+"	<tr >"
c_h=c_h+"	  <td width='90%' align=left colspan=10 background='"&site.object(site.object_p).image&"/dot03.gif' height='1' ></td>"
c_h=c_h+"	</tr>"
c_h=c_h+"	<tr>"
c_h=c_h+"		<td height='30' width='30' align=right><img border='0' src='"&site.object(site.object_p).image&"/dotorange.gif'></td>"
c_h=c_h+"		<td height='30' width='30%' style='padding-left:15'>出入金额</td>"
c_h=c_h+"		<td height='30' width='28%'>出入日期</td>"
c_h=c_h+"		<td height='30' width='22%'>出入原因</td>"
c_h=c_h+"		<td height='30' width='15%'>相关操作</td>"
c_h=c_h+"	</tr>"
c_h=c_h+"</table>"

'------------显示函数
dim ar_send(5)

ar_send(0)=n_pepage
ar_send(1)=n_page
ar_send(2)=select_content
ar_send(3)=c_order
ar_send(4)=c_h
ar_send(5)=c

n_pages=site.functions.thing_list(ar_send)
'-----------显示函数
site.temp.url_request=replace(site.temp.url_request,"&n_page="&request("n_page"),"")

response.write "<br>"
response.write "<table border='0' width='95%' cellspacing='1' cellpadding='0'"&site.object(site.object_p).style&">"
response.write "<tr>"
response.write "<td align='center' >"
response.write "<a href='"&site.temp.file_request&"?"&site.temp.url_request&"&n_page=1'><img align='absmiddle' border='0' src='"&site.object(site.object_p).image&"/btn_pre.gif' width='19' height='21' alt='第一页'></a>"
if n_page>1 then  response.write "<a href='"&site.temp.file_request&"?"&site.temp.url_request&"&n_page="&n_page-1&"'><img align='absmiddle'  border='0' src='"&site.object(site.object_p).image&"/btn_pre2.gif' width='47' height='21' alt='上一页'></a> "
response.write "一共有"&n_pages&"页&nbsp; 现在是第"&n_page&"页"

for num_page_show=1 to n_pages
response.write "[<a href='"&site.temp.file_request&"?"&site.temp.url_request&"&n_page="&num_page_show&"'>"&num_page_show&"</a>] "
next

if n_page<n_pages then  response.write "<a href='"&site.temp.file_request&"?"&site.temp.url_request&"&n_page="&n_page+1&"'><img align='absmiddle'  border='0' src='"&site.object(site.object_p).image&"/btn_next2.gif' width='46' height='21' alt='下一页'></a>"
response.write "<a href='"&site.temp.file_request&"?"&site.temp.url_request&"&n_page="&n_pages&"'><img align='absmiddle'  border='0' src='"&site.object(site.object_p).image&"/btn_next.gif' width='18' height='21' alt='最后一页'></a></td>"
response.write "</tr>"
response.write "</table>"

'结果分页显示结束
'################################################################################################################################################################
%>