<div class="content-heading  justify-content-between">
  <div>考生材料审核<span *ngIf="responseMap" class="ml-4 ">
    <span *ngIf="responseMap.PayTotal">缴费未待审核的共【{{responseMap.PayTotal}}】人</span><!--且重新上传共-->
    <!-- <span *ngIf="responseMap.NoVerifyTotal">缴费未审核的共【{{responseMap.NoVerifyTotal}}】人</span> -->
    <!-- <span *ngIf="responseMap.VerifyFailAndReupload">审核失败重新上传的共【{{responseMap.VerifyFailAndReupload}}】人</span> -->
    <span *ngIf="responseMap.NoVerify">未审核的共【{{responseMap.NoVerify}}】人</span>
    <span *ngIf="responseMap" class="ml-4 table-sort" (click)="modifyStd()">【{{responseMap.StdReg.std_name}}】</span>
    <span class="ml-2 table-sort" *ngIf="responseMap.StdReg.std_param5 == 'Active'">【<span class="text-success">合格</span>】</span>
    <span class="ml-2 table-sort" *ngIf="responseMap.StdReg.std_param5 == 'InActive'">【<span class="text-danger">不合格</span>】</span>
  </span></div>
  <div class="col-lg-2">
    <input type="text" class="form-control" [(ngModel)]= "searchText" (keyup.enter)="searchStd()"  placeholder="输入关键字搜索"  />
  </div>
  <div class="col-lg-1">
    <button class="btn btn-primary btn-lg" (click)="searchStd()">查询</button>
  </div>
  <div class="col-lg-5">
    <button class="btn btn-primary btn-lg" type="button" (click)="randomStd()"> 下一个考生</button>
    <button class="btn btn-success btn-lg ml-2" type="button " (click)="acceptAll()" *ngIf="responseMap"> 一键通过审核</button>
    <button class="btn btn-danger btn-lg ml-2" type="button" (click)="acceptAllByType()" *ngIf="FrameService.getParamValue('FilterByMaterialType') == 'Active'">全部考生通过审核</button>
  </div>
  <div class="float-right">
    <div class="row">
      <!--
      <div style="width:200px;">
        <ngx-select [items]="materialArray" [(ngModel)]="material_type" optionValueField="material_type"
                    (ngModelChange)="randomStd()"
                    optionTextField="material_name"></ngx-select>
      </div>
      -->
      <div style="width:160px;">
        <ngx-select [items]="materialArray" [(ngModel)]="material_type" optionValueField="material_type"
                    (ngModelChange)="randomStd()"
                    optionTextField="material_name"></ngx-select>
      </div>
    </div>
  </div>
</div>
<div class="row" *ngIf="responseMap">
  <ng-container *ngFor="let m of responseMap.MaterialArray">
    <div class="col-xl-4 mt-3" *ngIf="m.material_id">
      <div class="card card-default">
        <div class="card-body">
          <div [ngClass]="{'text-success':m.verify_status=== 'Active','text-danger':m.verify_status=== 'InActive'}">
            {{m.material_name}}
            <span *ngIf="m.material_type=='ArtExamCert'" class="text-danger">{{responseMap.StdReg.std_school}}</span>
              <span *ngIf="m.verify_status=== 'InActive' && m.verify_msg">【{{m.verify_msg}}】</span>
             </div>
          <div class="text-center mt-2">
            <div class="px-2">
              <img class="img-fluid rounded id_card"
                   [src]="FrameService.getParamValue('EnrolMaterialWebPath') + m['material_file']"
                   alt="" ngxViewer/>
            </div>
          </div>
        </div>
        <div class="card-footer">
          <p class="">
            <span>上传时间：{{m.upload_time}}<span *ngIf="m.verify_time"><br/>审核时间：{{m.verify_time}}</span></span>
            <span class="float-right">
                 <button class="btn btn-danger btn-sm" type="button"
                         *ngIf="m['verify_status'] === 'Active'"
                         (click)="refuseMaterial(m,'材料不符合要求')">打回重传</button>
              <div class="btn-group ml-2" dropdown *ngIf="m['verify_status'] === 'Active'">
                <button class="btn dropdown-toggle btn-secondary" type="button" dropdownToggle>其他原因
                  <span class="caret"></span>
                </button>
                <div *dropdownMenu class="dropdown-menu" role="menu">

                  <a class="dropdown-item" href="#" *ngFor="let r of refuseArray"
                     (click)="refuseMaterial(m,r.refuse_msg)">{{r.refuse_msg}}</a>
                  <div class="dropdown-divider"></div>
                  <a class="dropdown-item" href="#"
                     (click)="showModal({ResponseEntity: m, 'arrayUrl': 'std/material/refuse/all.htm'})">自定义原因</a>
                </div>
              </div>
        <button class="btn btn-info btn-sm" type="button"
                *ngIf="m['verify_status'] !== 'Active'"
                (click)="acceptMaterial(m)">通过审核
        </button>
               <button class="btn btn-danger btn-sm ml-2" type="button"
                       *ngIf="m['verify_status'] === undefined"
                       (click)="refuseMaterial(m,'材料不符合要求')">审核失败</button>
              <div class="btn-group ml-2" dropdown *ngIf="m['verify_status'] === undefined">
                <button class="btn dropdown-toggle btn-secondary" type="button" dropdownToggle>其他原因
                  <span class="caret"></span>
                </button>
                <div *dropdownMenu class="dropdown-menu" role="menu">

                  <a class="dropdown-item" href="#" *ngFor="let r of refuseArray"
                     (click)="refuseMaterial(m,r.refuse_msg)">{{r.refuse_msg}}</a>
                  <div class="dropdown-divider"></div>
                  <a class="dropdown-item" href="#"
                     (click)="showModal({ResponseEntity: m, 'arrayUrl': 'std/material/refuse/all.htm'})">自定义原因</a>
                </div>
              </div>
        </span>
          </p>
        </div>
      </div>
    </div>
  </ng-container>
</div>
