<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="orderpay.aspx.cs" Inherits="TW.UI.orderpay" %>
<!DOCTYPE html>
<html>
<head lang="en">
	
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv=X-UA-Compatible content=IE=EmulateIE9 />
<script type="text/javascript" src="/static/card/js/configweb.js"></script>
	<title>订单详细页面_<%=config.SiteName %></title>
	<link rel="stylesheet" href="/static/card/css/public.css" />
    <link rel="stylesheet" href="/static/card/css/trade.css" />
    <script type="text/javascript" src="/static/card/js/jquery-1.11.3.js"></script>
    <script type="text/javascript" src="/static/card/js/tools.js"></script>
    <script type="text/javascript" src="/static/card/js/map.js"></script>
    <script type="text/javascript" src="/static/card/js/recharge.js"></script>
    <script>
        $(document).ready(function () {
            $(".tab-link").click(function () {
                $(this).addClass("tab-link-cur").siblings().removeClass("tab-link-cur");
                $(".submit-form").hide().eq($(this).index()).show();
                type = $(this).index();
                $("#paytype").val(type);
            });

            $(".bank-list li").click(function () {
                $(this).addClass("current").siblings().removeClass("current");
                var bankId = $(this).find("div").attr("value");
                banksClick(bankId);
            })

            $('#kfUlId li').click(function () {
                var csId = $(this).attr("value");
                $("#userOrderCsId").val(csId);
                $("#orderCsId").val(csId);
                $("#csId").val(csId);
            });


            $("#tabUlId li").click(function () {
                var payType = $(this).attr("value");
                $("#payType").val(payType);
            })

            $(".simple-check i").click(function () {
                var clickId = $(this).attr("id");

                $("#debitShowId").removeClass();
                $("#creditShowId").removeClass();
                if (clickId == 'debitShowId') {
                    $("#debitShowId").addClass("icon icon-checked-green");
                    $("#creditShowId").addClass("icon icon-no-check-green");

                    var debitId = $("#debitId").val();
                    $("#submitBankId").val(debitId);
                } else {
                    $("#creditShowId").addClass("icon icon-checked-green");
                    $("#debitShowId").addClass("icon icon-no-check-green");
                    var creditId = $("#creditId").val();
                    $("#submitBankId").val(creditId);
                }

            });
            <%if(paytype>0){ %>
            $(".pay-result-modal").show();
            $(".shade").show();
            window.open("<%=payurl %>");
            <%} %>
        });


        function close() {
            $(".shade").hide();
        }
        function toOrderDetial() {
            location.href = "/memb/orderview.aspx?ordno=<%=ordno %>";
        }
    </script>
</head>
<body>
<form id="form1" runat=server>

<input type=hidden value="0" id="paytype" name="paytype" />
<div class="shade black">
    <div class="pay-result-modal">
        <div class="modal-top">
            友情提示
            <a class="close" href="javascript:close();">x 关闭</a>
        </div>
        <div class="modal-body">
            <p style="font-size: 20px;font-weight: bold;margin-bottom: 10px;">
                <i class="icon icon-tip-success"></i>
                &nbsp;
                请您在新打开的页面完成支付
            </p>
            <p style="color: #EA4444;line-height: 20px;margin-left: 20px;">支付完成前请不要关闭此窗口。</p>
            <p style="color: #EA4444;line-height: 20px;margin-left: 20px;">完成支付后请根据您的情况点击下面的按钮：</p>
            <div class="btn-group">
                <button class="default-btn" type="button" onclick="toOrderDetial();">已完成支付</button>
                <button class="vice-btn" type="button" onclick= "javascript:window.location.href='<%=config.PayEorUrl %>'">支付遇到问题</button>
            </div>
        </div>
    </div>
</div>
<TW:Header ID="Header1" runat="server" />


<!--内容 -->
<style type="text/css">
.account-info{
}
.nav-tab{
	height:50px;
	line-height:50px;
	background-color:#e7e7e7;
	margin-top:15px;
	border:1px solid #ccc;
}
.nav-tab .tab-link{
	display:block;
	float:left;
	text-align:center;
	text-decoration:none;
	font-size:14px;
	font-weight:700;
	color:#666;
	width:125px;
}
.nav-tab .tab-link-cur{
	background-color: #fff;
    border-top: 3px solid #ea4444;
    height: 49px;
    color: #ea4444;
    margin-top: -1px;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    margin-left: -1px;
}
.account-info{
	height:80px;
	line-height:80px;
	border: 1px solid #ccc;
	border-top: 0;
}
.info-table { 
	height:40px;
	line-height:40px;
	margin-top: 15px;
}

