登录德邦快递官网,即可同步账号,快速寄件和查件
扫码登录
验证码登录

二维码已失效

刷新重试
扫描成功

登录已取消

请使用 微信/ 支付宝扫码
+86
手机号错误 请输入手机号
验证码错误 请输入短信验证码
您输入的验证码有误
登录
注:未注册手机验证后自动登录为德邦用户
登录即表示您同意并遵守 《隐私政策》
请完成安全验证
换一张
温馨提示:未注册手机验证后自动登录为德邦用户




网点查询

智能识别

识别完成后请在城市选择框处确认
地图模式
列表模式
{{mapResultList}}
筛选结果
输入的地址: {{formData.searchmapAddress}}-{{formData.searchmapAddressDetail}}
按省筛选
热门城市
{{item.cityName}}
{{key}}
{{item.provinceName}}
全部
发货
送货
该地点暂无数据,请稍后再试!
    该地点暂无数据,请稍后再试!
      该地点暂无数据,请稍后再试!
      {{setCityListprovinceName}}的以下城市设有网点
      {{cityItem.cityName}}({{cityItem.count}})
      该地点暂无数据,请重新选择!
      {{setCountyListcountyName}}的以下城市设有网点
      {{countryItem.countyName}}({{countryItem.count}})
      该地点暂无数据,请重新选择!
      点击定位
      查询结果
      网点名称
      网点地址
      联系方式
      业务范围
      {{branch.name}}
      {{branch.address}}
      {{branch.contactway }}
      {{branch.businessType}}
      $(function () { try { sensors.track("PC_wdcx_pageview"); } catch (error) { console.log("error"); } var branchSearch = angular.module("branchSearch", ["app"]); branchSearch.factory("branchSearchService", [ "$q", "httpService", "$http", function ($q, httpService, $http) { return { searchBranch: searchBranch, searchBranchMap: searchBranchMap, stationSearch: stationSearch, fetchAddressRecog: fetchAddressRecog, }; function fetchAddressRecog(jsonbody) { var deferred = $q.defer(); var url = CustomUtils.getBusinessBaseUrl() + "/gwapi/onlineService/eco/online/addressAiResolutionApi/addressAiResolution"; httpService .httpPost(null, url, jsonbody) .then(function (data) { deferred.resolve(data); }) .then(null, function (error) { deferred.reject(error); }); return deferred.promise; } function searchBranch(jsonbody) { var deferred = $q.defer(); // var url = CustomUtils.getBusinessBaseUrl() + "/phonerest/branch/searchList"; // var url = CustomUtils.getBusinessBaseUrl() + "/gwapi/queryService/eco/query/branch/queryDeptNet"; var url = CustomUtils.getBusinessBaseUrl() + "/gwapi/queryService/eco/query/branch/searchList"; httpService .httpPost(null, url, jsonbody) .then(function (data) { deferred.resolve(data); }) .then(null, function (error) { deferred.reject(error); }); return deferred.promise; } function searchBranchMap(jsonbody) { var deferred = $q.defer(); var url = CustomUtils.getBusinessBaseUrl() + "/gwapi/queryService/eco/query/branch/queryDeptNet"; httpService .httpPost(null, url, jsonbody) .then(function (data) { deferred.resolve(data); }) .then(null, function (error) { deferred.reject(error); }); return deferred.promise; } function stationSearch(jsonbody) { var deferred = $q.defer(); var url = CustomUtils.getBusinessBaseUrl() + "/gwapi/queryService/eco/query/branch/stationSearch"; httpService .httpPost(null, url, jsonbody) .then(function (data) { deferred.resolve(data); }) .then(null, function (error) { deferred.reject(error); }); return deferred.promise; } }, ]); branchSearch.controller("branchSearchCtrl", [ "$scope", "$window", "$http", "httpService", "commonMethods", "branchSearchService", function ( $scope, $window, $http, httpService, commonMethods, branchSearchService ) { $scope.showRecogDialog = false; //查询类型1网点名2网点地址3网点业务范围 $scope.keywordType = "1"; // $scope.addressCheck=false; $scope.addressRecogText = ""; let dataLayer = []; $scope.selected_result = { provinceName: "", provinceCode: "", cityName: "", cityCode: "", countyName: "", countyCode: "", showName: "", }; function isEmpty(value) { if (value === null || value === undefined || value === "") { return true; } else { return false; } } $scope.showSearchResult = false; $scope.keyWords = ""; $scope.pageInfo = { totalNum: "", // 数据总数,用于生成页码总数 pageSize: 5, // 每页数据条数 currentPage: 1, // 当前页码 baseShow: 5, // 展示页码数,默认传5 totalPage: "", // 分页总数 watchParam: { currentPage: 1, flag: true, }, }; $scope.$watch( "pageInfo.watchParam", function (n, o) { if (n && $scope.showSearchResult) { $scope.searchBranch(); } }, true ); $scope.showAddressRecogAction = function (e) { e.stopPropagation(); console.log("显示智能识别", $scope.showRecogDialog); $scope.showRecogDialog = !$scope.showRecogDialog; console.log("显示智能识别", $scope.showRecogDialog); }; $scope.addressRecogClickAction = function (e) { e.stopPropagation(); }; $scope.addressRecogAction = function (e) { e.stopPropagation(); if ($scope.addressRecogText.length < 8) { $scope.popupInfo_marklist.text = "智能识别请输入至少8个字"; $("#marklistmsg").modal("show"); return; } commonMethods.pageLoading(true); branchSearchService .fetchAddressRecog({ address: $scope.addressRecogText }) .then(function (res) { commonMethods.pageLoading(false); if ("success" === res.status) { let proCityName = res.result.proCityName; let [province, city, county] = proCityName.split("-"); province = province ? province : ""; city = city ? city : ""; county = county ? county : ""; let town = res.result.town ? res.result.town : ""; let address = res.result.address ? res.result.address : ""; while ( (province.length !== 0 && address.indexOf(province) === 0) || (city.length !== 0 && address.indexOf(city) === 0) || (county.length !== 0 && address.indexOf(county) === 0) || (town.length !== 0 && address.indexOf(town) === 0) ) { if (city.length !== 0 && address.indexOf(city) === 0) { address = address.substring(city.length); } if (county.length !== 0 && address.indexOf(county) === 0) { address = address.substring(county.length); } if (town.length !== 0 && address.indexOf(town) === 0) { address = address.substring(town.length); } if ( province.length !== 0 && address.indexOf(province) === 0 ) { address = address.substring(province.length); } console.log(province, city, county, town, address); } if ($scope.tabIndex === 1) { $scope.formData.searchmapAddressDetail = town + address; $scope.mapaddressComponent.sender = { provinceName: province, provinceCode: "", cityName: city, cityCode: "", countyName: county, countyCode: "", showName: proCityName, }; $scope.formData.searchmapAddress = proCityName; $scope.formData.searchmapAddress = county ? county : city ? city : ""; $scope.showRecogDialog = false; $scope.addressRecogText = ""; setTimeout(function () { $("#mapsenderAddressID div input.dropdown-toggle").keyup(); }, 200); } else if ($scope.tabIndex === 2) { $scope.selected_result = { provinceName: province, provinceCode: "", cityName: city, cityCode: "", countyName: county, countyCode: "", showName: proCityName, }; // $scope.addressInput = proCityName $scope.addressInput = county ? county : city ? city : ""; $scope.showRecogDialog = false; $scope.addressRecogText = ""; setTimeout(function () { $("#senderAddressID div input.dropdown-toggle").keyup(); }, 200); } } else { $scope.popupInfo_marklist.text = "地址解析失败"; $("#marklistmsg").modal("show"); } }); }; $scope.searchBranchtag = function () { $scope.results = []; $scope.pageInfo.totalNum = 1; $scope.pageInfo.watchParam.flag = !$scope.pageInfo.watchParam.flag; $scope.showSearchResult = true; $scope.pageInfo.currentPage = 1; $scope.pageInfo.init(); dataLayer.push({ event: "ua event", eventCategory: "网点查询", eventAction: $scope.selected_result.provinceName + "-" + $scope.selected_result.cityName + "-" + $scope.selected_result.countyName, eventLabel: $scope.keywordType === "1" ? "1" : $scope.keywordType === "2" ? "2" : "3", }); }; $scope.searchBranch = function () { var _jsonbody = { cityCode: $scope.selected_result.cityCode, //城市编码 countyCode: $scope.selected_result.countyCode, //区县编码 keyword: $scope.keyWords, //关键字 searchType: $scope.keywordType, //查询类型1网点名2网点地址3网点业务范围 pageIndex: $scope.pageInfo.currentPage, pageSize: $scope.pageInfo.pageSize, }; console.log(_jsonbody); commonMethods.pageLoading(true); branchSearchService .searchBranch(_jsonbody) .then(function (data) { if (data.status == "success") { $scope.pageInfo.totalNum = data.result.totalRows; $scope.results = data.result.netResponses; for (var i in $scope.results) { if ($scope.results[i].name.indexOf("【") != -1) { $scope.results[i].name = $scope.results[i].name.substring(3); } $scope.results[i].businessArr = $scope.results[i].businessScope.split(" "); } } commonMethods.pageLoading(); }) .then(null, function (err) { commonMethods.pageLoading(); }); }; $scope.tabIndex = 1; $scope.chooseTab = function (bol) { $scope.tabIndex = bol; // if(bol==1){ // $("#map").addClass("tabbox_select"); // $("#text").removeClass("tabbox_select"); // }else{ // $("#map").removeClass("tabbox_select"); // $("#text").addClass("tabbox_select"); // } }; $scope.toOrder = function (name) { dataLayer.push({ event: "ua event", eventCategory: "网点查询", eventAction: name, eventLabel: "点击发货", }); var url = CustomUtils.getPageViewBaseUrl() + "/mail/order"; //window.open(url); window.location.href = url; }; // 地图模式 $scope.MapcheckAddress = MapcheckAddress; $scope.checkserachisok = checkserachisok; $scope.checkBtnDisable = checkBtnDisable; $scope.mapsearchResult = mapsearchResult; $scope.clickHotCity = clickHotCity; $scope.clickMenu = clickMenu; $scope.setCityList = setCityList; $scope.setCountyList = setCountyList; $scope.setSelectedArea = setSelectedArea; //查询等级 默认 查询级别 1 省份 2 城市 3 区县 4 区县营业部 $scope.mapResultlevel = "1"; $scope.serachmarkerlistdata = []; //地图模式默认模式 $scope.mapinitpage = true; $scope.mapResultList = "全国网点"; $scope.formData = { searchmapAddress: "", searchmapAddressDetail: "", }; $scope.formDataCheck = { searchmapAddress: false, }; //初始化地址选择 $scope.mapaddressComponent = { sender: {}, }; // 初始化地址 $scope.mapdataList = { allList: [], hotCitiesList: [], countryList: [], provinceList: { "A-F": [], "G-G": [], "H-I": [], "J-R": [], "S-W": [], "X-Z": [], }, cityList: [], countyList: [], countryList: {}, }; $scope.controlField = { step: 0, }; $scope.selectedResultMap = { provinceName: "", provinceCode: "", cityName: "", cityNameCode: "", countyName: "", countyCode: "", }; //模态框 $scope.popupInfo_marklist = { id: "marklistmsg", //popup id title: "网点地图查询", //popup标题 text: "", //popup显示文本 fun: "", //点击确定后执行的函数 }; //初始化分页插件 $scope.mappagetotal = 0; $scope.map_pageInfo1 = { totalNum: "", pageSize: 5, currentPage: 1, baseShow: 5, watchParam: { currentPage: 1, keyword: "", }, }; $scope.map_pageInfo2 = { totalNum: "", pageSize: 5, currentPage: 1, baseShow: 5, watchParam: { currentPage: 1, keyword: "", }, }; $scope.map_pageInfo3 = { totalNum: "", pageSize: 5, currentPage: 1, baseShow: 5, watchParam: { currentPage: 1, keyword: "", }, }; //监听状态 $scope.pageInfoisable = false; $scope.$watch( "map_pageInfo1.watchParam", function (n, o) { if (n && $scope.mapResultlevel == "4" && $scope.pageInfoisable) { //console.log( $scope.map_pageInfo1.currentPage); var jsonbody = { level: $scope.mapResultlevel, provinceCode: $scope.selectedResultMap.provinceCode, provinceName: $scope.selectedResultMap.provinceName, cityCode: $scope.selectedResultMap.cityCode, cityName: $scope.selectedResultMap.cityName, countyCode: $scope.selectedResultMap.countyCode, countyName: $scope.selectedResultMap.countyName, pageIndex: $scope.map_pageInfo1.currentPage, pageSize: 5, }; //console.log(jsonbody); getsearchBranchMap(jsonbody, "mylist1"); } }, true ); $scope.$watch( "map_pageInfo2.watchParam", function (n, o) { if (n && $scope.mapResultlevel == "4" && $scope.pageInfoisable) { // console.log( $scope.map_pageInfo2.currentPage); var jsonbody = { level: $scope.mapResultlevel, provinceCode: $scope.selectedResultMap.provinceCode, provinceName: $scope.selectedResultMap.provinceName, cityCode: $scope.selectedResultMap.cityCode, cityName: $scope.selectedResultMap.cityName, countyCode: $scope.selectedResultMap.countyCode, countyName: $scope.selectedResultMap.countyName, type: "1", pageIndex: $scope.map_pageInfo2.currentPage, pageSize: 5, }; // console.log(jsonbody); getsearchBranchMap(jsonbody, "mylist2"); } }, true ); $scope.$watch( "map_pageInfo3.watchParam", function (n, o) { if (n && $scope.mapResultlevel == "4" && $scope.pageInfoisable) { // console.log( $scope.map_pageInfo3.currentPage); var jsonbody = { level: $scope.mapResultlevel, provinceCode: $scope.selectedResultMap.provinceCode, provinceName: $scope.selectedResultMap.provinceName, cityCode: $scope.selectedResultMap.cityCode, cityName: $scope.selectedResultMap.cityName, countyCode: $scope.selectedResultMap.countyCode, countyName: $scope.selectedResultMap.countyName, type: "2", pageIndex: $scope.map_pageInfo3.currentPage, pageSize: 5, }; // console.log(jsonbody); getsearchBranchMap(jsonbody, "mylist3"); } }, true ); //默认状态 是没有详细地址 $scope.isSelectgetMapdetail = true; // 当有详细地址的时候 $scope.matchtypesmapdetail = "发货 提货 送货"; //覆盖默认的dom结构 AMapUI.defineTpl( "ui/overlay/SimpleInfoWindow/tpl/container.html", [], function () { return document.getElementById("my-infowin-tpl").innerHTML; } ); //判断地址 function MapcheckAddress(address, field, isSelect) { // var addressArry = address.split("-"); var addressArry = address.split("-"); if (addressArry.length == 3) { $scope.formDataCheck[field] = false; } else { $scope.formDataCheck[field] = true; } } //地图模式查询 判断按钮是否可用 function checkserachisok() { var isReady = true; if ($scope.formData.searchmapAddress.split("-").length === 3) { isReady = false; } return isReady; } // 列表模块,查询按钮是否可用 function checkBtnDisable() { let flag = true; if ($scope.keyWords && $scope.addressInput.split("-").length === 3) { flag = false; } return flag; } //提交按钮 $scope.mapsearchResult = mapsearchResult; function mapsearchResult() { var addresslist = $scope.formData.searchmapAddress.split("-"); $scope.selectedResultMap.provinceName = addresslist[0]; $scope.selectedResultMap.provinceCode = $scope.mapaddressComponent.sender.provinceCode; $scope.selectedResultMap.cityName = addresslist[1]; $scope.selectedResultMap.cityCode = $scope.mapaddressComponent.sender.cityCode; $scope.selectedResultMap.countyName = addresslist[2]; $scope.selectedResultMap.countyCode = $scope.mapaddressComponent.sender.countyCode; // var jsonbody = { // "level": $scope.mapResultlevel, // "provinceCode": $scope.selectedResultMap.provinceCode, // "provinceName": $scope.selectedResultMap.provinceName, // "cityCode": $scope.selectedResultMap.cityCode, // "cityName": $scope.selectedResultMap.cityName, // "countyCode": $scope.selectedResultMap.countyCode, // "countyName": $scope.selectedResultMap.countyName, // "pageIndex":$scope.map_pageInfo1.currentPage, // "pageSize":5 // }; //点击确认之后 查询列表 $scope.controlField.step = 0; $scope.mapResultList = "查询结果"; $scope.mapinitpage = false; map.remove($scope.markerinitList); $scope.mapresulttabIndex = 1; $scope.mapResultlevel = "4"; if ($scope.markerList) { $scope.markerList.clearData(); } if (isEmpty($scope.formData.searchmapAddressDetail)) { $scope.pageInfoisable = true; if ($scope.map_pageInfo1.currentPage == "1") { var jsonbody = { level: $scope.mapResultlevel, provinceCode: $scope.mapaddressComponent.sender.provinceCode, provinceName: $scope.mapaddressComponent.sender.provinceName, cityCode: $scope.mapaddressComponent.sender.cityCode, cityName: $scope.mapaddressComponent.sender.cityName, countyCode: $scope.mapaddressComponent.sender.countyCode, countyName: $scope.mapaddressComponent.sender.countyName, pageIndex: 1, pageSize: 5, }; getsearchBranchMap(jsonbody, "mylist1"); } else { $scope.map_pageInfo1.currentPage = 1; $scope.map_pageInfo1.watchParam.currentPage = 1; } } else { var jsonbody = { matchtypes: [ "pickup", "deliver", // 送货 "leave", // 发货 ], transportway: "motor_self", province: $scope.mapaddressComponent.sender.provinceName, city: $scope.mapaddressComponent.sender.cityName, county: $scope.mapaddressComponent.sender.countyName, otherAddress: $scope.formData.searchmapAddressDetail, lng: "", lat: "", }; /*0403上线从这里开始*/ var addressDet = $scope.mapaddressComponent.sender.provinceName + $scope.mapaddressComponent.sender.cityName + $scope.mapaddressComponent.sender.countyName + $scope.formData.searchmapAddressDetail; var mapBaidu = new BMap.Map("containerBaidu"); var options = { onSearchComplete: function (results) { if (results.getPoi(0)) { jsonbody.lng = results.getPoi(0).point.lng + ""; jsonbody.lat = results.getPoi(0).point.lat + ""; } // //console.log("这是jsonbody",jsonbody); // } else if (results.Br) { // jsonbody.lng = results.Br[0].point.lng + ""; // jsonbody.lat = results.Br[0].point.lat + ""; // } getsearchBranchMapdetail(jsonbody, "mylist1"); }, }; var local = new BMap.LocalSearch(mapBaidu, options); local.search(addressDet); /*0403上线到这里结束*/ } } $scope.resetMapAddressDetail = function () { $scope.formData.searchmapAddressDetail = ""; }; $scope.resetKeyWords = function () { $scope.keyWords = ""; }; // 初始化地图 $scope.setposition = setposition; var map = new AMap.Map("container", { resizeEnable: true, zoom: 5, //地图显示的缩放级别 }); // 初始化缩放控件 AMapUI.loadUI(["control/BasicControl"], function (BasicControl) { //缩放控件,显示Zoom值 map.addControl( new BasicControl.Zoom({ position: "rb", // showZoomNum: true }) ); }); // 定位函数 function setposition() { //实例化城市查询类 var citysearch = new AMap.CitySearch(); //自动获取用户IP,返回当前城市 citysearch.getLocalCity(function (status, result) { if (status === "complete" && result.info === "OK") { if (result && result.city && result.bounds) { // var cityinfo = result.city; var citybounds = result.bounds; //地图显示当前城市 map.setBounds(citybounds); } } }); } //当不去搜索的时候 $scope.maptabIndex = 1; $scope.mapchooseTab = mapchooseTab; function mapchooseTab(bol) { $scope.maptabIndex = bol; } //默认情况下,地图上的点列表 $scope.markerinitList = []; // 默认状态下加载数据 getMarkslist(); function getMarkslist() { $scope.mapResultlevel = "1"; // if($scope.mapResultlevel=="1"){ var jsonbody = { level: $scope.mapResultlevel, provinceCode: "", provinceName: "", cityCode: "", cityName: "", countyCode: "", countyName: "", }; getsearchBranchMap(jsonbody, "mylist1"); } function getMarkerlsitmap(datalist) { map.remove($scope.markerinitList); $scope.markerinitList = []; angular.forEach(datalist, function (i) { if (i.longitude && i.latitude) { var arrs = BmapToGmapLngLat(i.longitude, i.latitude); var marker = new AMap.Marker({ //添加自定义点标记 map: map, position: arrs, //基点位置 offset: new AMap.Pixel(-45, -42), //相对于基点的偏移位置 draggable: false, //是否可拖动 content: '
      ' + '
      ' + i.showname + "(" + i.count + ")" + '
      ', }); marker.on("click", function (e) { if ($scope.mapResultlevel == "1") { setCityList(i); } else if ($scope.mapResultlevel == "2") { setCountyList(i); } else if ($scope.mapResultlevel == "3") { setSelectedArea(i); } }); $scope.markerinitList.push(marker); } }); map.add($scope.markerinitList); map.setFitView(); } //当去搜索的时候 $scope.mapresulttabIndex = 1; $scope.mapresultchooseTab = mapresultchooseTab; function mapresultchooseTab(bol) { $scope.mapresulttabIndex = bol; $scope.mapResultlevel = "4"; if ($scope.markerList) { $scope.markerList.clearData(); } if ($scope.isSelectgetMapdetail) { if ($scope.mapresulttabIndex === 1) { // jsonbody.type = ''; // getsearchBranchMap(jsonbody, 'mylist1'); if ($scope.map_pageInfo1.currentPage == "1") { var jsonbody = { level: $scope.mapResultlevel, provinceCode: $scope.selectedResultMap.provinceCode, provinceName: $scope.selectedResultMap.provinceName, cityCode: $scope.selectedResultMap.cityCode, cityName: $scope.selectedResultMap.cityName, countyCode: $scope.selectedResultMap.countyCode, countyName: $scope.selectedResultMap.countyName, pageIndex: 1, pageSize: 5, }; getsearchBranchMap(jsonbody, "mylist1"); } else { $scope.map_pageInfo1.currentPage = "1"; $scope.map_pageInfo1.watchParam.currentPage = "1"; } } else if ($scope.mapresulttabIndex === 2) { if ($scope.map_pageInfo2.currentPage == "1") { var jsonbody = { level: $scope.mapResultlevel, provinceCode: $scope.selectedResultMap.provinceCode, provinceName: $scope.selectedResultMap.provinceName, cityCode: $scope.selectedResultMap.cityCode, cityName: $scope.selectedResultMap.cityName, countyCode: $scope.selectedResultMap.countyCode, countyName: $scope.selectedResultMap.countyName, type: "1", pageIndex: 1, pageSize: 5, }; getsearchBranchMap(jsonbody, "mylist2"); } else { $scope.map_pageInfo2.currentPage = "1"; $scope.map_pageInfo2.watchParam.currentPage = "1"; } } else if ($scope.mapresulttabIndex === 3) { if ($scope.map_pageInfo3.currentPage == "1") { var jsonbody = { level: $scope.mapResultlevel, provinceCode: $scope.selectedResultMap.provinceCode, provinceName: $scope.selectedResultMap.provinceName, cityCode: $scope.selectedResultMap.cityCode, cityName: $scope.selectedResultMap.cityName, countyCode: $scope.selectedResultMap.countyCode, countyName: $scope.selectedResultMap.countyName, type: "2", pageIndex: 1, pageSize: 5, }; getsearchBranchMap(jsonbody, "mylist3"); } else { $scope.map_pageInfo3.currentPage = "1"; $scope.map_pageInfo3.watchParam.currentPage = "1"; } } } else { var jsonbody = { transportway: "motor_self", province: $scope.mapaddressComponent.sender.provinceName, city: $scope.mapaddressComponent.sender.cityName, county: $scope.mapaddressComponent.sender.countyName, otherAddress: $scope.formData.searchmapAddressDetail, }; if ($scope.mapresulttabIndex === 1) { $scope.matchtypesmapdetail = "发货 提货 送货"; jsonbody.matchtypes = ["pickup", "deliver", "leave"]; // getsearchBranchMapdetail(jsonbody, 'mylist1'); lngAndlogSeach(jsonbody, getsearchBranchMapdetail, "mylist1"); } else if ($scope.mapresulttabIndex === 2) { $scope.matchtypesmapdetail = "发货"; jsonbody.matchtypes = ["leave"]; // getsearchBranchMapdetail(jsonbody, 'mylist2'); lngAndlogSeach(jsonbody, getsearchBranchMapdetail, "mylist2"); } else if ($scope.mapresulttabIndex === 3) { $scope.matchtypesmapdetail = "送货"; jsonbody.matchtypes = ["deliver", "expressDeliver"]; // getsearchBranchMapdetail(jsonbody, 'mylist3'); lngAndlogSeach(jsonbody, getsearchBranchMapdetail, "mylist3"); } } } function lngAndlogSeach(jsonbody, fn, type) { if (!BMap || !BMap.Map) { return; } var mapBaidu = new BMap.Map("containerBaidu"); /*0403上线从这里开始*/ // var addressDet = $scope.mapaddressComponent.sender.provinceName + $scope.mapaddressComponent.sender.cityName + $scope.mapaddressComponent.sender.countyName + $scope.formData.searchmapAddressDetail; var addressDet = jsonbody.province + jsonbody.city + jsonbody.county + jsonbody.otherAddress; var that = this; var options = { onSearchComplete: function (results) { if (results.getPoi(0)) { jsonbody.lng = results.getPoi(0).point.lng + ""; jsonbody.lat = results.getPoi(0).point.lat + ""; } fn.apply(that, [jsonbody, type]); }, }; var local = new BMap.LocalSearch(mapBaidu, options); local.search(addressDet); } function testlist(classId, listdata) { // 初始化标注 AMapUI.loadUI( [ "misc/MarkerList", "overlay/SimpleMarker", "overlay/SimpleInfoWindow", ], function (MarkerList, SimpleMarker, SimpleInfoWindow) { //即jQuery/Zepto var $ = MarkerList.utils.$; var defaultIconStyle = "darkblue", //默认的图标样式 hoverIconStyle = "red", //鼠标hover时的样式 selectedIconStyle = "red"; //选中时的图标样式 $scope.markerList = new MarkerList({ map: map, listContainer: classId, getDataId: function (dataItem, index) { return dataItem.id; }, // if( !(isEmpty(dataItem.longitude) || isEmpty(dataItem.latitude)) ){ getPosition: function (dataItem) { return BmapToGmapLngLat( dataItem.longitude, dataItem.latitude ); // return [dataItem.longitude, dataItem.latitude]; }, //构造marker用的options对象, content和title支持模板,也可以是函数,返回marker实例,或者返回options对象 getMarker: function (dataItem, context, recycledMarker) { if ( !(isEmpty(dataItem.longitude) || isEmpty(dataItem.latitude)) ) { var label = "" + (context.index + 1); if (recycledMarker) { recycledMarker.setIconStyle(defaultIconStyle); return; } return new SimpleMarker({ iconTheme: "default", containerClassNames: "my-marker", iconStyle: defaultIconStyle, iconLabel: { innerHTML: label, //设置文字内容 style: { color: "#fff", //设置文字颜色 }, }, // showPositionPoint:{ // color: 'red',//点的颜色 // radius: 2 //点的半径。 // } }); } }, getInfoWindow: function ( dataItem, context, recycledInfoWindow ) { if ( !(isEmpty(dataItem.longitude) || isEmpty(dataItem.latitude)) ) { if (dataItem.businessType) { var inforbodys = '
      业务范围: ' + dataItem.businessType + "
      " + '
      电话: ' + dataItem.contactway + "
      " + '
      地址: ' + dataItem.address + "
      " + '
      ' + '' + "
      "; } else { var tempBusinessArr = new Array(); if (!isEmpty(dataItem.isDelivery)) { tempBusinessArr.push(dataItem.isDelivery); } if (!isEmpty(dataItem.isLeave)) { tempBusinessArr.push(dataItem.isLeave); } if (!isEmpty(dataItem.isPickupSelf)) { tempBusinessArr.push(dataItem.isPickupSelf); } var inforbodys = '
      业务范围: ' + tempBusinessArr.join(" ") + "
      " + '
      电话: ' + dataItem.contactway + "
      " + '
      地址: ' + dataItem.address + "
      " + '
      ' + '' + "
      "; } if (recycledInfoWindow) { recycledInfoWindow.setInfoTitle(dataItem.name); // recycledInfoWindow.setInfoBody('
      业务范围:'+ dataItem.businessType+'
      电话:'+ dataItem.contactway +'
      地址:'+ dataItem.address+'
      '); recycledInfoWindow.setInfoBody(inforbodys); return recycledInfoWindow; } return new SimpleInfoWindow({ infoTitle: dataItem.name, infoBody: inforbodys, // infoBody: '
      业务范围:'+ dataItem.businessType+'
      '+ // '
      电话:'+ dataItem.contactway+'
      '+ // '
      地址:'+ dataItem.address+'
      ', offset: new AMap.Pixel(0, -40), }); } }, getListElement: function ( dataItem, context, recycledListElement ) { // var label = String.fromCharCode('A'.charCodeAt(0) + context.index); var label = "" + (context.index + 1); var styleslabel = "amap-simple-marker-style-" + defaultIconStyle; //使用模板创建 var innerHTML = MarkerList.utils.template( '
      ' + '
      ' + '
      ' + '
      ' + '
      <%- label %>
      ' + "
      " + '
      ' + "<% if(dataItem.distance) { %>" + "<%- dataItem.distance %>公里" + " <% } %>" + "
      " + "
      " + "<% if(dataItem.distance) { %>" + '
      ' + " <% } %>" + "<% if(!dataItem.distance) { %>" + '
      ' + " <% } %>" + '
      ' + "<%- dataItem.name %>" + "
      " + '
      ' + "<%- dataItem.address %>" + "
      " + "
      ", { dataItem: dataItem, label: label, styleslabel: styleslabel, } ); if (recycledListElement) { recycledListElement.innerHTML = innerHTML; return recycledListElement; } return ( '
      ' + innerHTML + "
      " ); }, //列表节点上监听的事件 listElementEvents: ["click", "mouseenter", "mouseleave"], //marker上监听的事件 markerEvents: ["click", "mouseover", "mouseout"], //makeSelectedEvents:false, selectedClassNames: "select_map", autoSetFitView: true, }); $scope.markerList.on("selectedChanged", function (event, info) { if (info.selected) { // 设置列表样式 var selectclassobj = info.selected.listElement.getElementsByClassName( "my-marker" ); selectclassobj[0].className = "amap-simple-marker margin-center my-marker amap-simple-marker-def-style " + "amap-simple-marker-style-" + selectedIconStyle; if (info.selected.marker) { //更新为选中样式 info.selected.marker.setIconStyle(selectedIconStyle); } else { // alert("此网点暂无标注,有疑问请联系95353"); $scope.popupInfo_marklist.title = "网点地图查询"; $scope.popupInfo_marklist.text = "此网点暂无标注,有疑问请联系95353!"; $("#marklistmsg").modal("show"); } } if (info.unSelected) { // console.log(info.unSelected); //列表回复样式 var unselectclassobj = info.unSelected.listElement.getElementsByClassName( "my-marker" ); unselectclassobj[0].className = "amap-simple-marker margin-center my-marker amap-simple-marker-def-style " + "amap-simple-marker-style-" + defaultIconStyle; //更新为默认样式 if (info.unSelected.marker) { info.unSelected.marker.setIconStyle(defaultIconStyle); } } }); $scope.markerList.on( "listElementMouseenter markerMouseover", function (event, record) { if (record && record.marker) { forcusMarker(record.marker); //this.openInfoWindowOnRecord(record); //非选中的id if (!this.isSelectedDataId(record.id)) { //设置为hover样式 record.marker.setIconStyle(hoverIconStyle); //this.closeInfoWindow(); } } } ); function forcusMarker(marker) { marker.setTop(true); //不在地图视野内 if (!map.getBounds().contains(marker.getPosition())) { //移动到中心 map.setCenter(marker.getPosition()); } } $scope.markerList.on( "listElementMouseleave markerMouseout", function (event, record) { if (record && record.marker) { if (!this.isSelectedDataId(record.id)) { //恢复默认样式 record.marker.setIconStyle(defaultIconStyle); } } } ); $scope.markerList.on("infoWindowClick", function (event, record) { if ( event.target.className == "button primary-xs normal el-hover-pointer text-right" ) { window.location.href = CustomUtils.getPageViewBaseUrl() + "/mail/order"; } }); function isElementInViewport(el) { var rect = el.getBoundingClientRect(); return ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement .clientHeight) /*or $(window).height() */ && rect.right <= (window.innerWidth || document.documentElement .clientWidth) /*or $(window).width() */ ); } //展示该数据 $scope.markerList.render(listdata); } ); } //获取热门城市 function getHotCitiesList() { var url = CustomUtils.getBusinessBaseUrl() + "/phonerest/citycontrol/queryHotCitys"; //var url = ""; var req = { method: "GET", url: url, headers: { "Content-Type": "application/json", Accept: "application/json, text/plain, */*", }, }; $http(req).then( function (data) { $scope.mapdataList.hotCitiesList = data.data.result; // console.log($scope.mapdataList.hotCitiesList); }, function (err) {} ); } //获取省市拼音 function getProvinceList(countryCode) { var url = CustomUtils.getBusinessBaseUrl() + "/phonerest/citycontrol/queryProviecn/" + countryCode; var req = { method: "GET", url: url, headers: { "Content-Type": "application/json", Accept: "application/json, text/plain, */*", }, }; $http(req).then( function (data) { setProvinceSoft(data.data.result); // console.log(data); }, function (err) {} ); } //设置省排序 function setProvinceSoft(list) { angular.forEach(list, function (item, index) { // if(item.provinceCode != "820000" && item.provinceCode != "710000" && item.provinceCode != "810000"){ // //去除港澳台 if ( "a" <= item.pinyin.substr(0, 1) && item.pinyin.substr(0, 1) <= "f" ) { $scope.mapdataList.provinceList["A-F"].push(item); } else if (item.pinyin.substr(0, 1) == "g") { $scope.mapdataList.provinceList["G-G"].push(item); } else if ( "h" <= item.pinyin.substr(0, 1) && item.pinyin.substr(0, 1) <= "i" ) { $scope.mapdataList.provinceList["H-I"].push(item); } else if ( "j" <= item.pinyin.substr(0, 1) && item.pinyin.substr(0, 1) <= "r" ) { $scope.mapdataList.provinceList["J-R"].push(item); } else if ( "s" <= item.pinyin.substr(0, 1) && item.pinyin.substr(0, 1) <= "w" ) { $scope.mapdataList.provinceList["S-W"].push(item); } else if ( "x" <= item.pinyin.substr(0, 1) && item.pinyin.substr(0, 1) <= "z" ) { $scope.mapdataList.provinceList["X-Z"].push(item); } // }else{ // $scope.dataList.provinceListGAT.push(item); // } }); } //点击热门城市 function clickHotCity(value) { setCountyList(value); } //点击热门城市/省/国家菜单 function clickMenu(num) { $scope.formData.searchmapAddress = ""; $scope.pageInfoisable = false; if (num == 0) { //调用接口 getMarkslist(); } else if (num == 1) { $scope.mapResultlevel = "2"; var jsonbody = { level: $scope.mapResultlevel, provinceCode: $scope.selectedResultMap.provinceCode, provinceName: $scope.selectedResultMap.provinceName, cityCode: "", cityName: "", countyCode: "", countyName: "", }; getsearchBranchMap(jsonbody, "mylist1"); $scope.selectedResultMap.cityName = ""; $scope.selectedResultMap.cityCode = ""; $scope.selectedResultMap.countyName = ""; $scope.selectedResultMap.countyCode = ""; } else if (num == 2) { $scope.mapResultlevel = "3"; var jsonbody = { level: $scope.mapResultlevel, provinceCode: $scope.selectedResultMap.provinceCode, provinceName: $scope.selectedResultMap.provinceName, cityCode: $scope.selectedResultMap.cityCode, cityName: $scope.selectedResultMap.cityName, countyCode: "", countyName: "", }; getsearchBranchMap(jsonbody, "mylist1"); $scope.selectedResultMap.countyName = ""; $scope.selectedResultMap.countyCode = ""; } } //设置市列表 function setCityList(item) { $scope.setCityListprovinceName = item.provinceName; //console.log($scope.setCityListprovinceName); $scope.mapResultlevel = "2"; var jsonbody = { level: $scope.mapResultlevel, provinceCode: item.provinceCode, provinceName: item.provinceName, cityCode: "", cityName: "", countyCode: "", countyName: "", }; getsearchBranchMap(jsonbody, "mylist1"); $scope.selectedResultMap.provinceName = item.provinceName; $scope.selectedResultMap.provinceCode = item.provinceCode; } //设置区县列表 function setCountyList(item) { $scope.setCountyListcountyName = item.cityName; $scope.mapResultlevel = "3"; var jsonbody = { level: $scope.mapResultlevel, provinceCode: item.provinceCode, provinceName: item.provinceName, cityCode: item.cityCode, cityName: item.cityName, countyCode: "", countyName: "", }; getsearchBranchMap(jsonbody, "mylist1"); $scope.selectedResultMap.provinceName = item.provinceName; $scope.selectedResultMap.provinceCode = item.provinceCode; $scope.selectedResultMap.cityName = item.cityName; $scope.selectedResultMap.cityCode = item.cityCode; } //设置选择结果 function setSelectedArea(item) { $scope.mapResultlevel = "4"; $scope.mapresulttabIndex = 1; $scope.map_pageInfo1.currentPage = 1; $scope.map_pageInfo1.watchParam.currentPage = 1; var jsonbody = { level: $scope.mapResultlevel, provinceCode: item.provinceCode, provinceName: item.provinceName, cityCode: item.cityCode, cityName: item.cityName, countyCode: item.countyCode, countyName: item.countyName, pageIndex: 1, pageSize: 5, }; getsearchBranchMap(jsonbody, "mylist1"); $scope.selectedResultMap.countyName = item.countyName; $scope.selectedResultMap.countyCode = item.countyCode; } //根据地名获取网点列表, 没有详细地址 true function getsearchBranchMap(jsonbody, id) { $scope.serachisdetail = true; $scope.isSelectgetMapdetail = true; //初始化数据源 $scope.serachmarkerlistdata = []; if ($scope.markerList) { $scope.markerList.clearData(); } commonMethods.pageLoading(true); branchSearchService .searchBranchMap(jsonbody) .then(function (data) { if (data.status == "success") { // console.log(data); $scope.serachmarkerlistdata = data.result.netResponses; if (data.result.totalRows) { $scope.mappagetotal = data.result.totalRows; // console.log( $scope.mappagetotal); } // 处理数据 addlistshowname( $scope.serachmarkerlistdata, $scope.mapResultlevel ); if ($scope.mapResultlevel === "4") { // 设置页数 $scope.pageInfoisable = true; if ($scope.mapresulttabIndex == "1") { $scope.map_pageInfo1.totalNum = $scope.mappagetotal; } else if ($scope.mapresulttabIndex == "2") { $scope.map_pageInfo2.totalNum = $scope.mappagetotal; } else if ($scope.mapresulttabIndex == "3") { $scope.map_pageInfo3.totalNum = $scope.mappagetotal; } $scope.controlField.step = 0; $scope.mapResultList = "查询结果"; $scope.mapinitpage = false; map.remove($scope.markerinitList); testlist(id, deletesomemsg($scope.serachmarkerlistdata)); } else { getMarkerlsitmap($scope.serachmarkerlistdata); if ($scope.mapResultlevel === "2") { $scope.controlField.step = 2; $scope.mapdataList.cityList = $scope.serachmarkerlistdata; } else if ($scope.mapResultlevel === "1") { $scope.controlField.step = 0; $scope.mapinitpage = true; $scope.mapResultList = "全国网点"; $scope.selectedResultMap = { provinceName: "", provinceCode: "", cityName: "", cityCode: "", countyName: "", countyCode: "", }; } else if ($scope.mapResultlevel === "3") { $scope.controlField.step = 3; $scope.mapdataList.countyList = $scope.serachmarkerlistdata; } } // console.log($scope.serachmarkerlistdata); commonMethods.pageLoading(false); } else if (data.status == "fail") { commonMethods.pageLoading(false); $scope.popupInfo_marklist.title = "网点地图查询"; $scope.popupInfo_marklist.text = "网点地图查询失败,请稍后再试!"; $("#marklistmsg").modal("show"); } }) .then(null, function (err) { commonMethods.pageLoading(false); }); } //根据地名获取网点列表, 详细地址 function getsearchBranchMapdetail(jsonbody, id) { // $scope.serachisdetail=true; $scope.isSelectgetMapdetail = false; //初始化数据源 $scope.serachmarkerlistdata = []; if ($scope.markerList) { $scope.markerList.clearData(); } commonMethods.pageLoading(true); branchSearchService .stationSearch(jsonbody) .then(function (data) { if (data.status == "success") { // console.log(data.result) // var response = data.result // if(typeof(response)==='string') { // data.result = JSON.parse(data.result) // } var resData = data.result.data; angular.forEach(resData, function (item, index) { // 将百度经纬度改成 高德经纬度 // var gLatLngArr = BmapToGmapLngLat(item.baiduLng, item.baiduLat) var items = { latitude: item.baiduLat, longitude: item.baiduLng, name: item.deptName, address: item.deptAddress, contactway: item.contactway, distance: item.distance, businessType: item.businessScope, isPickupSelf: item.pickupSelf ? "提货" : "", isLeave: item.isLeave ? "发货" : "", isDelivery: item.delivery ? "送货" : "", }; $scope.serachmarkerlistdata.push(items); }); testlist(id, $scope.serachmarkerlistdata); // console.log($scope.serachmarkerlistdata); commonMethods.pageLoading(false); } else if (data.status == "fail") { commonMethods.pageLoading(false); $scope.popupInfo_marklist.title = "网点地图查询"; $scope.popupInfo_marklist.text = "网点地图暂无数据,请稍后再试!"; $("#marklistmsg").modal("show"); } }) .then(null, function (err) { commonMethods.pageLoading(false); }); } //自定义函数为在得到的数据上加字段 function addlistshowname(data, i) { if (i == "1") { angular.forEach(data, function (item) { item["showname"] = item.provinceName; }); } else if (i == "2") { angular.forEach(data, function (item) { item["showname"] = item.cityName; }); } else if (i == "3") { angular.forEach(data, function (item) { item["showname"] = item.countyName; }); } } //定义函数处理数据 function deletesomemsg(list) { angular.forEach(list, function (item) { // if (item.name.indexOf("【") != -1) { // item.name = item.name.substring(3); // } if (item.name.indexOf("】") !== -1) { item.name = item.name.substring(item.name.indexOf("】") + 1); } }); //console.log(list); return list; } // 获取全部城市 热门城市 getHotCitiesList(); getProvinceList("100000"); // 百度经纬度 转成 高德 经纬度 function BmapToGmapLngLat(bd_lon, bd_lat) { var x_pi = (3.14159265358979324 * 3000.0) / 180.0; var x = bd_lon - 0.0065; var y = bd_lat - 0.006; var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi); var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi); var gg_lng = z * Math.cos(theta); var gg_lat = z * Math.sin(theta); return [gg_lng, gg_lat]; } var w = angular.element($window); w.bind("click", function () { $scope.showRecogDialog = false; }); }, ]); angular.bootstrap(document.getElementById("branchSearch"), [ "branchSearch", ]); });

    • 价格时效查询
    • 网点查询
    • 公司概述
    • 采购
    • 联系我们
    • 帮助
    • 企业新闻
    • 企业公告
    • 货物追踪
    • 德邦公告
      z6com·尊龙凯时(中国区)官网公告
      市场活动
      市场活动
      联系方式

      联系方式

      客户服务热线: 400-80045666

      总部地址:

      邮箱:

      Copyright © 2012-2025 Z6尊龙官网入口. All Rights Reserved. |网站地图|XML