160 lines
4.8 KiB
PHP
160 lines
4.8 KiB
PHP
|
|
<!-- Main Content Container for side bar and body-->
|
|
<div class="main-container ace-save-state" id="main-container">
|
|
<script type="text/javascript">
|
|
try{ace.settings.loadState('main-container')}catch(e){}
|
|
</script>
|
|
|
|
|
|
<!--breadcrumb-->
|
|
|
|
<!-- End of breadcrumb -->
|
|
|
|
|
|
<div>
|
|
|
|
<form name="f1" method="post" action="sickness.php" id="flex_form_history">
|
|
<div id="flex1" style="width: 100%"></div>
|
|
<input type="hidden" name="flex_sickness_id" id="flex_sickness_id" /> <input
|
|
type="hidden" name="hidden_flexi_id" id="hidden_flexi_id" value="" />
|
|
</form>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
<!-- /.page-content -->
|
|
<!-- /.main-content -->
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
var hiddenid="";
|
|
$(function () {
|
|
hiddenid=$('#emp_id').val();
|
|
$("#hidden_flexi_id").val(hiddenid);
|
|
$("#emp_id_history").val(hiddenid);
|
|
var w=screen.width*.90;
|
|
var h=screen.height*.45;
|
|
//document.getElementById('emp_id_history').value = var hiddenid;
|
|
//document.getElementById("emp_id_history").value = hiddenid;
|
|
$("#flex1").flexigrid({
|
|
url: 'history_sickness_script.php?hiddenid='+hiddenid+'',
|
|
dataType: 'json',
|
|
colModel: [
|
|
{display: 'Sr', name: 'count', width: w*.02, sortable: false, align: 'left'},
|
|
{display: 'Appointment Date ', name: 'sickness_date', width: w*.1, sortable: true, align: 'left'},
|
|
{display: 'Ticket No', name: 'ticket_no', width: w*.1, sortable: true, align: 'left'},
|
|
{display: 'Treatment S.Date ', name: 'from_date', width: w*.08, sortable: true, align: 'left'},
|
|
{display: 'Treatment E.Date ', name: 'to_date', width: w*.08, sortable: true, align: 'left'},
|
|
{display: 'Absence S.Date', name: 'date_absent', width: w*.08, sortable: true, align: 'left'},
|
|
{display: 'Return Date', name: 'date_return', width: w*.08, sortable: true, align: 'left'},
|
|
{display: 'Agency', name: 'agency', width: w*.1, sortable: true, align: 'left'},
|
|
{display: 'Ailment', name: 'sickness_name', width: w*.15, sortable: true, align: 'left'},
|
|
{display: 'Fitness Status', name: 'fitness_status', width: w*.1, sortable: true, align: 'left'},
|
|
{display: '', name: '', width: w*.05, sortable: false, align: 'left'},
|
|
|
|
],
|
|
buttons: [
|
|
|
|
|
|
{name: 'PDF', bclass: 'print', onpress : pdf},
|
|
{separator: true},
|
|
{name: 'Excel', bclass: 'print_excel', onpress : excel},
|
|
{separator: true}
|
|
],
|
|
searchitems: [
|
|
|
|
{display: 'Ailment', name: 'sickness_name', isdefault: true},
|
|
],
|
|
sortname: "sickness_date",
|
|
sortorder: "desc",
|
|
usepager: true, //pagination
|
|
|
|
useRp: true,
|
|
rp: 50, //records per page
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
|
resizable: true,
|
|
//width: w,
|
|
height: h,
|
|
singleSelect: true
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
function pdf(){
|
|
var hiddenid=$('#emp_id').val();
|
|
window.open('pdf_history_sickness.php?hiddenid='+hiddenid+'');
|
|
}
|
|
function excel(){
|
|
var hiddenid=$('#emp_id').val();
|
|
window.location = 'excel_history_sickness.php?hiddenid='+hiddenid+'';
|
|
}
|
|
|
|
function save_history(){
|
|
|
|
$.ajax({
|
|
url : 'save_history_sickness.php',
|
|
type : "POST",
|
|
data : $("#history_form").serialize(),
|
|
dataType:'json',
|
|
success : function(data) {
|
|
if(data!='' && data!=null){
|
|
BootstrapDialog.alert('History Sickness Updated Successfully.');
|
|
$("#flex1").flexReload();
|
|
}else{
|
|
var history_record= $("#history_record").text();
|
|
|
|
$('#history_record').text(parseInt(history_record)+1);
|
|
|
|
BootstrapDialog.alert('History Sickness Saved Successfully.');
|
|
$("#flex1").flexReload();
|
|
|
|
}
|
|
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Saving History');
|
|
|
|
}
|
|
});
|
|
|
|
$('.close').click();
|
|
}
|
|
|
|
|
|
var history_id = "";
|
|
|
|
function open_fitness(sicknessId) {
|
|
document.forms['flex_form_history'].action="fitness.php";
|
|
$("#flex_form_history").method="post";
|
|
$("#flex_sickness_id").val(sicknessId);
|
|
$("#flex_form_history").submit();
|
|
}
|
|
|
|
function open_sickness(sicknessId) {
|
|
document.forms['flex_form_history'].action="sickness.php";
|
|
$("#flex_form_history").method="post";
|
|
$("#flex_sickness_id").val(sicknessId);
|
|
$("#flex_form_history").submit();
|
|
}
|
|
function myDateFormater(myDate){
|
|
var d=new Date(myDate);
|
|
var m=d.getMonth()+1;
|
|
var y=d.getFullYear();
|
|
var date=d.getDate();
|
|
// alert(date+"/"+m+"/"+y);
|
|
return date+"/"+m+"/"+y;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//$("#emp_id_history").val(hiddenid);</script>
|
|
<?php include('techsyn_footer.php'); ?>
|
|
<?php include('form/add_history_sickness.php');?>
|