 <?php
date_default_timezone_set('America/Lima');
session_start();
$y=date('Y');
$m=date('m');
$d=date('d');
$fec1="$d-$m-$y";
$fec2="$d-$m-$y";
require_once("../formatos/formato.php");
?>
<section class="content">
	<div class="container-fluid">
	<div class="row">
	    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
		    <div class="card">
		        <div class="card-header">
    		<div class="row">
			
			
			
			<form name="for_fil_progen" id="for_fil_progen" method="POST" >							
				
				
						<div class="row">
						
							<div class="col-lg-2 col-sm-2 col-6">
								<label for="txt_fil_pro_mar">Marca:</label>
								<input type="text" name="txt_fil_pro_mar" id="txt_fil_pro_mar" autocomplete="off" value="" class="form-control input-sm" > 							 	
							</div> 
							
							<div class="col-lg-2 col-sm-3 col-6">
								<label for="cmb_fil_cat_id">Categoría:</label>
								<select name="cmb_fil_cat_id" id="cmb_fil_cat_id" class="form-control  input-sm"></select>
							</div>
							
							<div class="col-lg-2 col-sm-3 col-6">
								<label for="txt_fil_pro_dat1">Busqueda:</label>
								<input name="txt_fil_pro_dat1" type="text" id="txt_fil_pro_dat1" autocomplete="off" class="form-control  input-sm">
							</div>
							
							<div class="col-lg-2 col-sm-3 col-6">
								<label for="txt_fil_pro_dat2">-</label>
								<input name="txt_fil_pro_dat2" type="text" id="txt_fil_pro_dat2" autocomplete="off" class="form-control  input-sm">
							</div>
							
							<div class="col-lg-2 col-sm-3 col-6">
								<label for="txt_fil_pro_dat3">-</label>
								<input name="txt_fil_pro_dat3" type="text" id="txt_fil_pro_dat3" autocomplete="off" class="form-control  input-sm">
							</div>
							
							<div class="col-lg-2 col-sm-3 col-6" style="padding-top: 30px;">
							<span style="cursor:pointer" onClick="productogeneral_cst_tabla()" class="btn btn-primary"> <i class="fa fa-search"></i></span>
							<span style="cursor:pointer" onClick="productogeneral_cst_filtro()" class="btn btn-default"> Restablecer </span>
							</div>
							
						</div>
						
					
						</form>
					
					</div>
				</div>
			</div>
		</div>
	</div>
	</div>
</section>
<script type="text/javascript">
	
	
	$( "#txt_fil_pro_dat1" ).keydown(function(e){
			if(e.which==13)
			{
				
				productogeneral_cst_tabla();
				e.preventDefault();
			
			}
		});
		
			$( "#txt_fil_pro_dat2" ).keydown(function(e){
			if(e.which==13)
			{
				
				productogeneral_cst_tabla();
				e.preventDefault();
			
			}
		});
		
		
			$( "#txt_fil_pro_dat3" ).keydown(function(e){
			if(e.which==13)
			{
				
				productogeneral_cst_tabla();
				e.preventDefault();
			
			}
		});
	
	$( "#txt_fil_pro_mar" ).keydown(function(e){
			if(e.which==13)
			{
				productogeneral_cst_tabla();
				e.preventDefault();
			}
		});

	
	function cmb_fil_cat_id()
	{	
		$.ajax({
			type: "POST",
			url: "../categoria/cmb_cat_id.php",
			async:true,
			dataType: "html",                      
			data: ({
			//cat_id: "<?php //echo $cat_id?>"
		}),
			beforeSend: function() {
				$('#cmb_fil_cat_id').html('<option value="">Cargando...</option>');
			},
			success: function(html){
				$('#cmb_fil_cat_id').html(html);
			}
		});
	}
	
	
	cmb_fil_cat_id();
	
	
</script>   