87,997
社区成员




function addMarkerOnMap(result) {
if (result.length>11)
{
try
{
_json=eval("(" + result + ")");
}
catch (error)
{
alert("数据存在非法字符!");
document.getElementById("btnSrh").value="查 询";
document.getElementById("btnSrh").removeAttribute("disabled");
return;
}
var jsLocat = _json.Table;
var index=0;
var latlng;
var pre_latlng;
var flag=false;
var listcust = new Array(jsLocat.length);
var markerOption = new MMarkerOptions();
var html =new MTipOptions();
for(var i = 0;i < jsLocat.length;i++ )
{
latlng = new MMarker(new MLngLat(jsLocat[i].LON,jsLocat[i].LAT),markerOption);
if (jsLocat[i].VISIT_TYPE!="0" && jsLocat[i].VISIT_TYPE!=undefined)
{
if (flag==false && parseFloat(jsLocat[i].LAT)!=0.0 && parseFloat(jsLocat[i].LON) !=0.0)
{
pre_latlng=new MMarker(new MLngLat(jsLocat[i].LAT,jsLocat[i].LON),markerOption);
flag=true;
}
}
html.content="拜访序号:"+eval(index+1)+"<br/>终端名称:"+jsLocat[i].NAME+"<br/>客户地址:"+jsLocat[i].ADDRESS_LINE;
html.content+="<br/>联系人:"+jsLocat[i].SLOG_CODE+"<br/>联系方式: "+jsLocat[i].FAX + " " +jsLocat[i].TELEPHONE;
html.content +="<br/>GPS信息:<span style=\"color:Blue\">"+jsLocat[i].TYPE_NAME+"</span>";
markerOption.imageUrl = "../Resources/Images/green_marker.png"; html.content+="<br/>商户坐标:"+jsLocat[i].LON +","+jsLocat[i].LAT;
html.content+="<br/>拜访坐标:"+jsLocat[i].VISITLON+","+jsLocat[i].VISITLAT ;
html.content+="<br/>到店时间:"+jsLocat[i].START_TIME;
html.content+="<br/>离店时间:"+jsLocat[i].STOP_TIME;
html.content+="<br/>订单数量: "+jsLocat[i].ORDER_NUM_CS +"箱 " + jsLocat[i].ORDER_NUM_PC +"盒";
var ddl =document.getElementById("ddlUserList");
var username= ddl.options[ddl.selectedIndex].text;
var userid = ddl.value;
html.content+="<br/><a href=\"../OrderManagement/Order_List_View.aspx?customerid="+jsLocat[i].ID +"&visittime="+document.getElementById("<%=txtDate.ClientID %>").value +"&loginid="+userid +"\" target=\"_blank\">订单明细</a>";
if (jsLocat[i].PHOTO_ID!="")
{
html.content+="<br/><a href=\"../CallRoute/Visit_Photo_Review.aspx?id="+jsLocat[i].ID+"&visitid="+jsLocat[i].VISIT_ID+"&name="+jsLocat[i].NAME+"&username="+username+"&visittime="+document.getElementById("<%=txtDate.ClientID %>").value +"\" target=\"_blank\">照片列表</a>";
html.content+=" <a href=\"#\" onclick=\"showPhoto("+jsLocat[i].PHOTO_ID+")\">查看照片";
}
markerOption.picAgent = false;
markerOption.tipOption = html;
latlng.id = "mark"+i;
mapObj.addOverlay(latlng, true);
}
}
}