/**
 * create by robot 
 * date Thu Sep 12 16:16:36 CST 2019 
 */ 

var pageIndex=1;
$(document).ready(function(){
	//调用查询
	pageIndex=StringUtil.getQueryString('pageIndex');
	if(pageIndex==undefined||pageIndex==null){
		pageIndex=1;
	}
	queryMerchantMenberRecharge(pageIndex);
});

//查询
function queryMerchantMenberRecharge(index){
	if(typeof(index)=='undefined'){
		index=1;
	}
	var url=ctx+'/vip/goRechargeLog';
	$.ajax({  
        url:url,  
        type:"post", 
        dataType:"json",
        data:{  
        	"currPage":index,
        	 "memberCode":$("#memberCode").val(),
             "storeId":$("#storeId").val(),
        },  
        success:function(result){
        	//渲染数据
        	$('#data_content').empty();
        	var header='';
        	var data='';
        	data+='<div class="weui-flex lgraybg">';
    		data+='<div class="weui-flex__item pt15 pb15 dgray tcenter f14">金额(元)</div>';
    		data+='<div class="weui-flex__item pt15 pb15 dgray tcenter f14">时间</div>';
    		data+='<div class="weui-flex__item pt15 pb15 dgray tcenter f14">状态</div>';
    		data+='</div>';
        	$.each(result.merchantMenberRechargeList,function(i){
        		var merchantMenberRecharge=result.merchantMenberRechargeList[i];
        		var createDt='';
        		if(StringUtil.isNotBlank(merchantMenberRecharge.createDt)){
        			createDt=new Date(merchantMenberRecharge.createDt).toYYYYMMDDHHMMSS();
        		}
        		data+='<div class="weui-flex bdbe">';
        		data+='<div class="weui-flex__item pt15 pb15 tcenter f14">¥'+merchantMenberRecharge.rechargeMoney+'</div>';
        		data+='<div class="weui-flex__item pt15 pb15 tcenter f14">'+createDt+'</div>';
        		data+='<div class="weui-flex__item pt15 pb15 tcenter f14 f-green">充值成功</div>';
        		data+='</div>';
        	});
        	$('#data_content').append(data);
        } 
    });  
}


//查询
function queryMerchantMenberRecharge2(index){
	if(typeof(index)=='undefined'){
		index=1;
	}
	var url=ctx+'/vip/goRechargeLog';
	$.ajax({  
        url:url,  
        type:"post", 
        dataType:"json",
        data:{  
        	"currPage":index,
        	 "memberCode":$("#memberCode").val(),
             "storeId":$("#storeId").val(),
        },  
        success:function(result){ 
        	var data='';
        	//渲染数据
        	$.each(result.merchantMenberRechargeList,function(i){
        		var merchantMenberRecharge=result.merchantMenberRechargeList[i];
        		var createDt='';
        		if(StringUtil.isNotBlank(merchantMenberRecharge.createDt)){
        			createDt=new Date(merchantMenberRecharge.createDt).toYYYYMMDDHHMMSS();
        		}
        		data+='<div class="weui-flex bdbe">';
        		data+='<div class="weui-flex__item pt15 pb15 tcenter f14">¥'+merchantMenberRecharge.rechargeMoney+'</div>';
        		data+='<div class="weui-flex__item pt15 pb15 tcenter f14">'+createDt+'</div>';
        		data+='<div class="weui-flex__item pt15 pb15 tcenter f14 f-green">充值成功</div>';
        		data+='</div>';
        	});
        	$('#data_content').append(data);
        } 
    });  
}





