<div class="panel panel-default">
  <!--标题-->
  <div class="panel-title">
    <nav aria-label="breadcrumb">
      <ol class="breadcrumb">
        <!-- TODO 
        <li class="breadcrumb-item">考务管理</li>-->
        <li class="breadcrumb-item active" aria-current="page">准考证管理</li>
      </ol>
    </nav>
  </div>
  <div class="panel-body ml-sm" [hidden]="this.editShowType=='only'" >
    <div class="card card-default">
      <div class="card-body">
        <!--查询条件-->
        <div class="row mb-3 ml-1" [hidden]="this.editShowType=='only'" >
          <div class="col-lg-12" style="width:100%;">
            <form (ngSubmit)="framePager.goSearch()" class="form-inline" >
              <table  style="width:100%;">
              <!-- <div class="input-group mr-1 input-group-sm">
                <label>年度码：</label>
                <input name="keyword" [(ngModel)]="query.year_code" class="input-sm form-control" type="text" value="" maxlength="6" style="width:70px">

              </div> -->
              <tr>
               <td align="right" style="width:10%">考试批次:</td>
                <td align="left" style="width:10%">
                  <flex-select [allowClear]="true"
                      [url]= "'pl/plExamTime/list.htm'"
                      respDataPath= "array"
                      optionValueField="id"
                      optionTextField="examyearmonth"
                      [(ngModel)]="query.exam_time_id"
                      placeholder="请选择"
                      width = "60"
                      noResultsFound = "无数据"
                      [ngModelOptions]="{standalone: true}"
                      >
                  </flex-select>
            </td>

            <td align="right" style="width:10%"> 关键字:</td>
            <td align="left" style="width:20%">
                <input name="keyword" [(ngModel)]="query.query" class="input-sm form-control" type="text" value="" maxlength="64" style="width:180px">

            </td>

            
            
            <td>
              <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" >
                <i class="fa fa-search"></i> 查询</button>
              <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="reset()">
                <i class="fa fa-undo"></i> 重置</button>
              <!-- <button type="submit">提交</button> -->
            </td>
            
            </tr>
            </table>
            </form>
          </div>
        </div>

        <!-- 工具栏 -->
        <div class="row mb-2" [hidden]="this.editShowType=='only'">
          <div class="col-lg-12">
            <div class="pull-left" style="text-align: right;">
              <!-- <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" (click)="this.goEdit(editTemplateModal,'modal','modal-lg',null)" title="添加">
                <i class="fa fa-plus"></i> 添加</button>
            
              <button class="btn btn-primary mr-1 btn-sm" (click)="this.delete()" data-toggle="tooltip" data-placement="left" title="删除">
                <i class="fa fa-trash"> 删除</i>
              </button>-->
             
                  <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" title="准考证批量生成" (click)="buildTicket()">
                  <i class="fa icon-cloud-download"></i>  批量生成准考证</button>
                  <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" title="重新批量生成准考证（已生成的准考证不再重新生成）" (click)="buildTicketAgain()">
                    <i class="fa icon-cloud-download"></i>  重新批量生成准考证</button>
                  
                    <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" title="机考准考证批量生成" (click)="buildTicketForComputerTest()">
                      <i class="fa icon-cloud-download"></i>  批量生成机考准考证</button>
                      <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" title="重新批量生成机考准考证（已生成的准考证不再重新生成）" (click)="buildTicketForComputerTestAgain()">
                        <i class="fa icon-cloud-download"></i>  重新批量生成机考准考证</button>
            </div>
          </div>
        </div>

        <!--表格-->
        <div class="row">
          <div class="col-lg-12 ml-0" [hidden]="this.editShowType=='only'">
            <table class="table table-sm table-striped table-hover table-bordered bg-white">
              <thead>
                <tr>
                  
                  <th align="center">考试批次</th>
                  <th align="center">准考证号</th>
                  <th>姓名</th>
                  <th>证件号码</th>
                  <th align="center">性别</th>
                  <th>专业名称</th>
                  <th align="center">准考证文件大小（单位:B）</th>
                  <th align="center">操作</th>
                </tr>
              </thead>
              <tbody>
                <tr *ngFor="let item of framePager.getRecords(); let i = index">

                  <td align="center">{{item.exam_year_month}}</td>
                  <td align="center">{{item.ticket_no}}</td>
                  <td>{{item.std_name}}</td>
                  <td>{{item.cert_no}}</td>
                  <td align="center">{{item.std_sex}}</td>
                  <td>{{item.major_name}}</td>
                  <td align="right">{{item.ticket_file_size}}</td>
                  <td align="center">
                      <a href="#" (click)="delete(item)" title="删除"><em class="fa-lg fas fa-trash mr-1"
                        style="color:#F56D6D"></em></a>  
                        &nbsp;&nbsp;
                    <a href="#" *ngIf="item.ticket_file" (click)="downTicket(item)" title="下载准考证">
                      <i class="fa fa-download"></i>
                  </a>  
                   
                  </td>
                </tr>
              </tbody>
            </table>
            <!-- TODO -->
            <frame-pager [url]="QUERY_URL" [autoLoad]="false" hideSearch="true" hasCheck="true" #framePager (preReqEvent)="this.search($event)"></frame-pager>
          </div>

        </div>
      </div>
    </div>
  </div>
  <!-- only编辑页面 -->
</div>