<%@ Page language="c#" Codebehind="NumberAdd.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.OrderAdd" ValidateRequest="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
		<title>添加订单</title>
	    <!--#include file="inc/head.inc"-->
		<script type="text/javascript" src="inc/multi_popup.js"></script>
		<script type="text/javascript" src="inc/jquery.easydrag.handler.beta2.js"></script>
		<script type="text/javascript" src="inc/PageBar.js"></script>
	    <script type="text/javascript" src="inc/OrderAdd.js"></script>
	    
	    <link type="text/css" rel="stylesheet" href="style/multi_popup.css" />
		<script type="text/javascript" src="inc/ui.datepicker.cn.js"></script>
		<link type="text/css" rel="stylesheet" href="inc/ui.datepicker.css" />
        <script type="text/javascript" src="inc/jquery.livequery.js"></script>
	    <script type="text/javascript" src="inc/jquery.form.js"></script>
		<script src="<%=webSite %>get_all_regions.aspx?nocopyright=1" type="text/javascript"></script>
        <%--<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/jquery.jqzoom.min.js" type="text/javascript"></script>--%>
	    <script type="text/javascript" src="inc/Regions.js"></script>
        <script type="text/javascript">
	        var ShopFolder = '/<%=ShopFolder %>';
			var memberAdvance = 0;
			var couponsCode = '';
