	<%@include file="/jsp/common/defaultTopLogin.jsp"%>
    
    <link rel="stylesheet" href="${contextPath}/js/common/jquery/jquery-treetable/css/jquery.treetable.css" />
	<link rel="stylesheet" href="${contextPath}/js/common/jquery/jquery-treetable/css/jquery.treetable.theme.default.css" />
	 
    <script src="${contextPath}/js/common/jquery/jquery-treetable/jquery.treetable.js"></script>    
		    
	<style>						
		
		.alignleft {
		  float: left;
		  width:33.33333%;
		  text-align:left;
		  padding-left: 15px;
		}		
		span.indenter{
		   text-align:left !important;
		}
		table tbody td:nth-child(1){
			text-align: left;
		}
		
		table tbody td{
			text-align: center;
			font-size: 12px;
		}
		
		table thead tr.encabezado{
			text-align: center;
			font-size: 12px;
		}				
		
		table.treetable{		
		    border: 1px solid #888;
    		border-collapse: collapse;
    		font-size: .8em;
    		line-height: 1;
    		margin: .6em 0 1.8em 0;
    		width: 100%;    		
    	}
	</style>

   <% //Se baja a sesion el pmn return de listado y el tipo contrato
      session.removeAttribute("idContrato");     
      String pmnP = request.getParameter("pmn");
      session.setAttribute( "pmnReturn", pmnP );
      String tipCto = request.getParameter("tipoContrato");
      
      if(tipCto != null && !tipCto.equals(""))
         session.setAttribute( "tipoContrato", tipCto );            
   %>     

   <input type="hidden" id="idContrato"/>
   <input type="hidden" id="idDoc"/>         
   <div class ="row">
   		<label id="labelError" class="text-danger" for="porcentaje" style="display:none">*Seleccione un filtro para la b&uacute;squeda.</label>
   </div>
   
   <div id="divElemetos" class ="row">
   	       	    	  	
	  	<div class="col-sm-4" >
		  	<label class="form-label">Estudios: </label>
		  	<select class="form-control-sm" id="estudios" >  		
			</select>
		</div>

		<div class="col-sm-2 form-check" >
			<input class="class="form-check-input"" type="checkbox" id ="cbRechazado" value="">
		  	<label class="form-check-label"> Rechazados</label>
		</div>
		             	  	
	  	<div class="col-sm-2">
	  		<input id="buscar" type="button" value="Buscar" class="btn btn-success form-control "/>    	
	  	</div>
	  	
		<div class="col-sm-2"> 		
	    	<input id="nuevo"  type="button" value="Agregar Contrato" class="btn btn-primary  "/>
	  	</div>  	
  	</div>
  	 <div id="filtros" class="row">
  			
			<div class="col-sm-3">
			<label class="form-label" for="contrato">Contrato:</label>
				<input class="form-control" id="contrato" name="contrato" type="text"
					>
			</div>
			<div class="col-sm-3">
			<label class="form-label" for="nombreEstandar">Nombre Estandar:</label>
				<input class="form-control" id="nombreEstandar" name="nombreEstandar" type="text"
					>
			</div>
			<div class="col-sm-3">
			<label class="form-label" for="nombreUnico">Nombre Unico:</label>
				<input class="form-control" id="nombreUnico" name="nombreUnico" type="text"
					>
			</div>
			<div class="col-sm-3">
			<label class="form-label" for="idBv">ID BroadView:</label>
				<input class="form-control" id="idBv" name="idBv" type="text"
					>
			</div>
  	</div>

    <br/>
    <div class ="row">
        <div class ="col-sm-4"></div>
   		<label id="labelBuscando" class="col-sm-2 text-danger" for="porcentaje" style="display:none">B&uacute;scando Datos....</label>
    </div>
    <br/>   
    <div id="divTabla" class="row"></div>
        	
    <div id="dialogoDocs" class="modal  bs-example-modal-lg" id="modalTitulo">
		<div class="modal-dialog  modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="btn-close" data-bs-dismiss="modal" "aria-hidden="true"></button>
					<h3 class="modal-title"></h3>
				</div>
				<div class="modal-body">			
				</div>
				<div class="modal-footer">
				     <button type="button" class="btn btn-default" data-bs-dismiss="modal" >Cerrar</button>							
				</div>
		    </div>
		</div>
	</div>
	
	<!-- MODAL TIPO ENMIENDA -->
	<div  id="modalTipoEnmienda" class="modal  bs-example-modal-lg">
		<div style="margin:auto; padding-right:19px; width:430px;" class="modal-dialog  modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="btn-close" data-bs-dismiss="modal" aria-hidden="true">X</button>
					<h3 class="modal-title"></h3>
				</div>
				<div class="modal-body">
				      <label class="form-label" id="tipoContrato" style="display:none"></label>
				      <label class="form-label" id=idContratoE style="display:none"></label>				      	
				      <div><input type="radio" value="3" name="operacion" onclick="btnTipoEnmienda.disabled = false">Enmienda Normal</div>
				      <div><input type="radio" value="4" name="operacion" onclick="btnTipoEnmienda.disabled = false">Enmienda por Correccion</div>
				      
				</div>
				<div class="modal-footer">
				     <button type="button" class="btn btn-default" data-bs-dismiss="modal" >Cancelar</button>
				     <input disabled="disabled" style="background-color:gray; color:#fff9f9;" class="btn" id="btnTipoEnmienda" type="button" value="Crear" onclick="enviarOperacionEnmienda(idContratoE,tipoContrato)" data-bs-dismiss="modal">							
				</div>
		    </div>
		</div>
	</div>
					
    <input type="text" id="tamTabla" style="display:none">  
    <input type="text" id="pmn" value="<%= ( Integer.parseInt( pmn ) + 1 ) %>" style="display:none">    
    <input type="text" id="pmnReturn" value="<%= pmn %>" style="display:none">
                              
    <script src="${contextPath}/js/dda/contrato/listado/listado.js?v=${versionJS}"></script>
	<script type="text/javascript" language="javascript" src="${contextPath}/js/dda/contrato/listado/uploadListado.js?v=${versionJS}"></script>
	<script src="${contextPath}/js/common/perfil/perfilController.js?v=${versionJS}"></script>
	<script src="${contextPath}/js/common/perfil/perfilService.js?v=${versionJS}"></script>
	
	
    <%@include file="/jsp/common/defaultBottomLogin.jsp"%>
    <jsp:include page="/jsp/dda/contrato/common/uploadDocument.jsp" />
    