This commit is contained in:
Taric Xin
2021-12-28 20:25:36 +08:00
parent 62313baf18
commit 571bf8728d
6 changed files with 45 additions and 21 deletions

View File

@ -22,7 +22,7 @@
</nz-card>
<nz-card class="content-box">
<st #st [data]="service.$api_get_account_balance" [columns]="columns"
<st #st [data]="service.$api_get_driver_account_page" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"

View File

@ -9,8 +9,8 @@
<nz-card>
<nz-row [nzGutter]="16">
<nz-col [nzXl]="9" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="天津怡亚通物流科技有限公司(浦发)" [nzTitle]="'茅台集团股份有限公司'"
[nzValueStyle]="{'font-size':'16px','font-weight':'bold'}" class="bold">
<nz-statistic [nzValue]="params.ltdName+'('+(params.bankType===1?'平安':'浦发')+')'"
[nzTitle]="params.tenantName" [nzValueStyle]="{'font-size':'16px','font-weight':'bold'}" class="bold">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
@ -19,7 +19,8 @@
</nz-statistic>
</nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic [nzValue]="(info?.incomeAmount || 0) +''" [nzTitle]="'收入金额'" [nzValueStyle]="{'font-size':'16px',color:'red'}">
<nz-statistic [nzValue]="(info?.incomeAmount || 0) +''" [nzTitle]="'收入金额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
@ -50,7 +51,7 @@
</nz-card>
<nz-card class="content-box" nzBordered>
<st #st [data]="service.$api_get_balance_by_shipper" [columns]="columns"
<st #st [data]="service.$api_get_shipper_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 }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"

View File

@ -20,13 +20,21 @@ export class FreightAccountDetailComponent implements OnInit {
info: any = {};
params: any = {};
_$expand = false;
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private route: ActivatedRoute) {}
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private route: ActivatedRoute) {
this.params = route.snapshot.queryParams;
}
ngOnInit(): void {}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { transactionNumber: this.route.snapshot.params.id });
Object.assign(requestOptions.body, {
ltdid: this.params.ltdid,
projectId: this.params.projectId,
roleId: this.params.roleId
});
if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value });
}
@ -34,7 +42,6 @@ export class FreightAccountDetailComponent implements OnInit {
};
afterReq = (data: any[], rawData?: any) => {
console.log(data, rawData);
if (rawData?.success) {
this.info = {
incomeAmount: rawData.data.rawData,
@ -81,9 +88,10 @@ export class FreightAccountDetailComponent implements OnInit {
title: '交易时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd'
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true
} as SFDateWidgetSchema
},
transactionNumber: {

View File

@ -22,7 +22,7 @@
</nz-card>
<nz-card class="content-box">
<st #st [data]="service.$api_get_account_balance" [columns]="columns"
<st #st [data]="service.$api_get_shipper_account_page" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"

View File

@ -70,12 +70,12 @@ export class FreightAccountComponent implements OnInit {
title: '企业名称',
ui: { placeholder: '请输入' }
},
phone: {
name: {
type: 'string',
title: '联系人',
ui: { placeholder: '请输入' }
},
page: {
phone: {
type: 'string',
title: '联系人电话',
ui: {
@ -141,13 +141,13 @@ export class FreightAccountComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '企业名称', index: 'tenantName' },
{ title: '联系人', index: 'description' },
{ title: '联系人电话', index: 'description' },
{ title: '网络货运人', index: 'ltdid' },
{ title: '联系人', index: 'name' },
{ title: '联系人电话', index: 'phone' },
{ title: '网络货运人', index: 'ltdName' },
{ title: '银行类型', index: 'bankType', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } },
{ title: '虚拟账户', index: 'virtualAccount' },
{ title: '可用余额', index: 'availableBalance' },
{ title: '冻结余额', index: 'freezeBalance' },
{ title: '冻结余额', index: 'availableBalance' },
{ title: '累计消费金额', index: 'description' },
{ title: '账户总余额', render: 'availableBalance' },
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 },
@ -162,7 +162,17 @@ export class FreightAccountComponent implements OnInit {
buttons: [
{
text: '查看明细',
click: item => this.router.navigate(['/financial-management/freight-account/detail/' + item.id])
click: item =>
this.router.navigate(['/financial-management/freight-account/detail/' + item.id], {
queryParams: {
tenantName: item.tenantName,
ltdName: item.ltdName,
bankType: item.bankType,
projectId: item.projectId,
roleId: item.roleId,
ltdid: item.ltdid
}
})
}
]
}

View File

@ -7,8 +7,13 @@ import { BaseService, ShipperBaseService } from '@shared';
export class FreightAccountService extends ShipperBaseService {
$mock_url = '/rule?_allow_anonymous=true';
// 获取账户余额信息
$api_get_account_balance = '/api/fcc/accountBalance/getAccountBalance';
// 运营端获取货主账户信息
$api_get_shipper_account_page = '/api/fcc/accountBalance/getShipperAccountBalanceByOperator';
// 运营端获取司机账户信息
$api_get_driver_account_page = '/api/fcc/accountBalance/getDriverAccountBalanceByOperator';
// 运营端获取货主账户明细信息
$api_get_shipper_account_detail = '/api/fcc/accountBalance/getShipperAccountBalanceDetailByOperator';
// 货主端获取账户余额交易明细
$api_get_balance_by_shipper = '/api/fcc/accountBalanceDetail/getAccountBalanceByShipperPage';