<page-header-wrapper [title]="'提现记录'">
</page-header-wrapper>

<!-- <nz-card>
    <nz-row [nzGutter]="16">
        <nz-col [nzXl]="6" [nzLg]="6" [nzSm]="12">
            <nz-statistic nzValue="100 笔" [nzTitle]="'待审核订单数'" [nzValueStyle]="{'font-size':'21px'}">
            </nz-statistic>
        </nz-col>
        <nz-col [nzXl]="6" [nzLg]="6" [nzSm]="12">
            <nz-statistic nzValue="80000.00 元" [nzTitle]="'待审核提现金额'" [nzValueStyle]="{'font-size':'21px'}">
            </nz-statistic>
        </nz-col>
        <nz-col [nzXl]="6" [nzLg]="6" [nzSm]="12">
            <nz-statistic nzValue="100 笔" [nzTitle]="'已提现订单数'" [nzValueStyle]="{'font-size':'21px'}">
            </nz-statistic>
        </nz-col>
        <nz-col [nzXl]="6" [nzLg]="6" [nzSm]="12">
            <nz-statistic nzValue="80000.00 元" [nzTitle]="'已提现金额'" [nzValueStyle]="{'font-size':'21px'}">
            </nz-statistic>
        </nz-col>
    </nz-row>
</nz-card> -->

<nz-card class="search-box" nzBordered>
    <div nz-row nzGutter="8">
        <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
            <sf #sf [schema]="searchSchema"
                [ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24,gutter:15 } }}" [compact]="true"
                [button]="'none'"></sf>
        </div>
        <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
            <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
            <button nz-button (click)="resetSF()">重置</button>
            <button nz-button (click)="exprot()"> 导出</button>
            <button nz-button nzType="link" (click)="expandToggle()">
                {{ !_$expand ? '展开' : '收起' }}
                <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
            </button>
        </div>
    </div>
</nz-card>

<nz-card class="content-box" nzBordered>
    <nz-tabset [nzTabBarExtraContent]="extraTemplate">
        <nz-tab nzTitle="全部" (nzClick)="changeRefundStatus()"></nz-tab>
        <nz-tab nzTitle="待审核" (nzClick)="changeRefundStatus('1')"></nz-tab>
        <nz-tab nzTitle="处理中" (nzClick)="changeRefundStatus('2')"></nz-tab>
        <nz-tab nzTitle="提现成功" (nzClick)="changeRefundStatus('3')"></nz-tab>
        <nz-tab nzTitle="提现失败" (nzClick)="changeRefundStatus('5')"></nz-tab>
        <nz-tab nzTitle="已拒绝" (nzClick)="changeRefundStatus('4')"></nz-tab>
    </nz-tabset>

    <ng-template #extraTemplate>
        <div class="d-flex align-items-center ">
            <div class="mr-md">
                已选择
                <strong class="text-red">{{ selectedRows.length }}</strong> 条数据&nbsp;&nbsp; 累计提现 <strong
                    class="text-red">{{
                    totalCallNo }}</strong>
                <a *ngIf="totalCallNo > 0" (click)="st.clearCheck();totalCallNo=0" class="ml-lg">清空</a>
            </div>
            <button nz-button (click)="this.auditAction(null)">审核</button>
        </div>
    </ng-template>

    <st #st [data]="service.$api_get_refund_page" [columns]="columns" [req]="{  process: beforeReq }" [page]="{}"
        [loading]="false" [scroll]="{ x:'1200px' }" (change)="stChange($event)">
        <ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column">
            {{ item.bankName }} <br> {{ item.bankCardNumber }}
        </ng-template>
    </st>
</nz-card>

<ng-template #auditModal>
    <div nz-row nzGutter="8">
        <div nz-col nzSpan="24" se-container [labelWidth]="80">
            <se [col]="1" label="备注">
                <textarea nz-input rows="3" [(ngModel)]="msg" placeholder="同意可以不用填写原因 ，拒绝必须说明原因"
                    style="width: 325px;margin-left: 14px;"></textarea>
            </se>
        </div>
    </div>
</ng-template>