//			var shipFreeType = <%=shipfree.FreeType %>;//免运费方式
//			var leastMoney = <%=shipfree.LeastMoney %>;//FreeType为1时用到此变量
			var shipFreeType = 0;//免运费方式
			var leastMoney = 9999999;//FreeType为1时用到此变量
			var taxRateGeneral = <%=config.TaxRate.Split('|')[0] %>;//普通发票
			var taxRateVAT = <%=config.TaxRate.Split('|')[1] %>;//增值税发票
			var cartID="<%= cartID %>";
	    </script>
	    <style type="text/css">
	        .c1{width:5%;}
	        .c2{width:35%;}
	        .c3{width:15%;}
	        .c4{width:15%;}
	        .c5{width:15%;}
	        .c6{width:15%;}
	    </style>
	</HEAD>
	<body>
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height="9px" width="8px" align="absmiddle" />手动添加订单</div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">

           <input type="hidden" value="1" id="PageNo" name="PageNo">
            <div class="frame">
			    <div id="step1" class="frame_title pmt_rule_title hand">第一步：请输入手机/电话号码</div>
			    <div id="step_1" class="frame_content pmt_rule_content">
			        <table cellspacing="0" cellpadding="0" class="">
						<tr>
							<th class="tl">请输入手机/电话号码：</th>
							<td class="tr">
								<asp:textbox id="txtQuery" Width="200px" runat="server" Text=""></asp:textbox><em class="xp-need">*</em>
                            </td>
                            <td class="center">
                            <input type="button" value=" 查  询" id="search_user" name="search_user">
                            </td>
                        </tr>
					</table>
					<div id=info>
                    </div>
			    </div>
			</div>
			
			<div class="frame">
			    <div id="step2" class="frame_title pmt_rule_title hand">第二步：选择商品</div>
			    <div id="step_2" class="frame_content pmt_rule_content ">
			        <table>
                        <tbody>
                        <tr align="left">
	                        <td width="70px">商品名称：</td>
	                        <td width="180px"><input type="text" value="" id="search_name" name="search_name"></td>
	                        <td style="text-align:right">商品ID：</td>
	                        <td width="600px"><input type="text" value="" id="productids" name="productids" size="50"> 可输入多个商品id，用半角逗号隔开。</td>
                            <td></td>
                        </tr>
                        <tr style="text-algin:left;height: 35px">
	                        <td width="70px">店内分类：</td>
	                        <td width="180px">
	                            <select name="subcat" id="subcat">
	                            <%=BindCategories() %>
                                </select>
                          </td>
                          <td style="text-align:right">品    牌：</td>
	                      <td width="600px">
	                            <select id="brand" name="brand">
                                    <%=BindBrand("0")%>
                                </select>
	                      </td>
                          <td style=text-align: right;">
	                            <input type="button" id="search_product" name="search_product" value=" 查询 ">
	                            <input type="hidden" value="0" id="is_search_product" name="is_search_product">
                          </td>
                    </tr>
                    </tbody>
                   </table>
                   <div id="productlist"></div>
			    </div>
			</div>
			<div class="frame">
			    <div id="step3" class="frame_title pmt_rule_title hand">第三步：录入订单基本信息</div>
			    <div id="step_3" class="frame_content pmt_rule_content ">
			        <div class="frame">
	                <div class="frame_title">填写收货人地址</div>
	                <div class="frame_content">
	                    <table class="ptable" cellspacing="0" cellpadding="0">
	                        <tr>
	                            <th class="tl">选择收货地址：</th>
	                            <td class="tr">
                                    <input type="radio" id="shipAddr_0" name="shipAddr" value="0" /><label>新增收货地址</label>
	                            </td>
	                        </tr>
	                    </table>
	                    <br />
	                    <table class="ptable" cellspacing="0" cellpadding="0">
                            <tr>
                                <th class="tl"><em>*</em>收货人姓名：</th>
                                <td class="tr"><asp:textbox id="txtRName" runat="server"></asp:textbox><span class="infotips">请填写您的有效证件上的真实姓名，以免延误您按时收到货物</span></td>
                            </tr>
                            <tr>
                                <th class="tl"><em>*</em>手机：</th>
                                <td class="tr"><asp:textbox id="txtRMobile" runat="server"></asp:textbox> 或 联系电话：<asp:textbox id="txtRPhone" runat="server"></asp:textbox></td>
                            </tr>
                            <tr>
                                <th class="tl"><em>*</em>地区：</th>
                                <td class="tr">
                                    <select id="ddlTopAreas" name="ddlTopAreas"><%=GetSubArea(0)%></select>
                                </td>
                            </tr>
                            <tr>
                                <th class="tl"><em>*</em>地址：</th>
                                <td class="tr"><span id="choosed_regions"></span>
                                <asp:textbox id="txtRAddress" runat="server" Columns="20"></asp:textbox>
                                <span class="infotips">格式：街道-小区-门牌号数-楼层-房间</span>
                                </td>
                            </tr>
                            <tr>
                                <th class="tl">邮编：</th>
                                <td class="tr"><asp:textbox id="txtRPostalcode" runat="server"></asp:textbox></td>
                            </tr>
                            <tr>
                                <th class="tl">电子邮箱：</th>
                                <td class="tr"><asp:textbox id="txtREmail" runat="server"></asp:textbox></td>
                            </tr>
                            <tr class="recsave" id="saveaddr">
                                <th class="tl"><em>*</em>是否保存：</th>
                                <td class="tr"><input id="isSaveAddr" name="isSaveAddr" type="checkbox" value="1" checked="checked" /><span class="infotips">勾选，则保存本次收货地址</span></td>
                            </tr>
                            <tr>
                                <th class="tl"></th>
                                <td class="tr"><input type="hidden" id="cartid" name="cartid" value=<%=cartID%> /><input type="hidden" id="memberid" name="memberid" value="-1" /></td>
                            </tr>
                        </table>
	                </div>
	                </div>
	                
	                <div class="frame">
	                    <div class="frame_title">选择支付方式</div>
	                    <div class="frame_content">
	                        <table class="ptable" cellspacing="0" cellpadding="0">
                            <asp:Repeater ID="rptpayment" runat="server">
                            <ItemTemplate>
                                <tr class='paytype_<%#DataBinder.Eval(Container.DataItem, "PayTypeID")%>' style='<%#((int)DataBinder.Eval(Container.DataItem, "PayTypeID") == 5 || (int)DataBinder.Eval(Container.DataItem, "PayTypeID")==6) ? "display:none" : ""%>'>
                                    <th class="tl"><input type="radio" id='rbPayType_<%# Container.ItemIndex %>' name="rbPayType" value='<%#DataBinder.Eval(Container.DataItem, "PayTypeID")%>' /><label for="rbPayType_<%# Container.ItemIndex %>"><%#DataBinder.Eval(Container.DataItem, "PayTypeName")%></label></th>
                                    <td class="tr"><%#DataBinder.Eval(Container.DataItem, "Remark")%>&nbsp;</td>
                                </tr>
                            </ItemTemplate></asp:Repeater>
                                <tr>
                                    <th class="tl"></th>
                                    <td class="tr"></td>
                                </tr>
	                        </table>
	                        <br/>
	                        <table class="ptable" cellspacing="0" cellpadding="0" id="ztdContainer" style="display:none;">
	                            <tbody>
	                            <tr><td colspan="2">选择自提点</td></tr>
	                            <tr id="tmp_ztd" style="display:none;">
                                    <th class="tl ztdname">自提点名称</th>
                                    <td class="tr ztddetail"><div class="ztdAddr">地址</div><div class="ztdRemark">描述</div></td>
                                </tr>
                                </tbody>
	                        </table>
	                    </div>
	                </div>
	                
	                <div class="frame shipContainer">
	                    <div class="frame_title">选择配送方式</div>
	                    <div class="frame_content">
	                        <table class="ptable" cellspacing="0" cellpadding="0" id="shipContainer">
	                            <tbody>
	                                <tr id="tmp_ship" style="display:none;">
                                        <th class="tl"><span class="shipname">配送方式名称</span>(<%=GetCurrencySign()%><span class="shipprice"></span>)</th>
                                        <td class="tr"><span class="shipdetail"></span></td>
                                    </tr>
                                </tbody>
	                        </table>
	                    </div>
	                </div>
        	        
	                <div class="frame">
	                    <div class="frame_title">配送时间</div>
	                    <div class="frame_content">
	                        <table class="ptable" cellspacing="0" cellpadding="0">
	                            <tbody>
                                    <tr>
                                        <th class="tl">送货日期：</th>
                                        <td class="tr">
                                            <select class="inputstyle" id="ddlDate" name="ddlDate"><option selected="selected" value="任意日期">任意日期</option><option value="仅工作日">仅工作日</option><option value="仅休息日">仅休息日</option><option value="指定日期">指定日期</option></select>
                                            <div id="specal_day" style="display:none;">
                                            <asp:textbox id="txt_Date" runat="server" ForeColor="ControlDark"></asp:textbox>
                                            <span class="infotips">此默认日期及之后的时间可作为有效的送货时间</span>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th class="tl">时间：</th>
                                        <td class="tr">
                                            <select class="inputstyle" id="ddlShippTime" name="ddlShippTime"><option value="任意时间段">任意时间段</option><option  value="上午">上午</option><option  value="下午">下午</option ><option value="晚上">晚上</option></select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th class="tl">订单附言：</th>
                                        <td class="tr"><asp:textbox id="txtRemark" runat="server" Width="400" Height="40px" TextMode="MultiLine"></asp:textbox></td>
                                    </tr>
                                </tbody>
	                        </table>
	                    </div>
	                </div>
        	        
	                <div class="frame">
	                    <div class="frame_title"><div class="itemtitle"><asp:CheckBox ID="chkInvoice" runat="server" Text="开具发票" /></div></div>
	                    <div class="frame_content">
	                        <table class="ptable" cellspacing="0" cellpadding="0" id="invoice" style="display:none;">
	                            <tbody>
                                    <tr>
                                        <th class="tl">发票类型：</th>
                                        <td class="tr">
                                            <asp:RadioButton ID="rbtnInvoiceTypeGeneral" GroupName="InvoiceType" runat="server" Text="普通发票" Checked="true"></asp:RadioButton>
                                            <asp:RadioButton ID="rbtnInvoiceTypeVAT" GroupName="InvoiceType" runat="server" Text="增值税发票"></asp:RadioButton>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th class="tl">发票抬头：</th>
                                        <td class="tr">
                                            <asp:RadioButton ID="rbtnInvoiceHeadPerson" GroupName="InvoiceHead" runat="server" Text="个人" Checked="true"></asp:RadioButton>
                                            <asp:RadioButton ID="rbtnInvoiceHeadCompany" GroupName="InvoiceHead" runat="server" Text="单位"></asp:RadioButton>
                                            <asp:TextBox ID="txtCompanyName" runat="server" Columns="45" style="display:none;"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th class="tl">发票内容：</th>
                                        <td class="tr">
                                            <asp:RadioButton ID="rbtnInvoiceContentDetails" GroupName="InvoiceContent" runat="server" Text="明细" Checked="true"></asp:RadioButton>
                                            <asp:RadioButton ID="rbtnInvoiceContentOther" GroupName="InvoiceContent" runat="server" Text="其它"></asp:RadioButton><br />
                                            <asp:TextBox ID="txtInvoiceContent" TextMode="MultiLine" runat="server" Height="60px" Columns="50" style="padding:5px;display:none;"></asp:TextBox>
                                        </td>
                                    </tr>
                                </tbody>
	                        </table>
                        </div>
	                </div>
        	        
	                <div class="frame" style="display:none;">
	                    <div class="frame_title">使用优惠券</div>
	                    <div class="frame_content">
	                    </div>
	                </div>    
        	        
	                <div class="frame" id="frmAdvance" style="display:none;">
	                    <div class="frame_title">使用预付款</div>
	                    <div class="frame_content">
	                        <table class="ptable" cellspacing="0" cellpadding="0">
	                            <tr>
	                                <th class="tl"><input type="checkbox" id="cbAdvPay" name="cbAdvPay" value="1" /><label>使用预付款</label></th>
	                                <td class="tr">预付款余额:<label id="advMoney"></label></td>
	                            </tr>
	                        </table>
	                    </div>
	                </div>
	                
	                <div class="frame">
	                    <div class="frame_title">确认订单信息,提交生成订单.</div>
	                    <div class="frame_content">
        	                <div id="CartInfo"></div>
	                        <table class="ptable" cellspacing="0" cellpadding="0">
						        <tr>
							        <td class="tr">	<asp:button id="btnSubmit" runat="server" Text="提交订单" CssClass="inputbtn"></asp:button></td>
						        </tr>
	                        </table>
	                    </div>
	                </div>
			    </div>
			</div>
		</form>
		</div>
		</div>
		</div>
	</body>
</HTML>