<div class="modal-header">
  <h4 class="modal-title pull-left">考生预约统计 - {{ResponseEntity.group_name}}</h4>
</div>
<div class="modal-body mb-1" *ngIf="ResponseMap">
  <tabset class="bg-white p-0" justified="true">
    <tab *ngFor="let date of ResponseMap['DateArray']">
      <ng-template tabHeading>
        <em class="far fa-clock fa-fw"></em> {{date.ly_exam_date}}
      </ng-template>
      <div>
        <div class="card card-default">
          <div class="card-body">
            <table class="table table-striped table-hover table-bordered">
              <thead>
              <tr>
                <th class="th-index"></th>
                <th>考试时间</th>
                <th>时长(分钟)</th>
                <th *ngIf="ResponseEntity.province_flag === 'InActive'" class="wd-sm">时段容量</th>
                <th *ngIf="ResponseEntity.province_flag === 'InActive'" class="wd-sm">已预约量</th>
                <th *ngIf="ResponseEntity.province_flag === 'Active'" class="wd-sm">省内容量</th>
                <th *ngIf="ResponseEntity.province_flag === 'Active'" class="wd-sm">外省容量</th>
              </tr>
              </thead>
              <tbody>
              <tr *ngFor="let v of ResponseMap.TimeMap[date.ly_exam_date]; let i = index">
                <td>{{i+1}}</td>
                <td>{{date.ly_exam_date}} {{v.group_time.exam_start_time}} - {{v.group_time.exam_end_time}}</td>
                <td>{{v.group_time.exam_minutes}}</td>
                <td *ngIf="ResponseEntity.province_flag === 'InActive'">{{v.country_total}}</td>
                <td *ngIf="ResponseEntity.province_flag === 'InActive'" class="{{getColor(v.country_total,v.arrange_country_total)}}">{{v.arrange_country_total}}</td>
                <td *ngIf="ResponseEntity.province_flag === 'Active'"> <span *ngIf="v.province_total>0" class="{{getColor(v.province_total,v.arrange_province_total)}}">{{v.arrange_province_total}} / {{v.province_total}}</span></td>
                <td *ngIf="ResponseEntity.province_flag === 'Active'"><span *ngIf="v.outside_total>0"  class="{{getColor(v.outside_total,v.arrange_outside_total)}}"> {{v.arrange_outside_total}} / {{v.outside_total}}</span></td>
              </tbody>
            </table>
          </div>
        </div>

      </div>
    </tab>
  </tabset>
</div>

<div class="modal-footer">
  <div>
    <button class="btn btn-primary" type="button" (click)="FuncService.ajaxDownload('rpt/layout/interview/arrange/group.htm', {ly_group_id:  ResponseEntity.ly_group_id})">
      下载各时段汇总
    </button>
    <button class="btn btn-primary ml-5" type="button" (click)="FuncService.ajaxDownload('frame/report/download.htm', {report_name:'LayoutGroupArrangeStd', report_title :'预约考生明细-' + ResponseEntity.group_name, ly_group_id:  ResponseEntity.ly_group_id})">
      下载考生明细
    </button>
    <button class="btn btn-secondary ml-5" type="button" (click)="closeWindow()">关闭窗口</button>
  </div>
</div>
