<%@ page language="C#" autoeventwireup="true" inherits="tuan_2_process, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ Register Src="~/tuan/2/head.ascx" TagName="head" TagPrefix="UC" %>
<%@ Register Src="~/tuan/2/side.ascx" TagName="side" TagPrefix="UC" %>
<%@ Register Src="~/tuan/2/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">
        var telReg=/^[0-9]{11,11}$/; 
        function check1(){
            selffun1();
            if(document.getElementById("Panel1")){
            if(document.getElementById("receivingcontact").value==""){alert("收货人不能为空！");selffun2();return false;}
            if(document.getElementById("receivingphone").value==""){alert("联系手机不能为空！");selffun2();return false;}
            else{
                if(!telReg.test(document.getElementById("receivingphone").value)){alert("请填写正确的手机号码！");selffun2();return false;}
            }
            if(document.getElementById("receivingaddress").value==""){alert("收货地址不能为空！");selffun2();return false;}
            }
            else if(document.getElementById("Panel2")){
                if(document.getElementById("tel").value==""){alert("请填写手机号码！");selffun2();return false;}
                else{
                    if(!telReg.test(document.getElementById("tel").value)){alert("请填写正确的手机号码！");selffun2();return false;}
                }
            }
        }
        function selffun1(){
            document.getElementById("tuan_pay_btn").className="none";document.getElementById("tuan_pay_btn_copy").className="tuan_pay_btn";
        }
        function selffun2(){
            document.getElementById("tuan_pay_btn").className="tuan_pay_btn";document.getElementById("tuan_pay_btn_copy").className="none";
        }
    </script>

</head>
<body>
    <div class="wrap">
    <UC:head ID="head1" runat="server" />
        <div class="box">            
            <script type="text/javascript">document.getElementById("homemenu").className="";</script>
            <div class="mainside">
                <div class="mainbox">
                    <div class="c1">
                        <div class="m1"></div>
                        <div class="v1">
                            <form runat="server" id="form1" autocomplete="off">
                            <div class="process1">
                                <table border="0" cellpadding="0" cellspacing="1" width="100%">
                                    <tr>
                                        <td class="td1">订单商品：</td>
                                        <td class="td2"><asp:Literal ID="Literal1" runat="server"></asp:Literal></td>
                                    </tr>
                                    <tr>
                                        <td class="td1">团购价格：</td>
                                        <td class="td2"><asp:Literal ID="Literal2" runat="server"></asp:Literal>元<asp:Literal ID="Literal2_" runat="server" Visible="false"></asp:Literal></td>
                                    </tr>
                                    <tr>
                                        <td class="td1">团购数量：</td>
                                        <td class="td2">
                                            <asp:DropDownList ID="DropDownList1" runat="server" CssClass="s14" Style="color: #333"
                                                Width="100" AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                                                <asp:ListItem Value="1" Text="1份"></asp:ListItem>
                                                <asp:ListItem Value="2" Text="2份"></asp:ListItem>
                                                <asp:ListItem Value="3" Text="3份"></asp:ListItem>
                                                <asp:ListItem Value="" Text="自定输入"></asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:TextBox ID="TextBox1" runat="server" MaxLength="4" CssClass="inp1" Width="80" AutoPostBack="true" OnTextChanged="TextBox1_TextChanged" Visible="false" Text="1"></asp:TextBox>
                                            <asp:HiddenField ID="HiddenField1" runat="server" Value="1" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="td1">应付金额：</td>
                                        <td class="td2"><strong style="color: #f60"><asp:Literal ID="Literal3" runat="server"></asp:Literal>元</strong></td>
                                    </tr>
                                    <tr>
                                        <td class="td1">帐户余额：</td>
                                        <td class="td2"><asp:Literal ID="Literal5" runat="server"></asp:Literal></td>
                                    </tr>
                                    <tr>
                                        <td class="td1">团购说明：</td>
                                        <td class="td2"><div style="color: #666"><asp:Literal ID="Literal4" runat="server"></asp:Literal></div></td>
                                    </tr>
                                </table>
                            </div>
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="process1" style="padding-top: 0;">
                                    <div class="str s14 red" style="padding-bottom: 5px">请填写收货信息：</div>
                                    <table border="0" cellpadding="0" cellspacing="1" width="100%">
                                        <tr>
                                            <td class="td1">收货人：</td>
                                            <td class="td2"><asp:TextBox ID="receivingcontact" runat="server" MaxLength="20" CssClass="inp1" Width="200"></asp:TextBox></td>
                                        </tr>
                                        <tr>
                                            <td class="td1">联系手机：</td>
                                            <td class="td2"><asp:TextBox ID="receivingphone" runat="server" MaxLength="11" CssClass="inp1" Width="200"></asp:TextBox></td>
                                        </tr>
                                        <tr>
                                            <td class="td1">收货地址：</td>
                                            <td class="td2"><asp:TextBox ID="receivingaddress" runat="server" MaxLength="200" CssClass="inp1" Width="450"></asp:TextBox></td>
                                        </tr>
                                        <tr>
                                            <td class="td1">备注：</td>
                                            <td class="td2"><asp:TextBox ID="receivingremark" runat="server" CssClass="inp1" Width="450" Height="150" TextMode="MultiLine"></asp:TextBox></td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>
                            <asp:Panel ID="Panel2" runat="server">
                              <div class="process1" style="padding-top: 0;">
                                <div class="str s14 red" style="padding-bottom: 5px"> 请填写接收团购码的手机号：</div>
                                    <table border="0" cellpadding="0" cellspacing="1" width="100%">
                                      <tr>
                                        <td class="td1"> 手机号码： </td>
                                        <td class="td2"><asp:TextBox ID="tel" runat="server" MaxLength="11" CssClass="inp1" Width="200"></asp:TextBox></td>
                                      </tr>
                                    </table>
                              </div>
                            </asp:Panel>
                            <div class="cart_operation" style="padding-top: 0; padding-left: 30px; padding-bottom: 15px">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr>
                                        <td width="130">
                                            <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>
                                        <td></td>
                                    </tr>
                                </table>
                            </div>
                            </form>
                        </div>
                        <div class="n1"></div>
                    </div>
                </div>
                <UC:side ID="side1" runat="server" />
                <div class="clear"></div>
            </div>
        </div>
        <UC:foot ID="foot1" runat="server" />
    </div>
</body>
</html>
