Files
simrs-jatim/keuangan/form_orderbatalalokasi.php
2024-04-19 14:04:41 +07:00

150 lines
4.7 KiB
PHP

<?php
array_push($form_plugin['ui_plugins_js'],$floatthead_js);
array_push($form_plugin['ui_plugins_js'],$sweetalert_js);
$title = 'ALOKASI IURBEA';
?>
<style type="text/css">
.btn-notifikasi {
-webkit-animation: glowing 1500ms infinite;
-moz-animation: glowing 1500ms infinite;
-o-animation: glowing 1500ms infinite;
animation: glowing 1500ms infinite;
}
@-webkit-keyframes glowing {
0% { background-color: #f39c12; -webkit-box-shadow: 0 0 3px #f39c12; }
50% { background-color: #ffc107; -webkit-box-shadow: 0 0 40px #ffc107; }
100% { background-color: #f39c12; -webkit-box-shadow: 0 0 3px #f39c12; }
}
@-moz-keyframes glowing {
0% { background-color: #f39c12; -moz-box-shadow: 0 0 3px #f39c12; }
50% { background-color: #ffc107; -moz-box-shadow: 0 0 40px #ffc107; }
100% { background-color: #f39c12; -moz-box-shadow: 0 0 3px #f39c12; }
}
@-o-keyframes glowing {
0% { background-color: #f39c12; box-shadow: 0 0 3px #f39c12; }
50% { background-color: #ffc107; box-shadow: 0 0 40px #ffc107; }
100% { background-color: #f39c12; box-shadow: 0 0 3px #f39c12; }
}
@keyframes glowing {
0% { background-color: #f39c12; box-shadow: 0 0 3px #f39c12; }
50% { background-color: #ffc107; box-shadow: 0 0 40px #ffc107; }
100% { background-color: #f39c12; box-shadow: 0 0 3px #f39c12; }
}
</style>
<div class="container-fluid">
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-header">Order Pembatalan <?php echo $title; ?></div>
<div class="card-body">
<form id="frm_report">
<?php echo $hidden_form; ?>
<input type="hidden" name="by" id="by" value="alokasi">
<input type="hidden" name="idxdaftar" id="idxdaftar" value="">
<input type="hidden" name="shift" value="<?php echo $_SESSION['SHIFT']; ?>">
<div class="form-group row" id="isiNobill">
<label class="col-sm-2">No Billing</label>
<div class="col-sm-6">
<input type="text" name="nobill" value="" class="mask-money form-control form-control-sm" id="nobill">
</div>
</div>
</form>
</div>
<div class="card-footer">
<button class="btn btn-primary" type="button" onclick="cari()"><i class="fa fa-search"></i> Cari</button>
</div>
</div>
</div>
</div>
<hr>
<div class="row"><div class="col-sm-12">
<form id="form_deposit">
<div class="wrapper" style="overflow:auto;height:360px">
<table class="table table-bordered table-striped table-sm" id="alokasi">
<thead>
<tr class="bg-success text-white">
<th style="width:5%">No</th>
<th style="width:10%">Tanggal</th>
<th style="width:10%">Nomr</th>
<th style="width:15%">Nama Pasien</th>
<th style="width:10%">Kode Tarif</th>
<th style="width:10%">Uraian Tarif</th>
<th style="width:10%">Jumlah</th>
<th style="width:5%">Aksi</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</form>
</div></div>
</div>
</div>
</div>
<?php
$js_init .= '
const Toast = Swal.mixin({
toast: true,
position: "top-end",
showConfirmButton: false,
timer: 3000
});
$("#nobill,#nobukti").on("keypress",function(e){
if(e.which == 13 || e.keyCode == 13)
{
e.preventDefault();
cari();
}
})
var $table = $("#alokasi");
function cari() {
$.post("'._BASE_.'jaspel/pembatalan_iurbea.php?page=cari_orderbatalalokasi",$("#frm_report").serialize(),function(data)
{
$("#alokasi tbody").html(data.data);
$table.floatThead({
position: "absolute",
scrollContainer: true
});
$("#idxdaftar").val(data.idxdaftar);
$("#simpanOrderBatal").prop("disabled",false);
},"json");
}
function reset() {
$("#frm_report").trigger("reset");
$("#alokasi tbody").html("");
$("#simpanOrderBatal").prop("disabled",true);
}
function orderbatal_alokasi(nobill,iurbea_id) {
form_data = $("#frm_report").serialize();
Swal.fire({
title: "Anda yakin?",
html: "Anda ingin mengorder batal '.$title.' tersebut",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Ya, Batalkan!"
}).then((result) => {
if (result.value) {
$.post("'._BASE_.'jaspel/pembatalan_iurbea.php",form_data+"&page=orderbatal_alokasi&nobill="+nobill+"&iurbea_id="+iurbea_id,function(data){
Toast.fire({title:data.message,type:data.type,onClose : function() {
if(data.type == "success") {
cari();
}
}});
},"json");
}
});
}
';
?>