Ordenamiento en JS
This commit is contained in:
@@ -1021,13 +1021,14 @@ Public Class ClsNominas
|
|||||||
' Return Retorno
|
' Return Retorno
|
||||||
'End Function
|
'End Function
|
||||||
|
|
||||||
Public Function DeleteNom_NominasDetalles(CveConcepto As Integer, CvePersonal As Integer, CvePeriodo As Integer) As Boolean
|
Public Function DeleteNom_NominasDetalles(CveConcepto As Integer, CvePersonal As Integer, CvePeriodo As Integer, CveUsuario As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Nom_NominasDetallesDelete")
|
DataAdapter("PA_Nom_NominasDetallesDelete")
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
|
SqlAdapter.SelectCommand.Parameters.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
SqlAdapter.SelectCommand.Parameters.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
SqlAdapter.SelectCommand.Parameters.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -1038,12 +1039,13 @@ Public Class ClsNominas
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function RemoveNom_NominasDetalles(CveNominaDetalle As Integer) As Boolean
|
Public Function RemoveNom_NominasDetalles(CveNominaDetalle As Integer, CveUsuario As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Nom_NominasDetallesRemove")
|
DataAdapter("PA_Nom_NominasDetallesRemove")
|
||||||
|
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@CveNominaDetalle", SqlDbType.Int).Value = CveNominaDetalle
|
SqlAdapter.SelectCommand.Parameters.Add("@CveNominaDetalle", SqlDbType.Int).Value = CveNominaDetalle
|
||||||
|
SqlAdapter.SelectCommand.Parameters.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
@@ -2237,7 +2239,8 @@ Public Class ClsNominas
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddPeriodo(CveTipoPeriodo As Integer, Ejercicio As Integer, Mes As Integer, Numero As Integer, FechaInicio As Date, FechaFin As Date,
|
Public Function AddPeriodo(CveTipoPeriodo As Integer, Ejercicio As Integer, Mes As Integer, Numero As Integer, FechaInicio As Date, FechaFin As Date,
|
||||||
EsInicioMes As Boolean, EsFinMes As Boolean, EsInicioSS As Boolean, EsFinSS As Boolean, EsInicioAño As Boolean, EsFinAño As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveTurno As Integer, Estatus As Integer, CveSubTipoPeriodo As Integer) As Boolean
|
EsInicioMes As Boolean, EsFinMes As Boolean, EsInicioSS As Boolean, EsFinSS As Boolean, EsInicioAño As Boolean, EsFinAño As Boolean, CveUsuario As Integer,
|
||||||
|
CveEmpresa As Integer, CveTurno As Integer, Estatus As Integer, CveSubTipoPeriodo As Integer, AplicaAjusteAlNeto As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Nom_PeriodosAdd")
|
DataAdapter("PA_Nom_PeriodosAdd")
|
||||||
@@ -2261,6 +2264,7 @@ Public Class ClsNominas
|
|||||||
.Add("@CveUsuario", SqlDbType.VarChar).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.VarChar).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo
|
.Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo
|
||||||
|
.Add("@AplicaAjusteAlNeto", SqlDbType.Int).Value = AplicaAjusteAlNeto
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -2281,7 +2285,7 @@ Public Class ClsNominas
|
|||||||
|
|
||||||
Public Function UpdatePeriodo(FechaInicio As Date, FechaFin As Date, EsInicioMes As Boolean, EsFinMes As Boolean, EsInicioSS As Boolean, EsFinSS As Boolean,
|
Public Function UpdatePeriodo(FechaInicio As Date, FechaFin As Date, EsInicioMes As Boolean, EsFinMes As Boolean, EsInicioSS As Boolean, EsFinSS As Boolean,
|
||||||
EsInicioAño As Boolean, EsFinAño As Boolean, FueCalculado As Boolean, CveTipoPeriodo As Integer, Ejercicio As Integer, Mes As Integer, Numero As Integer,
|
EsInicioAño As Boolean, EsFinAño As Boolean, FueCalculado As Boolean, CveTipoPeriodo As Integer, Ejercicio As Integer, Mes As Integer, Numero As Integer,
|
||||||
Estatus As Integer, CvePeriodo As Integer, CveEmpresa As Integer, CveTurno As Integer, CveSubTipoPeriodo As Integer) As Boolean
|
Estatus As Integer, CvePeriodo As Integer, CveEmpresa As Integer, CveTurno As Integer, CveSubTipoPeriodo As Integer, CveUsuario As Integer, Optional AplicaAjusteAlNeto As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -2308,6 +2312,9 @@ Public Class ClsNominas
|
|||||||
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno
|
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo
|
.Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo
|
||||||
|
|
||||||
|
.Add("@CveUsuario", SqlDbType.VarChar).Value = CveUsuario
|
||||||
|
.Add("@AplicaAjusteAlNeto", SqlDbType.Int).Value = AplicaAjusteAlNeto
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
.Totales, .table-striped > tbody > tr.Totales {
|
.Totales, .table-striped > tbody > tr.Totales {
|
||||||
background: rgb(158 169 190) !important;
|
background: rgb(158 169 190) !important;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
.divContainerads {
|
.divContainerads {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-height: calc(100vh - 260px);
|
max-height: calc(100vh - 260px);
|
||||||
@@ -104,26 +104,20 @@
|
|||||||
background-color:inherit;
|
background-color:inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.adssigscroll tr,
|
|
||||||
table.adssigscroll tr td {
|
|
||||||
/*visibility: hidden;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
table.adssigscroll tr:nth-child(1),
|
table.adssigscroll tr:nth-child(1),
|
||||||
table.adssigscroll tr:nth-child(2) {
|
table.adssigscroll tr:nth-child(2) {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0; /* Se mantiene pegado en la parte superior */
|
top: 0;
|
||||||
background-color: inherit; /* Para que no se superponga con otros elementos */
|
background-color: inherit;
|
||||||
z-index: 4; /* Asegura que esté sobre otros elementos */
|
z-index: 4;
|
||||||
}
|
}
|
||||||
table.adssigscroll tr:nth-child(1) th:nth-child(1),table.adssigscroll tr:nth-child(1) th:nth-child(2),
|
table.adssigscroll tr:nth-child(1) th:nth-child(1),table.adssigscroll tr:nth-child(1) th:nth-child(2),
|
||||||
table.adssigscroll tr:nth-child(2) td:nth-child(1),table.adssigscroll tr:nth-child(2) td:nth-child(2) {
|
table.adssigscroll tr:nth-child(2) td:nth-child(1),table.adssigscroll tr:nth-child(2) td:nth-child(2) {
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.adssigscroll tr:nth-child(2) {
|
table.adssigscroll tr:nth-child(2) { top: 26.14px; }
|
||||||
top: 26.14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.adssigscroll tr td:nth-child(1),table.adssigscroll tr th:nth-child(1),
|
table.adssigscroll tr td:nth-child(1),table.adssigscroll tr th:nth-child(1),
|
||||||
table.adssigscroll tr td:nth-child(2),table.adssigscroll tr th:nth-child(2) {
|
table.adssigscroll tr td:nth-child(2),table.adssigscroll tr th:nth-child(2) {
|
||||||
@@ -144,10 +138,52 @@
|
|||||||
table.adssigscroll tr td:nth-child(2),table.adssigscroll tr th:nth-child(2) {
|
table.adssigscroll tr td:nth-child(2),table.adssigscroll tr th:nth-child(2) {
|
||||||
left: 120px;
|
left: 120px;
|
||||||
}
|
}
|
||||||
/*
|
*/
|
||||||
tr:nth-child(n + 100) {
|
|
||||||
visibility:hidden;
|
/*Begin ScrollADS V2*/
|
||||||
}*/
|
|
||||||
|
|
||||||
|
.divContainerads {
|
||||||
|
width: 100%;
|
||||||
|
max-height: calc(100vh - 260px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.adssigscroll {
|
||||||
|
min-width: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.adssigscroll tbody, table.adssigscroll thead {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.adssigscroll tr {
|
||||||
|
background-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.adssigscroll tr.stickyRow {
|
||||||
|
position: sticky;
|
||||||
|
top: 0; /* Se mantiene pegado en la parte superior */
|
||||||
|
background-color: inherit; /* Para que no se superponga con otros elementos */
|
||||||
|
z-index: 4; /* Asegura que esté sobre otros elementos */
|
||||||
|
}
|
||||||
|
.tr_order > th::after {
|
||||||
|
content: "\f0dc";
|
||||||
|
font:normal normal normal 14px / 1 FontAwesome;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 5px;
|
||||||
|
color: #32A1CF;
|
||||||
|
}
|
||||||
|
.tr_order > th.asce::after {
|
||||||
|
content: "\f0de";
|
||||||
|
}
|
||||||
|
|
||||||
|
.tr_order > th.desc::after {
|
||||||
|
content: "\f0dd";
|
||||||
|
}
|
||||||
|
/*END ScrollADS V2*/
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
@@ -319,9 +355,9 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="divContainerads">
|
<div class="divContainerads">
|
||||||
<asp:GridView ID="GvDatos" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="True" ShowHeaderWhenEmpty="true"
|
<asp:GridView ID="GvDatos" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="True" ShowHeaderWhenEmpty="true"
|
||||||
DataKeyNames="CvePS"
|
DataKeyNames="CvePS" CssClass="adssigscrollJS table table-striped table-advance table-hover " data-cols="2" data-rows="2" data-heightmenos="300" GridLines="None" >
|
||||||
CssClass="adssigscroll table table-striped table-advance table-hover " data-cols="2" data-heightmenos="300" GridLines="None">
|
<HeaderStyle CssClass="tr_order" />
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="120px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="120px">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
|
|||||||
@@ -175,6 +175,12 @@
|
|||||||
<asp:Literal ID="ImgFueCalculado" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
<asp:Literal ID="ImgFueCalculado" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||||
</asp:LinkButton>
|
</asp:LinkButton>
|
||||||
</th>
|
</th>
|
||||||
|
<th style="width: 100px">
|
||||||
|
<asp:LinkButton ID="LBAplicaAjusteAlNeto" runat="server" CausesValidation="false" Text="" CommandArgument="AplicaAjusteAlNeto" OnClick="LbOrden_Click">
|
||||||
|
Ajuste al neto
|
||||||
|
<asp:Literal ID="imgAplicaAjusteAlNeto" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||||
|
</asp:LinkButton>
|
||||||
|
</th>
|
||||||
<th style="width: 100px">
|
<th style="width: 100px">
|
||||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||||
Estatus
|
Estatus
|
||||||
@@ -187,7 +193,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePeriodo, CveTipoPeriodo,CveSubTipoPeriodo, Ejercicio, Mes,Numero, FechaInicio,FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, Estatus, CveTurno"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePeriodo, CveTipoPeriodo,CveSubTipoPeriodo, Ejercicio, Mes,Numero, FechaInicio,FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, Estatus, CveTurno, AplicaAjusteAlNeto"
|
||||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvDatos" data-tableheader=".tableheader" EmptyDataText="No se encontraron Periodos Registrados"
|
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvDatos" data-tableheader=".tableheader" EmptyDataText="No se encontraron Periodos Registrados"
|
||||||
GridLines="None" data-rows="0" ShowHeader="false">
|
GridLines="None" data-rows="0" ShowHeader="false">
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -305,6 +311,14 @@
|
|||||||
<asp:CheckBox ID="ChkFueCalculado" runat="server" Checked='<%# If(Eval("FueCalculado").ToString = "Si", True, False) %>' />
|
<asp:CheckBox ID="ChkFueCalculado" runat="server" Checked='<%# If(Eval("FueCalculado").ToString = "Si", True, False) %>' />
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-Width="10px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox ID="chkAplicaAjusteAlNeto" runat="server" Checked='<%# If(Eval("AplicaAjusteAlNeto").ToString = "True", True, False) %>' />
|
||||||
|
</ItemTemplate>
|
||||||
|
<EditItemTemplate>
|
||||||
|
<asp:CheckBox ID="chkAplicaAjusteAlNeto" runat="server" Checked='<%# If(Eval("AplicaAjusteAlNeto").ToString = "True", True, False) %>' />
|
||||||
|
</EditItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||||
@@ -440,6 +454,7 @@
|
|||||||
<asp:ListItem Text=" Inicio Año" Value="5"></asp:ListItem>
|
<asp:ListItem Text=" Inicio Año" Value="5"></asp:ListItem>
|
||||||
<asp:ListItem Text=" Fin Año" Value="6"></asp:ListItem>
|
<asp:ListItem Text=" Fin Año" Value="6"></asp:ListItem>
|
||||||
<asp:ListItem Text=" Calculado" Value="7"></asp:ListItem>
|
<asp:ListItem Text=" Calculado" Value="7"></asp:ListItem>
|
||||||
|
<asp:ListItem Text=" Ajuste al neto" Value="8"></asp:ListItem>
|
||||||
</asp:CheckBoxList>
|
</asp:CheckBoxList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ Partial Class Nomina_CatPeriodos
|
|||||||
Dim EsInicioAño As Boolean
|
Dim EsInicioAño As Boolean
|
||||||
Dim EsFinAño As Boolean
|
Dim EsFinAño As Boolean
|
||||||
Dim FueCalculado As Boolean
|
Dim FueCalculado As Boolean
|
||||||
|
Dim AplicaAjusteAlNeto As Integer
|
||||||
Dim Numero As Integer = TxtNumeroAdd.Text.Trim.ToEntero()
|
Dim Numero As Integer = TxtNumeroAdd.Text.Trim.ToEntero()
|
||||||
Dim FechaInicio As Date = TxtFechaInicioAdd.Text().Trim.ToDate()
|
Dim FechaInicio As Date = TxtFechaInicioAdd.Text().Trim.ToDate()
|
||||||
Dim FechaFin As Date = TxtFechaFinAdd.Text.Trim().ToDate()
|
Dim FechaFin As Date = TxtFechaFinAdd.Text.Trim().ToDate()
|
||||||
@@ -270,11 +271,13 @@ Partial Class Nomina_CatPeriodos
|
|||||||
If item.Selected Then EsFinAño = True Else EsFinAño = False
|
If item.Selected Then EsFinAño = True Else EsFinAño = False
|
||||||
Case 7
|
Case 7
|
||||||
If item.Selected Then FueCalculado = True Else FueCalculado = False
|
If item.Selected Then FueCalculado = True Else FueCalculado = False
|
||||||
|
Case 8
|
||||||
|
If item.Selected Then AplicaAjusteAlNeto = 1 Else AplicaAjusteAlNeto = 0
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
If Comando = "Agregar" Then
|
If Comando = "Agregar" Then
|
||||||
|
|
||||||
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(), CveSubTipoPeriodo) Then
|
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(), CveSubTipoPeriodo, AplicaAjusteAlNeto) Then
|
||||||
|
|
||||||
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
@@ -290,7 +293,7 @@ Partial Class Nomina_CatPeriodos
|
|||||||
End If
|
End If
|
||||||
ElseIf Comando = "Actualizar" Then
|
ElseIf Comando = "Actualizar" Then
|
||||||
|
|
||||||
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), CveSubTipoPeriodo) Then
|
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), CveSubTipoPeriodo, UsuarioActual.CveUsuario, AplicaAjusteAlNeto) Then
|
||||||
|
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
@@ -350,9 +353,11 @@ Partial Class Nomina_CatPeriodos
|
|||||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinAño").ToString())
|
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinAño").ToString())
|
||||||
Case 7
|
Case 7
|
||||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("FueCalculado").ToString())
|
item.Selected = Convert.ToBoolean(GvRow.DataKey("FueCalculado").ToString())
|
||||||
|
Case 8
|
||||||
|
item.Selected = Convert.ToBoolean(GvRow.DataKey("AplicaAjusteAlNeto").ToString())
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
UpModalPerido.Update()
|
UpAddInventarioFisico.Update()
|
||||||
|
|
||||||
RegistraScript("$('#divAddPeriodo').modal('show')")
|
RegistraScript("$('#divAddPeriodo').modal('show')")
|
||||||
End Sub
|
End Sub
|
||||||
@@ -381,6 +386,8 @@ Partial Class Nomina_CatPeriodos
|
|||||||
item.Selected = False
|
item.Selected = False
|
||||||
Case 7
|
Case 7
|
||||||
item.Selected = False
|
item.Selected = False
|
||||||
|
Case 8
|
||||||
|
item.Selected = True
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
UpModalPerido.Update()
|
UpModalPerido.Update()
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
|||||||
{
|
{
|
||||||
using (ClsNominas onom = new ClsNominas())
|
using (ClsNominas onom = new ClsNominas())
|
||||||
{
|
{
|
||||||
if (onom.DeleteNom_NominasDetalles(SRCveConcepto, CvePersonal, CvePeriodoFiniquito))
|
if (onom.DeleteNom_NominasDetalles(SRCveConcepto, CvePersonal, CvePeriodoFiniquito,UsuarioActual.CveUsuario))
|
||||||
{
|
{
|
||||||
Alert("el importe sera tomado del calculo y no del valor fijo");
|
Alert("el importe sera tomado del calculo y no del valor fijo");
|
||||||
loadsobrerecibo(onom);
|
loadsobrerecibo(onom);
|
||||||
|
|||||||
@@ -3692,7 +3692,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
using (ClsNominas onom = new ClsNominas())
|
using (ClsNominas onom = new ClsNominas())
|
||||||
{
|
{
|
||||||
if (continuar = onom.DeleteNom_NominasDetalles(SRCveConcepto, SRCvePersonal, CvePeriodoSeleccionado))
|
if (continuar = onom.DeleteNom_NominasDetalles(SRCveConcepto, SRCvePersonal, CvePeriodoSeleccionado, UsuarioActual.CveUsuario))
|
||||||
{
|
{
|
||||||
|
|
||||||
msgFin = (onom.DtResultados.Rows.Count > 0 && onom.DtResultados.Rows[0]["AplicaFiniquito"].ToString().ToUpper().Contiene("1", "TRUE"));
|
msgFin = (onom.DtResultados.Rows.Count > 0 && onom.DtResultados.Rows[0]["AplicaFiniquito"].ToString().ToUpper().Contiene("1", "TRUE"));
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ Partial Class Nomina_RegistroNomina
|
|||||||
Protected Sub GvMovimientos_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvMovimientos.RowDeleting
|
Protected Sub GvMovimientos_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvMovimientos.RowDeleting
|
||||||
Dim Nom As New ClsNominas
|
Dim Nom As New ClsNominas
|
||||||
|
|
||||||
If Nom.RemoveNom_NominasDetalles(GvMovimientos.DataKeys(e.RowIndex).Value.ToString().ToEntero) Then
|
If Nom.RemoveNom_NominasDetalles(GvMovimientos.DataKeys(e.RowIndex).Value.ToString().ToEntero,UsuarioActual.CveUsuario) Then
|
||||||
Alert("Movimiento Eliminado", TipoMensaje.MsgInformacion)
|
Alert("Movimiento Eliminado", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
84
PivotTable.aspx
Normal file
84
PivotTable.aspx
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<%@ Page Title="Sistema de Información Gerencial" Language="C#" AutoEventWireup="false" CodeFile="PivotTable.aspx.cs" Inherits="PivotTable" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="es">
|
||||||
|
<head runat="server">
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Tabla Dinámica con WebDataRocks (DataTable)</title>
|
||||||
|
<!-- Incluir el CSS de WebDataRocks -->
|
||||||
|
<link rel="stylesheet" href="https://cdn.webdatarocks.com/latest/webdatarocks.min.css" />
|
||||||
|
<!-- Incluir el archivo de localización en español -->
|
||||||
|
<script src="https://cdn.webdatarocks.com/latest/localization/webdatarocks.locale.es.js"></script>
|
||||||
|
<!-- Incluir la Toolbar y el script principal de WebDataRocks -->
|
||||||
|
<script src="https://cdn.webdatarocks.com/latest/webdatarocks.toolbar.min.js"></script>
|
||||||
|
<script src="https://cdn.webdatarocks.com/latest/webdatarocks.js"></script>
|
||||||
|
<style>
|
||||||
|
/* Estilos opcionales para el contenedor */
|
||||||
|
#wdr-component {
|
||||||
|
width: 100%;
|
||||||
|
height: 500px;
|
||||||
|
margin: 20px auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<div>
|
||||||
|
<!-- Se puede utilizar este literal para depuración o para mostrar el JSON generado -->
|
||||||
|
<asp:Literal ID="litJsonData" runat="server" Visible="false"></asp:Literal>
|
||||||
|
<!-- Contenedor donde se renderizará el pivot table -->
|
||||||
|
<div id="wdr-component"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
// La variable "datosLocal" se inicializa con el JSON generado en C#
|
||||||
|
var datosLocal = <%= JsonData %>;
|
||||||
|
|
||||||
|
// Inicialización de WebDataRocks con configuración en español
|
||||||
|
var pivot = new WebDataRocks({
|
||||||
|
container: "#wdr-component", // Contenedor donde se renderizará la tabla dinámica
|
||||||
|
toolbar: true, // Activa la barra de herramientas (se mostrará en español)
|
||||||
|
report: {
|
||||||
|
dataSource: {
|
||||||
|
data: datosLocal, // Asigna el JSON obtenido desde C#
|
||||||
|
// Configuración detallada de los campos (fields)
|
||||||
|
fields: [
|
||||||
|
{ uniqueName: "Producto", caption: "Producto" },
|
||||||
|
{ uniqueName: "Categoría", caption: "Categoría" },
|
||||||
|
{ uniqueName: "Año", caption: "Año", type: "number", format: "0" },
|
||||||
|
{ uniqueName: "Ventas", caption: "Ventas Totales", type: "number", format: "$#,##0.00" },
|
||||||
|
{ uniqueName: "Región", caption: "Región" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// Configuración de la estructura del reporte
|
||||||
|
slice: {
|
||||||
|
// Filas: se mostrarán los productos
|
||||||
|
rows: [
|
||||||
|
{ uniqueName: "Producto", caption: "Producto" }
|
||||||
|
],
|
||||||
|
// Columnas: se agruparán los datos por Año
|
||||||
|
columns: [
|
||||||
|
{ uniqueName: "Año", caption: "Año" }
|
||||||
|
],
|
||||||
|
// Medidas: se sumarán las ventas para cada combinación de Producto y Año
|
||||||
|
measures: [
|
||||||
|
{ uniqueName: "Ventas", aggregation: "sum", caption: "Total Ventas" }
|
||||||
|
],
|
||||||
|
// Filtros: se configura un filtro sobre el campo Región
|
||||||
|
filters: [
|
||||||
|
{
|
||||||
|
uniqueName: "Región",
|
||||||
|
caption: "Filtrar por Región",
|
||||||
|
filter: {
|
||||||
|
members: [
|
||||||
|
{ uniqueName: "Región.[Norte]" },
|
||||||
|
{ uniqueName: "Región.[Sur]" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
50
PivotTable.aspx.cs
Normal file
50
PivotTable.aspx.cs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Web.Script.Serialization;
|
||||||
|
|
||||||
|
partial class PivotTable : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
// Propiedad pública que contendrá el JSON a insertar en la página
|
||||||
|
public string JsonData { get; set; }
|
||||||
|
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
// Crear un DataTable con las columnas necesarias
|
||||||
|
DataTable dt = new DataTable();
|
||||||
|
dt.Columns.Add("Producto", typeof(string));
|
||||||
|
dt.Columns.Add("Categoría", typeof(string));
|
||||||
|
dt.Columns.Add("Año", typeof(int));
|
||||||
|
dt.Columns.Add("Ventas", typeof(decimal));
|
||||||
|
dt.Columns.Add("Región", typeof(string));
|
||||||
|
|
||||||
|
// Agregar filas al DataTable
|
||||||
|
dt.Rows.Add("Producto A", "Categoría 1", 2020, 1200, "Norte");
|
||||||
|
dt.Rows.Add("Producto B", "Categoría 1", 2020, 800, "Sur");
|
||||||
|
dt.Rows.Add("Producto A", "Categoría 2", 2021, 1500, "Norte");
|
||||||
|
dt.Rows.Add("Producto B", "Categoría 2", 2021, 1100, "Sur");
|
||||||
|
dt.Rows.Add("Producto C", "Categoría 1", 2020, 900, "Norte");
|
||||||
|
dt.Rows.Add("Producto C", "Categoría 2", 2021, 1300, "Sur");
|
||||||
|
|
||||||
|
// Convertir el DataTable a una lista de diccionarios para serializarlo a JSON
|
||||||
|
List<Dictionary<string, object>> rows = new List<Dictionary<string, object>>();
|
||||||
|
foreach (DataRow dr in dt.Rows)
|
||||||
|
{
|
||||||
|
Dictionary<string, object> row = new Dictionary<string, object>();
|
||||||
|
foreach (DataColumn col in dt.Columns)
|
||||||
|
{
|
||||||
|
row.Add(col.ColumnName, dr[col]);
|
||||||
|
}
|
||||||
|
rows.Add(row);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Serializar la lista a JSON
|
||||||
|
var serializer = new JavaScriptSerializer();
|
||||||
|
JsonData = serializer.Serialize(rows);
|
||||||
|
|
||||||
|
// Opcional: Asignar el JSON a un Literal para visualizarlo (útil en depuración)
|
||||||
|
litJsonData.Text = JsonData;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -401,8 +401,359 @@ setswitch = function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
function adssigscrollJSLoad() {
|
||||||
|
|
||||||
|
$('table.adssigscrollJS:not(.adssigscroll)').each(function () {
|
||||||
|
try {
|
||||||
|
let Tthis = $(this);
|
||||||
|
let Tid = Tthis.attr('id');
|
||||||
|
let rowVisibles = isNaN(Number(Tthis.data('rows'))) ? 1 : Number(Tthis.data('rows'));
|
||||||
|
let colVisibles = isNaN(Number(Tthis.data('cols'))) ? 0 : Number(Tthis.data('cols'));
|
||||||
|
let divcontainer = $(`<div id="container${Tid}" class="divContainerads"></div>`);
|
||||||
|
let jsrows;
|
||||||
|
let jscols;
|
||||||
|
let stylosrow = '';
|
||||||
|
Tthis.addClass('adssigscroll');
|
||||||
|
|
||||||
|
|
||||||
|
if (rowVisibles > 0) {
|
||||||
|
jsrows = $(`table#${Tid}.adssigscroll tr:nth-child(-n+${rowVisibles})`);
|
||||||
|
if (jsrows) {
|
||||||
|
jsrows.addClass('stickyRow');
|
||||||
|
}
|
||||||
|
if (rowVisibles > 1) {
|
||||||
|
let numberitem = 1;
|
||||||
|
let top = -1;
|
||||||
|
jsrows.each(function () {
|
||||||
|
let Trowthis = $(this);
|
||||||
|
stylosrow = `${stylosrow}
|
||||||
|
table#${Tid}.adssigscroll tr:nth-child(${numberitem}) { top: ${top}px; }`;
|
||||||
|
top = top + Trowthis.outerHeight(true);
|
||||||
|
numberitem = numberitem + 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (colVisibles > 0) {
|
||||||
|
stylosrow = `${stylosrow}
|
||||||
|
table#${Tid}.adssigscroll tr td:nth-child(-n+${colVisibles}),table#${Tid}.adssigscroll tr th:nth-child(-n+${colVisibles}) {
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
|
table#${Tid}.adssigscroll tr td:nth-child(-n+${colVisibles}) {
|
||||||
|
background-color: inherit;
|
||||||
|
}`;
|
||||||
|
if (colVisibles > 1 && $(`table#${Tid}.adssigscroll tr:nth-last-child(1)`)) {
|
||||||
|
let left = 0;
|
||||||
|
for (let i = 1; i <= colVisibles; i++) {
|
||||||
|
|
||||||
|
stylosrow = `${stylosrow}
|
||||||
|
table#${Tid}.adssigscroll tr td:nth-child(${i}),table#${Tid}.adssigscroll tr th:nth-child(${i}) {
|
||||||
|
left: ${left}px;
|
||||||
|
}`;
|
||||||
|
let item = $(`table#${Tid}.adssigscroll tr:nth-last-child(1) > *:nth-child(${i})`);
|
||||||
|
if (item) {
|
||||||
|
left = left + item.outerWidth(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rowVisibles > 0 && colVisibles > 0) {
|
||||||
|
stylosrow = `${stylosrow}
|
||||||
|
table#${Tid}.adssigscroll tr.stickyRow th:nth-child(-n+${colVisibles}),table#${Tid}.adssigscroll tr.stickyRow td:nth-child(-n+${colVisibles}) { z-index: 5; }`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Tthis.before($(stylosrow = `<style>${stylosrow}</style>`));
|
||||||
|
Tthis.before(divcontainer);
|
||||||
|
divcontainer.append(Tthis);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
console.log("adssigscrollJS Error:" + err.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
function LoadSortSticky() {
|
||||||
|
$('body').on('click', 'table.adssigscroll tr.tr_order:not(.tsorterblock) > th ,table.adssigscroll tr.tr_order:not(.tsorterblock) > td ', function (e) {
|
||||||
|
var tthis = $(this);
|
||||||
|
if (tthis.closest('.NoClick').length == 0 && !($(e.target).is('a,input'))) {
|
||||||
|
|
||||||
|
Metronic.blockUI({ animate: true });
|
||||||
|
var index = tthis.index();
|
||||||
|
var multiplicador = -1;
|
||||||
|
var tipodato = tthis.data('tipodato');
|
||||||
|
var table = $(tthis.closest('.table')[0]);
|
||||||
|
var tabletr = table.find('> tr:not(.stickyRow),> tbody > tr:not(.stickyRow),> thead > tr:not(.stickyRow)');
|
||||||
|
|
||||||
|
|
||||||
|
if (1 == 1) {
|
||||||
|
|
||||||
|
if (tabletr.length > 0) {
|
||||||
|
|
||||||
|
el = $(tabletr[0]);
|
||||||
|
var tdtexto = el.find("> td");
|
||||||
|
texto = $(tdtexto[index]).data('order');
|
||||||
|
if (texto) {
|
||||||
|
tipodato = 'dataorder';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//console.log({ tipodato })
|
||||||
|
tthis.closest('tr').addClass('tsorterblock');
|
||||||
|
setTimeout(
|
||||||
|
function () {
|
||||||
|
if (tthis.hasClass('desc')) {
|
||||||
|
tthis.closest('tr').find('th').removeClass('asce');
|
||||||
|
tthis.closest('tr').find('th').removeClass('desc');
|
||||||
|
tthis.addClass('asce');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tthis.closest('tr').find('th').removeClass('asce');
|
||||||
|
tthis.closest('tr').find('th').removeClass('desc');
|
||||||
|
tthis.addClass('desc');
|
||||||
|
multiplicador = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function reordenaruno() {
|
||||||
|
var re = new RegExp(",", 'g');
|
||||||
|
tipostring = 0;
|
||||||
|
tiponumeric = 0;
|
||||||
|
tipodate = 0;
|
||||||
|
var mapped = tabletr.map(function (i, el) {
|
||||||
|
el = $(el);
|
||||||
|
var texto = el.find("> td");
|
||||||
|
var textod = null;
|
||||||
|
var texton = 0;
|
||||||
|
|
||||||
|
if (texto && texto.length > index) {
|
||||||
|
texto = $(texto[index]).text();
|
||||||
|
texto = texto.toLowerCase().trim();
|
||||||
|
if (texto.length > 0) {
|
||||||
|
var vnum = texto.replace("$", "").replace("%", "").replace("-", "").replace("(", "").replace(")", "").replace(re, "").trim();
|
||||||
|
if (vnum.length > 0) {
|
||||||
|
if ($.isNumeric(vnum)) {
|
||||||
|
texton = Number(vnum);
|
||||||
|
tiponumeric = 1;
|
||||||
|
} else {
|
||||||
|
var splited = texto.split("-")
|
||||||
|
if (splited.length == 3) {
|
||||||
|
var d = new Date(splited[2] + "-" + splited[1] + "-" + splited[0])
|
||||||
|
if (!(d.toString == "Invalid Date")) {
|
||||||
|
textod = d;
|
||||||
|
tipodate = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var splited = texto.split("/")
|
||||||
|
if (splited.length == 3) {
|
||||||
|
var d = new Date(splited[2] + "/" + splited[1] + "/" + splited[0])
|
||||||
|
if (!(d.toString == "Invalid Date")) {
|
||||||
|
textod = d;
|
||||||
|
tipodate = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tipostring = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
texto = null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
texto = null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
texto = null;
|
||||||
|
}
|
||||||
|
return { index: i, value: texto, valued: textod, valuen: texton, obj: el };
|
||||||
|
});
|
||||||
|
if (tipostring == 1) {
|
||||||
|
mapped.sort(function (a, b) {
|
||||||
|
return (+(a.value > b.value) || +(a.value === b.value) - 1) * multiplicador;
|
||||||
|
});
|
||||||
|
//tthis.closest('tr').find('th').data('tipodato', 'string')
|
||||||
|
} else {
|
||||||
|
if (tipodate == 1) {
|
||||||
|
mapped.sort(function (a, b) {
|
||||||
|
return (+(a.valued > b.valued) || +(a.valued === b.valued) - 1) * multiplicador;
|
||||||
|
});
|
||||||
|
//tthis.closest('tr').find('th').data('tipodato', 'date')
|
||||||
|
} else {
|
||||||
|
mapped.sort(function (a, b) {
|
||||||
|
return (+(a.valuen > b.valuen) || +(a.valuen === b.valuen) - 1) * multiplicador;
|
||||||
|
});
|
||||||
|
//tthis.closest('tr').find('th').data('tipodato', 'numeric')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mapped.each(function (i, el) {
|
||||||
|
table.append(this.obj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function reordenardos() {
|
||||||
|
var re = new RegExp(",", 'g');
|
||||||
|
tipostring = 0;
|
||||||
|
tiponumeric = 0;
|
||||||
|
tipodate = 0;
|
||||||
|
var mapped = tabletr.map(function (i, el) {
|
||||||
|
el = $(el);
|
||||||
|
var tdtexto = el.find("> td");
|
||||||
|
var texto = null;
|
||||||
|
if (tdtexto && tdtexto.length > index) {
|
||||||
|
texto = $(tdtexto[index]).text();
|
||||||
|
texto = texto.toLowerCase().trim();
|
||||||
|
} else {
|
||||||
|
texto = null;
|
||||||
|
}
|
||||||
|
return { index: i, value: texto, obj: el };
|
||||||
|
});
|
||||||
|
|
||||||
|
mapped.sort(function (a, b) {
|
||||||
|
return (+(a.value > b.value) || +(a.value === b.value) - 1) * multiplicador;
|
||||||
|
});
|
||||||
|
mapped.each(function (i, el) {
|
||||||
|
table.append(this.obj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function reordenartres() {
|
||||||
|
var re = new RegExp(",", 'g');
|
||||||
|
tipostring = 0;
|
||||||
|
tiponumeric = 0;
|
||||||
|
tipodate = 0;
|
||||||
|
var mapped = tabletr.map(function (i, el) {
|
||||||
|
el = $(el);
|
||||||
|
var tdtexto = el.find("> td");
|
||||||
|
var texto = null;
|
||||||
|
var textod = null;
|
||||||
|
if (tdtexto && tdtexto.length > index) {
|
||||||
|
texto = $(tdtexto[index]).text();
|
||||||
|
texto = texto.toLowerCase().trim();
|
||||||
|
var splited = texto.split("-")
|
||||||
|
if (splited.length == 3) {
|
||||||
|
var d = new Date(splited[2] + "-" + splited[1] + "-" + splited[0])
|
||||||
|
if (!(d.toString == "Invalid Date")) {
|
||||||
|
textod = d;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var splited = texto.split("/")
|
||||||
|
if (splited.length == 3) {
|
||||||
|
var d = new Date(splited[2] + "/" + splited[1] + "/" + splited[0])
|
||||||
|
if (!(d.toString == "Invalid Date")) {
|
||||||
|
textod = d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
texto = null;
|
||||||
|
}
|
||||||
|
return { index: i, value: textod, obj: el };
|
||||||
|
});
|
||||||
|
|
||||||
|
mapped.sort(function (a, b) {
|
||||||
|
return (+(a.value > b.value) || +(a.value === b.value) - 1) * multiplicador;
|
||||||
|
});
|
||||||
|
mapped.each(function (i, el) {
|
||||||
|
table.append(this.obj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function reordenarcuatro() {
|
||||||
|
var re = new RegExp(",", 'g');
|
||||||
|
tipostring = 0;
|
||||||
|
tiponumeric = 0;
|
||||||
|
tipodate = 0;
|
||||||
|
var mapped = tabletr.map(function (i, el) {
|
||||||
|
el = $(el);
|
||||||
|
var tdtexto = el.find("> td");
|
||||||
|
var texto = null;
|
||||||
|
var texton = 0;
|
||||||
|
if (tdtexto && tdtexto.length > index) {
|
||||||
|
texto = $(tdtexto[index]).text();
|
||||||
|
texto = texto.toLowerCase().trim();
|
||||||
|
|
||||||
|
if (texto.length > 0) {
|
||||||
|
var vnum = texto.replace("$", "").replace("%", "").replace("-", "").replace("(", "").replace(")", "").replace(re, "").trim();
|
||||||
|
if (vnum.length > 0) {
|
||||||
|
if ($.isNumeric(vnum)) {
|
||||||
|
texton = Number(vnum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
texto = null;
|
||||||
|
}
|
||||||
|
return { index: i, value: texton, obj: el };
|
||||||
|
});
|
||||||
|
|
||||||
|
mapped.sort(function (a, b) {
|
||||||
|
return (+(a.value > b.value) || +(a.value === b.value) - 1) * multiplicador;
|
||||||
|
});
|
||||||
|
mapped.each(function (i, el) {
|
||||||
|
table.append(this.obj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function reordenarcinco() {
|
||||||
|
var re = new RegExp(",", 'g');
|
||||||
|
tipostring = 0;
|
||||||
|
tiponumeric = 0;
|
||||||
|
tipodate = 0;
|
||||||
|
var mapped = tabletr.map(function (i, el) {
|
||||||
|
el = $(el);
|
||||||
|
var tdtexto = el.find("> td");
|
||||||
|
var texto = null;
|
||||||
|
var texton = 0;
|
||||||
|
if (tdtexto && tdtexto.length > index) {
|
||||||
|
texton = Number($(tdtexto[index]).data('order'));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
texto = null;
|
||||||
|
}
|
||||||
|
return { index: i, value: texton, obj: el };
|
||||||
|
});
|
||||||
|
//console.log(mapped)
|
||||||
|
mapped.sort(function (a, b) {
|
||||||
|
return (+(a.value > b.value) || +(a.value === b.value) - 1) * multiplicador;
|
||||||
|
});
|
||||||
|
mapped.each(function (i, el) {
|
||||||
|
table.append(this.obj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
switch (tipodato) {
|
||||||
|
case 'string':
|
||||||
|
reordenardos();
|
||||||
|
break;
|
||||||
|
case 'date':
|
||||||
|
reordenartres();
|
||||||
|
break;
|
||||||
|
case 'numeric':
|
||||||
|
reordenarcuatro();
|
||||||
|
break;
|
||||||
|
case 'dataorder':
|
||||||
|
reordenarcinco();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reordenaruno();
|
||||||
|
}
|
||||||
|
|
||||||
|
tthis.closest('tr').removeClass('tsorterblock');
|
||||||
|
Metronic.unblockUI();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
function ADScroller2() {
|
function ADScroller2() {
|
||||||
|
adssigscrollJSLoad();
|
||||||
$('table.ADSCROLLER2').each(function () {
|
$('table.ADSCROLLER2').each(function () {
|
||||||
try {
|
try {
|
||||||
var Tthis = $(this);
|
var Tthis = $(this);
|
||||||
@@ -1659,7 +2010,7 @@ function ADSReady() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
function loadsortadscroll() {
|
function loadsortadscroll() {
|
||||||
|
LoadSortSticky();
|
||||||
$('body').on('click', '.ADScroller > div > table > tbody > tr.tsorter:not(.tsorterblock) >th ,.ADScroller > div > table > thead > tr.tsorter:not(.tsorterblock) >th ', function (e) {
|
$('body').on('click', '.ADScroller > div > table > tbody > tr.tsorter:not(.tsorterblock) >th ,.ADScroller > div > table > thead > tr.tsorter:not(.tsorterblock) >th ', function (e) {
|
||||||
var tthis = $(this);
|
var tthis = $(this);
|
||||||
if (tthis.closest('.NoClick').length == 0 && !($(e.target).is('a,input'))) {
|
if (tthis.closest('.NoClick').length == 0 && !($(e.target).is('a,input'))) {
|
||||||
|
|||||||
@@ -28,12 +28,39 @@
|
|||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.form-group{
|
/*Begin ScrollADS V2*/
|
||||||
width:100%;
|
.divContainerads {
|
||||||
margin-top:15px;
|
width: 100%;
|
||||||
margin-bottom:15px;
|
max-height: calc(100vh - 260px);
|
||||||
display: table;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.adssigscroll {
|
||||||
|
min-width: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.adssigscroll tbody, table.adssigscroll thead {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.adssigscroll tr {
|
||||||
|
background-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.adssigscroll tr.stickyRow {
|
||||||
|
position: sticky;
|
||||||
|
top: 0; /* Se mantiene pegado en la parte superior */
|
||||||
|
background-color: inherit; /* Para que no se superponga con otros elementos */
|
||||||
|
z-index: 4; /* Asegura que est<73> sobre otros elementos */
|
||||||
|
}
|
||||||
|
/*END ScrollADS V2*/
|
||||||
|
div.form-group {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 15px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
div.form-group div.form-group{
|
div.form-group div.form-group{
|
||||||
margin-top:0px;
|
margin-top:0px;
|
||||||
margin-bottom:0px;
|
margin-bottom:0px;
|
||||||
|
|||||||
Reference in New Issue
Block a user