<%@ Page Title="" Language="C#" MasterPageFile="~/SignBox/Site1.Master" AutoEventWireup="true" CodeBehind="DeliveryServiceExpress.aspx.cs" Inherits="GxHub.Wms.Abroad.Web.SignBox.DeliveryServiceExpress" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>
        <%=GetText("第三方快递") %>
    </title>
     <script language="javascript" src="../lodop/LodopFuncs.js"></script>
    <object id="LODOP" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0"
        height="0">
        <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0" pluginspage="../lodop/install_lodop.exe"></embed>
    </object>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <yee:PageTitle ID="pgTitle" runat="server"  ></yee:PageTitle> 
    <yee:MessageBox runat="server" ID="msg">
    </yee:MessageBox>

    <!--  查询及搜索物流信息 --> 
    <div class="query">
        <table cellpadding="0" cellspacing="0" border="0">
            <tr> 
                <td class="queryLeft">
                    <%=GetText("流水号") %>：
                </td>
                <td class="queryRigth">
                    <asp:TextBox ID="txtSerialNo" runat="server"></asp:TextBox> 
                </td>  
                 <td class="queryLeft">
                  <%=GetText("客户代号") %>：
                 </td>
                 <td class="queryRigth">
                       <asp:TextBox ID="txtCustomerCode" runat="server"></asp:TextBox> 
                 </td> 
                 <td class="queryLeft">
                  <%=GetText("订单号") %>：
                 </td>
                 <td class="queryRigth">
                       <asp:TextBox ID="txtOrderNo" runat="server"></asp:TextBox> 
                 </td>
                 <td class="queryLeft">
                  <%=GetText("类型") %>：
                 </td>
                 <td class="queryRigth">
                       <asp:RadioButtonList ID="rblTypeId" runat="server"  RepeatDirection="Horizontal">
                           <asp:ListItem Selected="True" Value="1" Text="箱子" ></asp:ListItem>
                           <asp:ListItem Value="2" Text="出货通知单" ></asp:ListItem>
                       </asp:RadioButtonList>
                 </td> 
                 <td class="queryLeft">
                    <%=GetText("仓储中心") %>：
                </td>
                <td class="queryRigth">
                    <yee:UserWarehousesDropDownList ID="ddlWarehouse" runat="server" WarehouseType="海外仓储">
                    </yee:UserWarehousesDropDownList>
                </td>
                 <td  class="queryLeft">
                     <yee:Button ID="btnQuery" runat="server" CssClass="button" OnClick="btnQuery_Click"  />
                 
                 </td> 
             </tr>
        </table>
    </div>
    <div>
            <asp:Repeater ID="rptClaim" runat="server" OnItemDataBound="rptClaim_ItemDataBound">
                <HeaderTemplate>
                    <table cellpadding="0" class="table" cellspacing="0" border="0" id="table1">
                        <tr>
                           
                            <td class="tbheader" align="center" width="100px">
                                <%=GetText("流水号") %>
                            </td>
                            <td class="tbheader" align="center" width="100px">
                                <%=GetText("客户代号") %>
                            </td>
                            <td class="tbheader" align="center" width="100px">
                                <%=GetText("订单号") %>
                            </td>
                            <td class="tbheader" align="center" width="100px">
                                <%=GetText("国际运费") %>
                            </td>
                            <td class="tbheader" align="center" width="100px">
                                <%=GetText("本地运费") %>
                            </td>
                            <td class="tbheader" align="center" width="100px">
                                <%=GetText("地址") %>
                            </td>
                             <td class="tbheader">
                            </td>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="tbrow">
                        
                        <td class="tbpost">
                            <%# Eval("SerialNo")%>
                            <asp:HiddenField ID="hfBoxId" runat="server" Value='<%#Eval("BoxId") %>' />
                             <asp:HiddenField ID="hfNoticeId" runat="server" Value='<%#Eval("NoticeId") %>' />
                        </td>
                        <td class="tbpost">
                            <%#Eval("CustomerCode") %>
                        </td>
                        <td class="tbpost">
                            <%# Eval("OrderNo")%>
                        </td>
                        <td class="tbpost">
                            <%# Eval("InterFreight")%>
                        </td>
                         <td class="tbpost">
                            <%# Eval("AbroadFreight")%>
                        </td>
                        <td class="tbpost">
                            <%# Eval("Address")%>
                        </td>
                        <td width="20px" class="tbpost">
                            <asp:LinkButton ID="lbnAddList" runat="server"  CommandArgument='<%#Eval("SerialNo") %>'
                                CommandName="AddList" OnClick="lbnAddList_Click"></asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
                <AlternatingItemTemplate>
                    <tr class="tbrowalter">
                       
                        <td class="tbpost">
                            <%# Eval("SerialNo")%>
                            <asp:HiddenField ID="hfBoxId" runat="server" Value='<%#Eval("BoxId") %>' />
                             <asp:HiddenField ID="hfNoticeId" runat="server" Value='<%#Eval("NoticeId") %>' />
                        </td>
                        <td class="tbpost">
                            <%#Eval("CustomerCode") %>
                        </td>
                        <td class="tbpost">
                            <%# Eval("OrderNo")%>
                        </td>
                        <td class="tbpost">
                            <%# Eval("InterFreight")%>
                        </td>
                         <td class="tbpost">
                            <%# Eval("AbroadFreight")%>
                        </td>
                         <td class="tbpost">
                            <%# Eval("Address")%>
                        </td>
                        <td width="20px" class="tbpost">
                            <asp:LinkButton ID="lbnAddList" runat="server" CommandArgument='<%#Eval("SerialNo") %>'
                                CommandName="AddList" OnClick="lbnAddList_Click"></asp:LinkButton>
                        </td>
                    </tr>
                </AlternatingItemTemplate>
                <FooterTemplate>
                </FooterTemplate>
            </asp:Repeater>
            <yee:Pager ID="Pager1" runat="server" PageSize="5" PagerType="1" OnPageIndex_Changed="Pager1_PageIndex_Changed"
                PageIndex="0" />
        </div>
          <div class="subheader">
            <div class="title">
                <%=GetText("填写物流信息") %>   
            </div>
            <div style="clear: both">
            </div>
        </div>
         <!-- 这一块可直接一起发往的列表 -->
         <asp:Repeater ID="rptBoxList" runat="server" >
            <HeaderTemplate>
                <table cellpadding="0" class="table" cellspacing="0" border="0" id="table2">
                    <tr>
                       <td class="tbheader" align="center" width="100px">
                                <%=GetText("流水号") %>
                            </td>
                            <td class="tbheader" align="center" width="100">
                                <%=GetText("客户代号") %>
                            </td>
                            <td class="tbheader" align="center" width="100px">
                                <%=GetText("订单号") %>
                            </td>
                            <td class="tbheader" align="center" width="100px">
                                <%=GetText("国际运费") %>
                            </td>
                            <td class="tbheader" align="center" width="100px">
                                <%=GetText("本地运费") %>
                            </td> 
                            <td class="tbheader" align="center" width="400px">
                                <%=GetText("地址") %>
                            </td> 
                            <td class="tbheader" align="center">
                                <%=GetText("移除") %>
                            </td>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="tbrow">
                    
                        <td class="tbpost">
                            <%# Eval("SerialNo")%>
                            <asp:HiddenField ID="hfBoxId" runat="server" Value='<%#Eval("BoxId") %>' />
                             <asp:HiddenField ID="hfNoticeId" runat="server" Value='<%#Eval("NoticeId") %>' />
                        </td>
                        <td class="tbpost">
                            <%#Eval("CustomerCode") %>
                        </td>
                        <td class="tbpost">
                            <%# Eval("OrderNo")%>
                        </td>
                        <td class="tbpost">
                            <%# Eval("InterFreight")%>
                        </td>
                         <td class="tbpost">
                            <%# Eval("AbroadFreight")%>
                        </td>
                         <td class="tbpost">
                                <%# Eval("Address")%>
                         </td>
                      <td class="tbpost">
                        <asp:LinkButton ID="lbnRemove" runat="server"  OnClick="lbnRemove_click"
                            CommandArgument='<%#Eval("SerialNo") %>'><%=GetText("移除") %></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr class="tbrowalter">
                    <td class="tbpost">
                            <%# Eval("SerialNo")%>
                            <asp:HiddenField ID="hfBoxId" runat="server" Value='<%#Eval("BoxId") %>' />
                             <asp:HiddenField ID="hfNoticeId" runat="server" Value='<%#Eval("NoticeId") %>' />
                        </td>
                        <td class="tbpost">
                            <%#Eval("CustomerCode") %>
                        </td>
                        <td class="tbpost">
                            <%# Eval("OrderNo")%>
                        </td>
                        <td class="tbpost">
                            <%# Eval("InterFreight")%>
                        </td>
                         <td class="tbpost">
                            <%# Eval("AbroadFreight")%>
                        </td>
                         <td class="tbpost">
                                <%# Eval("Address")%>
                         </td>
                      <td class="tbpost">
                        <asp:LinkButton ID="lbnRemove" runat="server"  OnClick="lbnRemove_click"
                            CommandArgument='<%#Eval("SerialNo") %>'><%=GetText("移除") %></asp:LinkButton>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:Repeater>

    <!-- 物流信息 -->
      <table cellpadding="0" cellspacing="0" class="table">
            <asp:HiddenField ID="hfCustomerCode" runat="server" />
            <tr>
                <td class="tbpostheader">
                    <%=GetText("客户代号") %>
                </td>
                <td class="tbpost">
                     <asp:Literal ID="litCustomerCode" runat="server" ></asp:Literal> <asp:Literal ID="litCustomerName" runat="server" ></asp:Literal>
                </td>
            </tr>
            <tr>
                <td class="tbpostheader">
                    <%=GetText("快递公司") %>
                </td>
                <td class="tbpost">
                    <asp:DropDownList ID="ddlCompany" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="tbpostheader">
                    <%=GetText("快递单号") %>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtExpressNo" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tbpostheader">
                    <%=GetText("收货人") %>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtReceiverName" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tbpostheader">
                    <%=GetText("地址") %>
                </td>
                <td class="tbpost">
                    <asp:DropDownList ID="ddlRegion" runat="server" OnSelectedIndexChanged="ddlRegion_SelectedIndexChanged"
                        AutoPostBack="true">
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlProvice" runat="server" OnSelectedIndexChanged="ddlProvice_SelectedIndexChanged"
                        AutoPostBack="true">
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlCity" runat="server" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged"
                        AutoPostBack="true">
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlDistrict" runat="server">
                    </asp:DropDownList>
                    <asp:TextBox ID="txtAddress" runat="server" Width="300px" ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tbpostheader">
                    <%=GetText("联系电话") %>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtMobile" runat="server"></asp:TextBox>
                </td>
            </tr>
            
            <tr>
                <td class="tbpostheader">
                    <%=GetText("邮编") %>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtPostalcode" runat="server"></asp:TextBox>
                </td>
            </tr> 
            <tr>
                <td class="tbpostheader">
                    <%=GetText("成本费用") %>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtFreight" runat="server" Text="0.00"></asp:TextBox><asp:CheckBox ID="cbPay" runat="server"  Text="到付" AutoPostBack="true" OnCheckedChanged="cbPay_CheckedChanged"/>（付给快递公司费用）
                </td>
            </tr>
           <tr id="disTr" runat="server">
                <td class="tbpostheader">
                    <%=GetText("收取客户运费") %>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litHasFreight" runat="server" ></asp:Literal>
                    <asp:TextBox ID="txtFrightAmount" runat="server" Text="0.00"></asp:TextBox>  
                </td>
            </tr>
           <tr>
               <td class="tbpostheader">
                   <%=GetText("币种") %>
                </td>
               <td class="tbpost">
                   <asp:DropDownList   ID="ddlCurrencyCode" runat="server" >
                    </asp:DropDownList> 
               </td>
           </tr>
            <tr>
                <td class="tbpostheader">
                    <%=GetText("备注") %>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tbfooter">
                </td>
                <td class="tbfooter">
                    <asp:Button ID="btSave" runat="server" CssClass="button" OnClick="btSave_Click"  />
                </td>
            </tr>
        </table>
   <script language="javascript" type="text/javascript">


       var LODOP; //声明为全局变量 
       function prn1_print(name,tel,address) {
          
           CreateOneFormPage(name, tel, address);
           LODOP.PRINT();
           //window.location.reload();
       };

       function CreateOneFormPage(name, tel, address) {

           LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));
           LODOP.PRINT_INITA("打印发货信息");
             
           LODOP.SET_PRINT_PAGESIZE(0, 700, 500, "A4");
           LODOP.ADD_PRINT_TEXT(59, 20, 79, 30, "Tel：");
           LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
           LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
           LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
           LODOP.ADD_PRINT_TEXT(103, 19, 100, 30, "Address：");
           LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
           LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
           LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
           LODOP.ADD_PRINT_TEXT(20, 20, 100, 29, "Receiver：");
           LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
           LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
           LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
           LODOP.ADD_PRINT_TEXT(19, 112, 146, 30, name);
           LODOP.SET_PRINT_STYLEA(0, "FontSize", 11);
           LODOP.ADD_PRINT_TEXT(59, 111, 143, 30, tel);
           LODOP.SET_PRINT_STYLEA(0, "FontSize", 11);
           LODOP.ADD_PRINT_TEXT(105, 112, 140, 71, address);
           LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);


       };

        </script>
</asp:Content>
