Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -13,7 +13,7 @@ Imports Modelos
|
|||||||
|
|
||||||
Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||||
|
|
||||||
Private Property CveEmpresaFacturar As Integer = 143
|
Private Property CveEmpresaFacturar As Integer = 194
|
||||||
|
|
||||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||||
context.Response.ContentType = "text/plain"
|
context.Response.ContentType = "text/plain"
|
||||||
@@ -906,7 +906,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
|||||||
' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10)
|
' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10)
|
||||||
strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString)
|
strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString)
|
||||||
Try
|
Try
|
||||||
ArchivoW = New StreamWriter(String.Format("{0}\LogFacturacion.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8)
|
ArchivoW = New StreamWriter(String.Format("{0}\Log\LogFacturacion.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
|
||||||
Catch ex As UnauthorizedAccessException
|
Catch ex As UnauthorizedAccessException
|
||||||
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
|
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
<label class="col-md-1 ">Tipo de Unidad</label>
|
<label class="col-md-1 ">Tipo de Unidad</label>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<asp:DropDownList ID="DdlTipoUnidad" data-text="Todos" AppendDataBoundItems="true"
|
<asp:DropDownList ID="DdlTipoUnidad" data-text="Todos" AppendDataBoundItems="true"
|
||||||
DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" CssClass="form-control ddlFiltros input-sm select2me Widthall" ClientIDMode="Static"
|
DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" CssClass="form-control ddlFiltros input-sm select2me Widthall" ClientIDMode="Static"
|
||||||
Style="width: 100%;" runat="server">
|
Style="width: 100%;" runat="server">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||||
<%--Calendario Tab--%>
|
<%--Calendario Tab--%>
|
||||||
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario" OnClientClick="TabAltaClicked" >
|
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario" OnClientClick="TabAltaClicked">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||||
@@ -200,14 +200,14 @@
|
|||||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn miGrid"
|
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn miGrid"
|
||||||
GridLines="None" data-sort="true"
|
GridLines="None" data-sort="true"
|
||||||
DataKeyNames="CveContrato,NumeroContrato,DescripcionContrato,Ubicacion,FechaInicial,FechaFinal,CveCliente,NombreComercial,CveTipoAF,Importe,ImporteMin,ImporteMax,Observaciones,CveAF,CveChofer,CveChofer2,CveContratosEstatus,CantidadPasajeros,CveMoneda,Moneda,CveSubProyecto,NumChoferes,CveVentaRemision,RemisionSerieFolio,RemisionSaldo,TipoEstatus">
|
DataKeyNames="CveContrato,NumeroContrato,DescripcionContrato,Ubicacion,FechaInicial,FechaFinal,CveCliente,NombreComercial,CveTipoAF,Importe,ImporteMin,ImporteMax,Observaciones,CveAF,CveChofer,CveChofer2,CveContratosEstatus,CantidadPasajeros,CveMoneda,Moneda,CveSubProyecto,NumChoferes,CveVentaRemision,RemisionSerieFolio,RemisionSaldo,TipoEstatus">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Contrato">
|
<asp:TemplateField HeaderText="Contrato">
|
||||||
@@ -326,7 +326,7 @@
|
|||||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-dialog rowpadding">
|
<div class="modal-dialog rowpadding">
|
||||||
<div class="modal-content" style="width:950px;">
|
<div class="modal-content" style="width: 950px;">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
@@ -336,22 +336,22 @@
|
|||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
|
|
||||||
<label class="col-md-3 bold text-primary">Folio:</label>
|
<label class="col-md-3 bold text-primary">Folio:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:TextBox ID="TxtFolio" runat="server" Width="80px" Font-Bold="true" cssclass="textaslabel"></asp:TextBox>
|
<asp:TextBox ID="TxtFolio" runat="server" Width="80px" Font-Bold="true" CssClass="textaslabel"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:HyperLink runat="server" Text="" Target="_blank" id="HypRemision" CssClass="Texto"></asp:HyperLink>
|
<asp:HyperLink runat="server" Text="" Target="_blank" ID="HypRemision" CssClass="Texto"></asp:HyperLink>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<asp:Label runat="server" ID="LblSaldo"></asp:Label>
|
<asp:Label runat="server" ID="LblSaldo"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-3">Cliente</label>
|
<label class="col-md-3">Cliente</label>
|
||||||
@@ -390,32 +390,32 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<asp:Label ID="LbEstatus" runat="server" class="col-md-3">Estatus:</asp:Label>
|
<asp:Label ID="LbEstatus" runat="server" class="col-md-3">Estatus:</asp:Label>
|
||||||
<div class="col-md-9">
|
|
||||||
<asp:DropDownList ID="DdlEstatusContrato" Enabled="false" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
|
||||||
AppendDataBoundItems="true" DataValueField="CveContratoEstatus"
|
|
||||||
DataTextField="ContratoEstatus"
|
|
||||||
Width="100%">
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
|
||||||
<label class="col-md-3">Moneda:</label>
|
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtMoneda" runat="server" Width="100%" Enabled="false"></asp:TextBox>
|
<asp:DropDownList ID="DdlEstatusContrato" Enabled="false" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||||
|
AppendDataBoundItems="true" DataValueField="CveContratoEstatus"
|
||||||
|
DataTextField="ContratoEstatus"
|
||||||
|
Width="100%">
|
||||||
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-3">Moneda:</label>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<asp:TextBox ID="TxtMoneda" runat="server" Width="100%" Enabled="false"></asp:TextBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
<div class="row ">
|
<div class="row ">
|
||||||
<label class="col-md-3"># Pasajeros:</label>
|
<label class="col-md-3"># Pasajeros:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" Width="80px"></asp:TextBox>
|
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" Width="80px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-3">Lugar de Salida:</label>
|
<label class="col-md-3">Lugar de Salida:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
@@ -432,7 +432,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-3">Fecha Regreso:</label>
|
<label class="col-md-3">Fecha Regreso:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
@@ -449,8 +449,7 @@
|
|||||||
DataTextField="TipoActivoFijo" Class="form-control input-inline"
|
DataTextField="TipoActivoFijo" Class="form-control input-inline"
|
||||||
Width="100%" runat="server" Enabled="true"
|
Width="100%" runat="server" Enabled="true"
|
||||||
AutoPostBack="true"
|
AutoPostBack="true"
|
||||||
OnSelectedIndexChanged="DdlTipoAF_SelectedIndexChanged"
|
OnSelectedIndexChanged="DdlTipoAF_SelectedIndexChanged">
|
||||||
>
|
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -460,40 +459,40 @@
|
|||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<asp:DropDownList ID="DdlAF" DataValueField="CveActivoFijo"
|
<asp:DropDownList ID="DdlAF" DataValueField="CveActivoFijo"
|
||||||
DataTextField="CodDesc" Class="form-control select2me"
|
DataTextField="CodDesc" Class="form-control select2me"
|
||||||
Width="100%" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlAF_SelectedIndexChanged" >
|
Width="100%" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlAF_SelectedIndexChanged">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row my-1" runat="server" id="DVMotivoCambioAF" visible="false">
|
<div class="row my-1" runat="server" id="DVMotivoCambioAF" visible="false">
|
||||||
<label class="col-md-3">Motivo Cambio:</label>
|
<label class="col-md-3">Motivo Cambio:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtMotivoCambioUnidad" CssStyle=" form-control" runat="server" MaxLength="2000" Width="100%" ></asp:TextBox>
|
<asp:TextBox ID="TxtMotivoCambioUnidad" CssStyle=" form-control" runat="server" MaxLength="2000" Width="100%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtMotivoCambioUnidad" runat="server" ControlToValidate="TxtMotivoCambioUnidad" ErrorMessage="Campo Motivo Cambio requerido." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvTxtMotivoCambioUnidad" runat="server" ControlToValidate="TxtMotivoCambioUnidad" ErrorMessage="Campo Motivo Cambio requerido." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCERfvTxtMotivoCambioUnidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtMotivoCambioUnidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCERfvTxtMotivoCambioUnidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtMotivoCambioUnidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-3">Chofer 1</label>
|
<label class="col-md-3">Chofer 1</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||||
Width="100%" runat="server">
|
Width="100%" runat="server">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row my-1" >
|
<div class="row my-1">
|
||||||
<label class="col-md-3">Chofer 2 <asp:CheckBox runat="server" ID="chkSegundoChofer" AutoPostBack="true" OnCheckedChanged="chkSegundoChofer_CheckedChanged" /></label>
|
<label class="col-md-3">Chofer 2 <asp:CheckBox runat="server" ID="chkSegundoChofer" AutoPostBack="true" OnCheckedChanged="chkSegundoChofer_CheckedChanged" /></label>
|
||||||
<div class="col-md-9" runat="server" id="DVChofer2">
|
<div class="col-md-9" runat="server" id="DVChofer2">
|
||||||
<asp:DropDownList ID="DdlChofer2" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
<asp:DropDownList ID="DdlChofer2" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||||
Width="100%" runat="server">
|
Width="100%" runat="server">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row hidden">
|
<div class="row hidden">
|
||||||
<label class="col-md-3">Costo dólares:</label>
|
<label class="col-md-3">Costo dólares:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
@@ -514,7 +513,7 @@
|
|||||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" runat="server" type="decimal"></asp:TextBox>
|
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" runat="server" type="decimal"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -536,10 +535,9 @@
|
|||||||
<asp:UpdatePanel ID="UpCommando" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpCommando" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button runat="server" ID="BtnModal" OnClick="MostrarModal"></asp:Button>
|
<asp:Button runat="server" ID="BtnModal" OnClick="MostrarModal"></asp:Button>
|
||||||
<asp:HiddenField runat="server" ID="HdnCveContrato" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HdnCveContrato" Value="-1" ClientIDMode="Static" />
|
||||||
|
|
||||||
<%--<asp:Button runat="server" ID="BtnDdlTipoAF" OnClick="BtnDdlTipoAF_Click" ClientIDMode="Static"></asp:Button>--%>
|
|
||||||
|
|
||||||
|
<%--<asp:Button runat="server" ID="BtnDdlTipoAF" OnClick="BtnDdlTipoAF_Click" ClientIDMode="Static"></asp:Button>--%>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
@@ -547,7 +545,7 @@
|
|||||||
<asp:HiddenField runat="server" ID="HidModClienteNombre" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HidModClienteNombre" ClientIDMode="Static" />
|
||||||
<asp:HiddenField runat="server" ID="HidModCveCliente" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HidModCveCliente" ClientIDMode="Static" />
|
||||||
<asp:HiddenField runat="server" ID="HidCurrentMonth" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField runat="server" ID="HidCurrentMonth" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField runat="server" ID="HidCurrentYear" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField runat="server" ID="HidCurrentYear" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField runat="server" ID="HidCveTipoAF" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HidCveTipoAF" Value="-1" ClientIDMode="Static" />
|
||||||
<asp:HiddenField runat="server" ID="HidNumChoferes" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HidNumChoferes" Value="-1" ClientIDMode="Static" />
|
||||||
<asp:HiddenField runat="server" ID="HidRemisionSerieFolio" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HidRemisionSerieFolio" Value="-1" ClientIDMode="Static" />
|
||||||
@@ -612,7 +610,7 @@
|
|||||||
// Set themes
|
// Set themes
|
||||||
// https://www.amcharts.com/docs/v5/concepts/themes/
|
// https://www.amcharts.com/docs/v5/concepts/themes/
|
||||||
root.setThemes([
|
root.setThemes([
|
||||||
am5themes_Animated.new(root)
|
am5themes_Animated.new(root)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Create chart
|
// Create chart
|
||||||
@@ -638,17 +636,17 @@
|
|||||||
// Create axes
|
// Create axes
|
||||||
// https://www.amcharts.com/docs/v5/charts/xy-chart/axes/
|
// https://www.amcharts.com/docs/v5/charts/xy-chart/axes/
|
||||||
var yAxis = chart.yAxes.push(
|
var yAxis = chart.yAxes.push(
|
||||||
am5xy.CategoryAxis.new(root, {
|
am5xy.CategoryAxis.new(root, {
|
||||||
categoryField: "category",
|
categoryField: "category",
|
||||||
renderer: am5xy.AxisRendererY.new(root, {
|
renderer: am5xy.AxisRendererY.new(root, {
|
||||||
inversed: true,
|
inversed: true,
|
||||||
minorGridEnabled: true
|
minorGridEnabled: true
|
||||||
}),
|
}),
|
||||||
tooltip: am5.Tooltip.new(root, {
|
tooltip: am5.Tooltip.new(root, {
|
||||||
themeTags: ["axis"],
|
themeTags: ["axis"],
|
||||||
animationDuration: 200
|
animationDuration: 200
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
yAxis.data.setAll(categorias);
|
yAxis.data.setAll(categorias);
|
||||||
@@ -674,7 +672,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
var xAxis = chart.xAxes.push(
|
var xAxis = chart.xAxes.push(
|
||||||
dateAxis
|
dateAxis
|
||||||
);
|
);
|
||||||
|
|
||||||
chart.topAxesContainer.children.push(dateAxis);
|
chart.topAxesContainer.children.push(dateAxis);
|
||||||
@@ -728,14 +726,14 @@
|
|||||||
|
|
||||||
$('#<%=HdnCveContrato.ClientID%>').val(cveContrato);
|
$('#<%=HdnCveContrato.ClientID%>').val(cveContrato);
|
||||||
|
|
||||||
let url = '/Ashx/CargaEventos.ashx?METODO=contrato_transportes' ;
|
let url = '/Ashx/CargaEventos.ashx?METODO=contrato_transportes';
|
||||||
let parametros = '&cveContrato=' + cveContrato +'&U=' + '<%= UsuarioActual.CveUsuario %>' + '&E='+ '<%= UsuarioActual.CveEmpresa %>'+ '&tipoVista=' + '<%= RBTipoVista.Text %>' + '&CveUsuarioPara:' + $('#DdlTecnico').val(); + '&CveSubProyecto:' + $('#DdlSubProyecto').val();
|
let parametros = '&cveContrato=' + cveContrato + '&U=' + '<%= UsuarioActual.CveUsuario %>' + '&E=' + '<%= UsuarioActual.CveEmpresa %>' + '&tipoVista=' + '<%= RBTipoVista.Text %>' + '&CveUsuarioPara:' + $('#DdlTecnico').val(); + '&CveSubProyecto:' + $('#DdlSubProyecto').val();
|
||||||
|
|
||||||
fetch(url + parametros).then(response => response.json()).then(json => {
|
fetch(url + parametros).then(response => response.json()).then(json => {
|
||||||
updateEvent(json[0],null,false);
|
updateEvent(json[0], null, false);
|
||||||
}).catch(err => console.log('Solicitud fallida', err));
|
}).catch(err => console.log('Solicitud fallida', err));
|
||||||
});
|
});
|
||||||
|
|
||||||
series.events.on("datavalidated", function (ev) {
|
series.events.on("datavalidated", function (ev) {
|
||||||
let cellSize = 45;
|
let cellSize = 45;
|
||||||
|
|
||||||
@@ -752,7 +750,7 @@
|
|||||||
// Set it on chart's container
|
// Set it on chart's container
|
||||||
chart.root.dom.style.height = chartHeight + "px";
|
chart.root.dom.style.height = chartHeight + "px";
|
||||||
|
|
||||||
// ev.target.get("xAxis").zoomToValues(new Date(2024,6,15).getTime(), new Date(2024,6,20).getTime());
|
// ev.target.get("xAxis").zoomToValues(new Date(2024,6,15).getTime(), new Date(2024,6,20).getTime());
|
||||||
});
|
});
|
||||||
|
|
||||||
// Make stuff animate on load
|
// Make stuff animate on load
|
||||||
@@ -764,11 +762,11 @@
|
|||||||
}); // end am5.ready()
|
}); // end am5.ready()
|
||||||
}
|
}
|
||||||
|
|
||||||
function zoomAxis(anioI,mesI,diaI,anioF,mesF,diaF) {
|
function zoomAxis(anioI, mesI, diaI, anioF, mesF, diaF) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dateAxis.zoomToDates(new Date(anioI, mesI, diaI), new Date(anioF, mesF, diaF));
|
dateAxis.zoomToDates(new Date(anioI, mesI, diaI), new Date(anioF, mesF, diaF));
|
||||||
}, 1500);
|
}, 1500);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var PrimeraCargaCalendario = true;
|
var PrimeraCargaCalendario = true;
|
||||||
@@ -780,12 +778,12 @@
|
|||||||
var date = null;
|
var date = null;
|
||||||
|
|
||||||
function InitCalendar() {
|
function InitCalendar() {
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
let mes = parseInt($('#<%=HidCurrentMonth.ClientID%>').val());
|
let mes = parseInt($('#<%=HidCurrentMonth.ClientID%>').val());
|
||||||
let anio = parseInt($('#<%=HidCurrentYear.ClientID%>').val());
|
let anio = parseInt($('#<%=HidCurrentYear.ClientID%>').val());
|
||||||
|
|
||||||
Calendario(mes,anio);
|
Calendario(mes, anio);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -800,17 +798,26 @@
|
|||||||
$('#<%=TxtObservaciones.ClientID%>').val(event.Observaciones);
|
$('#<%=TxtObservaciones.ClientID%>').val(event.Observaciones);
|
||||||
$('#<%=TxtDescripcion.ClientID%>').val(event.description);
|
$('#<%=TxtDescripcion.ClientID%>').val(event.description);
|
||||||
$('#<%=TxtUbicacion.ClientID%>').val(event.NombreAcercamiento);
|
$('#<%=TxtUbicacion.ClientID%>').val(event.NombreAcercamiento);
|
||||||
|
|
||||||
if (esCalendario) {
|
if (esCalendario) {
|
||||||
$('#<%=TxtFechaSalida.ClientID%>').val(formatearFechaISO(event.start._i));
|
$('#<%=TxtFechaSalida.ClientID%>').val(formatearFechaISO(event.start._i));
|
||||||
}else{
|
} else {
|
||||||
$('#<%=TxtFechaSalida.ClientID%>').val(formatearFechaISO(event.start));
|
$('#<%=TxtFechaSalida.ClientID%>').val(formatearFechaISO(event.start));
|
||||||
}
|
}
|
||||||
$('#<%=TxtFechaRegreso.ClientID%>').val(formatearFechaISO(event.FechaFinal));
|
$('#<%=TxtFechaRegreso.ClientID%>').val(formatearFechaISO(event.FechaFinal));
|
||||||
$('#<%=DdlClientes.ClientID%>').val(event.CveCliente);
|
$('#<%=DdlClientes.ClientID%>').val(event.CveCliente);
|
||||||
|
|
||||||
$('#<%=DdlChofer.ClientID%>').val(event.CvePersonal);
|
$('#<%=DdlChofer.ClientID%>').val(event.CvePersonal);
|
||||||
$('#<%=DdlChofer2.ClientID%>').val(event.CvePersonal2);
|
|
||||||
|
if (event.CvePersonal2 > 0) {
|
||||||
|
$('#<%=chkSegundoChofer.ClientID%>').prop('checked', true);
|
||||||
|
setTimeout(function () { $('#<%=DdlChofer2.ClientID%>').val(event.CvePersonal2).change(); }, 500);;
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
$('#<%=chkSegundoChofer.ClientID%>').prop('checked', false);
|
||||||
|
$('#<%=DdlChofer2.ClientID%>').val(-1);
|
||||||
|
}
|
||||||
|
|
||||||
$('#<%=DdlEstatusContrato.ClientID%>').val(event.CveEventoEstatus);
|
$('#<%=DdlEstatusContrato.ClientID%>').val(event.CveEventoEstatus);
|
||||||
$('#<%=TxtDolares.ClientID%>').val(event.Dolares);
|
$('#<%=TxtDolares.ClientID%>').val(event.Dolares);
|
||||||
$('#<%=TxtPesos.ClientID%>').val(event.Pesos);
|
$('#<%=TxtPesos.ClientID%>').val(event.Pesos);
|
||||||
@@ -823,7 +830,7 @@
|
|||||||
$('#<%=DdlTipoAF.ClientID%>').val(event.CveTipoAF);
|
$('#<%=DdlTipoAF.ClientID%>').val(event.CveTipoAF);
|
||||||
$('#<%=DdlSubProyectoModal.ClientID%>').val(event.CveSubProyecto);
|
$('#<%=DdlSubProyectoModal.ClientID%>').val(event.CveSubProyecto);
|
||||||
|
|
||||||
$('#<%= HidCveTipoAF.ClientID%>').val( $('#<%=DdlTipoAF.ClientID%>').val() );
|
$('#<%= HidCveTipoAF.ClientID%>').val($('#<%=DdlTipoAF.ClientID%>').val());
|
||||||
|
|
||||||
<%--$('#<%=BtnDdlTipoAF.ClientID%>').click();--%>
|
<%--$('#<%=BtnDdlTipoAF.ClientID%>').click();--%>
|
||||||
<%--$('#<%=DdlAF.ClientID%>').val(event.CveActivoFijo);--%>
|
<%--$('#<%=DdlAF.ClientID%>').val(event.CveActivoFijo);--%>
|
||||||
@@ -833,14 +840,14 @@
|
|||||||
$('#HidRemisionSerieFolio').val(event.RemisionSerieFolio);
|
$('#HidRemisionSerieFolio').val(event.RemisionSerieFolio);
|
||||||
$('#HidCveVentaRemision').val(event.CveVentaRemision);
|
$('#HidCveVentaRemision').val(event.CveVentaRemision);
|
||||||
$('#HidRemisionSaldo').val(event.RemisionSaldo);
|
$('#HidRemisionSaldo').val(event.RemisionSaldo);
|
||||||
$('#HdnNumContrato').val(event.NumeroContrato);
|
$('#HdnNumContrato').val(event.NumeroContrato);
|
||||||
|
|
||||||
if (event.CveActivoFijo > 0) {
|
if (event.CveActivoFijo > 0) {
|
||||||
$('#HidCveAF').val(event.CveActivoFijo);
|
$('#HidCveAF').val(event.CveActivoFijo);
|
||||||
} else {
|
} else {
|
||||||
$('#HidCveAF').val('-1');
|
$('#HidCveAF').val('-1');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (event.NombreComercial !== null) {
|
if (event.NombreComercial !== null) {
|
||||||
$('#HidModClienteNombre').val('');
|
$('#HidModClienteNombre').val('');
|
||||||
@@ -850,7 +857,7 @@
|
|||||||
|
|
||||||
$('#HidModCveCliente').val(event.CveCliente);
|
$('#HidModCveCliente').val(event.CveCliente);
|
||||||
|
|
||||||
$('#<%=BtnModal.ClientID%>').click();
|
$('#<%=BtnModal.ClientID%>').click();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -872,71 +879,71 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//function formatearFechaISO(fechaISO) {
|
//function formatearFechaISO(fechaISO) {
|
||||||
// let fecha = new Date(fechaISO);
|
// let fecha = new Date(fechaISO);
|
||||||
|
|
||||||
// // Formatear la fecha en DD/MM/YYYY
|
// // Formatear la fecha en DD/MM/YYYY
|
||||||
// let dia = fecha.getDate().toString().padStart(2, '0');
|
// let dia = fecha.getDate().toString().padStart(2, '0');
|
||||||
// let mes = (fecha.getMonth() + 1).toString().padStart(2, '0'); // getMonth() devuelve mes de 0-11
|
// let mes = (fecha.getMonth() + 1).toString().padStart(2, '0'); // getMonth() devuelve mes de 0-11
|
||||||
// let año = fecha.getFullYear();
|
// let año = fecha.getFullYear();
|
||||||
|
|
||||||
// // Formatear la hora en formato 12 horas con AM/PM
|
// // Formatear la hora en formato 12 horas con AM/PM
|
||||||
// let horas = fecha.getHours();
|
// let horas = fecha.getHours();
|
||||||
// let minutos = fecha.getMinutes().toString().padStart(2, '0');
|
// let minutos = fecha.getMinutes().toString().padStart(2, '0');
|
||||||
// let periodo = 'a. m.';
|
// let periodo = 'a. m.';
|
||||||
// if (horas >= 12) {
|
// if (horas >= 12) {
|
||||||
// periodo = 'p. m.';
|
// periodo = 'p. m.';
|
||||||
// horas = horas > 12 ? horas - 12 : horas; // Convertir hora de formato 24 a 12 horas
|
// horas = horas > 12 ? horas - 12 : horas; // Convertir hora de formato 24 a 12 horas
|
||||||
// }
|
// }
|
||||||
// if (horas === 0) horas = 12; // Medianoche se muestra como 12 a.m.
|
// if (horas === 0) horas = 12; // Medianoche se muestra como 12 a.m.
|
||||||
// horas = horas.toString().padStart(2, '0');
|
// horas = horas.toString().padStart(2, '0');
|
||||||
|
|
||||||
// // Combinar la fecha y la hora
|
// // Combinar la fecha y la hora
|
||||||
// return `${dia}/${mes}/${año} ${horas}:${minutos}:00 ${periodo}`;
|
// return `${dia}/${mes}/${año} ${horas}:${minutos}:00 ${periodo}`;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
||||||
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
|
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateEventOnDropResize(event, allDay) {
|
||||||
|
var eventToUpdate = {
|
||||||
|
id: event.id,
|
||||||
|
start: event.start
|
||||||
|
};
|
||||||
|
|
||||||
|
if (event.end === null) {
|
||||||
|
eventToUpdate.end = eventToUpdate.start;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
eventToUpdate.end = event.end;
|
||||||
|
}
|
||||||
|
var endDate;
|
||||||
|
if (!event.allDay) {
|
||||||
|
endDate = new Date(eventToUpdate.end + 60 * 60000);
|
||||||
|
endDate = endDate.toJSON();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
endDate = eventToUpdate.end.toJSON();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateEventOnDropResize(event, allDay) {
|
eventToUpdate.start = eventToUpdate.start.toJSON();
|
||||||
var eventToUpdate = {
|
eventToUpdate.end = eventToUpdate.end.toJSON(); //endDate;
|
||||||
id: event.id,
|
eventToUpdate.allDay = event.allDay;
|
||||||
start: event.start
|
|
||||||
};
|
|
||||||
|
|
||||||
if (event.end === null) {
|
PageMethods.ActualizaEvento(eventToUpdate, UpdateTimeSuccess);
|
||||||
eventToUpdate.end = eventToUpdate.start;
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
eventToUpdate.end = event.end;
|
|
||||||
}
|
|
||||||
var endDate;
|
|
||||||
if (!event.allDay) {
|
|
||||||
endDate = new Date(eventToUpdate.end + 60 * 60000);
|
|
||||||
endDate = endDate.toJSON();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
endDate = eventToUpdate.end.toJSON();
|
|
||||||
}
|
|
||||||
|
|
||||||
eventToUpdate.start = eventToUpdate.start.toJSON();
|
function eventDropped(event, dayDelta, minuteDelta, allDay, revertFunc) {
|
||||||
eventToUpdate.end = eventToUpdate.end.toJSON(); //endDate;
|
if ($(this).data("qtip")) $(this).qtip("destroy");
|
||||||
eventToUpdate.allDay = event.allDay;
|
updateEventOnDropResize(event);
|
||||||
|
}
|
||||||
|
|
||||||
PageMethods.ActualizaEvento(eventToUpdate, UpdateTimeSuccess);
|
function eventResized(event, dayDelta, minuteDelta, revertFunc) {
|
||||||
}
|
if ($(this).data("qtip")) $(this).qtip("destroy");
|
||||||
|
|
||||||
function eventDropped(event, dayDelta, minuteDelta, allDay, revertFunc) {
|
updateEventOnDropResize(event);
|
||||||
if ($(this).data("qtip")) $(this).qtip("destroy");
|
}
|
||||||
updateEventOnDropResize(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
function eventResized(event, dayDelta, minuteDelta, revertFunc) {
|
|
||||||
if ($(this).data("qtip")) $(this).qtip("destroy");
|
|
||||||
|
|
||||||
updateEventOnDropResize(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
function Calendario(mes = -1, anio = -1) {
|
function Calendario(mes = -1, anio = -1) {
|
||||||
|
|
||||||
@@ -1045,39 +1052,39 @@
|
|||||||
$('#<%=HidCurrentMonth.ClientID%>').val(currentMonth);
|
$('#<%=HidCurrentMonth.ClientID%>').val(currentMonth);
|
||||||
$('#<%=HidCurrentYear.ClientID%>').val(currentYear);
|
$('#<%=HidCurrentYear.ClientID%>').val(currentYear);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function obtenerFechaInicio(mes = -1, anio = -1) {
|
function obtenerFechaInicio(mes = -1, anio = -1) {
|
||||||
let fechaActual = new Date();
|
let fechaActual = new Date();
|
||||||
|
|
||||||
if (mes === -1) {
|
|
||||||
mes = fechaActual.getMonth() + 1; // getMonth() es base 0, así que se suma 1
|
|
||||||
}
|
|
||||||
if (anio === -1) {
|
|
||||||
anio = fechaActual.getFullYear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
let mesFormateado = ('0' + mes).slice(-2);
|
|
||||||
|
|
||||||
|
if (mes === -1) {
|
||||||
let fechaInicio = `${anio}-${mesFormateado}-01`;
|
mes = fechaActual.getMonth() + 1; // getMonth() es base 0, así que se suma 1
|
||||||
|
}
|
||||||
|
if (anio === -1) {
|
||||||
|
anio = fechaActual.getFullYear();
|
||||||
|
}
|
||||||
|
|
||||||
return fechaInicio;
|
|
||||||
}
|
let mesFormateado = ('0' + mes).slice(-2);
|
||||||
|
|
||||||
|
|
||||||
|
let fechaInicio = `${anio}-${mesFormateado}-01`;
|
||||||
|
|
||||||
|
return fechaInicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function TabAltaClicked(sender, e) {
|
function TabAltaClicked(sender, e) {
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
InitCalendar();
|
InitCalendar();
|
||||||
|
|
||||||
}, 10);
|
}, 10);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user