<div class="box search-form-container glcc_pr_check-list-form">
  <%= form_tag(admins_glcc_pr_check_index_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
    <div class="form-group mr-2">
      <label for="status">考核选项：</label>
      <% status_options = [['全部',''],['中期考核',1], ['结项考核', 2]] %>
      <%= select_tag(:term, options_for_select(status_options), class: 'form-control') %>
    </div>
    
    <div class="form-group mr-2">
      <label for="status">第　</label>
      <%= select_year(Date.today, {field_name:"year"}, {class:"form-control"})%>
      <label for="status">　期</label>
    </div>
    <%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
  <% end %>
  <button onclick="$('.send-email-list-form').show();$('.glcc_pr_check-list-form').hide();$('.glcc-examine-list-container').hide()" > 前去发送邮件</button>    
</div>

<div class="box search-form-container send-email-list-form" style ="display:none">
  <h5> 请重新选择参数,谨慎操作</h5>
  
  <%= form_tag(send_mail_admins_glcc_pr_check_index_path, method: :post, class: 'form-inline search-form flex-1', remote: true) do %>
    <div class="form-group mr-2">
      <label for="status">　　请选择考核选项：</label>
      <% status_options = [['全部',''],['中期考核',1], ['结项考核', 2]] %>
      <%= select_tag(:term, options_for_select(status_options), class: 'form-control') %>
    </div>
    
    <div class="form-group mr-2">
      <label for="status">第　</label>
      <%= select_year((Date.today + 1.years), {field_name:"year"}, {class:"form-control"})%>
      <label for="status">　期（注:此处为一年中的数据）</label>
    </div>

    <%= submit_tag('发送邮件', class: 'btn btn-primary ml-3',data: { confirm: '您是否真的需要进行邮件发送操作？请确认 考核选项 和 期数' }) %>
  <% end %>    
  <button onclick="$('.glcc_pr_check-list-form').show();$('.send-email-list-form').hide();$('.glcc-examine-list-container').show()" > 取消发送邮件</button>    
</div>

<div class="box admin-list-container glcc-examine-list-container">
  <%= render partial: 'examine_material', locals: { examine_materials: @examine_materials } %>
</div>


