<%@ page language="C#" autoeventwireup="true" inherits="Shop_Auction_ShopBuy, HoWaveVGO" title="购买订单" viewstateencryptionmode="Never" enableviewstatemac="false" enableeventvalidation="false" %>
<html>
<body>

<form id="aspnetForm" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"  EnablePartialRendering="true"/>
<script type="text/javascript" src="../Js/Howave_ShopBuyProduct.js"></script>
<div id="TextContent" class="TextContent" style="left: 0px; top: 0px"> 
   <div id="step">
      <table align="center">
         <tr>
            <td><img src="../Images/buystep1.gif" /></td>
         </tr>
      </table>
   </div>
   <div id="trade" class="trade">
     <div class="HackBox"></div>
     <div id="title1" class="tradeTitle"><span>交易明细及交易条件</span></div>
        <table align="center" width="760px">
          <tr>
             <td width="150px" rowspan="6" valign="top">
               <asp:Image ID="ProductImage" runat="server" /></td>
             <td>商品名称：<asp:HyperLink ID="ProductName" runat="server" Target="_blank" /></td>
          </tr> 
          <tr>
             <td>当前价格：<asp:Literal ID="ProductPrice" runat="server" /></td>
          </tr> 
          <tr>
             <td>所 在 地：<asp:Literal ID="ProductPlace" runat="server" /></td>
          </tr> 
          <tr>
             <td>
                <asp:Panel ID="TeamBuyPanel" runat="server" Visible="false">
                   <div style="float:left">团购选择：</div>
                    <asp:DropDownlist ID="otherChoice" runat="server" >
                        <asp:ListItem Text="非团购最低价不可" Value="0"  Selected="True"/>
                        <asp:ListItem Text="选择你愿意乘坐的巴士" Value="1" />                   
                    </asp:DropDownlist>
                    <div style="float:left">
                       <asp:CheckBoxList ID="otherBus" runat="server"  RepeatDirection="Vertical"  style="display:none;"   RepeatLayout="Flow"/>
                    </div>
                </asp:Panel>
             </td>
          </tr>        
          <tr>
              <td> <asp:Literal ID="ShopGuide1" runat="server" /></td>
          </tr>  
        </table>       
   </div>
   <div id="configmbuy" class="trade">
       <div class="HackBox"></div>
       <div id="title2" class="tradeTitle"><span>确认购买数量</span></div>
       <table align="center" width="760">
         <tr>
           <td width="150" valign="middle">
              </td>
           <td valign="middle">
              <table>
                <tr>
                   <td width="100px">购买数量：</td>
                   <td>
                      <asp:TextBox ID="Amount" runat="server" Width="50px" Text="1"/>
                       （安全库存<asp:Label ID="CanBuy" runat="server" />件）
                         <asp:RequiredFieldValidator ID="RequiredFieldValidator5" ControlToValidate="Amount"
                           runat="server" ErrorMessage="请输入件数"/>
                            <asp:RangeValidator ID="rav_2" runat="server" ErrorMessage="输入数量必须为整数" Type="Integer" ControlToValidate="Amount" MaximumValue="99999" MinimumValue="1" Display="Dynamic"/></td>
                </tr>
               <asp:Panel ID="ShowAuction" runat="server" Visible="false" >
                  <tr>
                     <td>出价金额：</td>
                     <td><asp:TextBox ID="AuctionEndPrice" runat="server" Width="50px"  CausesValidation="True" />元&nbsp;
                      （请输入您的出价，至少<asp:Literal ID="AuctionCurrentPrice" runat="server" />元）
                         <asp:RequiredFieldValidator ID="RequiredFieldValidator6" ControlToValidate="AuctionEndPrice"
                           runat="server" ErrorMessage="请输入出价"/><br />
                           如果您输入的金额高于<asp:Literal ID="AuctionCurrentPrice2" runat="server" />元，则系统会启动代理出价功能。
                           一旦有人出价，系统会帮您逐渐增加出价金额，直到您输入的金额为止。</td>
                 </tr>                
               </asp:Panel> 
               <tr>
                   <td valign="middle">运费负担：</td>
                   <td>
                     <asp:Literal ID="DeliverCharegPayType" runat="server" />
                   </td>
                </tr>        
                               
                <tr>
                   <td>验证码：</td>
                   <td>
                      <asp:TextBox ID="CheckCode" runat="server" Width="50px" />&nbsp;
                      <div id="ImgCheckCode" style="display:inline;"></div>&nbsp;
                      <a id="hlRefreshCheckcode" class="ColorMetalBlue" href="javascript:refreshCode();">看不到图片？点击这里。</a>
                      <script type="text/javascript"> refreshCode();</script>
                   </td>
                </tr>   
              </table>
               
           </td>  
         </tr> 
       </table>         
    </div>
   
    <div id="confirDeliver" class="trade">
       <div  class="HackBox"></div>
       <div  class="tradeTitle"><span>确认配送方式</span></div>
         <table align="center" width="760px" border="0" class="DeliverListStyle">
            <tr>
               <th>名称</th>
               <th>描述</th>
               <th>费用</th>
           </tr>
           <tr>
              <td colspan="3" width="100%" >
                <asp:RadioButtonList ID="RadioButtonList_TradeType"  runat="server" RepeatDirection="Vertical" Width="100%"  CellPadding="0" CellSpacing="0" />
              </td>
           </tr>
         </table>  
    </div>
           
    <div id="configmpay" class="trade">
       <div class="HackBox"></div>
       <div class="tradeTitle"><span>确认支付方式</span></div>   
            <table align="center" width="760px" border="0" class="DeliverListStyle" >
            <tr>
               <th width="18%">名称</th>
               <th width="58%">描述</th>
               <th width="22%">折扣</th>
           </tr>
           <tr>
              <td colspan="3" width="100%" >
                 <asp:RadioButtonList ID="OnlinePayTypeSelect"  runat="server" RepeatDirection="Vertical" Width="100%"  CellPadding="0" CellSpacing="0" />
              </td>
           </tr>
         </table> 
    </div>
    <div id="ContactAddress" class="trade">
       <div class="HackBox"></div>
       <div class="tradeTitle"><span>确认收货地址</span></div>
       <div style="width:758px; padding-top:2px; border:solid 1px #F1F1F1;">
          <asp:Panel ID="user_address" runat="server">
              <table style="width:100%;">
                 <tr>
                     <th width="150px">选择收货地址：</th>
                     <td><asp:ImageButton ID="show_new_address_btn" runat="server" ImageUrl="../Images/new_address.gif" OnClick="show_new_address_btn_Click" CausesValidation="False" /></td>
                 </tr>
                 <tr>
                     <th>收货地址：</th>
                     <td><asp:RadioButtonList ID="my_receive_address" runat="server" /></td>
                 </tr>
              </table>            
          </asp:Panel>
     
              <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                 <ContentTemplate>
                    <asp:Panel id="show_new_address" runat="server" Visible="false">
                        <table style="width:100%;">
                            <tr>
                                <th width="150px">*收货人姓名：</th>
                                <td><asp:TextBox id="ContacterName" runat="server" MaxLength="50"/>必须为中文<asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ErrorMessage="请填写收货人姓名" ControlToValidate="ContacterName"/>
                           
                                </td>
                            </tr>
                             <tr>
                                <th>*联系电话：</th>
                                <td>手机：<asp:TextBox id="mobilePhone" runat="server" MaxLength="11"/><br />
                                    固话：<asp:TextBox id="homePhone" runat="server" Width="100px" MaxLength="20"/>(区号-电话号码-分机号)若没分机号则留空</td>
                            </tr>
                             <tr>
                                <th>*详细收货地址：</th>
                                <td><asp:TextBox id="Address" runat="server" Width="200px" MaxLength="50"/>
                                    <asp:RequiredFieldValidator id="RequiredFieldValidator4" runat="server" ErrorMessage="请填写送货地址" ControlToValidate="Address"/>
                                </td>
                            </tr>
                             <tr>
                                <th>Email地址：</th>
                                <td><asp:TextBox id="Email" runat="server" Width="200px" MaxLength="50"/>
                                    <asp:RegularExpressionValidator id="RegularExpressionValidator2" runat="server"  ErrorMessage="Email地址格式不正确" ControlToValidate="Email" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"/>
                                </td>
                            </tr>
                             <tr>
                                <th>*邮编：</th>
                                <td><asp:TextBox id="zipCode" runat="server" MaxLength="6"/>
                                   <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="邮政编码不能为空" ControlToValidate="zipCode"/>
                                   <asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ErrorMessage="邮政编码格式不对" ControlToValidate="zipCode" ValidationExpression="\d{6}"/>
                                </td>
                            </tr>
                             <tr>
                                <th>是否保存地址：</th>
                                <td><asp:CheckBox id="SaveAddress" runat="server"/>是</td>
                            </tr>
                           
                        </table>
                     </asp:Panel> 
                 </ContentTemplate>
                 <Triggers>
                     <asp:AsyncPostBackTrigger ControlID="show_new_address_btn" EventName="Click"></asp:AsyncPostBackTrigger>
                 </Triggers>
              </asp:UpdatePanel>
      
          <asp:PlaceHolder ID="Product_Need_Invoice" runat="server" Visible="false">
              <table style="width:100%;">
                 <tr>
                    <th width="150px">发票信息：</th>
                    <td><asp:TextBox ID="Invoice_Content" runat="server" Text="发票抬头：商品名称： 发票金额： 元" TextMode="MultiLine" Width="250px" Height="60px"/><asp:CheckBox ID="Invoice_Need" runat="server"  Text="是否需要发票"/></td>
                 </tr>
              </table>                
          </asp:PlaceHolder>
         
             <table style="width:100%;">
                 <tr >
                    <th width="150px">备注：</th>
                    <td><asp:TextBox ID="Remark" runat="server"  TextMode="MultiLine" Height="70" Width="250"/></td>
                 </tr>   
             </table>
        </div> 
    </div>
    <div class="trade">
        <div class="HackBox"></div>
        <div class="tradeTitle"><span>交易服务条款：</span></div> 
        <div style="width:95%; font-size:12px; padding-top:1px;">
            <asp:TextBox ID="TradeProtocal" runat="server" TextMode="MultiLine" Width="754px" Height="101px" Text=" 注意：如果你选择的是一口价格购买方式，则支付的是订单总额，如果是竟拍，则不需付款先，如果是团购则支付的是团购定金。如果你选择的是商城货币支付且手续费是买方支付的话,订单总额为=指定价格＊折扣＊数量（１＋税率）＋运费）＊付款方式折扣率*(1+钉单手续费百分比).如果你选择支付宝支付提交的商品价格是平均价格，公式为：平均价格*数量=（指定价格＊折扣＊数量（１＋税率）＋运费）＊付款方式折扣率＝订单总金额，开始时候销售价格=指定价格，卖家可以在会员中心那修改指定价，如果不需要发票，税率为O，无论买卖家付运费，商品折扣率为多少，支付宝那都显示为0，因为在这里统计好了平均价了。" />
        </div>
    </div>
    <div class="trade" style="padding-left:4px; text-align:left;">
        <asp:Label ID="err_tips"  runat="server"  Width="733px"/>
    </div>
    <div id="submitButton" style="clear:both; text-align:center; margin-top:10px;">
        <asp:ImageButton ImageUrl="../Images/ConfirmBuyButton1.gif" runat="server" ID="LaterBuy" CommandName="later_pay" OnCommand="ImageButton1_Click"/>
        <asp:ImageButton ImageUrl="../Images/ConfirmBuyButton2.gif" runat="server" ID="ImageButton1" CommandName="now_pay"  OnCommand="ImageButton1_Click"/>
    </div>
 </div>  

