fix bug
This commit is contained in:
@ -1,32 +1,43 @@
|
|||||||
<page-header-wrapper title="司机账户">
|
<page-header-wrapper title="司机账户"> </page-header-wrapper>
|
||||||
</page-header-wrapper>
|
|
||||||
|
|
||||||
<nz-card class="search-box">
|
<nz-card class="search-box">
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||||
<sf #sf [schema]="searchSchema"
|
<sf
|
||||||
[ui]="{ '*': { spanLabelFixed: 110,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
|
#sf
|
||||||
[button]="'none'"></sf>
|
[schema]="searchSchema"
|
||||||
</div>
|
[ui]="{ '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }"
|
||||||
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
|
[compact]="true"
|
||||||
class="text-right">
|
[button]="'none'"
|
||||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
></sf>
|
||||||
<button nz-button (click)="resetSF()">重置</button>
|
|
||||||
<button nz-button (click)="exportList()"> 导出</button>
|
|
||||||
<button nz-button nzType="link" (click)="expandToggle()">
|
|
||||||
{{ !_$expand ? '展开' : '收起' }}
|
|
||||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</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]="loading" (click)="st?.load(1)">查询</button>
|
||||||
|
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
|
||||||
|
<button nz-button [disabled]="loading" (click)="exportList()"> 导出</button>
|
||||||
|
<button nz-button nzType="link" (click)="expandToggle()">
|
||||||
|
{{ !_$expand ? '展开' : '收起' }}
|
||||||
|
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card class="content-box">
|
<nz-card class="content-box">
|
||||||
<st #st [data]="service.$api_get_driver_account_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
|
<st
|
||||||
[loading]="false" [scroll]="{ x: '1200px' }">
|
#st
|
||||||
<ng-template st-row="availableBalance" let-item let-index="index">
|
[data]="service.$api_get_driver_account_page"
|
||||||
<a (click)="showAccountDetail(item)">{{ (parseFloat(item.availableBalance) +
|
[columns]="columns"
|
||||||
parseFloat(item.freezeBalance)).toFixed(2) | currency}}</a>
|
[req]="{ process: beforeReq }"
|
||||||
</ng-template>
|
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
|
||||||
</st>
|
[page]="{}"
|
||||||
|
[loading]="false"
|
||||||
|
[scroll]="{ x: '1200px' }"
|
||||||
|
>
|
||||||
|
<ng-template st-row="availableBalance" let-item let-index="index">
|
||||||
|
<a (click)="showAccountDetail(item)">{{
|
||||||
|
(parseFloat(item.availableBalance) + parseFloat(item.freezeBalance)).toFixed(2) | currency
|
||||||
|
}}</a>
|
||||||
|
</ng-template>
|
||||||
|
</st>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
@ -18,7 +18,7 @@ export class DriverAccountComponent implements OnInit {
|
|||||||
st!: STComponent;
|
st!: STComponent;
|
||||||
@ViewChild('sf', { static: false })
|
@ViewChild('sf', { static: false })
|
||||||
sf!: SFComponent;
|
sf!: SFComponent;
|
||||||
|
loading: boolean = true;
|
||||||
searchSchema: SFSchema = this.initSF();
|
searchSchema: SFSchema = this.initSF();
|
||||||
columns: STColumn[] = this.initST();
|
columns: STColumn[] = this.initST();
|
||||||
_$expand = false;
|
_$expand = false;
|
||||||
@ -40,9 +40,16 @@ export class DriverAccountComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.loading = true;
|
||||||
return requestOptions;
|
return requestOptions;
|
||||||
};
|
};
|
||||||
|
afterRes = (data: any[], rawData?: any) => {
|
||||||
|
console.log(data)
|
||||||
|
this.loading = false
|
||||||
|
return data.map(item => ({
|
||||||
|
...item,
|
||||||
|
}));
|
||||||
|
};
|
||||||
showAccountDetail(item: any) {
|
showAccountDetail(item: any) {
|
||||||
this.modal.create({
|
this.modal.create({
|
||||||
nzTitle: '账户明细',
|
nzTitle: '账户明细',
|
||||||
|
|||||||
Reference in New Issue
Block a user