<%@ Page Language="C#" AutoEventWireup="true" debug="true" Inherits="WinLibClass.Form.Admin.UserOrderForm.List"  CodePage="65001" PathLevel="1" PageFileFlag="OrderForm_List" PageFileTitle="会员充值管理" DataBindingType="1" PageFlagId="1" %>

<%@ Register TagPrefix="Site" TagName="Menu" Src="../WUC/Site_Menu.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<Site:Menu id="menu_headtitle" runat="server" Flag="HeadTitle" CurrentPageTitle = "后台管理 - 会员充值管理" />
<Site:Menu id="menu_headjs" runat="server" Flag="HeadJs" PathLevel="1" />
<Site:Menu id="menu_headcss" runat="server" Flag="HeadCss" PathLevel="1" />

<script type="text/javascript" charset="utf-8" src="/paipaijs/dialoguser.js"></script>

<script>

//编辑
function Edit_Info(id,ischecked)
{
//访问类型,AJAX路径,数据JSON,弹出框ID,弹出框标题,等执行的函数名;
var _url="update.aspx?IsAdd=1";
var _data = {"id":id};	
//if(id<1)
if(ischecked<1)
Common.EditFunction("POST",_url,_data,"<%=PageFileFlag%>","<%=PageFileTitle%>:编辑","SaveSub");	
else  
Common.EditFunction("POST",_url,_data,"<%=PageFileFlag%>","<%=PageFileTitle%>:编辑","");	
//将本行设置为选中颜色
SetActive(id);
}


//系统保留
function Del_Info(id)
{
//弹出框ID,标题，内容，删除程序执行路径，参数表
var _url =  "update.aspx?IsAdd=3";
var _data ={"id":id};
Common.ConfirmDelete2 ("POST",_url,_data,"<%=PageFileFlag%>","删除确认","");
SetActive(id);	
}

function PayToUserOrderForm(id){		
	if(confirm("该操作不可逆，您确定要提交吗？")==false)
	{
		return false;
	}	
	
	jQuery.ajax({	
		async:false,
		type: "POST",
		url: "update.aspx?IsAdd=10",
		data:{"id":id},//DeleteType==2:删除
		cache: false,
		success: function(msg){
			if(msg>0){Alert("支付处理完毕。",1);Common.Refresh();}
			else{AlertErr("支付处理失败。",1);}
		}
	});
	return false;
}





// 以下两个函数，请参照 JS/PointSettingLog.js 中的同名函数的写法，以它为准。
function ChooseUser1(UserId, SpanId,InputId,ChooseType)
{
	var _dlgId = "Dom_UserChoose_Dlg";
	var s = jQuery("#inputSelectText").val();
	var _url="../Dialog/getDialogData_1.aspx";
	var _data = {"InfoId":UserId,"SpanId":SpanId,"InputId":InputId,"ChooseType":ChooseType, "DialogId":_dlgId,"unnc":s,"p":1};	
	Common.EditFunction("GET",_url,_data,_dlgId,"会员选择");
}
//查看详细信息(11:23 2011-11-28)
function ShowDetailInfo(Flag,id)
{
	var GameType = jQuery("#GameType").val();
	
	if( Flag==3 && (GameType<1 || id<1)){ Alert("没有该数据。");return ;}
	
	var _dlgId = "Dom_ShowDetailInfo_Dlg";
	var _url = '../Dialog/getDialogInfo_2.aspx';
	var _data={'id':id,"GameType":GameType};
	var _tit = "商品详细信息";
	if(Flag==1){ _url = '../Dialog/getDialogInfo_1.aspx';_tit = "会员 - 详细信息";}
	else if(Flag==1){_url = '../Dialog/getDialogInfo_2.aspx';_tit = "商品 - 详细信息";}
	else if(Flag==3){_url = '../Dialog/getDialogInfo_3.aspx';
		if(GameType==1){_tit = "第"+ id +"期 " + "竞拍 - 详细信息";}
		else if(GameType==2){_tit = "第"+ id +"期 " + "秒杀详细信息";}
		else if(GameType==3){_tit ="第"+ id +"期 " +  "彩票详细信息";}
		else if(GameType==4){_tit ="第"+ id +"期 " +  "投注详细信息";}
		else if(GameType==1501){_tit ="折扣商品 - 详细信息";_url = '../Dialog/getDialogInfo_2.aspx';}
		else if(GameType==1601){_tit =  "积分兑换商品 - 详细信息";_url = '../Dialog/getDialogInfo_2.aspx';}
		else _tit =   "第"+ id +"期 " +  "竞拍";
	}
	Common.EditFunction("GET",_url,_data,_dlgId,  _tit+" ");
}
</script>


