<%@ Page Language="C#" AutoEventWireup="true" Inherits="zhongchou.buyList" CodeBehind="buyList.aspx.cs" %>

<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <title>
        <%=pGlobla.title %>付款页面</title>
    <meta name="keywords" content="<%=pGlobla.key %>" />
    <meta name="description" content="<%=pGlobla.des %>" />
    <!--public js&css start-->
        <script src="Images/geo.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="images/14c4c0d24fba6ed25d8b6758064ef7b8eb28.css">
    <script type="text/javascript" src="images/2cc0475e1160ea574d0a9b5ebea60136eb28.js"></script>
    <style>
        .header { background: #ffffff; height: 83px; border-bottom: 1px solid #eaeaea; }
        .header .m-right span.pull-down { padding-bottom: 16px; }
        .pull-down i.meun-01 { color: #333333; }
        body { background: #ebeef1; }
        .header .m-right { width: 200px; margin-top: 10px; }
        .ms-left { float: left; }
        .header .m-left { margin-top: 10px; }
        .pay-tab { margin-top: 22px; margin-left: 28px; }
        .pay-tab li { float: left; border-bottom: 4px solid #d3d3d3; width: 296px; text-align: center; padding-bottom: 6px; }
        .pay-tab li a { color: #666666; display: block; cursor: default; }
        .pay-tab li.selected { border-color: #fd729d; }
        .pay-tab li.selected a { color: #fd729d; }
    </style>
</head>
<body onload="setup();">
<form id="form1" runat="server">
    <!--header static-->
    <div class="header">
        <div class="wrap-1024 clearfix">
            <div class="m-left">
                <h1>
                    <a id="nav_logo" alt="众筹网" class="img-logo " title="众筹网" href="/index.aspx"><img src="/images/<%=pGlobla.Logo %>" /></a></h1>
            </div>
            <div class="ms-left">
                <ul class="pay-tab">
                    <li class='selected'><a>1.提交订单</a></li>
                    <li><a>2.支持成功</a></li>
                </ul>
            </div>
            <div class="m-right clearfix">
                <div id="Js-header-loginBtn">
                    <span class="clearfix" style="padding-left: 0; width: 200px; text-align: right; margin-right: 0;"><i class="meun-01" style="width: 150px; cursor: default"><em class="pay-user-icon">
                        <img src="images/pay_user_icon.png"></em>chenshenbo</i></span>
                </div>
            </div>
        </div>
    </div>
    <!--header end-->   
    <link href="Images/fb244b1667b8ab2567060391bb25b081.css" rel="stylesheet" type="text/css" />
    <!--main static-->
    <div class="main clearfix">
        <div class="wrap-1024 b-white clearfix">
            <div class="pay-detial">
                <div class="supdtl">
                    <div class="supdtl-head">
                        <span class="pos1">项目名称</span> <span class="pos2">回报内容</span> <span class="pos3">支持金额</span> <span class="pos4">配送费用</span> <span class="pos5">预计回报发送时间</span>
                    </div>
                    <div class="supdtl-cont">
                    <asp:Repeater ID="projectRP" runat="server"><ItemTemplate>
                        <div class="supdtl-cont-top">
                            <span class="pos1">
                                <img src="Images/<%#Eval("smallImg") %>" alt="<%#Eval("seoName") %>">
                                <span id="js-dealName" title="<%#Eval("seoName") %>"><%#Eval("LengName") %></span> </span><span class="pos2"><span class="morecon"><%#Eval("rJJ") %></span><span class="more">显示全部</span></span> <span class="pos3 js-pos3">￥<%#Eval("money") %></span>
                            <span class="pos4 js-pos4"><%#Eval("need") %></span> <span class="pos5">项目成功结束后<%#Eval("returnDay")%>天内 </span>
                        </div>
                        </ItemTemplate></asp:Repeater>
                    </div>
                    <div class="supdtl-cont-bot clearfix">
                        <div class="clearfix">
                            给项目发起人留言<input name="memo" type="text" />                            
                        </div>
                    </div>
                </div>
                <p class="p-address" style="display: none;">
                    <span>*</span>收货地址： 辽宁抚顺sadf(sasd) 18684691326 <a id="Js-useOther">使用其他收货地址</a>
                </p>
                <div class="order-box" id="Js-otheraddr" >
                    <div id='confirm-order'>
                        <div class="pay-tit">
                            <h3>
                                收货信息</h3>
                        </div>
                        <div id='consignee_list' class="pay-con padd20"  style="display: none;">
                            <div class="addes">
                                <p class="Js-addrList tr-selectd" data-id="343138">
                                    <input type="radio" name="address_id" value="343138"  />
                                    <label>
                                        辽宁抚顺sadf(sasd) 18684691326
                                    </label>
                                    <span class="Js-addr-del" style="display: none;">删除</span> <span class="Js-addr-modify" style="display: none;">修改</span>
                                </p>
                                <p class="Js-addrList">
                                    <input type="radio" name="address_id" class="newAddress" />
                                    <label id="Js-addr-new">
                                        添加新地址</label>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
                <asp:Repeater ID="usermsg" runat="server"><ItemTemplate>
                <div class="pay-add-address" id="js-pay-add-address" style="display: ;">                    
                    <div class="row-input">
                        <label>
                            <span>＊</span>收件人：</label>
                        <input type="text" name="consignee" id="consignee" placeholder="姓名" value="<%#Eval("realname") %>" />
                        <input type="text" name="mobile" id="mobile" value="<%#Eval("phone") %>">
                        <span id="validator-consignee-required" class="error-text" style="display: none">姓名不能为空</span> <span id="validator-mobile-required" class="error-text" style="display: none">手机号不能为空</span> <span id="validator-mobile-correct" class="error-text" style="display: none">手机号不正确</span>
                    </div>
                    <div class="row-input">
                        <label>
                            <span>＊</span>收货地址：</label>
                        <select class="select" name="province" id="s1">
                          <option></option>
                        </select>
                        <select class="select" name="city" id="s2">
                          <option></option>
                        </select>
                        <select class="select" name="town" id="s3">
                          <option></option>
                        </select>                        
                        <input type="text" class="ads-ipt" id="address" name="address" placeholder="详细地址" value="">
                        <span id="validator-province-error" class="error-text" style="display: none">请选择省</span> <span id="validator-city-error" class="error-text" style="display: none">请选择市</span> <span id="validator-address-required" class="error-text" style="display: none">地址不能为空</span>
                    </div>
                </div>
                </ItemTemplate></asp:Repeater>
            </div>
            <br />
            <div class="pay-wrap">
                <div class="pay-head clearfix">
                    <ul>
                        <li class="lan">平台支付</li>
                    </ul>
                </div>
                <div class="pay-con" id="Js-select">
                    <input type="hidden" class="sel_bank" name="bank_id" value="alipay">
                    <input type="hidden" class="sel_num" name="payment" value="29">
                    <div class="pay-row" style="border-top-width: medium; border-top-style: none; display: block;">
                        <div class="cashier-cach">
                            <ul>
                                <li class="alipay select"><span class="" value="alipay" data-payment="29"></span></li>
                                <%--<li class="yeepay"><span class="" value="alipay" data-payment="36"></span></li>--%>
                                <li class="weixin"><span class="" value="weixin" data-payment="50"></span></li>
                            </ul>

                        </div>
                        <br />
                        <div class="cashier-cach">
                            <ul>
                                <li><span class="alibank_types bk_typeICBC" value="ICBC" data-payment="38"></span></li>
                                <li><span class="alibank_types bk_typeCMBCHINA" value="CMBCHINA" data-payment="38"></span></li>
                                <li><span class="alibank_types bk_typeCCB" value="CCB" data-payment="38"></span></li>
                                <li><span class="alibank_types bk_typeABC" value="ABC" data-payment="38"></span></li>
                                <li><span class="alibank_types bk_typeSPDB" value="SPDB" data-payment="38"></span></li>
                                <li><span class="alibank_types bk_typeCEB" value="CEB" data-payment="38"></span></li>
                                <li><span class="alibank_types bk_typeCMBC" value="CMBC" data-payment="38"></span></li>
                                <li><span class="alibank_types bk_typeGDB" value="GDB" data-payment="38"></span></li>
                                <li><span class="alibank_types bk_typeBOC" value="BOC" data-payment="38"></span></li>
                                <li><span class="alibank_types bk_typePOST" value="POST" data-payment="38"></span></li>
                            </ul>

                        </div>
                    </div>                    
                </div>
            </div>
            <div class="pay-submit">
                <div><em>支付额度为</em><span class="s-f js-pay-other">￥<%=Request.QueryString["m"] %><input name="moneyinput" maxlength="10" hidden value="<%=Request.QueryString["m"] %>" /></span></div>
                <input id="orderSubmit" name="orderSubmit" type="submit" class="btn-effect-blue btn-sub w217 w162" value="提交订单">
            </div>
        </div>
    </div>
    <!--footer static-->
    <!--div class="footer">
        <div class="footer-copy">
            <div class="m-Links">
            </div>
            <div class="wrap" style="font-size: 11px;">
                RaiseDreams.Com
            </div>
        </div>
    </div-->    
    <script src="Images/fe3974b84fb6b50da0f329242078614c.js" type="text/javascript"></script>
    <!--footer end-->
    <script src="Images/395284370102247a1fc47a72c25a70a0.js" type="text/javascript"></script>
    </form>
</body>
<script type="text/javascript">
    function promptinfo() {
        var address = document.getElementById('address');
        var s1 = document.getElementById('s1');
        var s2 = document.getElementById('s2');
        var s3 = document.getElementById('s3');
        if (s3.value.indexOf('县级') == -1) {
            address.value = s1.value + s2.value + s3.value + "？街道？栋？号，收件人：" + document.getElementById("consignee").value + "，联系电话：" + document.getElementById("mobile").value;
        }
    }
    function validInput() {
        var validMobile = !/^1[3|4|5|7|8][0-9]\d{8}$/.test($("input[name='mobile']").val());
        var consignee = $("input[name='consignee']").val();
        var mobile = $("input[name='mobile']").val();
        var province = $("select[name='province']").find("option:selected").data("id");
        var provinceName = $("select[name='province']").find("option:selected").val();
        var city = $("select[name='city']").find("option:selected").data("id");
        var cityName = $("select[name='city']").find("option:selected").val();
        var address = $("input[type='text'][name='address']").val();

        if (!consignee) {
            $("#validator-consignee-required").show();
            return false;
        } else {
            $("#validator-consignee-required").hide();
        }
        if (!mobile) {
            $("#validator-mobile-required").show();
            return false;
        } else {
            $("#validator-mobile-required").hide();
        }
        if (mobile && validMobile) {
            $("#validator-mobile-correct").show();
            return false;
        } else {
            $("#validator-mobile-correct").hide();
        }
        if (province == -1) {
            $("#validator-province-error").show();
            return false;
        } else {
            $("#validator-province-error").hide();
        }
        if (city == -1) {
            $("#validator-city-error").show();
            return false;
        } else {
            $("#validator-city-error").hide();
        }
        if (!address) {
            $("#validator-address-required").show();
            return false;
        } else {
            $("#validator-address-required").hide();
        }
    }
    $(function () {
        if ($("#js-dealName").text().length > 40) {
            var text = $("#js-dealName").text().substr(0, 40);
            $("#js-dealName").text(text + "……");
        }
        $("input[name='consignee']").on({
            blur: function () {
                if (!$(this).val()) {
                    $("#validator-consignee-required").show();
                } else {
                    $("#validator-consignee-required").hide();
                }
            }
        });

        $("input[name='mobile']").on({
            blur: function () {
                if (!$(this).val()) {
                    $("#validator-mobile-required").show();
                } else {
                    $("#validator-mobile-required").hide();
                }
                if ($(this).val() && !/^1[3|4|5|7|8][0-9]\d{8}$/.test($(this).val())) {
                    $("#validator-mobile-correct").show();
                } else {
                    $("#validator-mobile-correct").hide();
                }
            }
        });
        $("select[name='province']").on({
            blur: function () {
                if ($(this).find("option:selected").data("id") == -1) {
                    $("#validator-province-error").show();
                } else {
                    $("#validator-province-error").hide();
                }
            }
        });

        $("select[name='city']").on({
            blur: function () {
                if ($(this).find("option:selected").data("id") == -1) {
                    $("#validator-city-error").show();
                } else {
                    $("#validator-city-error").hide();
                }
            }
        });

        $("input[type='text'][name='address']").on({
            blur: function () {
                if (!$(this).val()) {
                    $("#validator-address-required").show();
                } else {
                    $("#validator-address-required").hide();
                }
            }
        });


        $("input[name='is_remained']").on("change", function () {
            if ($(this).prop("checked")) {
                var js_account_now = Number($(".js-account-now").text().substr("1"));
                var js_pos3 = Number($(".js-s-f").text().substr("1").replace(",", ""));

                if (js_pos3 <= js_account_now) {
                    $(".js-pay-selected").text("￥" + js_pos3);
                    $(".js-pay-other").text("￥0");
                } else {
                    var pay_other = js_pos3 - js_account_now;
                    $(".js-pay-selected").text("￥" + js_account_now);
                    $(".js-pay-other").text("￥" + pay_other.toFixed(2));
                }
                $("#js-yzf").show();
            } else {
                $(".js-pay-selected").text("￥0");
                $(".js-pay-other").text($(".js-s-f").text());
                $("#js-yzf").hide();
            }
        });

    });

</script>
</html>