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
01801e82
Commit
01801e82
authored
Sep 14, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EDIT detalleMontos dentro de la carpeta modals, con errores]
parent
3530877d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
102 deletions
+108
-102
general.js
src/main/webapp/js/general.js
+2
-1
montos_administrativos.js
src/main/webapp/js/pages/montos_administrativos.js
+105
-100
detalleMontosAdministrativos.jsp
...os/montosAdministrativos/detalleMontosAdministrativos.jsp
+1
-1
No files found.
src/main/webapp/js/general.js
View file @
01801e82
...
...
@@ -9,12 +9,13 @@ const PATH_SERVICIO_REST = 'http://app9.sacooliveros.edu.pe:8080/security-rest/a
//<editor-fold> SERVICIOS REST
const
baseURLRest
=
'http://sistem16:666/'
;
const
baseURLModals
=
`http://localhost:7070/Asistencia/vistas/modals/`
;
const
ajaxWebService
=
axios
.
create
({
baseURL
:
baseURLRest
});
const
ajaxModal
=
axios
.
create
({
baseURL
:
`http://localhost:7070/Asistencia/vistas/modals/`
baseURL
:
baseURLModals
});
//<editor-fold>
...
...
src/main/webapp/js/pages/montos_administrativos.js
View file @
01801e82
function
getColumns
()
{
let
columns
=
[
{
title
:
`N°`
,
data
:
`id`
,
className
:
'text-center'
},
{
title
:
`APELLIDOS Y NOMBRES`
,
data
:
null
,
className
:
`text-center`
,
render
:
(
data
)
=>
{
let
nombresCompletos
;
let
nombres
=
data
.
trabajador_nombres
;
let
apellidos
=
data
.
trabajador_apellidos
;
nombresCompletos
=
`
${
apellidos
}
${
nombres
}
`
;
return
nombresCompletos
;
}
},
{
title
:
"SEDE"
,
data
:
"sede_descripcion"
,
className
:
"text-center"
},
{
title
:
`CARGO`
,
data
:
`puestolaboral_nombre`
,
className
:
'text-center'
},
{
title
:
`DESCUENTO<br>(S/.)`
,
data
:
`descuento_total`
,
className
:
'text-center'
,
render
:
(
data
)
=>
{
return
`<span class="text-danger">
${
data
}
.00</span>`
;
}
},
{
title
:
`ACCIONES`
,
data
:
null
,
className
:
'text-center'
,
render
:
(
data
)
=>
{
let
acciones
=
""
;
let
registrar
=
""
;
let
verdetalle
=
""
;
verdetalle
=
`<span data-toggle="tooltip" data-placement="left" title="Ver detalle" style="cursor: pointer"> <i class='verdetalle icon-list text-primary-700'></i> </span>`
;
acciones
=
verdetalle
;
return
acciones
;
}
}
];
return
columns
;
let
columns
=
[
{
title
:
`N°`
,
data
:
`id`
,
className
:
'text-center'
},
{
title
:
`APELLIDOS Y NOMBRES`
,
data
:
null
,
className
:
`text-center`
,
render
:
(
data
)
=>
{
let
nombresCompletos
;
let
nombres
=
data
.
trabajador_nombres
;
let
apellidos
=
data
.
trabajador_apellidos
;
nombresCompletos
=
`
${
apellidos
}
${
nombres
}
`
;
return
nombresCompletos
;
}
},
{
title
:
"SEDE"
,
data
:
"sede_descripcion"
,
className
:
"text-center"
},
{
title
:
`CARGO`
,
data
:
`puestolaboral_nombre`
,
className
:
'text-center'
},
{
title
:
`DESCUENTO<br>(S/.)`
,
data
:
`descuento_total`
,
className
:
'text-center'
,
render
:
(
data
)
=>
{
return
`<span class="text-danger">
${
data
}
.00</span>`
;
}
},
{
title
:
`ACCIONES`
,
data
:
null
,
className
:
'text-center'
,
render
:
(
data
)
=>
{
let
acciones
=
""
;
let
registrar
=
""
;
let
verdetalle
=
""
;
verdetalle
=
`<span data-toggle="tooltip" data-placement="left" title="Ver detalle" style="cursor: pointer"> <i class='verdetalle icon-list text-primary-700'></i> </span>`
;
acciones
=
verdetalle
;
return
acciones
;
}
}
];
return
columns
;
}
const
listarPeriodosCierreAsistencia
=
(
nodeIdentifier
)
=>
{
ajaxWebService
.
get
(
URI_ADMINISTRATIVOS_PERIODO_CIERRE_ASISTENCIA
).
then
((
result
)
=>
{
let
data
=
result
.
data
;
let
html
=
`<option value="">[SELECCIONE]</option>`
;
html
+=
data
.
map
(
periodo
=>
`<option value="
${
periodo
.
id
}
">
${
periodo
.
descripcion
}
</option>`
);
$
(
nodeIdentifier
).
html
(
html
);
$
(
nodeIdentifier
).
change
((
e
)
=>
{
let
id
=
$
(
e
.
currentTarget
).
val
();
console
.
log
(
id
)
});
});
ajaxWebService
.
get
(
URI_ADMINISTRATIVOS_PERIODO_CIERRE_ASISTENCIA
).
then
((
result
)
=>
{
let
data
=
result
.
data
;
let
html
=
`<option value="">[SELECCIONE]</option>`
;
html
+=
data
.
map
(
periodo
=>
`<option value="
${
periodo
.
id
}
">
${
periodo
.
descripcion
}
</option>`
);
$
(
nodeIdentifier
).
html
(
html
);
$
(
nodeIdentifier
).
change
((
e
)
=>
{
let
id
=
$
(
e
.
currentTarget
).
val
();
console
.
log
(
id
)
});
});
// initSelect2(nodeIdentifier, "descripcion");
}
...
...
@@ -134,42 +134,46 @@ const listarPeriodosCierreAsistencia = (nodeIdentifier) => {
const
listarSedes
=
(
selectorName
)
=>
{
ajaxWebService
.
get
(
URI_SEDES
).
then
((
result
)
=>
{
let
sedes
=
result
.
data
;
sedes
=
_
.
orderBy
(
sedes
,
s
=>
s
.
descripcion
);
let
html
=
`<option value="">[TODOS]</option>`
;
sedes
.
forEach
(
sede
=>
html
+=
`<option value="
${
sede
.
codigo
}
">
${
sede
.
descripcion
}
</option>`
);
$
(
`
${
selectorName
}
`
).
html
(
html
);
$
(
selectorName
).
select2
();
});
ajaxWebService
.
get
(
URI_SEDES
).
then
((
result
)
=>
{
let
sedes
=
result
.
data
;
sedes
=
_
.
orderBy
(
sedes
,
s
=>
s
.
descripcion
);
let
html
=
`<option value="">[TODOS]</option>`
;
sedes
.
forEach
(
sede
=>
html
+=
`<option value="
${
sede
.
codigo
}
">
${
sede
.
descripcion
}
</option>`
);
$
(
`
${
selectorName
}
`
).
html
(
html
);
$
(
selectorName
).
select2
();
});
};
const
mostrarModalVerDetalleDescuentoAsistencia
=
(
data
)
=>
{
location
.
href
=
`
${
baseURLModals
}
administrativos/montosAdministrativos/detalleMontosAdministrativos.jsp`
}
const
listarDescuentoMensualAdministrativos
=
(
objParams
=
{})
=>
{
ajaxWebService
.
get
(
URI_ADMINISTRATIVOS_DESCUENTO_MENSUAL
,
objParams
).
then
((
response
)
=>
{
let
columns
=
getColumns
();
let
wrapsNameDatatable
=
`divDatatable`
;
let
classNameForDatatable
=
`display table table-bordered`
;
makeDatatable
(
wrapsNameDatatable
,
{
data
:
response
.
data
,
columns
,
},
classNameForDatatable
,
).
then
((
nodes
)
=>
{
$
(
".chkFirma, #chkFirmaTodo"
).
uniform
();
nodes
.
container
.
off
()
.
on
(
"click"
,
".verdetalle"
,
function
()
{
let
data
=
nodes
.
datatable
.
DataTable
().
row
(
$
(
this
).
parents
(
"tr"
)).
data
();
mostrarModalVerDetalleDescuentoAsistencia
(
data
);
})
});
});
ajaxWebService
.
get
(
URI_ADMINISTRATIVOS_DESCUENTO_MENSUAL
,
objParams
).
then
((
response
)
=>
{
let
columns
=
getColumns
();
let
wrapsNameDatatable
=
`divDatatable`
;
let
classNameForDatatable
=
`display table table-bordered`
;
makeDatatable
(
wrapsNameDatatable
,
{
data
:
response
.
data
,
columns
,
},
classNameForDatatable
,
).
then
((
nodes
)
=>
{
$
(
".chkFirma, #chkFirmaTodo"
).
uniform
();
nodes
.
container
.
off
()
.
on
(
"click"
,
".verdetalle"
,
function
()
{
let
data
=
nodes
.
datatable
.
DataTable
().
row
(
$
(
this
).
parents
(
"tr"
)).
data
();
mostrarModalVerDetalleDescuentoAsistencia
(
data
);
})
});
});
};
...
...
@@ -178,9 +182,9 @@ const aplicarFiltro = () => {
}
$
(
document
).
ready
(
function
()
{
initDatePicker
(
"#dpFechaInicioFiltro"
,
"#dpFechaFinFiltro"
);
listarSedes
(
"#cboSedesFiltro"
);
listarPeriodosCierreAsistencia
(
"#cboPeriodoCierreFiltro"
);
$
(
"#btnAplicarFiltro"
).
click
(
aplicarFiltro
);
$
(
"#btnMostrarTodo"
).
click
(
listarDescuentoMensualAdministrativos
);
initDatePicker
(
"#dpFechaInicioFiltro"
,
"#dpFechaFinFiltro"
);
listarSedes
(
"#cboSedesFiltro"
);
listarPeriodosCierreAsistencia
(
"#cboPeriodoCierreFiltro"
);
$
(
"#btnAplicarFiltro"
).
click
(
aplicarFiltro
);
$
(
"#btnMostrarTodo"
).
click
(
listarDescuentoMensualAdministrativos
);
});
\ No newline at end of file
src/main/webapp/vistas/detalleMontosAdministrativos.jsp
→
src/main/webapp/vistas/
modals/administrativos/montosAdministrativos/
detalleMontosAdministrativos.jsp
View file @
01801e82
...
...
@@ -10,7 +10,7 @@
<!--css-->
</head>
<body>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<
%@
include
file=
"
../../
templates/header-body.jsp"
%
>
<!-- content -->
<div
class=
"col-md-4 col-md-offset-4"
>
<div
class=
"panel panel-primary"
>
...
...
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