<div class="content-header" >
      <div class="container-fluid">
        <div class="row mb-2">
		 <div class="col-sm-6">
			<h1>
			Gestion de precios y codigos de barras
			<small>modulo</small>
			</h1>
		</div>	
		
		<div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
				<li class="breadcrumb-item" >Inicio</li>
				<li class="breadcrumb-item" >Almacen</li>
				<li class="breadcrumb-item active">Gestion de precios y codigos de barras</li>
            </ol>
          </div>
		</div>
	</div>
</div>
<section class="content">
	<div class="container-fluid">
	<div class="row">
	    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:0px;" >
		    <div class="card">
		        <div class="card-header">
		          <button id="btn_actualizar" class="btn btn-default">Actualizar</button>		        
		        </div>
		    </div>
		</div>
	</div>
	</div>
</section>
	
	
	
	
	
	
	
	
	
	
	
			<div class="modal " id="div_mensaje_dialog" role="dialog" data-keyboard="false" data-backdrop="static" tabindex="-1"  style="padding:0px; overflow-y:scroll;">
			<div class="modal-dialog modal-md"  role="document" >
			<div class="modal-content" style="padding:0px;">
			<div class="modal-body div_mensaje"  >
			
		
			
			</div>
			<br />
			<br />
			</div>
			</div>
			</div>		
			
	<!-- Filter content -->
	<div id="div_preciogestion_filtro"></div>
	<!-- Table content -->
	<div id="div_preciogestion_tabla"></div>
	<!-- Form content -->
<script type="text/javascript">
	function preciogestion_filtro()
	{
		$.ajax({
			type: "POST",
			url: "../preciogestion/preciogestion_filtro.php",
			async:true,
			dataType: "html",                      
		//data: ({
			//producto: $('#txt_fil_pro').val()
		//}),
		beforeSend: function() {
			var divmen = "<center> <br> <span class='spinner-border spinner-border-lg mr-2'></span> <span style='font-size:1.5rem;'>PROCESANDO PETICIÓN</span></center>";	
			$('#div_preciogestion_filtro').html(divmen);
		},
		success: function(html){
			$('#div_preciogestion_filtro').html(html);
		},
		complete: function(){
			preciogestion_tabla();
		}
	});
	}
	function preciogestion_tabla()
	{
$('#div_mensaje_dialog').modal('show');
	
	$.ajax({
		type: "POST",
		url: "../preciogestion/preciogestion_tabla.php",
		async:true,
		dataType: "html",                      
		data: $("#for_fil_pro").serialize(),
		beforeSend: function() {
			var divmen = "<center> <br> <span class='spinner-border spinner-border-lg mr-2'></span> <span style='font-size:1.5rem;'>PROCESANDO PETICIÓN</span></center>";	
			$('.div_mensaje').html(divmen);
			$('#div_preciogestion_tabla').addClass("ui-state-disabled");
        },
		success: function(html){
			$('#div_preciogestion_tabla').html(html);
		},
		complete: function(){			
			$('#div_preciogestion_tabla').removeClass("ui-state-disabled");
			$('#div_mensaje_dialog').modal('hide');
		}/*,error: function(a){
			console.log(a);
		}*/
	});    
	}
$(function() {
	
	 $('#btn_actualizar').click(function() {
			$("#contenido").load("../preciogestion/preciogestion_vista.php");
		});
		preciogestion_filtro();	
		setTitle("GESTION DE PRECIOS - "+nombreEmpresa);	
	 
	
});
</script>