Commit f269ed86 by Billy Larru

[ADD registro_periodo_cierre]

parent 5f50934b
const mostrarModalNuevoPeriodo = () => {
ajaxModal.get("cierreasistenciamensual/mantenimientoPeriodoCierre/registroperiodocierre.jspf").then((response) => {
swalWithBootstrapButtons({
title: '<strong>Registrar Periodo</strong>',
html: response.data,
showCancelButton: true,
showCloseButton: true,
focusConfirm: false,
confirmButtonText: '<i class="icon-checkmark2"></i> Registrar',
cancelButtonText: '<i class="icon-cross3"></i>Cancelar',
width: '30%',
customClass: 'swal2-overflow',
onOpen: () => {
inicializarInputsModalNuevoPeriodo();
}
}).then((result) => {
if (result.value) {
registrarNuevoPeriodo();
}
})
})
}
const inicializarInputsModalNuevoPeriodo = () => {
listarTipoPersonal("#cboTipoPersonal")
listarMesesCierre("#cboMesesCierre")
initDatePicker("#dpFechaInicio", "#dpFechaFin")
$("#dpFechaInicio").val("")
$("#dpFechaFin").val("")
}
const registrarNuevoPeriodo = () => {
let tipopersonal_id = $("#cboTipoPersonal").val()
let tipopersonal_descripcion = $("#cboTipoPersonal option:selected").text()
let mescierre_id = $("#cboMesesCierre").val()
let mescierre_descripcion = $("#cboMesesCierre option:selected").text()
let fecha_inicio = $("#dpFechaInicio").val()
let fecha_fin = $("#dpFechaFin").val()
let params = {
}
ajaxWebService.post(URI_PERIODOCIERRE, params).then((response) => {
})
}
const listarTipoPersonal = (nodeIdentifier) => {
ajaxWebService.get(URI_TIPOPERSONAL).then((response) => {
console.log(response)
if (response.status) {
let data = response.data
let html = ""
html += data.map(tipoPersonal => `<option value="${tipoPersonal.id}">${tipoPersonal.descripcion}</option>`)
$(nodeIdentifier).html(html)
}
})
}
const listarMesesCierre = (nodeIdentifier) => {
ajaxWebService.get(URI_MESESCIERRE).then((response) => {
if (response.status) {
let data = response.data
let html = ""
html += data.map(mesCierre => `<option value="${mesCierre.id}">${mesCierre.descripcion}</option>`)
$(nodeIdentifier).html(html)
}
})
}
$(document).ready(function () {
$("#btnNuevoPeriodo").click(mostrarModalNuevoPeriodo);
})
\ No newline at end of file
<jsp:include page="/vistas/templates/validar.jsp" />
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="/vistas/templates/header.jsp" />
<!--template-core-->
<!--css de la pagina-->
<link href="../css/lib/sweetalert2.min.css" rel="stylesheet" type="text/css"/>
<!--css-->
</head>
<body>
<jsp:include page="/vistas/templates/header-body.jsp" />
<!-- content -->
<!-- / content -->
<jsp:include page="/vistas/templates/footer-body.jsp" />
<!--js de la pagina-->
<script src="../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js" type="text/javascript"></script>
<script src="../plantilla/assets/js/plugins/ui/moment/moment.min.js" type="text/javascript"></script>
<script src="../plantilla/assets/js/plugins/pickers/datepicker.js" type="text/javascript"></script>
<script src="../js/lib/bootstrap-select.min.js" type="text/javascript"></script>
<script src="../plantilla/assets/js/plugins/forms/selects/select2.min.js"></script>
<script src="../js/lib/lodash.js" type="text/javascript"></script>
<!--js-->
</body>
</html>
\ No newline at end of file
<div class="panel-body">
<form id="frm" onsubmit="return false;" autocomplete="off">
<div class="row">
<div class="form-group col-md-6">
<label>Tipo de Personal</label>
<select id="cboTipoPersonal" class="select-search form-control"></select>
</div>
<div class="form-group col-md-6">
<label>Mes de cierre</label>
<select id="cboMesesCierre" class="select-search form-control"></select>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label>Fecha Inicio</label>
<div class="input-group">
<span class="input-group-addon"><i class="icon-calendar"></i></span>
<input type="text" class="form-control" id="dpFechaInicio">
</div>
</div>
<div class="form-group col-md-6">
<label>Fecha Fin</label>
<div class="input-group">
<span class="input-group-addon"><i class="icon-calendar"></i></span>
<input type="text" class="form-control" id="dpFechaFin">
</div>
</div>
</div>
</form>
</div>
\ No newline at end of file
<jsp:include page="/vistas/templates/validar.jsp" />
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="/vistas/templates/header.jsp" />
<!--template-core-->
<!--css de la pagina-->
<link href="../css/lib/sweetalert2.min.css" rel="stylesheet" type="text/css"/>
<!--css-->
</head>
<body>
<jsp:include page="/vistas/templates/header-body.jsp" />
<!-- content -->
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-primary">
<div class="panel-heading">
<h5 class="panel-title">Búsqueda</h5>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-8 form-group">
<label>Personal</label>
<select class="select-search form-control" id="cboPersonalFiltro" >
</select>
</div>
<div class="col-md-4 form-group">
<label>Sede</label>
<select class="form-control" id="cboSedesFiltro">
</select>
</div>
</div>
<div class="row">
<div class="col-md-4 form-group">
<label>Fecha Inicio</label>
<div class="input-group">
<span class="input-group-addon"><i class="icon-calendar"></i></span>
<input type="text" class="form-control" id="dpFechaInicioFiltro">
</div>
</div>
<div class="col-md-4 form-group">
<label>Fecha Fin</label>
<div class="input-group">
<span class="input-group-addon"><i class="icon-calendar"></i></span>
<input type="text" class="form-control" id="dpFechaFinFiltro">
</div>
</div>
<div class="col-md-4 form-group">
<label>Estado</label>
<select class="form-control selectpicker" id="cboEstadoJustificacionFiltro" multiple>
</select>
</div>
</div>
</div>
<div class="panel-footer">
<div class="text-center">
<button class="btn btn-primary" id="btnAplicarFiltro"><i class="fa fa-search"></i> Aplicar filtro</button>&nbsp;
<button class="btn btn-primary" id="btnMostrarTodo"><i class="icon-eye4"></i> Mostrar Todo</button>&nbsp;
</div>
</div>
</div>
</div>
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit">LISTADO DE PERIODOS DE CIERRE</h6>
<div class="heading-elements">
<button type="button" id="btnNuevoPeriodo" class="btn bg-slate border-slate-600 btn-xs"><i class="glyphicon glyphicon-plus"></i>&nbsp; Nuevo periodo</button>
</div>
</div>
<div id="divDatatable"></div>
</div>
</div>
<!-- / content -->
<jsp:include page="/vistas/templates/footer-body.jsp" />
<!--js de la pagina-->
<script src="../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js" type="text/javascript"></script>
<script src="../plantilla/assets/js/plugins/ui/moment/moment.min.js" type="text/javascript"></script>
<script src="../plantilla/assets/js/plugins/pickers/datepicker.js" type="text/javascript"></script>
<script src="../js/lib/bootstrap-select.min.js" type="text/javascript"></script>
<script src="../plantilla/assets/js/plugins/forms/selects/select2.min.js"></script>
<script src="../js/lib/lodash.js" type="text/javascript"></script>
<script src="../js/pages/registro_periodo_cierre.js" type="text/javascript"></script>
<!--js-->
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment