Export excel in Survey Report

This commit is contained in:
San Wai Lwin
2018-05-22 11:37:08 +06:30
parent cfc672dc31
commit 574f320dfd
4 changed files with 141 additions and 21 deletions

View File

@@ -10,29 +10,15 @@
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="main-box-body clearfix p-l-15 p-r-15">
<%= form_tag transactions_surveys_path, :method => :get do %>
<div class="row clearfix">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<label class="form-control-label"><%= t("views.right_panel.button.search_keyboard") %></label>
<input type="text" id="dining_name" name="filter" placeholder="Dining Name" class="form-control input-md" >
</div>
<%= render :partial=>'survey_report_filter',
:locals=>{ :period_type => true, :shift_name => true, :report_path =>transactions_surveys_path} %>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
<label class="form-control-label"><%= t("views.right_panel.detail.from") %></label>
<input class="form-control datepicker" name="from" id="from" type="text" placeholder="From date">
</div>
<hr/>
<div class="text-right">
<a href="javascript:export_to('<%=transactions_surveys_path%>.xls')" class = "btn btn-info wave-effects "><%= t("views.btn.exp_to_excel") %></a>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
<label class="form-control-label"><%= t("views.right_panel.detail.to") %></label>
<input class="form-control datepicker" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="form-group col-lg-1 col-md-1 col-sm-1 col-xs-1">
<label > &nbsp;</label>
<br> <input type="submit" value="Search" class='btn btn-primary btn-md'>
</div>
</div>
<% end %>
<div class="card">
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover">
@@ -116,3 +102,9 @@
</div>
</div>
<script type="text/javascript">
$(function(){
$("#from").val("<%=params[:from] rescue '-'%>");
$("#to").val("<%=params[:to] rescue '-'%>");
});
</script>