<script type="text/javascript">	
$(document).ready(function() {	
	$("#tabs").tabs({selected:0});	
	$("#tampil_data").load('spv/supplier/tampil_data.php');
	
	$("#txt_cari").keyup(function() {
		var cari 	= $("#txt_cari").val()
		
		$.ajax({
			type	: "GET",
			url	: "spv/supplier/tampil_data.php",
			data	: "cari="+cari,
			success	: function(data){
				$("#tampil_data").html(data);
			}
		});
	});
	
	$("#cetak_sp").click(function(){
		var cari = $("#txt_cari").val();		
		window.location.href='modul/laporan/daftar_sp.php?cari='+cari;
	});
	
	$("#tutup_sp").click(function(){
		document.location='?module=home';
	});
});
</script>


<style type="text/css">
#info {
	font-size:12px;
	font-weight:bold;
	color:#F00;
}
</style>
<?php
echo "<div id='tabs'>";
echo "<ul >	       
	       <li><a href='#data'>DAFTAR SUPPLIER</a></li>
      </ul>";

	echo "<div id='data'>
			<div id='pencarian'>
			<fieldset>
			<legend>Filter Data</legend>
			
			<input type='text' name='txt_utdg' id='txt_utdg' size='10' class='input' hidden />
			<input type='text' name='txt_utbg' id='txt_utbg' size='10' class='input' hidden />
			<table width='100%'>
				<tr>
					<td>Cari Kata : <input type='text' name='txt_cari' id='txt_cari' size='40'></td>
					<td>
						<button name='cetak_cs' id='cetak_sp'>Cetak</button>
						<button name='tutup_cs' id='tutup_sp'>Tutup</button>
					</td>
				</tr>
			</table>
			</fieldset>
			</div><br>
			<div id='tampil_data' align='center' style='overflow-x: auto;height: 400px;scroll-behavior: smooth'></div>
	</div>";
	echo "<div id='info' align='center'></div>";
echo "</div>";
?>