<script type="text/javascript">
function SelectBus(id,choice)
{
  var _teamNums=<asp:literal id="TeamNumLiteral" runat="server" Text="0"/>;  
  var _busID="otherBus_";
  if(document.getElementById(id).checked)
  {
        for(var j=choice+1;j<_teamNums;j++)
        {
           document.getElementById(_busID+j).checked=true; 
           document.getElementById(_busID+j).disabled=true;
        } 
        
  }
  else
  {
        for(var j=choice+1;j<_teamNums;j++)
        {
           document.getElementById(_busID+j).checked=false; 
           document.getElementById(_busID+j).disabled=false;
        } 
       
  }
}
  
</script> 

    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetProductByProductID" TypeName="Shop_Product">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="ProductID" QueryStringField="ProductID"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>    
     <asp:HiddenField ID="HiddenField1" runat="server" />
    <asp:HiddenField ID="h_product_id" runat="server" />
    <asp:HiddenField ID="h_shop_id" runat="server" />
    <asp:HiddenField ID="h_saler_id" runat="server" />
    <asp:HiddenField ID="h_whopay_delivercharge" runat="server" />
    <asp:HiddenField ID="h_product_type" runat="server" />
    <asp:HiddenField ID="h_canbuy" runat="server" />
    <asp:HiddenField ID="h_product_name" runat="server" />
    <asp:HiddenField ID="h_product_price" runat="server" />
    <asp:HiddenField ID="h_delivertype" runat="server" />
    <asp:HiddenField ID="h_auctionAddPrice" runat="server" />
    <asp:HiddenField ID="h_deposit" runat="server" />  
    <asp:HiddenField ID="H_TeamType" runat="server" Value="-1" />
    <asp:HiddenField ID="h_salerName" runat="server" />
    <asp:HiddenField ID="h_deliverPayType" runat="server" />
    <asp:HiddenField ID="h_payRate" runat="server"  Value="0"/>
    <asp:HiddenField ID="h_productUnit" runat="server"  Value="0"/>
    <asp:HiddenField ID="HiddenTaxRate" runat="server"  Value="0"/>
 </form>   
</body>
</html>



