114 lines
4.4 KiB
PHP
114 lines
4.4 KiB
PHP
<?php
|
|
include('../koneksi.php');
|
|
$vr_pelunasan_id=$_POST['vr_pelunasan_id'];
|
|
?>
|
|
<script>
|
|
$('button[name="fix_revisi"]').popover();
|
|
$('button[name="batal_fix_revisi"]').popover();
|
|
$('button[name="hapus_revisi"]').popover();
|
|
$("#tabel_data_revisi").DataTable({"stateSave": false,"paging": false,"lengthChange": false,"searching": false,"ordering": false,"info": false,"autoWidth": false});
|
|
</script>
|
|
<input type="hidden" id="vr_pelunasan_tbrev" value="<?php echo $vr_pelunasan_id; ?>">
|
|
<table id="tabel_data_revisi" class="table table-striped table-condensed table-bordered" style="font-size:13px" cellpadding="1">
|
|
<thead style="color:grey;font-family:InterSB">
|
|
<tr align="center">
|
|
<td width="40px;">No</td>
|
|
<td width="120px;">Tanggal Revisi</td>
|
|
<td>Keterangan Revisi</td>
|
|
<td width="200px;">Disampaikan Oleh</td>
|
|
<td width="100px;">Status</td>
|
|
<td width="100px;">Tools</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody style="color:black;font-family:Inter">
|
|
<?php
|
|
$no=1;
|
|
$d=pg_query("SELECT tgl_revisi,ket,pemeriksa,status,id FROM vr_revisi WHERE vr_pelunasan_id=$vr_pelunasan_id ORDER BY id DESC");
|
|
while($r=pg_fetch_array($d)) {
|
|
?>
|
|
<tr>
|
|
<td width="40px;" align="center" class="kiri"><?php echo $no; ?></td>
|
|
<td width="80px;" align="center"><?php echo date('d-m-Y',strtotime($r['tgl_revisi']));?></td>
|
|
<td><?php echo $r['ket']; ?></td>
|
|
<td width="130px;" align="center"><?php echo $r['pemeriksa']; ?></td>
|
|
<td width="100px;" align="center"><?php echo $r['status']; ?></td>
|
|
<td width="50px;" class="kanan" align="center">
|
|
<button type="button" name="fix_revisi" style="height:22px;"class="btn btn-success btn-xs fix_revisi kpl" id="<?php echo $r['id'];?>" data-content="Fix" rel="popover" data-placement="top" data-trigger="hover"><i class="fa fa-check"></i></button>
|
|
<button type="button" name="batal_fix_revisi" style="height:22px;"class="btn btn-inverse btn-xs batal_fix_revisi kpl" id="<?php echo $r['id'];?>" data-content="Batal Fix" rel="popover" data-placement="top" data-trigger="hover"><i class="fa fa-remove"></i></button>
|
|
<button type="button" name="hapus_revisi" style="height:22px;"class="btn btn-danger btn-xs hapus_revisi kpl" id="<?php echo $r['id'];?>" data-content="Hapus" rel="popover" data-placement="top" data-trigger="hover"><i class="fa fa-remove"></i></button>
|
|
</td>
|
|
</tr>
|
|
<?php $no++;} ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
<script>
|
|
|
|
$("#tabel_data_revisi").on('click','.fix_revisi',function(){
|
|
var vr_revisi_id = $(this).attr('id');
|
|
var key='fix_revisi';
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "app/kendali/crud.php",
|
|
data: 'vr_revisi_id='+vr_revisi_id
|
|
+'&key='+key,
|
|
success: function(data){
|
|
alert('Data revisi tersimpan..');
|
|
var vr_pelunasan_id=$('#vr_pelunasan_tbrev').val();
|
|
$('#tabelrev').load('app/kendali/tabelrev.php',{vr_pelunasan_id:vr_pelunasan_id});
|
|
refresh_tb();
|
|
}
|
|
});
|
|
});
|
|
|
|
$("#tabel_data_revisi").on('click','.batal_fix_revisi',function(){
|
|
var vr_revisi_id = $(this).attr('id');
|
|
var key='batal_fix_revisi';
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "app/kendali/crud.php",
|
|
data: 'vr_revisi_id='+vr_revisi_id
|
|
+'&key='+key,
|
|
success: function(data){
|
|
alert('Data revisi tersimpan..');
|
|
var vr_pelunasan_id=$('#vr_pelunasan_tbrev').val();
|
|
$('#tabelrev').load('app/kendali/tabelrev.php',{vr_pelunasan_id:vr_pelunasan_id});
|
|
refresh_tb();
|
|
}
|
|
});
|
|
});
|
|
|
|
$("#tabel_data_revisi").on('click','.hapus_revisi',function(){
|
|
var x = confirm("Anda yakin ingin menghapus ?");
|
|
if (x) {
|
|
var key = "hapus_revisi";
|
|
var vr_revisi_id = $(this).attr('id');
|
|
var rowElement = $(this).parent().parent();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "app/kendali/crud.php",
|
|
data: 'vr_revisi_id='+vr_revisi_id
|
|
+'&key='+key,
|
|
success: function(data){
|
|
alert('Data revisi terhapus..');
|
|
var vr_pelunasan_id=$('#vr_pelunasan_tbrev').val();
|
|
$('#tabelrev').load('app/kendali/tabelrev.php',{vr_pelunasan_id:vr_pelunasan_id});
|
|
refresh_tb();
|
|
}
|
|
});
|
|
} else {}
|
|
});
|
|
|
|
var ket = $('#ket').val();
|
|
/*
|
|
if (ket=='setor_pptk') {
|
|
$('button[name="fix_revisi"]').hide();
|
|
$('button[name="batal_fix_revisi"]').hide();
|
|
$('button[name="hapus_revisi"]').hide();
|
|
} else {
|
|
$('button[name="fix_revisi"]').show();
|
|
$('button[name="batal_fix_revisi"]').show();
|
|
$('button[name="hapus_revisi"]').show();
|
|
}
|
|
*/
|
|
</script>
|