edit
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
</nz-statistic>
|
||||
</nz-col>
|
||||
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
|
||||
<nz-statistic nzValue="100,000,000.00 元" [nzTitle]="'账户余额'"
|
||||
<nz-statistic [nzValue]="params?.availableBalance+'元' " [nzTitle]="'账户余额'"
|
||||
[nzValueStyle]="{'font-size':'16px',color:'red'}">
|
||||
</nz-statistic>
|
||||
</nz-col>
|
||||
@ -39,7 +39,8 @@
|
||||
[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 nzType="primary" [nzLoading]="service.http.loading"
|
||||
(click)="st?.load(1);loadInfo();">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="exportList()"> 导出</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
@ -51,9 +52,9 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box" nzBordered>
|
||||
<st #st [data]="service.$api_get_shipper_account_detail" [columns]="columns"
|
||||
<st #st [data]="service.$api_get_shipper_or_driver_account_detail" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterReq }"
|
||||
[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]="{ x:'1200px',y: '300px' }"></st>
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }" (change)="stChange($event)"></st>
|
||||
</nz-card>
|
||||
@ -19,7 +19,6 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
info: any = {};
|
||||
|
||||
params: any = {};
|
||||
|
||||
_$expand = false;
|
||||
@ -27,12 +26,15 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
this.params = route.snapshot.queryParams;
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
ngOnInit(): void {
|
||||
this.loadInfo();
|
||||
}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
Object.assign(requestOptions.body, {
|
||||
ltdid: this.params.ltdid,
|
||||
projectId: this.params.projectId,
|
||||
enterpriseId: this.params.enterpriseId,
|
||||
roleId: this.params.roleId
|
||||
});
|
||||
if (this.sf) {
|
||||
@ -41,15 +43,31 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
afterReq = (data: any[], rawData?: any) => {
|
||||
if (rawData?.success) {
|
||||
this.info = {
|
||||
incomeAmount: rawData.data.rawData,
|
||||
payAmount: rawData.data.payAmount
|
||||
};
|
||||
}
|
||||
return data;
|
||||
};
|
||||
loadInfo() {
|
||||
this.service
|
||||
.request(this.service.$api_get_shipper_account_balance_detail, {
|
||||
...this.sf.value,
|
||||
ltdid: this.params.ltdid,
|
||||
projectId: this.params.projectId,
|
||||
enterpriseId: this.params.enterpriseId,
|
||||
roleId: this.params.roleId,
|
||||
pageIndex: this.st.pi,
|
||||
pageSize: this.st.ps,
|
||||
createTime: {
|
||||
start: this.sf.value.createTime?.[0] || null,
|
||||
end: this.sf.value.createTime?.[1] || null
|
||||
}
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.info = res;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
|
||||
@ -126,9 +126,9 @@ export class FreightAccountComponent implements OnInit {
|
||||
title: '创建时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
@ -168,7 +168,9 @@ export class FreightAccountComponent implements OnInit {
|
||||
tenantName: item.tenantName,
|
||||
ltdName: item.ltdName,
|
||||
bankType: item.bankType,
|
||||
availableBalance: item.availableBalance,
|
||||
projectId: item.projectId,
|
||||
enterpriseId: item.enterpriseId,
|
||||
roleId: item.roleId,
|
||||
ltdid: item.ltdid
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user