538 lines
27 KiB
Text
538 lines
27 KiB
Text
<%@ Page Title="Requisitos del Cliente" Language="C#" MasterPageFile="~/formulario.master" ValidateRequest="true" AutoEventWireup="true" CodeFile="frwAdjuntosSolicitud.aspx.cs" Inherits="Forms_TRA_frwRequisitos" %>
|
|
|
|
<%@ Register Src="~/ControlUsuario/cuwBusquedaList.ascx" TagPrefix="uc1" TagName="cuwBusquedaList" %>
|
|
<%@ Register Src="~/ControlUsuario/cuwGridDocumento.ascx" TagPrefix="uc2" TagName="cuwGridDocumento" %>
|
|
|
|
|
|
<asp:Content ID="BodyContent" ContentPlaceHolderID="ContenidoFormulario" runat="Server">
|
|
|
|
<%--<script src="../../Scripts/jquery-ui-1.11.4.js"></script>
|
|
<script src="/../../Scripts/toastr.js" type="text/javascript"></script>
|
|
<link href="/../../Content/toastr.css" rel="stylesheet" />
|
|
<script src="/../../Scripts/bootstrap.js"></script>
|
|
<link href="/../../Content/Div.css" rel="stylesheet" />--%>
|
|
<script src="/../../Scripts/WebForms/General/cuwBusquedaList.js"></script>
|
|
<script src="/../../../Scripts/jquery-1.10.2.js"></script>
|
|
<script src="/../../../Scripts/toastr.js" type="text/javascript"></script>
|
|
<link href="/../../../Content/toastr.css" rel="stylesheet" />
|
|
<script src="/../../../Scripts/bootstrap.js"></script>
|
|
|
|
<script src="/../../Scripts/jquery.ui.widget.js"></script>
|
|
<script src="/../../Scripts/jquery.fileupload.js"></script>
|
|
<script src="/../../Scripts/jquery.iframe-transport.js"></script>
|
|
|
|
<script src="/../../Scripts/jquery.fileupload-ui.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
|
|
EscoderBoton();
|
|
//ActulalizarUpload();
|
|
});
|
|
function MensajeVencio() {
|
|
toastr["warning"]("El plazo para adjuntar requisitos se venció. Debe generar una nueva solicitud.", "SIGDD");
|
|
toastr.options = {
|
|
"closeButton": true,
|
|
"debug": false,
|
|
"newestOnTop": false,
|
|
"progressBar": false,
|
|
"positionClass": "toast-bottom-full-width",
|
|
"preventDuplicates": false,
|
|
"onclick": null,
|
|
"showDuration": "1300",
|
|
"hideDuration": "1000",
|
|
"timeOut": "10000",
|
|
"extendedTimeOut": "1000",
|
|
"showEasing": "swing",
|
|
"hideEasing": "linear",
|
|
"showMethod": "fadeIn",
|
|
"hideMethod": "fadeOut"
|
|
};
|
|
}
|
|
function MensajeError(mensaje) {
|
|
toastr["error"](mensaje, "SIGDD");
|
|
toastr.options = {
|
|
"closeButton": true,
|
|
"debug": false,
|
|
"newestOnTop": false,
|
|
"progressBar": false,
|
|
"positionClass": "toast-bottom-full-width",
|
|
"preventDuplicates": false,
|
|
"onclick": null,
|
|
"showDuration": "1300",
|
|
"hideDuration": "1000",
|
|
"timeOut": "10000",
|
|
"extendedTimeOut": "1000",
|
|
"showEasing": "swing",
|
|
"hideEasing": "linear",
|
|
"showMethod": "fadeIn",
|
|
"hideMethod": "fadeOut"
|
|
};
|
|
}
|
|
function MensajeAlerta() {
|
|
toastr["warning"]("Debe seleccionar al menos un requisito.", "SIGDD");
|
|
toastr.options = {
|
|
"closeButton": true,
|
|
"debug": false,
|
|
"newestOnTop": false,
|
|
"progressBar": false,
|
|
"positionClass": "toast-bottom-full-width",
|
|
"preventDuplicates": false,
|
|
"onclick": null,
|
|
"showDuration": "1300",
|
|
"hideDuration": "1000",
|
|
"timeOut": "10000",
|
|
"extendedTimeOut": "1000",
|
|
"showEasing": "swing",
|
|
"hideEasing": "linear",
|
|
"showMethod": "fadeIn",
|
|
"hideMethod": "fadeOut"
|
|
};
|
|
}
|
|
|
|
function MensajeInformativo() {
|
|
toastr["success"]("Se guardaron los datos en el sistema.", "SIGDD");
|
|
toastr.options = {
|
|
"closeButton": true,
|
|
"debug": false,
|
|
"newestOnTop": false,
|
|
"progressBar": false,
|
|
"positionClass": "toast-bottom-full-width",
|
|
"preventDuplicates": false,
|
|
"onclick": null,
|
|
"showDuration": "1300",
|
|
"hideDuration": "1000",
|
|
"timeOut": "10000",
|
|
"extendedTimeOut": "1000",
|
|
"showEasing": "swing",
|
|
"hideEasing": "linear",
|
|
"showMethod": "fadeIn",
|
|
"hideMethod": "fadeOut"
|
|
};
|
|
}
|
|
|
|
function MensajeInformativoCompleto(mensaje) {
|
|
toastr["warning"](mensaje, "SIGDD");
|
|
toastr.options = {
|
|
"closeButton": true,
|
|
"debug": false,
|
|
"newestOnTop": false,
|
|
"progressBar": false,
|
|
"positionClass": "toast-bottom-full-width",
|
|
"preventDuplicates": false,
|
|
"onclick": null,
|
|
"showDuration": "1300",
|
|
"hideDuration": "1000",
|
|
"timeOut": "10000",
|
|
"extendedTimeOut": "1000",
|
|
"showEasing": "swing",
|
|
"hideEasing": "linear",
|
|
"showMethod": "fadeIn",
|
|
"hideMethod": "fadeOut"
|
|
};
|
|
}
|
|
|
|
function EscoderBoton() {
|
|
|
|
//get reference of GridView control
|
|
var grid = document.getElementById("ContenidoFormulario_grvListaDatosRequisitos");
|
|
//variable to contain the cell of the grid
|
|
var cell;
|
|
var CuentaChecks = 0;
|
|
var CuentaChecksChequeados = 0;
|
|
if (grid.rows.length > 0) {
|
|
//loop starts from 1. rows[0] points to the header.
|
|
for (i = 1; i < grid.rows.length; i++) {
|
|
//get the reference of first column
|
|
cell = grid.rows[i].cells[0];
|
|
|
|
//loop according to the number of childNodes in the cell
|
|
for (j = 0; j < cell.childNodes.length; j++) {
|
|
//if childNode type is CheckBox
|
|
if (cell.childNodes[j].type == "checkbox") {
|
|
//assign the status of the Select All checkbox to the cell checkbox within the grid
|
|
|
|
CuentaChecks++;
|
|
if (cell.childNodes[j].checked) { CuentaChecksChequeados++; }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//alert(grid.rows.length);
|
|
if (CuentaChecks == CuentaChecksChequeados) {
|
|
document.getElementById("ContenidoFormulario_btnImcompleto").hidden = "hidden";
|
|
document.getElementById("ContenidoFormulario_btnGuardar").hidden = "";
|
|
}
|
|
|
|
else {
|
|
document.getElementById("ContenidoFormulario_btnImcompleto").hidden = "";
|
|
document.getElementById("ContenidoFormulario_btnGuardar").hidden = "hidden";
|
|
}
|
|
|
|
}
|
|
|
|
function VentanaAbrir() {
|
|
document.getElementById('light').style.display = 'block';
|
|
document.getElementById('fade').style.display = 'block';
|
|
|
|
}
|
|
function VentanaCerrar() {
|
|
document.getElementById('light').style.display = 'none';
|
|
document.getElementById('fade').style.display = 'none'
|
|
}
|
|
|
|
function abrirPDF(strRuta) {
|
|
//alert(strRuta);
|
|
//window.location = strRuta;
|
|
window.open(strRuta, '', '_blank', 'width=500,height=245,left=350,top=400');
|
|
}
|
|
function llamarUpload()
|
|
{
|
|
ActulalizarUpload();
|
|
}
|
|
function ActulalizarUpload(eliminar) {
|
|
$('.FileUpload').fileupload({
|
|
|
|
url: '/../FileUploadHandler.ashx?upload=start&solicitud=' + $("#ContenidoFormulario_lblNumSolicitud").text() + '&texto=' + $("#ContenidoFormulario_txtdescripcion").val() + '&fkrequisito=' + $("#ContenidoFormulario_ddlRequisito").val() + '&pksolicitud=' + $("#ContenidoFormulario_pksolicitud").val() + '&pkeliminar=' + eliminar + '&origen=adjunto',
|
|
type: 'POST',
|
|
add: function (e, data) {
|
|
//console.log('add', data);
|
|
//$('#progressbar').show();
|
|
data.submit();
|
|
},
|
|
progress: function (e, data) {
|
|
|
|
},
|
|
success: function (response, status) {
|
|
|
|
//console.log('success', response);
|
|
if (response != '') {
|
|
if (response == 'errorEXT') {
|
|
MostrarError("Solo se admiten documentos de tipo pdf.");
|
|
}
|
|
else {
|
|
|
|
$("#documentosPorSubir").append("<li onclick='return eliminaRegistro(event)'>" + response + "</li>");
|
|
|
|
|
|
}
|
|
|
|
}
|
|
},
|
|
error: function (error) {
|
|
if (error.status = "200") {
|
|
$('#progressbar').hide();
|
|
$('#progressbar div').css('width', '0%');
|
|
//console.log('success', response);
|
|
if (error.responseText != '') {
|
|
if (error.responseText == 'errorEXT') {
|
|
MostrarError("Solo se admiten documentos de tipo pdf.");
|
|
}
|
|
else {
|
|
if (error.responseText == "falloGuardar") {
|
|
MensajeError("Se produjo un error al guardar el archivo.");
|
|
}
|
|
else {
|
|
if (error.responseText == "falloExiste") {
|
|
MensajeError("El archivo ya existe.");
|
|
}
|
|
else {
|
|
$("#documentosPorSubir").append("<li id='" + error.responseText + "' onclick='return eliminaRegistro(this)'>" + error.responseText + "</li>");
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
else {
|
|
|
|
} // console.log('error', error);
|
|
}
|
|
});
|
|
}
|
|
function eliminaRegistro(ev) {
|
|
var datos = {
|
|
pkeliminar: ev.innerText
|
|
|
|
};
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: '/../FileUploadHandler.ashx?upload=start&solicitud=' + $("#ContenidoFormulario_lblNumSolicitud").text() + '&pksolicitud=' + $("#ContenidoFormulario_pksolicitud").val() + '&pkeliminar=' + ev.innerText,
|
|
|
|
cache: false,
|
|
data: JSON.stringify(datos),
|
|
contentType: 'application/json; charset=utf-8',
|
|
dataType: 'json',
|
|
success: function (response, status) {
|
|
|
|
if (response.d != '')
|
|
if (response.d == 'errorEXT') {
|
|
alert("Error al eliminar el archivo intente de nuevo.");
|
|
}
|
|
else {
|
|
//alert(response.d);
|
|
//ev.target.parentNode.remove();
|
|
ev.remove();
|
|
}
|
|
},
|
|
}).fail(function (jqxhr, textStatus, error) {
|
|
alert('Se presentó un problema al eliminar el archivo por favor intente de nuevo' + error);
|
|
|
|
}).then(function (value) {
|
|
//alert('entonces');
|
|
});
|
|
//ActulalizarUpload(ev.target.parentNode.innerText);
|
|
|
|
}
|
|
</script>
|
|
|
|
|
|
<style type="text/css">
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
font-family: Verdana;
|
|
background: -webkit-radial-gradient(center, ellipse cover rgb(250, 252, 251) 0%, rgb(223, 240, 247) 100%);
|
|
}
|
|
|
|
.black_overlay {
|
|
display: none;
|
|
position: absolute;
|
|
top: 0%;
|
|
left: 0%;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: black;
|
|
z-index: 1;
|
|
-moz-opacity: 0.8;
|
|
opacity: .80;
|
|
filter: alpha(opacity=80);
|
|
}
|
|
|
|
.white_content {
|
|
display: none;
|
|
position: absolute;
|
|
top: 10%;
|
|
left: 5%;
|
|
width: 90%;
|
|
height: 80%;
|
|
padding: 16px;
|
|
border: 1px solid #000;
|
|
background-color: white;
|
|
z-index: 5;
|
|
overflow: auto;
|
|
}
|
|
</style>
|
|
|
|
<asp:ScriptManager ID="ScripManager1" EnablePartialRendering="true" runat="server">
|
|
</asp:ScriptManager>
|
|
<asp:UpdatePanel ID="updPanel" runat="server" UpdateMode="Always">
|
|
<ContentTemplate>
|
|
<asp:UpdateProgress ID="updProgress" runat="server">
|
|
<ProgressTemplate>
|
|
<div>
|
|
<div class="espera">
|
|
<asp:Image ID="imgEspera" runat="server" ImageUrl="~/Images/Animados/cargando.gif" Style="position: absolute; top: 40%; left: 45%; width: 80px; height: 80px" />
|
|
<asp:Label ID="lblEspera" runat="server" Text="Espere... " Style="position: absolute; top: 57%; left: 46%; width: 50px; height: 50px; color: #c8c8c8; font-size: medium; font-weight: 700"></asp:Label>
|
|
</div>
|
|
</div>
|
|
</ProgressTemplate>
|
|
</asp:UpdateProgress>
|
|
<!-- TITULO -->
|
|
<div id="divTitulo" align="center">
|
|
<legend>Adjuntar documentos pdf</legend>
|
|
|
|
</div>
|
|
<!-- INSTRUCCIONES -->
|
|
<div id="divInstrucciones" align="center">
|
|
<%--<asp:Label ID="lblInstrucciones" runat="server" Text="Nota: (Completar y acatar los requerimientos indicados en la fórmula vigente.)" />--%>
|
|
</div>
|
|
<!-- SEPARADOR -->
|
|
<div id="divSeparador1" class="divSeparador">
|
|
</div>
|
|
<div align="right" style="width: 100%">
|
|
<%-- **********************************************************************Datos Superiores ********************************************************************************* --%>
|
|
<div id="divDatosSuperiores" runat="server" visible="false">
|
|
|
|
<%--Consultar--%>
|
|
|
|
<div align="center" id=" ">
|
|
|
|
|
|
|
|
<td colspan="5">
|
|
<h4 style="text-align: center; color: #000000;">Número de Solicitud:
|
|
<asp:Label ID="lblNumSolicitud" runat="server" Text="Label"></asp:Label>
|
|
<asp:HiddenField ID="pksolicitud" runat="server" />
|
|
</h4>
|
|
</td>
|
|
</div>
|
|
|
|
<div id="tdConsultar" runat="server" align="center">
|
|
<uc1:cuwBusquedaList ID="cuwBusquedaList" runat="server" Visible="false" />
|
|
</div>
|
|
|
|
<%--Listado de Datos--%>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<%--Botonera Superior--%>
|
|
|
|
|
|
<div class="tabla">
|
|
<div id="Panel2" class="panel panel-primary">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">Adjuntar Requisitos</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<div align="left" id=" ">
|
|
<div class="col-sm-12">
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-xs-7 col-sm-6 col-lg-5" style="width: 300px;">
|
|
<asp:Label runat="server" class="control-label" Text="Descripción adjunto" Font-Size="Medium" />
|
|
</div>
|
|
<div class="col-xs-5 col-sm-6 col-lg-4" style="width: 300px;">
|
|
|
|
<asp:TextBox ID="txtdescripcion" runat="server" TextMode="MultiLine" Rows="5" Columns="30" MaxLength="500" CssClass="form-control1"></asp:TextBox>
|
|
</div>
|
|
</div>
|
|
<div class="Separador"></div>
|
|
<div class="row">
|
|
<div class="col-xs-7 col-sm-6 col-lg-5" style="width: 300px;">
|
|
<asp:Label runat="server" class="control-label" Text="Adjuntar documento" Font-Size="Medium" />
|
|
</div>
|
|
<div class="col-xs-5 col-sm-6 col-lg-4" style="width: 600px;">
|
|
<input type="file" id="btnFileUpload" class="FileUpload" onclick="llamarUpload();" name="file" />
|
|
<ul class="etiqueta" id="documentosPorSubir">
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="Separador"></div>
|
|
<div class="row">
|
|
<div class="col-xs-7 col-sm-6 col-lg-5" style="width: 300px;">
|
|
|
|
</div>
|
|
<div class="col-xs-5 col-sm-6 col-lg-4" style="width: 600px;">
|
|
<asp:Button ID="btnSubirarchivo" runat="server" CssClass="botones" OnClick="btnSubirarchivo_Click" Text="Adjuntar Vision 2020" Visible="true" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="Separador"></div>
|
|
<div class="row">
|
|
<asp:GridView ID="grvLista" runat="server" Width="100%" CellPadding="2" PageSize="5" GridLines="None" AutoGenerateColumns="False" AllowPaging="True"
|
|
OnRowCommand="grvLista_RowCommand" OnPageIndexChanging="grvLista_PageIndexChanging" OnRowDataBound="grvLista_RowDataBound" Font-Names="Verdana" Font-Size="16px">
|
|
<RowStyle BackColor="#EFF3FB" VerticalAlign="Middle" />
|
|
<AlternatingRowStyle BackColor="White" VerticalAlign="Middle" />
|
|
<PagerStyle CssClass="gridViewPaginacion" ForeColor="#44608c" HorizontalAlign="Center" />
|
|
<HeaderStyle Font-Bold="True" ForeColor="White" CssClass="gridViewHeader" />
|
|
<PagerSettings PageButtonCount="25" />
|
|
<Columns>
|
|
|
|
<asp:BoundField DataField="PKADJUNTOSOLICITUD" HeaderText="ID" SortExpression="PKADJUNTOSOLICITUD">
|
|
<HeaderStyle Width="10%" />
|
|
</asp:BoundField>
|
|
<asp:BoundField DataField="NOMBREADJUNTOSOLICITUD" HeaderText="Adjunto">
|
|
<HeaderStyle Width="45%" Wrap="true"/>
|
|
<ItemStyle Wrap="true" />
|
|
</asp:BoundField>
|
|
<asp:BoundField DataField="DESCRIPCIONADJUNTOSOLICITUD" HeaderText="Descripcion">
|
|
<HeaderStyle Width="35%" />
|
|
</asp:BoundField>
|
|
|
|
<asp:BoundField DataField="FECHAADJUNTOSOLICITUD" HeaderText="Fecha">
|
|
<HeaderStyle Width="15%" />
|
|
</asp:BoundField>
|
|
|
|
|
|
|
|
<asp:BoundField DataField="FKSOLICITUD" HeaderText="Solicitud" SortExpression="FKSOLICITUD" />
|
|
|
|
|
|
|
|
<asp:ButtonField ImageUrl="~/Images/MiniBotones/btnRemover.png"
|
|
ButtonType="Image" CommandName="eliminar" Text="fdwer" HeaderText="Acciones">
|
|
|
|
</asp:ButtonField>
|
|
|
|
|
|
|
|
<asp:ButtonField ImageUrl="~/Images/MiniBotones/ConsultarExpediente.png"
|
|
ButtonType="Image" CommandName="ver" >
|
|
|
|
</asp:ButtonField>
|
|
<asp:BoundField DataField="NUMEROSOLICITUDSOLICITUD" HeaderText="" SortExpression="NUMEROSOLICITUDSOLICITUD" />
|
|
</Columns>
|
|
|
|
</asp:GridView>
|
|
</div>
|
|
<div class="Separador"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<%-- **********************************************************************Datos Medios ********************************************************************************* --%>
|
|
|
|
<div id="divDatosMedios" runat="server" visible="false">
|
|
<%--Datos del Registro--%>
|
|
<caption>
|
|
<div id="tdDatos" runat="server" style="text-align: center" class="tabla">
|
|
<div class="col-sm-7">
|
|
<%--<div runat="server" align="right" >
|
|
|
|
Descripción
|
|
<asp:TextBox ID="txtDescripcion" runat="server" MaxLength="200" TextMode="MultiLine" CssClass="textBox,validate[required]"></asp:TextBox>
|
|
<br />
|
|
<asp:RequiredFieldValidator ID="rvDescripcion" runat="server" ControlToValidate="txtDescripcion" ErrorMessage="Debe digitar una descripción para el requisito."></asp:RequiredFieldValidator>
|
|
<br />
|
|
<br />
|
|
Documento Soporte
|
|
<asp:TextBox ID="txtDocSoporte" runat="server" MaxLength="100" CssClass="textBox,validate[required]"></asp:TextBox>
|
|
<br />
|
|
<br />
|
|
|
|
</div>--%>
|
|
</div>
|
|
</div>
|
|
|
|
<%--Botonera Inferior--%>
|
|
</caption>
|
|
<div class="col-sm-7">
|
|
<div id="tdBotoneraInferior" runat="server" align="right" class="tabla">
|
|
|
|
<%--<asp:Button ID="btnGuardar" runat="server" CssClass="botones" OnClick="btnGuardar_Click" Text="Guardar" Visible="false" />
|
|
<asp:Button ID="btnAnterior2" runat="server" CssClass="botones" OnClick="btnAnterior_Click" Text="Anteior" />--%>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
<Triggers>
|
|
<asp:AsyncPostBackTrigger ControlID="btnSubirarchivo" EventName="Click" />
|
|
<%-- <asp:AsyncPostBackTrigger ControlID="btnGuardar" EventName="Click" />--%>
|
|
</Triggers>
|
|
</asp:UpdatePanel>
|
|
|
|
|
|
|
|
</asp:Content>
|
|
|
|
|