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
ebf32b33
Commit
ebf32b33
authored
Aug 10, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
busqueda por personal en proyectado comparativo
parent
b9c6c135
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
10 deletions
+24
-10
comparativo_proyeccion_policias.js
src/main/webapp/js/pages/comparativo_proyeccion_policias.js
+20
-6
comparativoProyeccionPolicias.jsp
src/main/webapp/vistas/comparativoProyeccionPolicias.jsp
+4
-4
No files found.
src/main/webapp/js/pages/comparativo_proyeccion_policias.js
View file @
ebf32b33
...
...
@@ -178,6 +178,19 @@ function seleccionarCriterio() {
}
function
buscar
()
{
let
datos
=
[];
let
criterioPersonal
=
$
(
"#cboCriterioPersonal"
).
val
();
if
(
criterioPersonal
===
"dni"
||
criterioPersonal
===
"nombres"
){
let
busquedaPersonal
=
$
(
"#txtBusquedaPersonal"
).
val
();
datos
=
_
.
filter
(
data
,
p
=>
p
[
criterioPersonal
].
toLowerCase
().
startsWith
(
busquedaPersonal
.
toLowerCase
()));
debugger
;
}
else
{
datos
=
data
;
}
$
(
"#tblProyectadoComparativo"
).
DataTable
().
destroy
();
$
(
"#tblProyectadoComparativo"
).
DataTable
({
"language"
:
{
...
...
@@ -228,7 +241,7 @@ function buscar() {
],
dom
:
'<"datatable-header"fl><"datatable-scroll-wrap"t><"datatable-footer"ip>'
,
"processing"
:
true
,
data
:
dat
a
,
data
:
dat
os
,
columns
:
[
{
data
:
"numero"
,
className
:
"text-center"
},
{
data
:
"dni"
},
...
...
@@ -305,16 +318,16 @@ function initDatePicker() {
function
pintarCriterioPersonal
()
{
let
criterio
=
$
(
this
).
val
();
if
(
criterio
===
"
DNI
"
)
{
if
(
criterio
===
"
dni
"
)
{
let
html
=
`<div class="col-md-8 form-group">
<label>DNI</label>
<input type="text" class="form-control" id="txt
DNI
"></input>
<input type="text" class="form-control" id="txt
BusquedaPersonal
"></input>
</div>`
;
$
(
"#divCriterioPersonal"
).
html
(
html
);
}
else
if
(
criterio
===
"
APELLIDOS
"
)
{
}
else
if
(
criterio
===
"
nombres
"
)
{
let
html
=
`<div class="col-md-8 form-group">
<label>Apellidos</label>
<input type="text" class="form-control" id="txt
Apellidos
"></input>
<input type="text" class="form-control" id="txt
BusquedaPersonal
"></input>
</div>`
;
$
(
"#divCriterioPersonal"
).
html
(
html
);
initDatePicker
();
...
...
@@ -329,5 +342,5 @@ $().ready(function () {
defaultConfigDatePicker
();
$
(
"#cboCriterio"
).
change
(
seleccionarCriterio
);
$
(
"#btnBuscar"
).
click
(
buscar
);
$
(
"#cboPersonal"
).
change
(
pintarCriterioPersonal
);
$
(
"#cbo
Criterio
Personal"
).
change
(
pintarCriterioPersonal
);
});
\ No newline at end of file
src/main/webapp/vistas/comparativoProyeccionPolicias.jsp
View file @
ebf32b33
...
...
@@ -36,11 +36,11 @@
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<label>
Personal
</label>
<select
class=
"form-control"
id=
"cboPersonal"
>
<select
class=
"form-control"
id=
"cbo
Criterio
Personal"
>
<option>
[SELECCIONE]
</option>
<option>
DNI
</option>
<option>
APELLIDOS
</option>
<option>
TODOS
</option>
<option
value=
"dni"
>
DNI
</option>
<option
value=
"nombres"
>
APELLIDOS
</option>
<option
value=
"*"
>
TODOS
</option>
</select>
</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