ok
Direktori : /proc/thread-self/root/home2/selectio/public_html/lilyexpresslive/software/admin/ |
Current File : //proc/thread-self/root/home2/selectio/public_html/lilyexpresslive/software/admin/delivery-0.php |
<?php require_once('header.php'); $old_date = date('Y-m-d', strtotime("-30 days")); /*Change the date for past days selection*/ $today=date('Y-m-d'); ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){ $('#status').on('change',function(){ var status= $('#status').val(); if(status=='Delivered'){ $("#delivered").show(); $("#undelivered").hide(); } else if(status=='Undelivery'){ $("#delivered").hide(); $("#undelivered").show(); } else { $("#delivered").hide(); $("#undelivered").hide(); } }); }); </script> <script type="text/javascript" language="javascript" > $(document).ready(function() { function getData(){ var from= $('#from').val(); var to= $('#to').val(); var role= $('#role').val(); var role_id= $('#role_id').val(); // alert(from); var dataTable = $('#employee-grid').DataTable( { "processing": true, "serverSide": true, "aaSorting":[[0,'desc']], "destroy":true, "ajax":{ url :"data-tables/delivery_dt.php", // json datasource data: {client_id:role_id,client_type:role,from:from,to:to}, type: "post", // method , by default get error: function(){ // error handling $(".employee-grid-error").html(""); $("#employee-grid").append('<tbody class="employee-grid-error"><tr><th colspan="3">No data found in the server</th></tr></tbody>'); $("#employee-grid_processing").css("display","none"); } } } ); } getData(); $('#get_report').on('click', function(){ var from_date= $('#from').val(); if(from_date){ getData(); } else { alert('Select a Date !!'); } } ); } ); </script> <script type="text/javascript"> $(document).ready(function(){ $('#select_all').on('click',function(){ if(this.checked){ $('.checkbox').each(function(){ this.checked = true; }); }else{ $('.checkbox').each(function(){ this.checked = false; }); } }); $('.checkbox').on('click',function(){ if($('.checkbox:checked').length == $('.checkbox').length){ $('#select_all').prop('checked',true); }else{ $('#select_all').prop('checked',false); } }); }); function updatestatusTo(){ var status=$('#status').val(); var r_name=$('#r_name').val(); var r_mobile=$('#r_mobile').val(); var r_relation=$('#r_relation').val(); var r_delivery_date=$('#r_delivery_date').val(); var reason=$('#reason').val(); var remark=$('#remark').val(); var destination= $('#destination').val(); var status_date= $('#status_date').val(); var checkValues = $('input[name=checkboxlist]:checked').map(function() { return $(this).val(); }).get(); if(checkValues!=""){ $.ajax({ url: 'delivery_status_update.php', type: 'post', data: {pickup_id:checkValues,status:status,r_name:r_name,r_mobile:r_mobile,r_relation:r_relation,r_delivery_date:r_delivery_date,reason:reason,remark:remark,destination:destination,status_date:status_date}, dataType: 'json', success: function(response) { //alert(response); if(response==1) { alert('Status Updated SuccessFully !!'); location.reload(); } else{ alert('Failed To Assign !!'); location.reload(); } } }); } else{ alert('No Value Selected'); } } </script> <section class="content-header"> <!--<div class="content-header-left"> <h1>View Pickup Entry</h1> </div>--> <div class="row"> <!--<form action="" method="POST">--> <div class="col-md-12"> <div class='col-md-3'> <a href="delivery_bulk_upload.php" class="btn btn-primary btn-sm">Bulk Upload</a> </div> <div class='col-md-3'> <label for="from">From:</label> <input type="date" id="from" value="<?php echo $old_date ?>" name="from"> </div> <div class='col-md-3'> <label for="to">To:</label> <input type="date" id="to" value="<?php echo $today ?>" name="to"> </div> <div class='col-md-3'> <button id="get_report" name="date_select" type="submit" class="btn btn-md btn-info">Submit</button> </div> <input type="hidden" id="fromm" name="fromm"> <input type="hidden" id="too" name="too"> <input type="hidden" id="role" name="role" value="<?php echo $clientType; ?>"> <input type="hidden" id="role_id" name="role_id" value="<?php echo $clientId; ?>"> </div> <!--</form>--> <!--Bulk Upload Code End--> </section> <section class="content"> <div class="row"> <div class="col-md-12"> <div > <div class="box-body table-responsive"> <table id="employee-grid" class="table table-bordered table-striped"> <thead> <tr> <th width="30">SL</th> <th><i class="fa fa-check"></i><input type="checkbox" id="select_all" /></th> <th>AWB Number</th> <th>Ref Number</th> <th>Material</th> <th>Company Name</th> <th>Address</th> <th>Mobile Number</th> <th>Status</th> <th>Payment Mode</th> <th>Customer Name</th> </tr> </thead> </table> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="col-md-8"> <div class="form-group"> <label for="" class="col-sm-6 control-label text-right">Select Status <span>*</span></label> <div class="col-sm-6"> <select name="status" class="form-control" id='status'> <option value="In Transit">In Transit</option> <option value="Received at destination">Received at Destination</option> <option value="Out for delivery">Out for delivery</option> <option value="Delivered">Delivered</option> <option value="Undelivery">Undelivery</option> </select> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="" class="col-sm-6 control-label text-right">Status Update Date <span>*</span></label> <div class="col-sm-6"> <input type="date" autocomplete="off" class="form-control" name="status_date" value="<?php echo date("Y-m-d") ?>" id="status_date" required> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="" class="col-sm-6 control-label text-right">Status Update Location <span>*</span></label> <div class="col-sm-6"> <input type="text" class="form-control" name="destinaton" id="destination" value="Bangalore"> </div> </div> </div> <div id='delivered' style="display:none;padding-top: 4%;" > <div class="col-md-6"> <div class="form-group"> <label for="" class="col-sm-6 control-label text-right">Receiver Name <span>*</span></label> <div class="col-sm-6"> <input type="text" autocomplete="off" class="form-control" name="r_name" id="r_name" value=""> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="" class="col-sm-6 control-label text-right">Receiver Mobile <span>*</span></label> <div class="col-sm-6"> <input type="text" autocomplete="off" class="form-control" name="r_mobile" id="r_mobile" value=""> </div> </div> </div> <div style="padding-top: 4%;"> <div class="col-md-6"> <div class="form-group"> <label for="" class="col-sm-6 control-label text-right">Relation <span>*</span></label> <div class="col-sm-6"> <input type="text" autocomplete="off" class="form-control" name="r_relation" id="r_relation" value=""> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="" class="col-sm-6 control-label text-right">Delivery Date <span>*</span></label> <div class="col-sm-6"> <input type="date" autocomplete="off" class="form-control" name="r_delivery_date" id="r_delivery_date" value=""> </div> </div> </div> </div> </div> <div id='undelivered' style="display:none;padding-top: 4%;"> <div class="col-md-6"> <div class="form-group"> <label for="" class="col-sm-6 control-label text-right">Reason <span>*</span></label> <div class="col-sm-6"> <input type="text" autocomplete="off" class="form-control" name="reason" id="reason" value=""> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="" class="col-sm-6 control-label text-right">Remark <span>*</span></label> <div class="col-sm-6"> <input type="text" autocomplete="off" class="form-control" name="remark" id="remark" value=""> </div> </div> </div> </div> <div class="col-md-4"> <center><button class="btn btn-primary btn-sm" onclick="updatestatusTo();">Update Status</button></center> </div> <br> <br> <br> <br> <br> <br> <br> </div> </div> </section> <div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">Delete Confirmation</h4> </div> <div class="modal-body"> <p>Are you sure want to delete this item?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <a class="btn btn-danger btn-ok">Delete</a> </div> </div> </div> </div> <?php require_once('footer.php'); ?>