<%@ Page Language="C#" AutoEventWireup="true" Codebehind="consume_default.aspx.cs" Inherits="JumbotCms.WebFile.Customer._consume_index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html   xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta   http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta   name="robots" content="noindex, nofollow" />
<meta   http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>支出明细 - 个人中心 - <%=site.Name %></title>
<script type="text/javascript" src="../_libs/jquery.tools.pack.js"></script>
<script type="text/javascript" src="../_data/jcmsV4.x.js"></script>
<link   type="text/css" rel="stylesheet" href="../_data/jcmsV4.x.css" />
<script type="text/javascript">
var sdate = joinValue('sdate');
var pagesize=10;
var page=thispage();
(function(){
	$(document).ready(function() {
		aLoad('');
	});
})();
function aLoad(s) {
	page = "1";
	if(s == "1w")
		sdate = "&sdate=1w";
	else if(s == "1m")
		sdate = "&sdate=1m";
	else if(s == "1y")
		sdate = "&sdate=1y";
	else
		sdate = "";
	ajaxList(page);
}
function ajaxList(currentpage)
{
	//设置选项卡
	for(i=1; i<5; i++)
	{
		$OBJ("tab"+i).className = "";
        
	}
	if(sdate == "&sdate=1w")
		$OBJ("tab1").className = "currently";
	else if(sdate == "&sdate=1m")
		$OBJ("tab2").className = "currently";
	else if(sdate == "&sdate=1y")
		$OBJ("tab3").className = "currently";
	else
		$OBJ("tab4").className = "currently";
	if(currentpage!=null) page=currentpage;
	$.ajax({
		type:		"get",
		dataType:	"json",
		data:		"page="+currentpage+"&pagesize="+pagesize+"&time="+(new Date().getTime()),
		url:		"consume_ajax.aspx?oper=ajaxGetList"+sdate,
		error:		function(XmlHttpRequest,textStatus, errorThrown){if(XmlHttpRequest.responseText!=""){alert(XmlHttpRequest.responseText);}},
		success:	function(d){
			switch (d.result)
			{
			case '0':
				JumbotCms.Alert(d.returnval, "0");
				break;
			case '1':
				$("#ajaxList").setTemplateElement("tplList", null, {filter_data: false});
				$("#ajaxList").processTemplate(d);
				$("#ajaxPageBar").html(d.pagerbar);
				break;
			}
		}
	});
}
</script>
</head>
<body>
<style>
@import url(../style/member/style.v4.css);
#ucmenu{width:600px;}
</style>
<iframe frameborder="0" scrolling="no" src="../user/index_default.aspx?do=header" width="100%" height="76" marginwidth="0" marginheight="0" hspace="0" vspace="0" id="ifheader"></iframe>
<!--顶部结束,中框架开始-->
<div id="user_content">
	<!--menu-->
	<div class="user_menu">
		<iframe frameborder="0" scrolling="no" src="index_default.aspx?do=left" width="176" height="700" name="iFrame1"  marginwidth="0" marginheight="0" hspace="0" vspace="0" id="ifleft"></iframe>
	</div>
	<script type="text/javascript">
function reinitIframe(str){
	var iframe = document.getElementById(str);
	try{
		var bHeight = iframe.contentWindow.document.body.scrollHeight;
		var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
		var height = Math.max(bHeight, dHeight);
		iframe.height =  height;
	}catch (ex){}
}
window.setInterval("reinitIframe('ifleft')", 200);
</script>
	<!--右侧功能细分区-->
	<div id="function_box">
		<!--二级菜单-->
		<div class="nav_two">
			<ul>
				<li class="currently"><a>支出明细</a></li>
				<li><a href="applylist_default.aspx?mod=customer">过往申请</a></li>
				<li><a href="buypoints_default.aspx?mod=customer">账户充值</a></li>
				<li><a href="activepointscard_default.aspx?mod=customer">激活点卡</a></li>
				<li><a href="vipapply_default.aspx?mod=customer">我要包年</a></li>
			</ul>
			<div class="clear"></div>
		</div>
		<!--三级菜单-->
		<div id="nav_box">
			<ul class="nav_three">
				<li id="tab4"><a href="javascript:;" onclick="aLoad('')">全部</a></li>
				<li id="tab3"><a href="javascript:;" onclick="aLoad('1y')">本年</a></li>
				<li id="tab2"><a href="javascript:;" onclick="aLoad('1m')">本月</a></li>
				<li id="tab1"><a href="javascript:;" onclick="aLoad('1w')">本周</a></li>
			</ul>
			<div class="clear"></div>
		</div>
		<!--右侧列表-->
		<div id="list">
        <textarea id="tplList" style="display:none"><table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<th width="*">详情</th>
		<th scope="col" style="width:120px;">消费时间</th>
	</tr>
	{#foreach $T.table as record}
	<tr>
		<td align="left">&nbsp;{$T.record.operinfo}</td>
		<td align="center">{formatDate($T.record.opertime,"yyyy-MM-dd hh:mm")}</td>
	</tr>
	{#/for}
</table></textarea>
			<div id="ajaxList"></div>
			<div class="clear"></div>
		</div>
		<div id="ajaxPageBar" class="pages"> </div>
		<div class="clear"></div>
	</div>
	<div class="clear"></div>
</div>
<iframe frameborder="0" scrolling="no" src="../user/index_default.aspx?do=footer" width="100%" height="50" marginwidth="0" marginheight="0" hspace="0" vspace="0" id="iffooter"></iframe>
</body>
</html>
