974 lines
56 KiB
Plaintext
974 lines
56 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="TrayectoDetalle.aspx.vb" Inherits="GPS_TrayectoDetalle" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style type="text/css">
|
|
/*html, body {
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}*/
|
|
|
|
/*#map {
|
|
width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
position: fixed !important;
|
|
}*/
|
|
|
|
.pac-container.pac-logo {
|
|
z-index: 100000;
|
|
}
|
|
|
|
.v-center {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
|
<asp:Literal ID="LblTitulo" runat="server" Text="Trayecto"></asp:Literal>
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<li>
|
|
<asp:LinkButton runat="server" ID="BtnTerminarTrayeto" OnClick="BtnTerminarTrayeto_Click"><i class="fa fa-map-marker"></i>Terminar Trayecto</asp:LinkButton>
|
|
</li>
|
|
<li>
|
|
<asp:LinkButton runat="server" ID="LnkActualizarEstatus" OnClick="LnkActualizarEstatus_Click"><i class="fa fa-refresh"></i>Actualizar al estatus siguiente</asp:LinkButton>
|
|
</li>
|
|
<li>
|
|
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i>Agregar Gasto</asp:LinkButton>
|
|
</li>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
|
<ajax:TabContainer runat="server" Width="100%">
|
|
<ajax:TabPanel runat="server" HeaderText="Recorrido">
|
|
<ContentTemplate>
|
|
<div class="row">
|
|
<div class="col-md-12 ">
|
|
<div class="portlet light bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="fa fa-map-o"></i>
|
|
<span class="caption-subject bold uppercase">Recorrido de la unidad:</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body form">
|
|
<div id="map" style="height: 600px; padding: 0;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</ajax:TabPanel>
|
|
<ajax:TabPanel runat="server" HeaderText="Estatus">
|
|
<ContentTemplate>
|
|
<asp:UpdatePanel ID="UpEventos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="row">
|
|
<div class="col-md-6 ">
|
|
<div class="portlet light bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="fa fa-map-signs font-green"></i>
|
|
<span class="caption-subject bold uppercase">Datos del Trayecto:</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body form" style="padding: 5px;">
|
|
<div class="row v-center">
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Estatus Actual:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlEstatusActual" runat="server"></asp:Literal>
|
|
</div>
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Vehículo:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlDispositivo" runat="server"></asp:Literal>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row v-center">
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Fecha Inicio:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlFechaI" runat="server"></asp:Literal>
|
|
</div>
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Fecha Fin:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlFechaF" runat="server"></asp:Literal>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row v-center">
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Combustible Inicial:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlCombustibleI" runat="server"></asp:Literal>
|
|
</div>
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Combustible Final:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlCombustibleF" runat="server"></asp:Literal>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row v-center">
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Cargas:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlCargas" runat="server"></asp:Literal>
|
|
</div>
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Descargas:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlDescargas" runat="server"></asp:Literal>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row v-center">
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Combutible Consumido:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlCombustibleConsumido" runat="server"></asp:Literal>
|
|
</div>
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Rendimiento:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlRendimiento" runat="server"></asp:Literal>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row v-center">
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Velocidad Media:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlVMedia" runat="server"></asp:Literal>
|
|
</div>
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Velocidad Máxima:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlVMax" runat="server"></asp:Literal>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row v-center">
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Tiempo Operativo:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlTiempo" runat="server"></asp:Literal>
|
|
</div>
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Kilometros Recorridos:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlKM" runat="server"></asp:Literal>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row v-center">
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="No. Excesos de Velocidad:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-4 v-center">
|
|
<asp:Literal ID="LtlExcesosVelo" runat="server"></asp:Literal>
|
|
</div>
|
|
<div class="col-md-2 v-center">
|
|
<b>
|
|
<asp:Literal runat="server" Text="Tiempo Estimado:"></asp:Literal></b>
|
|
</div>
|
|
<div class="col-md-3 v-center">
|
|
<asp:Label ID="LblETA" runat="server" ClientIDMode="Static"></asp:Label>
|
|
</div>
|
|
<div class="col-md-1 v-center">
|
|
<asp:LinkButton ID="BtnRecalcular" runat="server" Text="" OnClick="BtnRecalcular_Click" CssClass="btn btn-sm btn-circle btn-primary" ><i class='fa fa-refresh' aria-hidden='true'></i></asp:LinkButton>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 ">
|
|
<div class="portlet light bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="fa fa-car font-green"></i>
|
|
<span class="caption-subject bold uppercase">Historial de Estatus:</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body form">
|
|
<div style="max-height: 392px; overflow-y: scroll">
|
|
<asp:GridView ID="GvEstatus" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Eventos" GridLines="none" ToolTip="Listado de Eventos" CssClass="table table-striped table-hover Widthall">
|
|
<Columns>
|
|
<asp:BoundField DataField="Estatus" ItemStyle-Width="15%" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="ES" ItemStyle-Width="15%" HeaderText="Evento" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="Fecha" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="Combustible" ItemStyle-Width="15%" HeaderText="Combustible" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="Direccion" ItemStyle-Width="40%" HeaderText="Dirección" ItemStyle-HorizontalAlign="Left" />
|
|
<%-- <asp:BoundField DataField="Combustible" ItemStyle-Width="20%" HeaderText="Combustible" ItemStyle-HorizontalAlign="Center" />--%>
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</ContentTemplate>
|
|
</ajax:TabPanel>
|
|
<ajax:TabPanel runat="server" HeaderText="Driving">
|
|
<ContentTemplate>
|
|
<asp:UpdatePanel ID="UpDriving" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="row">
|
|
<div class="col-md-6 ">
|
|
<div class="portlet light bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="fa
|
|
fa-car font-green"></i>
|
|
<span class="caption-subject bold uppercase">Eventos de la unidad:</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body form">
|
|
<div style="max-height: 392px; overflow-y: scroll">
|
|
<asp:GridView ID="GvEventos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Eventos" GridLines="none" ToolTip="Listado de Eventos" CssClass="table table-striped table-hover Widthall">
|
|
<Columns>
|
|
<asp:BoundField DataField="Evento" ItemStyle-Width="20%" HeaderText="Evento" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="FechaTrama" ItemStyle-Width="20%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="Direccion" ItemStyle-Width="60%" HeaderText="Dirección" ItemStyle-HorizontalAlign="Left" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="portlet light bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="fa fa-car font-green"></i>
|
|
<span class="caption-subject bold uppercase">Ralentí:</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body form">
|
|
<div style="max-height: 392px; overflow-y: scroll">
|
|
<asp:GridView ID="GvRalenti" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Eventos" GridLines="none" ToolTip="Listado de Eventos" CssClass="table table-striped table-hover Widthall">
|
|
<Columns>
|
|
<asp:BoundField DataField="Evento" ItemStyle-Width="25%" HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="TiempoDetenido" ItemStyle-Width="25%" HeaderText="Evento" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="FechaTrama" ItemStyle-Width="25%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="portlet light bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="fa fa-car font-green"></i>
|
|
<span class="caption-subject bold uppercase">Excesos de Velocidad:</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body form">
|
|
<div style="max-height: 392px; overflow-y: scroll">
|
|
<asp:GridView ID="GvExcesos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Eventos" GridLines="none" ToolTip="Listado de Eventos" CssClass="table table-striped table-hover Widthall">
|
|
<Columns>
|
|
<asp:BoundField DataField="VelocidadMaxima" ItemStyle-Width="25%" HeaderText="Velocidad Máxima" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="FechaTrama" ItemStyle-Width="25%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="Direccion" ItemStyle-Width="60%" HeaderText="Dirección" ItemStyle-HorizontalAlign="Left" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</ContentTemplate>
|
|
</ajax:TabPanel>
|
|
<ajax:TabPanel runat="server" HeaderText="Igniciones">
|
|
<ContentTemplate>
|
|
<asp:UpdatePanel runat="server" ID="UpIgniciones" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet light bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="fa fa-car font-green"></i>
|
|
<span class="caption-subject bold uppercase">Igniciones</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body form">
|
|
<div style="max-height: 392px; overflow-y: scroll">
|
|
<asp:GridView ID="GvIgnicion" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-rows="1" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Numero de Vueltas Realizadas">
|
|
<Columns>
|
|
<asp:BoundField DataField="Vehiculo" ItemStyle-Width="12.5%" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="FechaEncendido" ItemStyle-Width="12.5%" HeaderText="Fecha Encendido" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="FechaApagado" ItemStyle-Width="12.5%" HeaderText="Fecha Apagado" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="VMedia" DataFormatString="{0:N2} Km/hr." ItemStyle-Width="12.5%" HeaderText="Velocidad Media" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="VMax" DataFormatString="{0:N2} Km/hr." ItemStyle-Width="12.5%" HeaderText="Velocidad Máxima" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="Kilometraje" DataFormatString="{0:N2} Km." ItemStyle-Width="12.5%" HeaderText="Kilometraje" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="Duracion" ItemStyle-Width="12.5%" HeaderText="Duración" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:TemplateField ItemStyle-Width="12.5%" HeaderText="Dirección Inicial" ItemStyle-HorizontalAlign="Center">
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlDireccionInicial" runat="server"></asp:Literal>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField ItemStyle-Width="12.5%" HeaderText="Dirección Final" ItemStyle-HorizontalAlign="Center">
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlDireccionFinal" runat="server"></asp:Literal>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</ContentTemplate>
|
|
</ajax:TabPanel>
|
|
<ajax:TabPanel runat="server" HeaderText="Combustible">
|
|
<ContentTemplate>
|
|
<asp:UpdatePanel runat="server" ID="UpCombustible">
|
|
<ContentTemplate>
|
|
<div class="portlet light bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="fa fa-car font-green"></i>
|
|
<span class="caption-subject bold uppercase">Combustible</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body form">
|
|
<div style="max-height: 392px; overflow-y: scroll">
|
|
<asp:GridView ID="GvCombustible" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-rows="1" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
|
<Columns>
|
|
<asp:BoundField DataField="Estatus" ItemStyle-Width="12.5%" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="EstatusSiguiente" ItemStyle-Width="12.5%" HeaderText="Estatus Siguiente" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="Cargas" DataFormatString="{0:N0}" ItemStyle-Width="12.5%" HeaderText="Cargas" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="SumaCargas" DataFormatString="{0:N2} Lts." ItemStyle-Width="12.5%" HeaderText="Combustible Cargas" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="Descargas" DataFormatString="{0:N0}" ItemStyle-Width="12.5%" HeaderText="Descargas" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="SumaDescargas" DataFormatString="{0:N2} Lts." ItemStyle-Width="12.5%" HeaderText="Combustible Descargas" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="Distancia" DataFormatString="{0:N2} Km." ItemStyle-Width="12.5%" HeaderText="Distancia" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="CombustibleI" DataFormatString="{0:N2} Lts." ItemStyle-Width="12.5%" HeaderText="Combustible Inicial" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="CombustibleF" DataFormatString="{0:N2} Lts." ItemStyle-Width="12.5%" HeaderText="Combustible Final" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="CombustibleConsumido" DataFormatString="{0:N2} Lts." ItemStyle-Width="12.5%" HeaderText="Combustible Consimido" ItemStyle-HorizontalAlign="Right" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</ContentTemplate>
|
|
</ajax:TabPanel>
|
|
<ajax:TabPanel runat="server" HeaderText="Gastos">
|
|
<ContentTemplate>
|
|
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
|
|
<ContentTemplate>
|
|
<div class="portlet light bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="fa fa-money font-green"></i>
|
|
<span class="caption-subject bold uppercase">Gastos</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body form">
|
|
<div style="max-height: 392px; overflow-y: scroll">
|
|
<asp:GridView ID="GvGastos" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
|
data-sort="true" data-rows="1" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" OnRowDataBound="GvGastos_RowDataBound">
|
|
<Columns>
|
|
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="Observaciones" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="Fecha" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
|
<asp:BoundField DataField="FechaIng" ItemStyle-Width="15%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
|
<asp:BoundField DataField="UsuarioIngreso" HeaderText="Usuario Ingresó" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="UsuarioModifico" HeaderText="Usuario Modificó" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="Total" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Left" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</ContentTemplate>
|
|
</ajax:TabPanel>
|
|
</ajax:TabContainer>
|
|
<div id="DModal" class="modal ADS fade" role="dialog">
|
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModal" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="modal-content">
|
|
<div class="modal-header ">
|
|
<h4 class="modal-title">
|
|
<asp:Literal ID="ltlMotititulo" Text="Modelo" runat="server"> </asp:Literal></h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFCCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFCCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtPrecio" runat="server" CssClass="form-control"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCEPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
<label for="<%= TxtPrecio.ClientID.ToString()%>">Precio:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVModelo" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCOModelo" runat="server" HighlightCssClass="vco" TargetControlID="RFVModelo" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción:</label>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtObs" runat="server" CssClass="form-control"></asp:TextBox>
|
|
<label for="<%= TxtObs.ClientID.ToString()%>">Observaciones:</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row v-center">
|
|
<label class="col-md-12" style="color: gray">Fecha:</label>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
|
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VgmGuardar" />
|
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
<asp:Button ID="BtnRefrescarPagina" runat="server" ClientIDMode="Static" Text="Refrescar" Style="display: none;" />
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
|
<script type="text/javascript">
|
|
var map;
|
|
var polylines = [];
|
|
var polygons = [];
|
|
var polybounds = [];
|
|
var markers = [];
|
|
var GeoReferencias = [];
|
|
var posicionesETA = [];
|
|
var lastOpenedInfoWindow;
|
|
var directionsDisplay;
|
|
var posInicio, posFin;
|
|
|
|
function initMap() {
|
|
polylines = [];
|
|
polygons = [];
|
|
polybounds = [];
|
|
markers = [];
|
|
GeoReferencias = [];
|
|
posicionesETA = [];
|
|
|
|
map = new google.maps.Map(document.getElementById('map'), {
|
|
center: { lat: 29.0730, lng: -110.9559 },
|
|
zoom: 7
|
|
});
|
|
|
|
//CalcularRuta();
|
|
}
|
|
|
|
function RefrescarPagina() {
|
|
$('#BtnRefrescarPagina').click();
|
|
}
|
|
|
|
function CalcularRuta() {
|
|
var origin1 = new google.maps.LatLng(55.930385, -3.118425);
|
|
|
|
var destinationA = 'Stockholm, Sweden';
|
|
var destinationB = new google.maps.LatLng(50.087692, 14.421150);
|
|
|
|
var service = new google.maps.DistanceMatrixService();
|
|
service.getDistanceMatrix(
|
|
{
|
|
origins: [origin1],
|
|
destinations: [destinationA, destinationB],
|
|
travelMode: 'DRIVING'
|
|
//transitOptions: TransitOptions,
|
|
//drivingOptions: DrivingOptions,
|
|
//unitSystem: UnitSystem,
|
|
//avoidHighways: Boolean,
|
|
//avoidTolls: Boolean,
|
|
}, callback);
|
|
|
|
function callback(response, status) {
|
|
if (status !== "OK") {
|
|
alert("Error was: " + status);
|
|
} else {
|
|
alert(JSON.stringify(response));
|
|
}
|
|
}
|
|
}
|
|
|
|
function DeleteMarkers() {
|
|
for (var i = 0; i < markers.length; i++) {
|
|
markers[i].setMap(null);
|
|
}
|
|
for (var i = 0; i < polygons.length; i++) {
|
|
polygons[i].setMap(null);
|
|
}
|
|
markers = [];
|
|
polygons = [];
|
|
if (typeof directionsDisplay !== 'undefined') {
|
|
directionsDisplay.setMap(null);
|
|
}
|
|
}
|
|
|
|
function doScaledCLick(boton) {
|
|
setTimeout(function () {
|
|
$(boton).click();
|
|
}, 250);
|
|
}
|
|
|
|
var geoReferenciaSeguir = '';
|
|
var estatusSiguiente = '';
|
|
|
|
function creaPoligono(coords, color, Geocerca, Estatus, InicioFin, CveEstatus, CveEstatusAnterior, cruzo, geocercaASeguir, estatusaSeguir) {
|
|
var polygon = new google.maps.Polygon({
|
|
paths: coords,
|
|
strokeColor: color,
|
|
strokeOpacity: 0.8,
|
|
strokeWeight: 2,
|
|
fillColor: color,
|
|
fillOpacity: 0.35
|
|
});
|
|
polygon.setMap(map);
|
|
polygons.push(polygon);
|
|
|
|
if (geocercaASeguir != '') {
|
|
geoReferenciaSeguir = geocercaASeguir;
|
|
estatusSiguiente = estatusaSeguir;
|
|
}
|
|
|
|
CreaMarcadorPoligono(coords, Geocerca, Estatus, InicioFin, CveEstatus, CveEstatusAnterior, cruzo)
|
|
}
|
|
|
|
function CreaMarcadorPoligono(coords, GeoCerca, Estatus, InicioFin, CveEstatus, CveEstatusAnterior, cruzo) {
|
|
var bounds = new google.maps.LatLngBounds();
|
|
for (i = 0; i < coords.length; i++) {
|
|
bounds.extend(coords[i]);
|
|
}
|
|
if (InicioFin == 0) {
|
|
var data = {
|
|
CveEstatus: CveEstatus,
|
|
CveEstatusAnterior: CveEstatusAnterior,
|
|
coords: bounds.getCenter(),
|
|
};
|
|
GeoReferencias.push(data);
|
|
} else if (InicioFin == 1) {
|
|
posInicio = bounds.getCenter();
|
|
} else if (InicioFin == 2) {
|
|
posFin = bounds.getCenter();
|
|
|
|
var directionsService = new google.maps.DirectionsService;
|
|
directionsDisplay = new google.maps.DirectionsRenderer({
|
|
map: map,
|
|
suppressMarkers: true
|
|
});
|
|
|
|
calculateAndDisplayRoute(directionsService, directionsDisplay, posInicio, posFin);
|
|
}
|
|
|
|
if (cruzo == "0") {
|
|
var center = bounds.getCenter();
|
|
posicionesETA.push({ lat: center.lat(), lng: center.lng() });
|
|
}
|
|
|
|
var marker = new google.maps.Marker({
|
|
position: bounds.getCenter(),
|
|
title: GeoCerca,
|
|
map: map
|
|
});
|
|
|
|
var infowindow = new google.maps.InfoWindow({
|
|
content: '<h4><b> GeoReferencia: ' + GeoCerca + '</b></h4><h4><b> Estatus: ' + Estatus + '</b></h4>'
|
|
});
|
|
|
|
marker.addListener('click', function () {
|
|
closeLastOpenedInfoWindow();
|
|
infowindow.open(map, marker);
|
|
lastOpenedInfoWindow = infowindow;
|
|
});
|
|
|
|
markers.push(marker);
|
|
}
|
|
|
|
function calculateAndDisplayRoute(directionsService, directionsDisplay, pointA, pointB) {
|
|
var waypts = [];
|
|
var orden = GeoReferencias.sort((a, b) => parseInt(a.CveEstatusAnterior) - parseInt(b.CveEstatusAnterior));
|
|
for (var i = 0; i < orden.length; i++) {
|
|
waypts.push({
|
|
location: orden[i].coords,
|
|
stopover: true
|
|
});
|
|
}
|
|
directionsService.route({
|
|
origin: pointA,
|
|
destination: pointB,
|
|
waypoints: waypts,
|
|
travelMode: google.maps.TravelMode.DRIVING
|
|
}, function (response, status) {
|
|
if (status == google.maps.DirectionsStatus.OK) {
|
|
directionsDisplay.setDirections(response);
|
|
} else {
|
|
window.alert('Directions request failed due to ' + status);
|
|
}
|
|
});
|
|
}
|
|
|
|
function CenterPoligono(coords) {
|
|
var bounds = new google.maps.LatLngBounds();
|
|
for (i = 0; i < coords.length; i++) {
|
|
bounds.extend(coords[i]);
|
|
}
|
|
map.fitBounds(bounds)
|
|
}
|
|
|
|
function closeLastOpenedInfoWindow() {
|
|
if (lastOpenedInfoWindow) {
|
|
lastOpenedInfoWindow.close();
|
|
}
|
|
}
|
|
|
|
function FitBounds() {
|
|
var bounds = new google.maps.LatLngBounds();
|
|
for (var i = 0; i < polygons.length; i++) {
|
|
var paths = polygons[i].getPaths();
|
|
paths.forEach(function (path) {
|
|
var ar = path.getArray();
|
|
for (var i = 0, l = ar.length; i < l; i++) {
|
|
bounds.extend(ar[i]);
|
|
}
|
|
})
|
|
}
|
|
for (var i = 0; i < polybounds.length; i++) {
|
|
bounds.extend(polybounds[i]);
|
|
}
|
|
|
|
for (var i = 0; i < markers.length; i++) {
|
|
if (markers[i].getVisible()) {
|
|
bounds.extend(markers[i].getPosition());
|
|
}
|
|
}
|
|
|
|
map.fitBounds(bounds)
|
|
}
|
|
|
|
function CreaMarcadorPI(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 CreaMarcador(coords, nomEquipo, ContentString, imagen) {
|
|
//setTimeout(function () {
|
|
|
|
//}, 500);
|
|
|
|
if (typeof imagen === 'undefined') { imagen = image; }
|
|
var marker = new google.maps.Marker({
|
|
position: coords,
|
|
title: nomEquipo,
|
|
map: map,
|
|
icon: imagen
|
|
});
|
|
|
|
var infowindow = new google.maps.InfoWindow({
|
|
content: ContentString
|
|
});
|
|
marker.addListener('click', function () {
|
|
closeLastOpenedInfoWindow();
|
|
infowindow.open(map, marker);
|
|
lastOpenedInfoWindow = infowindow;
|
|
});
|
|
markers.push(marker);
|
|
posicionesETA.push(coords);
|
|
}
|
|
|
|
function creaPolyline(coords, color, GeoCerca) {
|
|
var polyline = new google.maps.Polyline({
|
|
path: coords,
|
|
strokeColor: color,
|
|
strokeOpacity: 0.8,
|
|
strokeWeight: 2,
|
|
fillOpacity: 0.35
|
|
});
|
|
polyline.setMap(map);
|
|
polylines.push(polyline);
|
|
polybounds.push(coords[0]);
|
|
polybounds.push(coords[coords.length - 1]);
|
|
CreaMarcadorPoligono(coords, GeoCerca);
|
|
}
|
|
|
|
function NuevaConsulta() {
|
|
for (var i = 0; i < polygons.length; i++) {
|
|
polygons[i].setMap(null);
|
|
}
|
|
polygons = [];
|
|
for (var i = 0; i < polylines.length; i++) {
|
|
polylines[i].setMap(null);
|
|
}
|
|
|
|
for (var i = 0; i < markers.length; i++) {
|
|
markers[i].setMap(null);
|
|
}
|
|
polylines = [];
|
|
polybounds = [];
|
|
markers = [];
|
|
$("#dvConsulta").modal({ backdrop: 'static', keyboard: false })
|
|
}
|
|
|
|
function fitBoundsToVisibleMarkers() {
|
|
|
|
var bounds = new google.maps.LatLngBounds();
|
|
|
|
for (var i = 0; i < polygons.length; i++) {
|
|
bounds.extend(polygons[i].my_getBounds().getCenter())
|
|
|
|
}
|
|
for (var i = 0; i < markers.length; i++) {
|
|
if (markers[i].getVisible()) {
|
|
bounds.extend(markers[i].getPosition());
|
|
}
|
|
}
|
|
map.fitBounds(bounds);
|
|
|
|
}
|
|
|
|
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 CalcularETA() {
|
|
|
|
if (posicionesETA.length > 1) {
|
|
var latlongs = [];
|
|
var destinations = [];
|
|
var sources = [];
|
|
|
|
for (var i = 0; i < posicionesETA.length; i++) {
|
|
latlongs.push([posicionesETA[i].lng, posicionesETA[i].lat]);
|
|
|
|
if (i > 0) {
|
|
destinations.push(i);
|
|
}
|
|
|
|
if (i < posicionesETA.length - 1) {
|
|
sources.push(i);
|
|
}
|
|
}
|
|
|
|
const body = { locations: latlongs, destinations: destinations, sources: sources, resolve_locations: true };
|
|
|
|
fetch('https://api.openrouteservice.org/v2/matrix/driving-car', {
|
|
method: 'POST', // or 'PUT'
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'Authorization': '5b3ce3597851110001cf624839503f1e326e4ab8aa8a27afbcf30f6a'
|
|
},
|
|
body: JSON.stringify(body),
|
|
})
|
|
.then(response => response.json())
|
|
.then(data => {
|
|
let duracionTotal = 0;
|
|
|
|
if (data.durations.length > 0) {
|
|
for (var j = 0; j < data.durations.length; j++) {
|
|
let duracionPunto = data.durations[j][j]
|
|
duracionTotal += duracionPunto;
|
|
}
|
|
}
|
|
|
|
LblETA.innerHTML = formatETA(duracionTotal) + '<br> <b>Geocerca:</b> ' + geoReferenciaSeguir + '.<br> <b>Estatus:</b> ' + estatusSiguiente;
|
|
})
|
|
.catch((error) => {
|
|
alert('Error:' + error);
|
|
});
|
|
}
|
|
}
|
|
|
|
function formatETA(time) {
|
|
// Hours, minutes and seconds
|
|
var hrs = ~~(time / 3600);
|
|
var mins = ~~((time % 3600) / 60);
|
|
var secs = ~~time % 60;
|
|
|
|
// Output like "1:01" or "4:03:59" or "123:03:59"
|
|
var ret = "";
|
|
if (hrs > 0) {
|
|
ret += "" + hrs + " horas " + (mins < 10 ? "0" : "");
|
|
}
|
|
ret += "" + mins + " minutos " + (secs < 10 ? "0" : "");
|
|
ret += "" + secs + " segundos";
|
|
return ret;
|
|
}
|
|
|
|
</script>
|
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"></script>
|
|
</asp:Content>
|
|
|