227 lines
8.7 KiB
PHP
Executable File
227 lines
8.7 KiB
PHP
Executable File
|
|
|
|
<head>
|
|
<!-- <link rel="stylesheet" href=" https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"> -->
|
|
<link rel="stylesheet" href=" https://cdn.datatables.net/buttons/1.5.1/css/buttons.dataTables.min.css">
|
|
<style>
|
|
|
|
|
|
.dataTables_wrapper .dt-buttons {
|
|
float:none;
|
|
text-align:right;
|
|
}
|
|
.dataTables_filter {
|
|
text-align: right !important;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<div class="content-wrapper">
|
|
<section class="content" id="loadingcontent">
|
|
<div>
|
|
<CENTER><h3>Siddharth Industries -Maintenance/Breakdown Listing</h3></CENTER>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="box">
|
|
<div class="box-header">
|
|
<div class="row">
|
|
|
|
<div align="right" style="padding-right:10px">
|
|
<a class="btn btn-Primary" style="padding-right:10px" align="right" href="<?php echo base_url(); ?>batchcard/addMaint">Add New</a>
|
|
</div>
|
|
|
|
<!-- <form role="form" id="" action="<?php echo base_url()?>batchcard/daterange" method="post" enctype="multipart/form-data"> -->
|
|
|
|
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
|
<div class="row">
|
|
<div class="col-md-2">
|
|
<label for="from_date">
|
|
<?php echo 'From Date'; ?>
|
|
</label>
|
|
<div class="input-group">
|
|
<input name="from_date" id="max-date" class="form-control datepicker">
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-calendar fa-fw"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-2">
|
|
<label for="to_date">
|
|
<?php echo 'To Date'; ?>
|
|
</label>
|
|
<div class="input-group">
|
|
<input name="to_date" id="min-date" class="form-control datepicker">
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-calendar fa-fw"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
|
<select id="mySelect" name="mySelect" style="margin-top:27px">
|
|
<option value="">Select Option</option>
|
|
<option value="0">Maintenances</option>
|
|
<option value="1">Breakdown</option>
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2" style="margin-top:24px;">
|
|
<input type="submit" class="btn btn-success" name="btn_submit"
|
|
value="View Report">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<form role="form" id="" action="<?php echo base_url()?>" method="post" enctype="multipart/form-data">
|
|
|
|
|
|
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-12">
|
|
|
|
|
|
<table id="mnttable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
|
<thead style="background-color:#ddf">
|
|
<tr>
|
|
<th colspan="4"><center>Maintenance Details</center></th>
|
|
<th colspan="3"><center>Time Taken for Maintenance</center></th>
|
|
<th colspan="3"></th>
|
|
</tr>
|
|
<tr>
|
|
<th >Nature of maintenance</th>
|
|
<!-- <th >Date</th>
|
|
<th >Time</th> -->
|
|
<th > Location </th>
|
|
<th > Description </th><th> Reason </th>
|
|
<th >From</th>
|
|
<th >To</th>
|
|
<th >Total Hrs</th>
|
|
<th >Work Done By</th>
|
|
<th >Approved By</th>
|
|
<th >Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
if(!empty($MaintListing))
|
|
{
|
|
foreach($MaintListing as $ml)
|
|
{
|
|
//, Type, , , , , , ,
|
|
?>
|
|
|
|
<td><?php if($ml->Type == 0){ echo "MAINTENANCES"; }else{echo "BREAKDOWN";} ?></td>
|
|
<!-- <td><?php echo $ml->Maint_Date ?></td>
|
|
<td><?php echo $ml->Maint_Time ?></td> -->
|
|
<td><?php echo $ml->Maint_Location ?></td>
|
|
<td><?php echo $ml->Maint_Description ?></td>
|
|
<td><?php echo $ml->Maint_Reason ?></td>
|
|
<td><?php echo $ml->Maint_Time_from ?></td>
|
|
<td><?php echo $ml->Maint_Time_to ?></td>
|
|
<td><?php echo $ml->Maint_Total_hrs ?></td>
|
|
<td><?php echo $ml->Worker_Name ?></td>
|
|
<td><?php echo $ml->Approver_Name ?></td>
|
|
<td><u><a href="<?php echo base_url().'batchcard/editMaint/'.urlencode(base64_encode($ml->Maint_ID)) ?>" data-toggle="tooltip" title="Click here to Edit details"><i class="fa fa-edit" style="font-size:20px;"></i></a></u></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</form>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
|
|
$('#mnttable').DataTable({
|
|
dom: 'lBfrtip',
|
|
buttons: [
|
|
'pdf'
|
|
],
|
|
"paging": true,
|
|
"lengthChange": true,
|
|
"searching": true,
|
|
"ordering": true,
|
|
"info": true,
|
|
"autoWidth": true,
|
|
|
|
|
|
|
|
});
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
|
|
|
|
$( function() {
|
|
//var dateFormat = "mm/dd/yy",
|
|
from = $( "#min-date" )
|
|
.datepicker({
|
|
dateFormat: "dd-mm-yy",
|
|
defaultDate: "+0d",
|
|
changeMonth: true,
|
|
//numberOfMonths: 1
|
|
|
|
})
|
|
.on( "change", function() {
|
|
to.datepicker("option", "minDate", getDate( this ) );
|
|
}),
|
|
to = $( "#max-date" ).datepicker({
|
|
dateFormat: "dd-mm-yy",
|
|
defaultDate: "+0d",
|
|
changeMonth: true,
|
|
//numberOfMonths: 1
|
|
|
|
})
|
|
.on( "change", function() {
|
|
from.datepicker( "option", "maxDate", getDate( this ) );
|
|
});
|
|
|
|
function getDate( element ) {
|
|
var date;
|
|
|
|
try {
|
|
date = $.datepicker.parseDate( dateFormat, element.value );
|
|
|
|
} catch( error ) {
|
|
date = null;
|
|
}
|
|
|
|
return date;
|
|
}
|
|
} );
|
|
</script>
|
|
<!-- <!-- <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
|
<script src=" https://code.jquery.com/jquery-3.3.1.js"></script> -->
|
|
<!-- <script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script> -->
|
|
<script src="https://cdn.datatables.net/buttons/1.5.1/js/dataTables.buttons.min.js"></script>
|
|
<script src="https://cdn.datatables.net/buttons/1.5.1/js/buttons.flash.min.js"></script> -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
|
<script src="https://cdn.datatables.net/buttons/1.5.1/js/buttons.html5.min.js"></script>
|
|
<script src="https://cdn.datatables.net/buttons/1.5.1/js/buttons.print.min.js"></script>
|