<%@ Page Title="" Language="C#" MasterPageFile="~/SignBox/Site1.Master" AutoEventWireup="true" CodeBehind="TransferAbroadBoxList.aspx.cs" Inherits="GxHub.Wms.Abroad.Web.SignBox.TransferAbroadBoxList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>
        调拨确认列表
    </title>
    <style type="text/css">
        .sml_input
        {
            width: 90px;
        }
    </style>
      <script type="text/javascript">
          //使用checkbox当做全选反选
          function check_all_not() {
              var check = document.getElementById("checkboxAll").checked;
              //alert(check);
              if (check == true) {
                  checkAll();
              }
              else {
                  checkReverse();
              }

          }


          //选择
          function checkAll() {
              $(".check ").each(function () {
                  $(this).attr("checked", true);
              });
          }
          //反选
          function checkReverse() {
              $(".check ").each(function () {
                  $(this).attr("checked", !($(this).attr("checked")));
              });
          }
          function checkRemove() {
              $(".check ").each(function () {
                  $(this).attr("checked", false);
              });
          }

          function collect_click() {


              if ($(".check:checked").length == 0) {
                  alert("请先选择数据行");
                  return false;
              }
              var boxId = "";

              $(".check:checked").each(function () {
                  boxId += $(this).val() + ",";
              });
              $("#iframeBox").dialog("open");
              $("#BoxIframe").attr("src", "../StockOut/CollectBox.aspx?boxId=" + boxId);
              return false;

          }

 
 

</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <yee:MessageBox ID="msg" runat="server" ></yee:MessageBox>
    <yee:PageTitle  ID="pgTitle" runat="server"  Title="调拨确认列表"></yee:PageTitle>
    <asp:HiddenField ID="hfFrom" runat="server" ClientIDMode="Static" />
    <div class="query">
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td>
                    <%=GetText("仓储中心") %>
                </td>
                <td>
                    <yee:UserWarehousesDropDownList ID="ddlWarehouse" runat="server" WarehouseType="海外仓储">
                    </yee:UserWarehousesDropDownList>
                </td>
               
                <td>
                    <%=GetText("状态") %>
                </td>
                <td>
                    <asp:RadioButtonList ID="rblStatu" runat="server" RepeatDirection="Horizontal"></asp:RadioButtonList>
                  
                </td>
                
                 <td>
                    <%=GetText("目标仓") %>
                </td>
                <td>
                    <yee:UserWarehousesDropDownList ID="ddlTargetWareId" runat="server" WarehouseType="海外分仓">
                    </yee:UserWarehousesDropDownList>
                </td>
                <td>
                    <yee:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" />
                </td>
            </tr> 
            <tr>
                 <td>
                    <%=GetText("创建时间") %>
                </td>
                <td colspan="2">
                    <yee:DatePicker ID="dpFromDate" runat="server"  CssClass="sml_input" IsRequired="false" />
                    - <yee:DatePicker ID="dpToDate" runat="server"  CssClass="sml_input" IsRequired="false" />
                </td>
            </tr>
        </table>
    </div>
    
   <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand" OnItemDataBound="rptList_ItemDataBound">
    <HeaderTemplate>
        <table cellpadding="0" cellspacing="0" border="0" class="table" id="table">
            <tr>
                <td class="tbheader" width="40px">
                    <input type="checkbox" id="checkboxAll" class="checkboxAll" onclick="check_all_not()" />
                </td>
                <td class="tbheader">
                    <%=GetText("流水号") %>
                </td>
                <td class="tbheader">
                    <%=GetText("目标仓") %>
                </td> 
                <td class="tbheader">
                    <%=GetText("状态") %>
                </td>
                <td class="tbheader">
                    <%=GetText("创建时间") %>
                </td>
                <td class="tbheader">
                    <%=GetText("创建人") %>
                </td> 
                <td class="tbheader">
                    <%=GetText("验收人") %>
                </td>
                <td class="tbheader">
                    <%=GetText("验收时间") %>
                </td>
                <td class="tbheader">
                    <%=GetText("操作") %>
                </td>
            </tr>
    </HeaderTemplate>
    <ItemTemplate>
        <tr class="tbrow">
            <td class="tbpost">
                <input type="checkbox" id="cbItem" runat="server" class="check" value='<%#Eval("UniqueId")%>' />
                <asp:Literal ID="litSort" runat="server" ></asp:Literal>
            </td>
             <td class="tbpost">
                <%# Eval("SerialNo")%>
            </td>
            <td class="tbpost">
                <%#Eval("warehouseName")%>
            </td>
           
            <td class="tbpost">
                <%#Eval("CnName") %>
            </td>
            <td class="tbpost">
                <%# Eval("CreatedOn")%>
            </td>
            <td class="tbpost">
                <%# Eval("CreatedByName")%>
            </td>
            <td class="tbpost">
                <%# Eval("CheckedByName")%>
            </td>
            <td class="tbpost">
                <%# Eval("CheckedOn")%>
            </td>
         
            <td class="tbpost">
                <asp:LinkButton ID="lbnDetail" runat="server" CommandArgument='<%#Eval("UniqueId")%>'
                    CommandName="Detail" ><%=GetText("详情") %></asp:LinkButton>
                
            </td>
        </tr>
    </ItemTemplate>
    <AlternatingItemTemplate>
        <tr class="tbrowalter">
               <td class="tbpost">
                <input type="checkbox" id="cbItem" runat="server" class="check" value='<%#Eval("UniqueId")%>' />
                <asp:Literal ID="litSort" runat="server" ></asp:Literal>
            </td>
             <td class="tbpost">
                <%# Eval("SerialNo")%>
            </td>
            <td class="tbpost">
                <%#Eval("warehouseName")%>
            </td>
           
            <td class="tbpost">
                <%#Eval("CnName") %>
            </td>
            <td class="tbpost">
                <%# Eval("CreatedOn")%>
            </td>
            <td class="tbpost">
                <%# Eval("CreatedByName")%>
            </td>
             <td class="tbpost">
                <%# Eval("CheckedByName")%>
            </td>
            <td class="tbpost">
                <%# Eval("CheckedOn")%>
            </td>
         
            <td class="tbpost">
                <asp:LinkButton ID="lbnDetail" runat="server" CommandArgument='<%#Eval("UniqueId")%>'
                    CommandName="Detail" ><%=GetText("详情") %></asp:LinkButton>
           
            </td>
        </tr>
    </AlternatingItemTemplate>
    <FooterTemplate>
        </table>
    </FooterTemplate>
</asp:Repeater>
  
    <yee:Pager ID="Pager1" runat="server" PageSize="20" PagerType="1" OnPageIndex_Changed="Pager1_PageIndex_Changed"
        PageIndex="0" />


    <div id="dis_express" runat="server">
          <table cellpadding="0" cellspacing="0" class="table">
            
          
              <tr>
                <td class="tbpostheader">
                    <%=GetText("目标仓") %>
                </td>
                <td class="tbpost">
                     <yee:UserWarehousesDropDownList ID="ddlTrwareId" runat="server" WarehouseType="海外分仓" OnSelectedIndexChanged="ddlTrwareId_SelectedIndexChanged" AutoPostBack="true">
                    </yee:UserWarehousesDropDownList>
                </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: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="txtTel" 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: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" Text="发往分仓"  OnClick="bnSave_Click"/>
                </td>
            </tr>
        </table>
    </div>
    
</asp:Content>
