Commit inicial Ventas Productivo
This commit is contained in:
366
GPS/RepPuntosDeInteres.aspx
Normal file
366
GPS/RepPuntosDeInteres.aspx
Normal file
@@ -0,0 +1,366 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/SiteGPS.master" AutoEventWireup="false" CodeFile="RepPuntosDeInteres.aspx.vb" Inherits="GPS_RepPuntosDeInteres" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#map {
|
||||
width: 100%;
|
||||
height: calc(100% - 51px);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
#map {
|
||||
position: fixed !important;
|
||||
}
|
||||
|
||||
.pac-container.pac-logo {
|
||||
z-index: 100000;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
<div id="map"></div>
|
||||
<div id="dvConsulta" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UPConsulta" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="H1" runat="server">Consultar Reporte de Puntos</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="list-inline" style="font-size: 12px; margin-top: 15px; margin-left: 0px; margin-bottom: 20px;">
|
||||
<li>Fecha Inicio:
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpFechas"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator4" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</li>
|
||||
<li>Fecha Fin:
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpFechas"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator5" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusquedaEventos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaEventos','{0}')", GvPuntos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaEventos','{0}')", GvPuntos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvPuntos" runat="server" GridLines="None" DataKeyNames="Punto,PuntoDeInteres,CvePuntoDeInteres" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-height="150" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkGR" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="PuntoDeInteres" ItemStyle-Width="45%" HeaderText="Punto De Interés" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Descripcion" ItemStyle-Width="45%" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDispositivos.ClientID) %>" data-height="150" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDispositivos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvDispositivos" runat="server" GridLines="None" DataKeyNames="CveDispositivo,SerieVehiculo,DevID,NoEconomico,NombreVehiculo" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="800" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkDis" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="NoEconomico" ItemStyle-Width="25%" HeaderText="Número Económico" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="ModeloVehiculo" ItemStyle-Width="25%" HeaderText="Modelo Vehículo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="AñoVehiculo" ItemStyle-Width="25%" HeaderText="Año Vehículo" ItemStyle-HorizontalAlign="center" />
|
||||
<asp:BoundField DataField="PlacasVehiculo" ItemStyle-Width="25%" HeaderText="Placas Vehículo" ItemStyle-HorizontalAlign="center" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="BtnConsultar" runat="server" Text="Consultar Reporte" ValidationGroup="GrpFechas" CssClass="btn btn-primary"></asp:LinkButton>
|
||||
<button data-dismiss="modal" class="btn btn-default">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpdatePanel1">
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField runat="server" ID="HdnPunto" ClientIDMode="static" Value="0" />
|
||||
<asp:HiddenField runat="server" ID="HdnDispositivo" ClientIDMode="static" Value="0" />
|
||||
<div id="dvHistorico" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpHistorico" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="H2" runat="server"><i class="fa fa-bell-o"></i>Historial Visitas: </h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="conditional" ID="UpdatePanel3">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusquedaHist" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVHistorico.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVHistorico.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GVHistorico" runat="server" GridLines="None" DataKeyNames="CveDispositivoEvento" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-heightfijo="100" data-height="100" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Conductor" ItemStyle-Width="35%" HeaderStyle-HorizontalAlign="center" HeaderText="Conductor" ItemStyle-HorizontalAlign="left" />
|
||||
<asp:BoundField DataField="FechaEntrada" ItemStyle-Width="35%" HeaderStyle-HorizontalAlign="center" HeaderText="Fecha Visita" ItemStyle-HorizontalAlign="center" />
|
||||
<asp:BoundField DataField="Duracion" DataFormatString="{0} Minutos" HeaderStyle-HorizontalAlign="center" HeaderText="Duración" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="center" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" ID="uphidden">
|
||||
<ContentTemplate>
|
||||
<asp:Button Style="display: none" ID="BtnCargarGV" runat="server" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnRep" OnClientClick="CargaDivs('Rep');return false;" Text="<i class='fa fa-location-arrow'></i><span>Reporte de puntos</span>" runat="server">
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
|
||||
var markers = [];
|
||||
var lastOpenedInfoWindow;
|
||||
var geocoder;
|
||||
var map;
|
||||
var circles = [];
|
||||
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: { lat: 19.4326, lng: -99.13329 },
|
||||
zoom: 8
|
||||
});
|
||||
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(function (position) {
|
||||
var pos = {
|
||||
lat: position.coords.latitude,
|
||||
lng: position.coords.longitude
|
||||
};
|
||||
map.setCenter(pos);
|
||||
}, function () {
|
||||
handleLocationError(true, infoWindow, map.getCenter());
|
||||
});
|
||||
}
|
||||
//CargaPickers();
|
||||
////directionsService = new google.maps.DirectionsService;
|
||||
////directionsDisplay = new google.maps.DirectionsRenderer;
|
||||
////directionsDisplay.setMap(map);
|
||||
|
||||
//var upControlDiv = document.createElement('div');
|
||||
//var upControl = new ControlUltimoPunto(upControlDiv, map);
|
||||
|
||||
//upControlDiv.index = 1;
|
||||
//map.controls[google.maps.ControlPosition.TOP_RIGHT].push(upControlDiv);
|
||||
|
||||
//var routeControlDiv = document.createElement('div');
|
||||
//var routeControl = new ControlGuardarRuta(routeControlDiv, map);
|
||||
|
||||
//routeControlDiv.index = 2;
|
||||
//map.controls[google.maps.ControlPosition.TOP_RIGHT].push(routeControlDiv);
|
||||
|
||||
//service = new google.maps.DistanceMatrixService;
|
||||
// map.addListener('click', addLatLng);
|
||||
}
|
||||
function CargaDivs(Tipo) {
|
||||
if (Tipo === "PointGroup") {
|
||||
$("#C_TxtNombre").val("")
|
||||
$("#C_TxtDescripcion").val("")
|
||||
$('#divAgregarTipo').modal();
|
||||
$("#HdnTipo").val(Tipo)
|
||||
$("#lblPuntos").text("Nombre Grupo de Puntos")
|
||||
$("#dvEventos").css("display", "none")
|
||||
$("#dvAdd").css("display", "")
|
||||
}
|
||||
else if (Tipo === "Point") {
|
||||
if (markers.length > 0) {
|
||||
$('#divAgregarTipo').modal();
|
||||
$("#C_TxtNombre").val("")
|
||||
$("#C_TxtDescripcion").val("")
|
||||
$("#HdnTipo").val(Tipo)
|
||||
$("#lblPuntos").text("Nombre Punto(s) de Interés")
|
||||
$("#dvEventos").css("display", "")
|
||||
$("#dvAdd").css("display", "")
|
||||
} else { DeleteMarkers(); alert('Haga click en el mapa para dibujar puntos de interés') }
|
||||
}
|
||||
else if (Tipo === "GroupRoute") {
|
||||
DeleteMarkers();
|
||||
$("#C_TxtNombre").val("1")
|
||||
$("#C_TxtDescripcion").val("1")
|
||||
$('#divAgregarTipo').modal();
|
||||
$("#HdnTipo").val(Tipo)
|
||||
$("#dvEventos").css("display", "")
|
||||
$("#dvAdd").css("display", "none")
|
||||
}
|
||||
else if (Tipo === "Route") {
|
||||
DeleteMarkers();
|
||||
$('#dvConsulta').modal({ backdrop: 'static', keyboard: false });
|
||||
} else if (Tipo === "Rep") {
|
||||
$('#dvConsulta').modal({ backdrop: 'static', keyboard: false });
|
||||
CargaPickers();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function CreaCirculo(coords, color) {
|
||||
//var Circle = new google.maps.Circle({
|
||||
// strokeColor: color,
|
||||
// strokeOpacity: 0.8,
|
||||
// strokeWeight: 2,
|
||||
// fillColor: color,
|
||||
// fillOpacity: 0.35,
|
||||
// map: map,
|
||||
// center: coords,
|
||||
// radius: 15
|
||||
//});
|
||||
var Circle = new google.maps.Marker({
|
||||
position: coords,
|
||||
icon: {
|
||||
path: google.maps.SymbolPath.CIRCLE,
|
||||
scale: 10,
|
||||
fillColor: color,
|
||||
fillOpacity: 0.35,
|
||||
strokeWeight: 2,
|
||||
strokeColor: color,
|
||||
strokeOpacity: 0.8
|
||||
},
|
||||
map: map
|
||||
});
|
||||
circles.push(Circle);
|
||||
}
|
||||
function DeleteMarkers() {
|
||||
for (var i = 0; i < markers.length; i++) {
|
||||
markers[i].setMap(null);
|
||||
}
|
||||
markers = [];
|
||||
for (var i = 0; i < circles.length; i++) {
|
||||
circles[i].setMap(null);
|
||||
}
|
||||
circles = [];
|
||||
markers = [];
|
||||
}
|
||||
function CreaMarcador(coords, nomPunto, ContentString) {
|
||||
var marker = new google.maps.Marker({
|
||||
position: coords,
|
||||
title: nomPunto,
|
||||
map: map
|
||||
});
|
||||
var infowindow = new google.maps.InfoWindow({
|
||||
content: ContentString
|
||||
});
|
||||
marker.addListener('click', function () {
|
||||
closeLastOpenedInfoWindow();
|
||||
infowindow.open(map, marker);
|
||||
lastOpenedInfoWindow = infowindow;
|
||||
});
|
||||
markers.push(marker);
|
||||
if (markers.length > 1) {
|
||||
fitBoundsToVisibleMarkers()
|
||||
} else if (markers.length === 1) {
|
||||
map.setZoom(15);
|
||||
map.setCenter(coords);
|
||||
}
|
||||
}
|
||||
function closeLastOpenedInfoWindow() {
|
||||
if (lastOpenedInfoWindow) {
|
||||
lastOpenedInfoWindow.close();
|
||||
}
|
||||
}
|
||||
|
||||
function fitBoundsToVisibleMarkers() {
|
||||
|
||||
var bounds = new google.maps.LatLngBounds();
|
||||
|
||||
for (var i = 0; i < markers.length; i++) {
|
||||
if (markers[i].getVisible()) {
|
||||
bounds.extend(markers[i].getPosition());
|
||||
}
|
||||
}
|
||||
|
||||
map.fitBounds(bounds);
|
||||
|
||||
}
|
||||
|
||||
function CargaPickers() {
|
||||
$.datetimepicker.setLocale('es');
|
||||
$('input.ADDateTimePicker').each(function () {
|
||||
var TThis = $(this);
|
||||
if (Tthis.siblings().length <= 2) {
|
||||
TThis.datetimepicker({
|
||||
dayOfWeekStart: 1,
|
||||
lang: 'es',
|
||||
format: 'd/m/Y H:i',
|
||||
formatDate: 'd/m/Y H:i',
|
||||
step: 30
|
||||
});
|
||||
var Div = TThis.parent()
|
||||
var boton = document.createElement('span');
|
||||
boton.className = "input-group-btn"
|
||||
|
||||
var subboton = document.createElement('a')
|
||||
subboton.className = "btn default"
|
||||
subboton.innerHTML = "<i class='fa fa-calendar'></i>"
|
||||
subboton.addEventListener('click', function () {
|
||||
TThis.datetimepicker('show')
|
||||
});
|
||||
boton.appendChild(subboton)
|
||||
|
||||
Div[0].appendChild(boton)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGV(CveDispositivo, CvePunto) {
|
||||
$("#HdnPunto").val(CvePunto + '')
|
||||
$("#HdnDispositivo").val(CveDispositivo + '')
|
||||
$("#C_BtnCargarGV").click()
|
||||
}
|
||||
|
||||
</script>
|
||||
<script
|
||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places&callback=initMap">
|
||||
</script>
|
||||
<%-- <script
|
||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places&callback=initMap">
|
||||
</script>--%>
|
||||
</asp:Content>
|
||||
|
||||
Reference in New Issue
Block a user