</head>
<body>

<Site:Menu id="menu_topmenu" runat="server" Flag="TopMenu"  />
<div class1="wrap" id="wrap">
	<Site:Menu id="Wuc_LeftMenu" runat="server" Flag="LeftMenu" PageFileFlag="Menu_A_800_801" PathLevel="1" />	
	<div class1="mainbox" class="MainBox W1100 ">

		<div class="PGTitle LH30 ">
			<div class="W200 FL MGL10 FWB FS12"><%=PageFileTitle%></div>
			<div class="ChileMenu1 FL FS12">

			</div>
			<div class="Clear"></div>
		</div>

		<div class="ContBox MGT10 " >

<table class="Table FS12 ">


<tr style="height:30px;	font-weight: bold;">
<TH style="width:30px">序号</TH>
<TH style="width:150px">会员</TH>

<TH style="width:150px"><%=WinLibClass.Config.Global.WebSiteConfig.PointName_1%> / 购点金额</TH>
<TH style="width:80px"><%=WinLibClass.Config.Global.WebSiteConfig.PointName_2%></TH>
<TH style="width:80px"><%=WinLibClass.Config.Global.WebSiteConfig.PointName_3%></TH>
<TH style="width:150px">积分 / 购积分金额</TH>
<TH style="width:80px">支付额/实付额</TH>
<TH style="width:100px">操作类型</TH>
<TH style="width:100px">支付状态</TH>
<TH style="width:70px">操作</TH>
</tr>

<asp:Repeater id="rpList" runat="server">
<ItemTemplate>

<tr id="tr_<%#Eval("id")%>">
		<td><%#Eval("id")%></TD>
		<td><%# GetUserNickName(Eval("UserId"))%></td>
		<TD ><%# (Eval("Point1"))%> / <%# WinLibClass.Common.Utils.StrToInt( Eval("PointPrice").ToString(),0)/100f %></td>
		<TD ><%# (Eval("Point2"))%></td>
		<TD ><%# (Eval("Point3"))%></td>
		<TD ><%# (Eval("Credits"))%> / <%# WinLibClass.Common.Utils.StrToInt( Eval("CreditsPrice").ToString(),0)/100f %> </td>
		<TD ><%# WinLibClass.Common.Utils.StrToInt( Eval("RealPrice").ToString(),0)/100f %> / <%# WinLibClass.Common.Utils.StrToInt( Eval("RealPayPrice").ToString(),0)/100f %></td>
		<TD ><%# GetOperateType(Eval("OperateType"))%></td>
		<td ><%#Eval("IsChecked").Equals(1)?"<font color='green'>已支付</font>":"<font color='red'>未支付 <a href='#' onclick='PayToUserOrderForm("+Eval("id")+")' style='font-weight:bold;'>支付</a></font>"%></td>
		
		<td>
			<a onclick="Edit_Info(<%#Eval("id")%>,<%#Eval("ischecked")%>);" >编辑</a>
			<a onclick="Del_Info('<%#Eval("id")%>');" >删除</a>
		</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
		</div>
		<div class="ContBox" >
			<div class="page" style="margin-left:-13px;"><%=strPageInfo%>  -  <a href="#"onclick="Edit_Info(0,0);return false;"  class="A_Add">添加</a> </div>		
		
<div style="margin-left:6px;background-color:#e6e6e6;text-align:left;color:red;line-height:30px;">
&nbsp;&nbsp;注：手工充值，默认是不直接充上会员帐户的。当确定会员已经支付了货款或确定可以给客户支付到帐时，可点击“支付”链接，完成支付。

</div>
		
		</div>
		

	</div>
</div>


<div class="clear"></div>
<Site:Menu id="menu_foot" runat="server" Flag="Foot"   />
</body>
</html>


