<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">
              <form class="form-inline">
  
                <div class="input-group mr-1 input-group-sm">
                  <label>考试批次：</label>
                  <select class="custom-select"  [(ngModel)]="query.exam_time_id" [ngModelOptions]="{standalone: true}">
                    <option value="">全部</option>
                    <option *ngFor="let item of examTimeIdArray; let i = index" [value]="item.id">{{item.exam_year_month}}</option>
                    </select>
  
  
                </div>
                <div class="input-group mr-1 input-group-sm">
                  <label>考点：</label>
                  <select class="custom-select"  [(ngModel)]="query.exam_agent_id" [ngModelOptions]="{standalone: true}">
                    <option value="">全区</option>
                    <option *ngFor="let item of agentArray" [value]="item.id">{{item.org_name}}</option>
                    </select>
  
                </div>
                <div class="input-group mr-1 input-group-sm">
                    <label>项目：</label>
                    <select class="custom-select"  [(ngModel)]="query.data_type" [ngModelOptions]="{standalone: true}">
                      <option value="">全部</option>
                      <option value="1">自考报考费</option>
                      <option value="2">毕业实践考核</option>
                      <option value="3">毕业论文答辩</option>
                      </select>
    
                  </div>

                  <div *ngIf="query.data_type == 1" class="input-group mr-1 input-group-sm">
                    <label>报考类型：</label>
                    <select class="custom-select"  [(ngModel)]="query.enrolType" [ngModelOptions]="{standalone: true}">
                      <option value="0">全部</option>
                      <option value="1">网上报考</option>
                      <option value="2">现场报考</option>
                      </select>
    
                  </div>
         
  
                <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="queryAllList()">
                  <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>
              </form>
            </div>
          </div>
  
          <!-- 工具栏 -->
          <div class="row mb-2" [hidden]="this.editShowType=='only'">
            <div class="col-lg-12">
              <div class="pull-left">
  
                <button id="exportPdf" (click)="exportPdf();" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" title="导出">
                  <i class="fa fa-file-excel"></i> PDF导出</button>
   
  
            </div>
          </div>
  
          <!--表格-->
          <div class="row">
            <div class="col-lg-12 ml-2" [hidden]="this.editShowType=='only'">
              <table class="table table-sm table-striped table-hover table-bordered bg-white" style="width: 1000px">
                <thead>
                  <tr>
                    <th rowspan="2" width="60px" style="vertical-align: middle">
                      序号
                    </th>
                    <th rowspan="2" width="60px" style="vertical-align: middle;width: 120px" align="center">
                      项目
                    </th>
                    <th colspan="4" style="vertical-align: middle;width: 200px" align="center">
                      应缴金额
                    </th>
                    <th rowspan="2" colspan="2">
                      单位
                    </th>
                  </tr>

                  <tr>
                    <th align="center">
                      单位
                    </th>
                    <th align="center">
                      数量
                    </th>
                    <th align="center">
                      标准
                    </th>
                    <th align="center">
                      总金额
                    </th>
                  </tr>
                    
                </thead>
                <tbody>
                  <tr *ngFor="let item of enrolList; let i = index">
                    <td align="center">{{i+1}}</td>
                    <td *ngIf = "i==0" align="center" [attr.rowspan]="enrolList.length">{{item.a}}</td>
                    <td align="center">{{item.b}}</td>
                    <td align="right">{{item.f1}}</td>
                    <td align="right">{{item.f2}}</td>
                    <td align="right">{{item.f3}}</td>
                    <td *ngIf="query.enrolType==2" >{{item.f5}}</td>
                    <td *ngIf="i==0 || (i>0 && enrolList[i-1].f4 != item.f4)"  [attr.rowspan]="enrolRowspan(enrolList,item,index)" >{{item.f4}}</td>
                  </tr>
                  <tr *ngFor="let item of practiceList; let i = index">
                    <td >{{i+1+enrolList.length}}</td>
                    <td *ngIf = "i==0" align="center" [attr.rowspan]="practiceList.length">{{item.a}}</td>
                    <td align="center">{{item.b}}</td>
                    <td align="right">{{item.f1}}</td>
                    <td align="right">{{item.f2}}</td>
                    <td align="right">{{item.f3}}</td>
                    <td align="center">{{item.f4}}</td>
                  </tr>
                  <tr *ngFor="let item of paperList; let i = index">
                    <td align="center">{{i+1+enrolList.length+practiceList.length}}</td>
                    <td *ngIf = "i==0" align="center" [attr.rowspan]="paperList.length">{{item.a}}</td>
                    <td align="center">{{item.b}}</td>
                    <td align="right">{{item.f1}}</td>
                    <td align="right">{{item.f2}}</td>
                    <td align="right">{{item.f3}}</td>
                    <td align="center">{{item.f4}}</td>
                  </tr>

                </tbody>
              </table>
             
            </div>
  
 
          </div>
        </div>
      </div>
    </div>
 
  </div>
  
  
 