<page-header-wrapper title="平台账户">
</page-header-wrapper>

<nz-card>
  <nz-row [nzGutter]="16">
    <nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
      <nz-statistic [nzValue]="((info.availableBalance |currency:' ') || 0)+'元'" nzTitle="平台账户余额"
        [nzValueStyle]="{'font-size':'16px','font-weight':'bold'}" class="bold">
      </nz-statistic>
    </nz-col>
    <nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
      <nz-statistic [nzValue]="((info.shipperAvailableBalance |currency:' ') || 0)+' 元'" [nzTitle]="'货主账户余额'"
        [nzValueStyle]="{'font-size':'16px',color:'red'}">
      </nz-statistic>
    </nz-col>
    <nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
      <nz-statistic [nzValue]="((info.driverAvailableBalance |currency:' ') || 0)+' 元'" [nzTitle]="'司机账户余额'"
        [nzValueStyle]="{'font-size':'16px',color:'red'}">
      </nz-statistic>
    </nz-col>
    <nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
      <nz-statistic [nzValue]="((info.rechargeBalance |currency:' ') || 0)+' 元'" [nzTitle]="'累计充值金额'"
        [nzValueStyle]="{'font-size':'16px',color:'red'}">
      </nz-statistic>
    </nz-col>
    <nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
      <nz-statistic [nzValue]="((info.shipperWithdrawBalance |currency:' ') || 0)+' 元'" [nzTitle]="'货主累计提现金额'"
        [nzValueStyle]="{'font-size':'16px',color:'red'}">
      </nz-statistic>
    </nz-col>
    <nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
      <nz-statistic [nzValue]="((info.driverWithdrawBalance |currency:' ') || 0)+' 元'" [nzTitle]="'司机累计提现金额'"
        [nzValueStyle]="{'font-size':'16px',color:'red'}">
      </nz-statistic>
    </nz-col>
  </nz-row>
</nz-card>

<nz-card class="search-box">
  <div nz-row nzGutter="8">
    <div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
      <sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 110,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}"
        [compact]="true" [button]="'none'"></sf>
    </div>
    <div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
      <button nz-button nzType="primary" (click)="st?.load(1)">查询</button>
      <button nz-button (click)="resetSF()">重置</button>
      <button nz-button (click)="exportList()"> 导出</button>
    </div>
  </div>
</nz-card>

<nz-card class="content-box">
  <st #st [data]="service.$api_get_platform_account_page" [columns]="columns" [req]="{  process: beforeReq }"
    [page]="{}" [scroll]="{ x: '1200px' }" [loading]="service.http.loading">
  </st>
  <div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
    合计 <label class="text-red-dark">{{ static?.total }}</label> 项，收入
    <label class="text-red-dark font-weight-bold">{{ static?.incomeAmount | currency }}</label>，支出
    <label class="text-red-dark font-weight-bold">{{static?.payAmount | currency }}</label>
  </div>

</nz-card>
