cambios en apidenuncias
This commit is contained in:
179
.codex-links/WebIntranet/estadoInciPicada.aspx
Normal file
179
.codex-links/WebIntranet/estadoInciPicada.aspx
Normal file
@@ -0,0 +1,179 @@
|
||||
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.master" CodeBehind="estadoInciPicada.aspx.vb" Inherits="WebIntranet.estadoInciPicada" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="server">
|
||||
<div class="row pag">
|
||||
<div id="navLateral" class="col-3">
|
||||
<ul>
|
||||
<%--<li id='intPicadaBL' runat="server" class='obtListLat'><a onclick="redirigir()" href="intPicada.aspx">Introducir picada</a></li>--%>
|
||||
<li id='intPicadaPersBL' runat="server" class='obtListLat'><a onclick="redirigir()" href="intPicadaPersonal.aspx">Introducir picada a personal</a></li>
|
||||
<li id='Li1' runat="server" class='obtListLat'><a onclick="redirigir()" href="AnularPicadas.aspx">Anular picada a personal</a></li>
|
||||
<li id='informPicadasBL' class='obtListLat'><a onclick="redirigir()" href="listPicadas.aspx">Informe de listado de picadas</a></li>
|
||||
<li id='informIncidenciasBL' class='obtListLat'><a onclick="redirigir()" href="listSolicitudesComunicaciones.aspx">Informe de permisos y comunicaciones</a></li>
|
||||
<%--<li id='bolsaDeHorasBL' runat="server" class='obtListLat'><a onclick="redirigir()" href="/bolsaDeHoras.aspx">Bolsa de horas extraordinarias</a></li>--%>
|
||||
<%--<li id='VAAPBCBL' runat="server" class='obtListLat'><a onclick="redirigir()" href="/VAAPBC.aspx">Situación de vacaciones, asuntos particulares y días compensatorios</a></li>--%>
|
||||
<li id='VAAPBCBLpers' runat="server" class='obtListLat'><a onclick="redirigir()" href="/VAAPBCpers.aspx">Situación de vacaciones, asuntos particulares y días compensatorios</a></li>
|
||||
<%--<li id='listIncPic' runat="server" class='obtListLat listActivo'><a onclick="redirigir()" href="/VAAPBC.aspx">Situación de vacaciones, asuntos particulares y días compensatorios</a></li>--%>
|
||||
<li id='resumenIncidenciasEntreFechasBL' class='obtListLat'><a onclick="redirigir()" href="/resumenSolicitudesComunicacionesEntreFechas.aspx">Resumen de permisos y comunicaciones entre fechas</a></li>
|
||||
<li id='estIncPicBL' class='obtListLat listActivo'><a onclick="redirigir()" href="/estadoInciPicada.aspx">Estado de incidencias y picadas</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="listadoDePicadas" class="col">
|
||||
<p class="tituloMobile">Informe de listado de picadas</p>
|
||||
<div class="migasDePan">
|
||||
<ul>
|
||||
<li class="migaActiva">/ Control Horario</li>
|
||||
<li class="migaActiva">/ Informe de listado de picadas</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="d-flex-column justify-content-center">
|
||||
|
||||
|
||||
<div class="row IntroducirFechas align-items-center wrap" style="margin-left: auto !important; margin-right: auto !important; margin-bottom: 25px !important; margin-top: 0px;">
|
||||
<div class="col-md-3 d-flex" style="gap: 15px">
|
||||
<p style="margin-bottom: 0px; width: 50px; line-height: 35px">Del</p>
|
||||
<input id="inpFechaInicio" class="inFecha" style="height: 35px;" runat="server" type="date" max="9999-12-31" />
|
||||
</div>
|
||||
<div class="col-md-3 d-flex" style="gap: 15px">
|
||||
<p style="margin-bottom: 0px; width: 50px; line-height: 35px;">al</p>
|
||||
<input id="inpFechaFin" class="inFecha" style="height: 35px;" runat="server" type="date" max="9999-12-31" />
|
||||
</div>
|
||||
<div class="col justify-content-around d-flex" style="">
|
||||
<div style="display: flex; gap: 10px">
|
||||
<p style="margin-bottom: 0px; line-height: 35px;">Oficina</p>
|
||||
<input type="checkbox" id="chkPicada" />
|
||||
</div>
|
||||
<div style="display: flex; gap: 10px">
|
||||
<p style="margin-bottom: 0px;; line-height: 35px;">Teletrabajo</p>
|
||||
<input type="checkbox" id="chkTeletrabajo" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- <div class="col-md-3" style="display: flex; justify-content: center;">
|
||||
<input type="button" class="btnAzul btnAlargado" onclick="MostrarPicadas()" value="Buscar" />
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
<p id="mensaje" runat="server"></p>
|
||||
<div style="padding-inline:2.5%; margin-bottom:10px"><input type="text" id="buscador" style="width:calc(100% - 25px)" placeholder="buscar..." onkeyup="Filtrar()" onchange="Filtrar()" /><input style="width:25px" type="button" value="X" onclick="vaciarFiltro()"/></div>
|
||||
<div id="tablaincidencias" style="max-height:300px; overflow:auto;" runat="server" class="cajaTabla">
|
||||
</div>
|
||||
<div style="width:100%;display:flex;justify-content:center;">
|
||||
<input type="button" class="btnOAAFAzul" value="OBTENER EXCEL" onclick="obtenerEstado()" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function Filtrar() {
|
||||
var inp = $("#buscador").val().toUpperCase()
|
||||
var listInc = $(".itmList")
|
||||
if (inp.length > 0) {
|
||||
for (var i = 0; i < listInc.length; i++) {
|
||||
if (listInc[i].id.toUpperCase().includes(inp) == false) {
|
||||
listInc[i].hidden = true
|
||||
}
|
||||
else {
|
||||
listInc[i].hidden = false
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < listInc.length; i++) {
|
||||
listInc[i].hidden = false
|
||||
}
|
||||
}
|
||||
}
|
||||
function vaciarFiltro() {
|
||||
$("#buscador").val("")
|
||||
Filtrar()
|
||||
}
|
||||
function checkall() {
|
||||
var btn = $("#btnCheckAll")
|
||||
var checks = $(".chkList")
|
||||
if (btn[0].value == "Marcar todas") {
|
||||
for (var i = 0; i < checks.length; i++) {
|
||||
checks[i].checked = true
|
||||
}
|
||||
btn[0].value = "Desmarcar todas"
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < checks.length; i++) {
|
||||
checks[i].checked = false
|
||||
}
|
||||
btn[0].value = "Marcar todas"
|
||||
}
|
||||
}
|
||||
function compFechaIniAnterior(tramo1, tramo2) {
|
||||
if (tramo1 > tramo2) {
|
||||
return false
|
||||
}
|
||||
else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
function obtenerEstado() {
|
||||
var feIn = $("#inpFechaInicio").val()
|
||||
var feFi = $("#inpFechaFin").val()
|
||||
|
||||
if (feIn == "" || feFi == "") {
|
||||
$("#mensaje").css("color","red")
|
||||
$("#mensaje").text("Introduzca fecha de inicio y de final")
|
||||
return
|
||||
}
|
||||
|
||||
if (compFechaIniAnterior(feIn, feFi) == false) {
|
||||
$("#mensaje").css("color", "red")
|
||||
$("#mensaje").text("la fecha de inicio no puede ser posterior a la de final")
|
||||
return
|
||||
}
|
||||
|
||||
var chkpicadas = $("#chkPicada")[0].checked
|
||||
var chktele = $("#chkTeletrabajo")[0].checked
|
||||
var checks = $(".chkList")
|
||||
var listId = []
|
||||
for (var i = 0; i < checks.length; i++) {
|
||||
if (checks[i].checked == true) {
|
||||
listId.push(checks[i].value)
|
||||
}
|
||||
}
|
||||
$("#divLoading").css("display", "flex")
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/estadoInciPicada.aspx/obtenerEstado",
|
||||
data: '{"chPi":' + chkpicadas+ ',"chTe":' + chktele+ ', "liId":['+listId+'],"feIn":"'+feIn+'","feFi":"'+feFi+'"}',
|
||||
async: true,
|
||||
contentType: "application/json; charset=utf-8",
|
||||
success: function (result) {
|
||||
if (result.d != "") {
|
||||
//$('#btnDescargaRIM').css('display', 'none')
|
||||
//$("#iframeRIM").html = ""
|
||||
$('#mensaje').text("")
|
||||
var archivo = JSON.parse(result.d.Result)
|
||||
var base64String = archivo.FicheroExcel
|
||||
|
||||
datosNomina = base64String
|
||||
|
||||
var uri = 'data:application/octet-stream;base64,' + base64String;
|
||||
var downloadLink = document.createElement("a");
|
||||
downloadLink.href = uri;
|
||||
downloadLink.download = "EstadoIncidencias-" + feIn + "-" + feFi + ".xls";
|
||||
|
||||
document.body.appendChild(downloadLink);
|
||||
downloadLink.click();
|
||||
document.body.removeChild(downloadLink);
|
||||
|
||||
$("#divLoading").css("display", "none")
|
||||
$("#mensaje").css("color","green")
|
||||
$('#mensaje').text("Documento descargado")
|
||||
|
||||
}
|
||||
},
|
||||
error: function (result) {
|
||||
$("#divLoading").css("display", "none")
|
||||
alert('error occured');
|
||||
alert(result.responseText);
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
Reference in New Issue
Block a user