.acc-label{
            	margin-left:150px;
            }
            .bank-list{ 
            	padding:15px ; 
            }
            .bank-list li {
			    width: 198px;
			    height: 75px;
			    line-height: 75px;
			    margin-right: 20px;
			    margin-left: 13px;
			    margin-bottom: 20px;
			    float: left;
			    border: 1px solid #b3b3b3;
			    position: relative;
			    cursor: pointer;
			    text-align: center;
			}
			.bank-list li.current .select {
			    display: block;
			}
			.bank-list li .select {
			    width: 190px;
			    height: 70px;
			    border: 5px solid #0066cc;
			    position: absolute;
			    top: -1px;
			    left: -1px;
			    display: none;
			    z-index: 100;
			}
			.bank-list li.current .bank-dot {
			    display: block;
			}
			.bank-list li .bank-dot {
			    position: absolute;
			    z-index: 110;
			    top: -1px;
			    left: -1px;
			    display: none;
			}
			.bank-dot {
			    width: 35px;
			    height: 35px;
			    background-image: url("/static/card/css/files/dot-icon.png");
			    background-position: 0px -480px;
			}
		    .bank-wrap{
			    border: 1px solid #ccc;
			    border-top: 0;
			}
			.bank-tip{
			    text-align: center;
			    color: #f38c06;
			    height: 40px;
			    line-height: 40px;
			    font-size: 14px;
			}
</style>

<asp:Panel ID="plOrderPay" CssClass="content" runat="server">
    <div class="container clearfix">
        <div class="order-wrap">
            <div class="process">
            <img alt="" src="/static/card/css/files/trade-02.png"></div>
            <div class="pay-order-wrap clearfix">
                <div class="pay-left pull-left">
                    <div class="tip">订单已经提交成功!<span>请在<%=config.OrdAutoCclHours %>小时之内完成支付，否则订单会自动取消。</span></div>
                    <div class="order-info">
                        <p class="title">订单信息</p>
                        <ul class="info-table clearfix">
                            <li class="clearfix">
                                <label>订单编号：</label>
                                <div class="inp"><asp:Literal ID="litOrdNo" runat="server"></asp:Literal></div>
                            </li>
                            <li class="clearfix">
                                <label>选择客服：</label>    
                                <div class='inp'>     
                                    <div class='like-select'>
                                        <div class='like-selected'>
                                            <span class='text'><asp:Literal ID="litFstKf" runat="server"></asp:Literal></span>
                                            <input type='hidden' id='csId' name='csId' value='<%=fstkfid %>'/>
                                            <em class='down-btn'><s class='like-select-dot'></s></em>      
                                        </div>      
                                        <ul class='like-option' id='kfUlId'>
                                            <asp:Repeater ID="rptKF" runat="server">
                                            <ItemTemplate>
                                            <li class='<%#Convert.ToInt32(Eval("Id")) == fstkfid ? "current" : ""%>' data-value=<%#Eval("NickName").ToString() == "" ? Eval("UserName").ToString() : Eval("NickName").ToString()%> value=<%#Eval("Id")%>><%#Eval("NickName").ToString() == "" ? Eval("UserName").ToString() : Eval("NickName").ToString()%></li>
                                            </ItemTemplate>
                                            </asp:Repeater>
                                        </ul>    
                                    </div>  
                                </div>
                            </li>
                            <li class="clearfix">
                                <label>订单类型：</label>
                                <div class="inp"><asp:Literal ID="litRechageType" runat="server"></asp:Literal></div>
                            </li>
                            <li class="clearfix">
                                <label>确认金额：</label>
                                <div class="inp"><asp:Literal ID="litTotalAmt" runat="server"></asp:Literal></div>
                            </li>
                        </ul>
                    </div>
                   
                </div>
                <div class="pay-right pull-right">
                    <div class="receive-wrap">
                        <div class="title">收货信息</div>
                        <ul class="receive-info">
                            <li class='clearfix'><label>商品信息:</label><div class='inp'><asp:Literal ID="litGoodsTit" runat="server"></asp:Literal></div></li>
                            <li class='clearfix'><asp:Literal ID="litGetProAims" runat="server"></asp:Literal></li>
                            <li class='clearfix'><label>名称:</label><div class='inp'><asp:Literal ID="litProTit" runat="server"></asp:Literal></div></li>
                            <asp:PlaceHolder ID="phRegionGmServer" runat="server" Visible="False">
                            <li class="clearfix"><label>游戏区:</label><div class="inp"><asp:Literal ID="litRegion" runat="server"></asp:Literal></div></li>
                            <li class="clearfix"><label>游戏服:</label><div class="inp"><asp:Literal ID="litGmServer" runat="server"></asp:Literal></div></li>
                            </asp:PlaceHolder>
                        </ul>
                    </div>
                </div>
            </div>
             
                    
                    	<!-- 添加 -->
			            <div class="nav-tab">
			            	<a class="tab-link tab-link-cur" href="javascript:void(0);">余额支付	</a>
			            	<a class="tab-link " href="javascript:void(0);" style="display:none;">在线支付</a>
			            	<span style="color:#F8820C;margin-left:190px;padding-left:19px;font-size:14px;background-image: url(/static/card/css/files/aaaa.gif);background-repeat:no-repeat;background-position-y: 2px;" ><%--温馨提示：微信在线支付将额外收取5%的接口手续费!--%></span>
			            </div>
			            <div class="account-info submit-form" >
			                <label class="acc-label">账户余额：</label>                                
                            <asp:Literal ID="litMembBalance" runat="server"></asp:Literal>
			                &nbsp;&nbsp;&nbsp;&nbsp;
			                <a href="/memb/recharge.aspx" target="_blank">充值</a>
			                <label class="acc-label">支付密码：</label>
                            <asp:TextBox ID="txtPayPass" runat="server" CssClass="input-text" TextMode="Password"></asp:TextBox>
			            </div>
				        <div class="bank-wrap submit-form" style='display:none'>
					     		 <ul class='bank-list clearfix' id='chinaBankList' >功能升级，暂停使用！</ul>
		              	</div>
		            <div style="text-align: center">
                        <asp:Button ID="Button1" CssClass="default-btn" runat="server" Text="确认支付"
                            onclick="Button1_Click" />
		            </div>
        </div>
    </div>
</asp:Panel>

<asp:Panel ID="plOrderPayError" CssClass="content" runat="server" Visible="False">
    <div class="container clearfix">
        <div class="error-div">
            <div class="error-info">
                <h2><asp:Literal ID="litOrderPayErrorMsg" runat="server"></asp:Literal></h2>
                <div class="btn-group">
                    <button class="default-btn pull-left" type="button" onclick="javascript:history.back(-1);">返回上一页</button>
                    <button class="default-btn pull-right" type="button" onclick="javascript:window.location.href='/'">返回首页</button>
                </div>
            </div>
        </div>
    </div>
</asp:Panel>
<TW:Footer ID="Footer1" runat="server" />
<script type="text/javascript" >
    $(function () {
        var type = 0;
        $(".tab-link").click(function () {
            $(this).addClass("tab-link-cur").siblings().removeClass("tab-link-cur");
            $(".submit-form").hide().eq($(this).index()).show();
            type = $(this).index();
        });
        $("#btnPay").click(function () {
            if (type == 0) {
                userPay();
            } else {
                var payCom = $(".bank-list li.current .select").attr("value");
                $("#payTypeCom").val(payCom);
                $("#bankForm").submit();
                $(".pay-result-modal").show();
                $(".shade").show();
            }
        });

        $("#anonymityPay").click(function () {
            var payCom = $(".bank-list li.current .select").attr("value");
            var realName = $("#realNameInput").val();
            var IDCode = $("#IDCodeInput").val();
            if (realName == "") {
                alert("真实姓名不能为空!")
                return;
            }
            if (IDCode == "") {
                alert("身份证号码不能为空!")
                return;
            }
            if (payCom && realName && IDCode) {
                $("#payTypeCom").val(payCom);
                $("#realName").val(realName);
                $("#IDCode").val(IDCode);
                $("#anonymityForm").submit();
                $(".pay-result-modal").show();
                $(".modal-body .btn-group .default-btn").click(function () {
                    window.location.href = "/ordersearch.aspx";
                })
                $(".shade").show();
            }
        });
    });
</script>

</form>
</body>

