This commit is contained in:
Taric Xin
2022-03-02 16:15:39 +08:00
parent 3e08b87143
commit 6908a84e25
6 changed files with 57 additions and 16 deletions

View File

@ -31,4 +31,12 @@
font-size : 16px;
}
}
}
.total-footer {
position : absolute;
bottom : 30px;
height : 32px;
margin : 16px 0;
line-height: 32px;
}

View File

@ -31,7 +31,7 @@
</nz-row>
</nz-card>
<nz-card nzBordered>
<nz-card nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
@ -57,4 +57,9 @@
[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' }" (change)="stChange($event)"></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>

View File

@ -20,7 +20,7 @@ export class FreightAccountDetailComponent implements OnInit {
info: any = {};
params: any = {};
static: any = {};
_$expand = false;
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private route: ActivatedRoute) {
this.params = route.snapshot.queryParams;
@ -46,6 +46,7 @@ export class FreightAccountDetailComponent implements OnInit {
}
});
}
this.loadStatistics(requestOptions.body);
return requestOptions;
};
@ -71,6 +72,14 @@ export class FreightAccountDetailComponent implements OnInit {
});
}
loadStatistics(params: any) {
this.service.request(this.service.$api_get_shipper_account_balance_detail, params).subscribe(res => {
if (res) {
this.static = res;
}
});
}
stChange(e: STChange): void {}
exportList() {
@ -186,15 +195,15 @@ export class FreightAccountDetailComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '交易时间', index: 'createTime', type: 'date' },
{ title: '流水号', index: 'transactionNumber' },
{ title: '交易类型', index: 'tradeTypeLabel', className: 'text-center' },
{ title: '交易单号', index: 'businessNumber' },
{ title: '订单号', index: 'business2Number' },
{ title: '运单号', index: 'busine1ssNumber' },
{ title: '货主', index: 'busine11ssNumber' },
{ title: '所属项目', index: 'projectId' },
{ title: '收支类型', index: 'incomeTypeLabel', className: 'text-center' },
{ title: '交易时间', index: 'createTime', type: 'date', width: 170 },
{ title: '流水号', index: 'transactionNumber', width: 170 },
{ title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 140 },
{ title: '交易单号', index: 'businessNumber', width: 170 },
{ title: '订单号', index: 'business2Number', width: 170 },
{ title: '运单号', index: 'busine1ssNumber', width: 170 },
{ title: '货主', index: 'enterpriseName' , width: 170},
{ title: '所属项目', index: 'projectName' , width: 170},
{ title: '收支类型', index: 'incomeTypeLabel', className: 'text-center', width: 140 },
{
title: '交易金额',
index: 'amount',
@ -211,9 +220,9 @@ export class FreightAccountDetailComponent implements OnInit {
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.accountBalance }) }
},
{ title: '付款方', index: 'busine111ssNumber' },
{ title: '收款方', index: 'payeeName' },
{ title: '备注', index: 'projectId1' },
{ title: '付款方', index: 'busine111ssNumber' , width: 170},
{ title: '收款方', index: 'payeeName', width: 170 },
{ title: '备注', index: 'projectId1', width: 170 }
];
}
}

View File

@ -52,7 +52,13 @@
</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 #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>

View File

@ -19,6 +19,8 @@ export class PlatformAccountComponent implements OnInit {
columns: STColumn[] = this.initST();
info: any = {};
static: any = {};
constructor(public service: FreightAccountService, private router: Router, private nzModalService: NzModalService) {}
ngOnInit(): void {
@ -29,6 +31,7 @@ export class PlatformAccountComponent implements OnInit {
if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value });
}
this.loadStatistics(requestOptions.body);
return requestOptions;
};
@ -44,6 +47,14 @@ export class PlatformAccountComponent implements OnInit {
});
}
loadStatistics(params: any) {
this.service.request(this.service.$api_get_platform_account_statistics, params).subscribe(res => {
if (res) {
this.static = res;
}
});
}
/**
* 重置表单
*/

View File

@ -25,6 +25,8 @@ export class FreightAccountService extends ShipperBaseService {
// 运营端获取平台余额
$api_get_platform_account_header = '/api/fcc/accountBalance/getPlatformBalanceByOperator';
// 运营端获取平台余额
$api_get_platform_account_statistics = '/api/fcc/accountBalanceDetail/getAccountBalancePlatformIncomeDetailByOperator';
// 运营端获取平台余额
$api_get_platform_account_page = '/api/fcc/accountBalance/getPlatformAccountBalanceByOperator';
// 运营端获取账户余额交易明细
$api_get_platform_account_detail_page = '/api/fcc/accountBalanceDetail/getAccountBalanceByPage';