<div class="modal-header">
  <h4 class="modal-title pull-left">【{{currentEntity.pn_name}}】【{{currentEntity.province_name}}
    】【{{FrameService.getFrameDictText('ExamBatchName', '' + currentEntity.cur_batch)}}】</h4>

  <div class="float-right text-1-2" *ngIf="aspectTotal">
    <span>有效考生：{{aspectTotal.i01}}</span>
    <ng-container *ngIf="aspectTotal.i05 === undefined || aspectTotal.i05 == 0 ">
      <span class="text-danger ml-5">无合格考生</span>
    </ng-container>
    <ng-container *ngIf="aspectTotal.i05 !== undefined && aspectTotal.i05 >0 ">
      <span class="ml-2">合格线：{{aspectTotal.s01}}</span>
      <span class="ml-2">合格比率：{{aspectTotal.s02}}</span>
      <span class="ml-2">合格考生：{{aspectTotal.i05}}</span>
    </ng-container>
  </div>
</div>
<div class="modal-body mb-1">
  <tabset class="bg-white p-0" justified="true">
    <tab>
      <ng-template tabHeading>
        <span class="table-sort"><em
          class="far fa-address-card fa-fw"></em> {{FrameService.getFrameDictText('ExamBatchName', '1')}}</span>
      </ng-template>
      <div class="table-responsive bg-white table-full">
        <table class="table table-striped table-hover table-bordered">
          <thead>
          <tr>
            <th><span class="table-sort" (click)="pager.sort('std_province')">生源地</span></th>
            <th><span class="table-sort" (click)="pager.sort('std_name')">考生姓名</span></th>
            <th><span class="table-sort" (click)="pager.sort('std_sex')">性别</span></th>
            <th><span class="table-sort" (click)="pager.sort('ticket_no')">准考证号</span></th>
            <th><span class="table-sort" (click)="pager.sort('aspect_ticket_num')">专业考号</span></th>
            <th><span class="table-sort" (click)="pager.sort('score_1')">专业成绩</span></th>
            <th><span class="table-sort" (click)="pager.sort('score_1_qualified')">合格</span></th>
            <th>是否缴费</th>
            <th class="th-b-2"></th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let v of pager.getRecords(); let i = index">
            <td>{{v.province_name}}</td>
            <td>{{v.std_name}}</td>
            <td>{{v.std_sex}}</td>
            <td>{{v.ticket_no}}</td>
            <td>{{v.aspect_ticket_num}}</td>
            <td>{{v.score_1_value}}</td>
            <td><span class="text-success" *ngIf="v.score_1_qualified=== 'Active'">合格</span>
              <span class="text-danger" *ngIf="v.score_1_qualified=== 'InActive'">不合格</span></td>
            <td class="text-center">
              <button class="btn btn-warning" type="button"
                      *ngIf="v.score_1_qualified !== 'Active'" (click)="stdQualified(v)">补合格
              </button>
              <span *ngIf="v.std_batch > 2 || (v.std_batch==2 && v.batch_pay_status==='Active')" class="text-success">已缴费/确认</span>
              <span
                *ngIf="v.aspect_batch === 2 && v.std_batch===2 && v.batch_pay_status=== undefined && v.score_1_qualified === 'Active'">
                  <button class="btn btn-danger" type="button" (click)="batchPay(v)">人工收费
                </button>
              </span>
            </td>
            <td>


            </td>
          </tr>
          </tbody>
        </table>
      </div>
      <frame-pager [url]="'./plan/group/province/std/page.htm'" [pagerLimit]="10" [autoRequest]='false'
                   [pagerParams]="{pn_province_id:currentEntity.pn_province_id,batch_id:1}"
                   #pager></frame-pager>
    </tab>
  </tabset>
</div>

<div class="modal-footer justify-content-between">
  <div>
    <div class="form-inline ">
      <!--
      <label class="text-lg-right">合格分</label>
      -->
      <div class="ml-2">
        <input class="form-control" style="width:100px;" type="number" [(ngModel)]="currentEntity.qualified_value"/>
      </div>
    </div>

  </div>
  <div>
    <div class="btn-group btn-primary" dropdown [dropup]="true"
         *ngIf="currentEntity.qualified_value && currentEntity.qualified_value>0">
      <button class="btn  dropdown-toggle btn-secondary" type="button" dropdownToggle>划线功能
        <span class="caret"></span>
      </button>
      <div *dropdownMenu class="dropdown-menu dropup" role="menu">
        <a class="dropdown-item" href="#" (click)="totalQualified('percent')">比率计算合格线</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#" (click)="totalQualified('score')">根据合格线统计</a>
      </div>
    </div>
    <button class="btn btn-success ml-3" type="button" (click)="saveQualified()" *ngIf="aspectTotal">保存并进行合格判断</button>
     <button class="btn btn-secondary ml-3" type="button" (click)="closeWindow()">关闭窗口</button>
  </div>
</div>
