<!-- 页头 -->
<page-header-wrapper [title]="'合规监控报表'"></page-header-wrapper>
<nz-card>
  <!-- 搜索区 -->
  <div nz-row>
    <div nz-col nzSpan="18">
      <sf #sf [ui]="ui" [schema]="schema" [button]="'none'"></sf>
    </div>
    <div nz-col nzSpan="6">
      <div class="chooseBox">
        <div class="timeBox">
          <nz-radio-group [(ngModel)]="mode" nzButtonStyle="solid" (ngModelChange)="changeData()"  acl  [acl-ability]="['index-lRateQualified']">
            <label nz-radio-button nzValue="year">年</label>
            <label nz-radio-button nzValue="month">月</label>
          </nz-radio-group>
          <div class="dateBox">
            <nz-date-picker [(ngModel)]="date" [nzMode]="mode" [nzFormat]="dateFormat" (ngModelChange)="onChange($event)"></nz-date-picker>
          </div>
        </div>
      </div>
    </div>
  </div>
</nz-card>

<div nz-row [nzGutter]="16">
  <div nz-col class="gutter-row" [nzSpan]="6">
    <g2-card [title]="'订单合格率'" [bordered]="true" [total]="cardData1?.proportion" [footer]="footer1" contentHeight="46">
      <ng-template #footer1>
        <div class="card-f">
          <span class="card-f-l">合格：{{cardData1?.leftQuantity}}</span> <span>不合格：{{cardData1?.rightQuantity}}</span>
        </div>
      </ng-template>
    </g2-card>
  </div>
  <div nz-col class="gutter-row" [nzSpan]="6">
    <g2-card [title]="'货源单占比'" [bordered]="true" [total]="cardData2?.proportion" [footer]="footer2" contentHeight="46">
      <ng-template #footer2>
        <div class="card-f">
          <span class="card-f-l">货源单：{{cardData2?.leftQuantity}}</span> <span>合同单：{{cardData2?.rightQuantity}}</span>
        </div>
      </ng-template>
    </g2-card>
  </div>
  <div nz-col class="gutter-row" [nzSpan]="6">
    <g2-card [title]="'运费直付占比'" [bordered]="true" [total]="cardData3?.proportion" [footer]="footer3" contentHeight="46">
      <ng-template #footer3>
        <div class="card-f">
          <span class="card-f-l">司机：{{cardData3?.leftQuantity}}</span> <span>车队长：{{cardData3?.rightQuantity}}</span>
        </div>
      </ng-template>
    </g2-card>
    </div>
  <div nz-col class="gutter-row" [nzSpan]="6">
    <g2-card [title]="'付款及时率'" [bordered]="true" [total]="cardData4?.proportion" [footer]="footer4" contentHeight="46">
      <ng-template #footer4>
        <div class="card-f">
          <span class="card-f-l">准时：{{cardData4?.leftQuantity}}</span> <span>逾期：{{cardData4?.rightQuantity}}</span>
        </div>
      </ng-template>
    </g2-card>
  </div>
</div>

<nz-card nzTitle="平台合规情况监控报表">
  <app-compliance-curve #curve [chartData]="chartData"></app-compliance-curve>
  <!-- <g2-custom delay="100" (render)="render($event)"></g2-custom> -->
</nz-card>
