<div class="panel panel-default">
  <!--标题-->
  <div class="panel-title">
    <nav aria-label="breadcrumb">
      <ol class="breadcrumb">
        <!-- TODO -->
        <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 class="form-inline">
              <table>
              <!-- <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>
                  <div class="input-group mr-1 input-group-sm">
                      <label>考期:</label>
                          <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}"
                          (ngModelChange) ="freshExamUit()"
                          >
                      </flex-select>
                    </div>
               </td>
                

            <td>
                <div class="input-group mr-1 input-group-sm">
                    <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;准考证:</label>
                    <input name="keyword" [(ngModel)]="query.ticket_no" class="input-sm form-control" type="text" value="" maxlength="64" style="width:150px">

                  </div>
            </td>

          
           
            <td>
                <div class="input-group mr-1 input-group-sm">
                    <label>考区:</label>
                        <flex-select 
                        [allowClear]="true"
                        [(items)] = "examAgentArray"
                        optionValueField="id"
                        optionTextField="org_name"
                        [(ngModel)]="query.enrol_agent_id"
                        placeholder="请选择"
                        [ngModelOptions]="{standalone: true}"
                        (ngModelChange) ="freshExamUit()"
                        width = "160"
                        noResultsFound = "无数据"
                        >
                  </flex-select>
                  </div>
            </td>
            
            <td>
              <div class="input-group mr-1 input-group-sm">
                  <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;考点:</label>
                            <flex-select [allowClear]="true"
                            [(items)]="examUnitList"
                            respDataPath= "array"
                            optionValueField="id"
                            optionTextField="full_name"
                            [(ngModel)]="query.exam_unit_id"
                            placeholder="请选择"
                            [ngModelOptions]="{standalone: true}"
                            width = "200"
                            noResultsFound = "无数据"
                            >
                </flex-select>
                     
                </div>
          </td>

            </tr>
            <tr>
                <td>
                    <div class="input-group mr-1 input-group-sm">
                        <label>场次:</label>
                        <select name="exam_batch" [(ngModel)]="query.exam_batch" class="form-control" style="width: 60px;">
                            <option value="">请选择</option>
                            <option value="A">1</option>
                            <option value="B">2</option>
                            <option value="C">3</option>
                            <option value="D">4</option>
                            <option value="X">5</option>
                            <option value="Y">6</option>
                          </select>
                      </div>
                </td>

                
                <td>
                  <div class="input-group mr-1 input-group-sm">
                      <label>身份证号:</label>
                      <input name="keyword" [(ngModel)]="query.cert_no" class="input-sm form-control" type="text" value="" maxlength="64" style="width:150px">
    
                    </div>
              </td>

               
              
                <td>
                    <div class="input-group mr-1 input-group-sm">
                        <label>课程:</label>
                            <flex-select 
                            [allowClear]="true"
                            [(items)] = "courseList"
                            optionValueField="id"
                            optionTextField="code_course_name"
                            [(ngModel)]="query.course_id"
                            placeholder="请选择"
                            [ngModelOptions]="{standalone: true}"
                            width = "160"
                            noResultsFound = "无数据"
                            >
                      </flex-select>
                      </div>
                </td>

                <td>
                  <div class="input-group mr-1 input-group-sm">
                      <label>考场号:</label>
                      <input name="keyword" [(ngModel)]="query.room_code" class="input-sm form-control" type="text" value="" maxlength="64" style="width:150px">
    
                    </div>
              </td>
              
                <td  align="left">
                    <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="framePager.goSearch()">
                        <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 class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="export()">
                          <i class="fa icon-cloud-download"></i> 导出</button>

                   
            </td>
           
            
            </tr>
            </table>
           </form>
          </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>考点名称</th>
                  <th align="center">考场号</th>
                  <th align="center">座位号</th>
                  <th align="center">课程代码</th>
                  <th>课程名称</th>
                  <th align="center">准考证号</th>
                  <th>姓名</th>
                  <th>考场地址</th>
                  <th align="center" style="width:70px;">操作</th>
                </tr>
              </thead>
              <tbody>
                <tr *ngFor="let item of framePager.getRecords(); let i = index">
                  

                  <td align="center">{{item.exam_times}}</td>
                  <td align="center">{{item.org_code}}</td>
                  
                  <td>{{item.org_name}}</td>
                  
                  <td>{{item.unit_code_bz}}</td>
                  <td>{{item.unit_name_bz}}</td>
                  
                  <td align="right">{{item.room_code}}</td>
                  <td align="right">{{item.seat_no}}</td>
                  <td align="center">{{item.course_code}}</td>
                  <td>{{item.course_name}}</td>
                  <td align="center">{{item.ticket_no}}</td>
                  <td>{{item.std_name}}</td>
                  <td>{{item.adress}}</td>
                  <td align="center">
                      <a href="#" (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>