<page-header-wrapper title="货主账户">
</page-header-wrapper>

<nz-card class="search-box">
    <div nz-row nzGutter="8">
        <div nz-col [nzXl]="_$expand ? 24 : 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]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
            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> 导出</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">
    <st #st [data]="url" [columns]="columns"
        [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
        [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
        [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
        [loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)">
        <ng-template st-row="description1" let-item let-index="index">
            <a (click)="showAccount(item)">{{item.callNo}}</a>
        </ng-template>
    </st>
</nz-card>

<ng-template #accountModal>
    <st #st [data]="accountList" [columns]="[
    { title: '充值账户主体', index: 'description' },
    { title: '虚拟账户', index: 'description' },
    { title: '可用余额', index: 'description' }
    ]" [page]="{ show: false}" [scroll]="{ y: '300px' }">
        <ng-template st-row="description1" let-item let-index="index">
            <a (click)="showAccount(item)">{{item.callNo}}</a>
        </ng-template>
    </st>
</ng-template>