<%@ page language="C#" autoeventwireup="true" inherits="tuan_1_cart, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ Register Src="~/tuan/1/head.ascx" TagName="head" TagPrefix="UC" %>
<%@ Register Src="~/tuan/1/foot.ascx" TagName="foot" TagPrefix="UC" %>
<!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="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>购物车_<%=ZK.config("title","tuan") %></title>
    <link href="/tuan/<%=ZK.config("tuantemplate", "tuan")  %>/skin/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/s/skin/base.js"></script>
    <script type="text/javascript" src="/tuan/<%=ZK.config("tuantemplate", "tuan")  %>/skin/public.js"></script>
    <script type="text/javascript">
        function check1(){
            document.getElementById("tuan_pay_btn").className="none";document.getElementById("tuan_pay_btn_copy").className="tuan_pay_btn";
            if(document.getElementById("totalprice").innerHTML.indexOf("共支付")==-1){alert("订单不能为空！");document.getElementById("tuan_pay_btn").className="tuan_pay_btn";document.getElementById("tuan_pay_btn_copy").className="none"; return false;}
            var value=document.getElementById("tel").value;
            if(value==""){alert("您输入您的手机号码！");document.getElementById("tuan_pay_btn").className="tuan_pay_btn";document.getElementById("tuan_pay_btn_copy").className="none"; return false;}
            var telReg=/^[0-9]{11,11}$/;  if (!telReg.test(value)){alert("请输入正确的手机号码！");document.getElementById("tuan_pay_btn").className="tuan_pay_btn";document.getElementById("tuan_pay_btn_copy").className="none"; return false;}
        }
    </script>
</head>
<body>
    <div class="wrap">
        <div class="box">
            <UC:head ID="head1" runat="server" />
            <script type="text/javascript">document.getElementById("homemenu").className="";</script>
            <div class="mainside">
                <div class="c1">
                    <div class="m1" style="background-image: url(/tuan/1/skin/mainbox_top_.gif)"></div>
                    <div class="v1" style="background-image: url(/tuan/1/skin/mainbox_bg_.gif)">
                        <form id="form1" runat="server" autocomplete="off">
                            <asp:Panel ID="Panel_Nodata" runat="server" Visible="false"><div class="tip_nodata" id="tip_nodata">购物车为空，您还没有购买！</div></asp:Panel>
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="ce" style="padding: 10px 0 5px 18px;">
                                    <table border="0" cellpadding="0" cellspacing="0" class="wto">
                                        <tr>
                                            <td style="padding-right: 8px"><strong style="color: #f60">接收团购码的手机号：</strong></td>
                                            <td><asp:TextBox ID="tel" runat="server" CssClass="inp1" MaxLength="11" Width="120" style="border-color:#f2ab5f;color:#000;font-weight:bold"></asp:TextBox></td>                                       
                                            <td><div style="color: #f60; padding-left: 8px">请您填写正确的手机号码，团购成功后将会以短信发送团购码到您手机，凭此团购码进行消费！</div></td>
                                        </tr>
                                    </table>
                                </div>
                                <asp:Repeater ID="Repeater1" runat="server">
                                    <HeaderTemplate>
                                        <div class="cart_list">
                                            <table border="0" cellpadding="0" cellspacing="1" width="100%">
                                                <tr>
                                                    <th width="60">选择</th>
                                                    <th><div class="al" style="padding-left: 10px">商品名称</div></th>
                                                    <th width="100">原价</th>
                                                    <th width="100">折扣</th>
                                                    <th width="100">团购价格</th>
                                                    <th width="72">&nbsp;</th>
                                                </tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <asp:CheckBox ID="chk" runat="server" OnCheckedChanged="chk_OnCheckedChanged" AutoPostBack="true" />
                                                <asp:Literal ID="iid" runat="server" Visible="false" Text='<%#Eval("ID")%>'></asp:Literal>
                                                <asp:Literal ID="price" runat="server" Visible="false" Text='<%#Eval("tuanprice")%>'></asp:Literal>
                                            </td>
                                            <td>
                                                <div class="s14 al" style="padding-left: 10px"><a title="点击查看" href="/tuan/<%#Eval("id") %>.htm" target="_blank"><%#WM.E(Eval("shorttitle"),54,true)%></a></div>
                                            </td>
                                            <td>
                                                <div style="text-decoration: line-through; color: #999"><%#Convert.ToDouble(Eval("oldprice").ToString()).ToString("#.##")%></div>
                                            </td>
                                            <td>
                                                <%#(ZK.DoubleDiscount(Eval("tuanprice").ToString(), Eval("oldprice").ToString())*10).ToString("#.#")%>
                                            </td>
                                            <td>
                                                <strong>￥<%#Convert.ToDouble(Eval("tuanprice").ToString()).ToString("#.##")%></strong>
                                            </td>
                                            <td>
                                                <div class="cart_del"><a href="/tuan/cart.aspx?act=del&id=<%#Eval("id") %>">(删除)</a></div>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <FooterTemplate></table></div></FooterTemplate>
                                </asp:Repeater>
                                <div class="cart_operation">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td>
                                                <asp:Button ID="Button1" runat="server" Text="全选" CssClass="tuan_operation_btn" onmouseover="hover(this,0.8)" onmouseout="hover(this,1)" OnClick="Button1_Click" />
                                            </td>
                                            <td>
                                                <div class="ar totalprice" id="totalprice"><asp:Literal ID="Literal1" runat="server">共支付：<strong class="s14">-元</strong></asp:Literal><asp:Literal ID="Literal2" runat="server">，您的当前余额不足请先冲值，<a class="str" id="chongzhiURL" href="/user/chongzhi.aspx" target="_blank">进入充值页面&raquo;</a></asp:Literal></div>
                                            </td>
                                            <td width="130" class="ar">
                                                <div class="tuan_pay_btn" id="tuan_pay_btn"><asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" OnClientClick="return check1()">立即支付购买</asp:LinkButton></div>
                                                <div class="none" id="tuan_pay_btn_copy"><a href="javascript:void(0)">订单提交中..</a></div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>
                            <asp:Literal ID="JS" runat="server"></asp:Literal>
                        </form>
                    </div>
                    <div class="n1" style="background-image: url(/tuan/1/skin/mainbox_bottom_.gif)"></div>
                </div>
            </div>
        </div>
        <UC:foot ID="foot1" runat="server" />
    </div>
</body>
</html>
