<%@ Page Title="" Language="C#" MasterPageFile="~/Package/package.Master"  AutoEventWireup="true" CodeBehind="InternationalPackageCreateAddress.aspx.cs" Inherits="GxHub.Wms.Abroad.Web.Package.InternationalPackageCreateAddress" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<title>
   客户收货地址新增界面
</title>

<script src="../Scripts/jquery-1.6.3.js"></script>
<script src="../Scripts/jqueryUI/ui/jquery-ui-1.8.24.custom.js"></script>

<script type="text/javascript">

    // 地图选择
    function ChoseMap() {
        var lat = "";
        var lng = "";
        $("#EditIframe").attr("src", "../map2.html");
        $("#iframeEdit").dialog({
            autoOpen: true,
            resizable: false,
            width: 700,
            height: 600,
            modal: true,
            title: "选中map",
            buttons: {
                "确认": function () {
                    choseSize();
                    $(this).dialog("close");
                },
                "取消": function () {
                    $(this).dialog("close");
                }
            },
        });
        return false;
    }

    function choseSize() {
        $("#hfLatSize").val($("#EditIframe").contents().find("#lat").text());
        $("#hfLngSize").val($("#EditIframe").contents().find("#lng").text());
        $("#hfCityName").val($("#EditIframe").contents().find("#cityname").text());
        $("#hfDistrictName").val($("#EditIframe").contents().find("#districtname").text());
        
        $("#<%= txtAddress.ClientID %>").text($("#EditIframe").contents().find("#address").text());
    };

    function PreviousPage() {
        //window.history.back();
        // 
        window.location.href = "InternationalPackageEnter.aspx?bigBagNo=" + $("#hfBigBagNo").val();
    };

</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <yee:PageTitle ID="ptTitle" runat="server">
        <ShortCuts>
            <a href="javascript:PreviousPage()" title="返回直发包裹明细界面页面">返回</a>
        </ShortCuts>
    </yee:PageTitle>
    <yee:MessageBox ID="msg" runat="server">
    </yee:MessageBox>
<div class="query"> 
 <table cellpadding="0" cellspacing="0" border="0" class="table">
    <tr>
          <td class="tbpostheader" style="width: 150px;">
              <%=GetText("地址所属客户代号KH") %>
          </td>
          <td class="tbpost">
              <asp:TextBox ID="txtCustomerCode" runat="server" ></asp:TextBox>( 请勿输入前缀KH)
          </td>
    </tr> 
    <tr>
          <td class="tbpostheader">
              <%=GetText("收货地址联系人") %>
          </td>
          <td class="tbpost">
              <asp:TextBox ID="txtContacts" runat="server" ></asp:TextBox>
          </td>
     </tr>
     <tr>
         <td class="tbpostheader">
            <%=GetText("收货地址联系方式") %>
         </td>
         <td class="tbpost">
             <asp:TextBox ID="txtContactsMobile" runat="server" ></asp:TextBox>
         </td>
     </tr>
     <tr>
         <td class="tbpostheader">
            <%=GetText("所在地区") %>
         </td>
         <td class="tbpost">
             <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" Width="150px" Height="80px" onfocus ="ChoseMap()"></asp:TextBox>
             <asp:Button ID="btnMap" runat="server" CssClass="button" OnClientClick="return ChoseMap();" text="定位选择" style = "display:none"/>
         </td>
     </tr>
     <tr>
         <td class="tbpostheader">
            <%=GetText("详细地址") %>
         </td>
         <td class="tbpost">
             <asp:TextBox ID="txtAddressDetail" runat="server" ></asp:TextBox>
         </td>
     </tr>
     <tr>
         <td class="tbfooter" width="100px"></td>
         <td class="tbfooter">
             <asp:Button ID="btSubmit" runat="server" CssClass="button" Text="提交" OnClick="btnSubmit_Click" />
         </td>
     </tr>
 </table>
</div>

<asp:HiddenField ID="hfLatSize" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="hfLngSize" runat="server" ClientIDMode="Static" />

<asp:HiddenField ID="hfCityName" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="hfDistrictName" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="hfBigBagNo" runat="server" ClientIDMode="Static" />

<div id="iframeEdit" class="iframeEdit">
    <iframe id="EditIframe" frameborder="0" class="EditIframe" style="width: 100%; min-height: 0px; height: 480px;"></iframe>
</div>
</asp:Content>