Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Asistencia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Billy Larru
Asistencia
Commits
5656abe9
Commit
5656abe9
authored
Sep 10, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX montosPolicias, filtro por rango de fechas]
parent
895c5e12
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
36 deletions
+33
-36
monto_policias.js
src/main/webapp/js/pages/monto_policias.js
+30
-15
montoPolicias.jsp
src/main/webapp/vistas/montoPolicias.jsp
+2
-2
toleranciaMasiva.jsp
src/main/webapp/vistas/toleranciaMasiva.jsp
+1
-19
No files found.
src/main/webapp/js/pages/monto_policias.js
View file @
5656abe9
...
...
@@ -78,7 +78,20 @@ function getColumns() {
{
title
:
`ESTADO EXTRAS`
,
data
:
`estado_extras`
,
className
:
'text-center'
className
:
'text-center'
,
render
:
(
data
)
=>
{
let
label
=
""
;
let
contenido
=
""
;
if
(
data
==
1
)
{
label
=
"label label-success"
;
contenido
=
"APROBADO"
;
}
else
{
label
=
"label label-danger"
;
contenido
=
"SIN APROBAR"
;
}
return
`<span class="
${
label
}
">
${
contenido
}
</span>`
;
}
},
{
title
:
`MONTO TOTAL`
,
...
...
@@ -157,7 +170,7 @@ function defaultConfigDateRangePicker(selectorName) {
}
function
mostrar
Reporte
(
objParams
=
{})
{
function
mostrar
Todos
(
objParams
=
{})
{
ajaxWebService
.
get
(
URI_POLICIA_REPORTE_MONTOS
,
objParams
).
then
((
response
)
=>
{
let
columns
=
getColumns
();
...
...
@@ -165,42 +178,43 @@ function mostrarReporte(objParams = {}) {
let
classNameForDatatable
=
`display table table-bordered`
;
makeDatatable
(
wrapsNameDatatable
,
{
data
:
response
.
data
,
columns
},
classNameForDatatable
,
);
wrapsNameDatatable
,
{
data
:
response
.
data
,
columns
},
classNameForDatatable
,
);
});
}
function
verReporte
()
{
function
aplicarFiltro
()
{
debugger
let
rango_fechas
=
$
(
"#dpRangoFechas"
).
val
();
let
split_fechas
=
rango_fechas
.
split
(
"-"
).
map
(
f
=>
f
.
trim
());
let
fecha_inicio
=
split_fechas
[
0
];
let
fecha_fin
=
split_fechas
[
1
];
let
policia_nombres
=
$
(
"#cboPoliciasFiltro option:selected"
).
text
();
let
sede_descripcion
=
$
(
"#cboSedesFiltro option:selected"
).
text
();
let
intervalo_fechas
=
generarFechas
(
fecha_inicio
,
fecha_fin
);
policia_nombres
=
policia_nombres
.
includes
(
"TODOS"
)
?
""
:
policia_nombres
sede_descripcion
=
sede_descripcion
.
includes
(
"TODOS"
)
?
""
:
sede_descripcion
let
params
=
cleanQueryParams
({
fecha_entrada
:
fecha_inicio
,
fecha_entrada
:
intervalo_fechas
,
policia_nombres
,
sede_descripcion
});
mostrar
Reporte
({
params
});
mostrar
Todos
({
params
});
}
$
().
ready
(
function
()
{
listarPolicias
(
"#cboPoliciasFiltro"
);
listarSedes
(
"#cboSedesFiltro"
);
defaultConfigDateRangePicker
(
"#dpRangoFechas"
);
$
(
"#btn
VerTodos"
).
click
(
mostrarReporte
);
$
(
"#btn
VerReporte"
).
click
(
verReporte
);
$
(
"#btn
MostrarTodos"
).
click
(
mostrarTodos
);
$
(
"#btn
AplicarFiltro"
).
click
(
aplicarFiltro
);
});
\ No newline at end of file
src/main/webapp/vistas/montoPolicias.jsp
View file @
5656abe9
...
...
@@ -45,8 +45,8 @@
</div>
<div
class=
"panel-footer"
>
<div
class=
"text-center"
>
<button
class=
"btn btn-primary"
id=
"btn
VerReporte"
><i
class=
"icon-eye4"
></i>
Ver reporte
</button>
<button
class=
"btn btn-primary"
id=
"btn
VerTodos"
><i
class=
"icon-eye4"
></i>
Ver T
odos
</button>
<button
class=
"btn btn-primary"
id=
"btn
AplicarFiltro"
><i
class=
"icon-eye4"
></i>
Aplicar filtro
</button>
<button
class=
"btn btn-primary"
id=
"btn
MostrarTodos"
><i
class=
"icon-eye4"
></i>
Mostrar t
odos
</button>
</div>
</div>
</div>
...
...
src/main/webapp/vistas/toleranciaMasiva.jsp
View file @
5656abe9
...
...
@@ -34,7 +34,7 @@
<div
class=
"panel-footer"
>
<div
class=
"text-center"
>
<button
class=
"btn btn-primary"
id=
"btnAplicarFiltro"
><i
class=
"icon-eye4"
></i>
Aplicar filtro
</button>
<button
class=
"btn btn-
primary"
id=
"btnMostrarTodo"
><i
class=
"icon-eye4"
></i>
Mostrar Todo
</button>
<button
class=
"btn btn-
warning"
id=
"btnMostrarTodo"
><i
class=
"icon-eye4"
></i>
Limpiar
</button>
</div>
</div>
</div>
...
...
@@ -53,24 +53,6 @@
<div
class=
"row"
>
<div
class=
"col-md-12 form-group"
>
<select
multiple=
"multiple"
class=
"form-control"
id=
"lista"
>
<!-- <option value="option1" selected="selected">Classical mechanics</option>
<option value="option2">Electromagnetism</option>
<option value="option4">Relativity</option>
<option value="option5" selected="selected">Quantum mechanics</option>
<option value="option7">Astrophysics</option>
<option value="option8" selected="selected">Biophysics</option>
<option value="option9">Chemical physics</option>
<option value="option10">Econophysics</option>
<option value="option11">Geophysics</option>
<option value="option12">Medical physics</option>
<option value="option13">Physical chemistry</option>
<option value="option14" selected="selected">Continuum mechanics</option>
<option value="option15">Electrodynamics</option>
<option value="option16" selected="selected">Quantum field theory</option>
<option value="option17">Scattering theory</option>
<option value="option18" selected="selected">Chaos theory</option>
<option value="option19" selected="selected">Newton's laws of motion</option>
<option value="option20">Thermodynamics</option>-->
</select>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment