<div class="content-heading  justify-content-between">
  <div>考点管理</div>
  <div class="float-right">
    <div class="btn-group mb-1 mr-1" dropdown>
      <button class="btn dropdown-toggle btn-secondary btn-lg" type="button" dropdownToggle>考点管理
        <span class="caret"></span>
      </button>
      <div *dropdownMenu class="dropdown-menu modal-lg" role="menu">
        <a class="dropdown-item" href="#" (click)="showModal({'arrayUrl':'frame/region/province/list.htm'})">新增考点</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#" (click)="FuncService.ajaxDownload('conf/export.htm')">导出配置</a>


      </div>
    </div>
  </div>
</div>
<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('agent_code')">代码</span></th>
      <th><span class="table-sort" (click)="pager.sort('agent_name')">考点名称</span></th>
      <th><span class="table-sort" (click)="pager.sort('agent_province')">所在省份</span></th>
      <th><span class="table-sort" (click)="pager.sort('enrol_scope')">报考范围</span></th>
      <th>大类</th>
      <th>专业</th>
      <th><span class="table-sort" (click)="pager.sort('enrol_start_time')">报名起止时间</span></th>
      <th><span class="table-sort" (click)="pager.sort('pay_start_time')">缴费起止时间</span></th>
      <th><span class="table-sort" (click)="pager.sort('subscribe_status')">考试预约</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.agent_code}}</td>
      <td>{{v.agent_name}}</td>
      <td>{{v.province_name}}</td>
      <td><span *ngIf="v.enrol_scope !== 'Area'">{{v.enrol_scope | frameDict : 'AgentEnrolScope'}}</span>
        <span *ngIf="v.enrol_scope === 'Area'" class="text-warning table-button"
              (click)="showProvince(v)">{{v.enrol_scope | frameDict : 'AgentEnrolScope'}}</span>
      </td>
      <td><span *ngIf="v.category_total !== undefined" class="text-info table-button"
                (click)="showCategory(v)">{{v.category_total}}</span>
        <span *ngIf="v.category_total === undefined" class="text-muted table-button" (click)="showCategory(v)">配置</span>
      </td>
      <td><span *ngIf="v.aspect_total !== undefined" class="text-info table-button"
                (click)="showAspect(v)">{{v.aspect_total}}</span>
        <span *ngIf="v.aspect_total === undefined" class="text-muted table-button" (click)="showAspect(v)">配置</span>
      </td>
      <td [innerHTML]="getEnrolTime(v)"></td>
      <td [innerHTML]="getPayTime(v)"></td>
      <td [innerHTML]="v.subscribe_status | frameStatusCustom: ['开启预约','不能预约']"></td>

      <td><span *ngIf="v.agent_enrol_explain" class="text-success" [tooltip]="v.agent_enrol_explain">有报考说明</span>

      <td><span class="table-button" (click)="showModal({ResponseEntity:v, 'arrayUrl':'frame/region/province/list.htm'})"><em
        class="fa-lg fas fa-edit"></em></span>
        <span class="table-button ml-3 text-danger"
              (click)="pager.optrRecord('conf/agent/delete.htm', v, {successMsg:'考点已删除！', confirmMsg: '确定要删除该考点吗？', successMsgType:'Swal'})"><em
          class="fa-lg fas fa-trash-alt "></em></span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./conf/agent/page.htm'" #pager></frame-pager>
</div>

