edit
This commit is contained in:
@ -1,14 +1,18 @@
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
|
||||
import { FreightAccountService } from '../../services/freight-account.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-driver-account',
|
||||
templateUrl: './driver-account.component.html',
|
||||
styleUrls: ['./driver-account.component.less']
|
||||
styleUrls: ['./driver-account.component.less'],
|
||||
providers: [CurrencyPipe]
|
||||
})
|
||||
export class DriverAccountComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
@ -20,7 +24,12 @@ export class DriverAccountComponent implements OnInit {
|
||||
columns: STColumn[] = this.initST();
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: FreightAccountService, private router: Router) {}
|
||||
constructor(
|
||||
public service: FreightAccountService,
|
||||
private router: Router,
|
||||
private modal: NzModalService,
|
||||
private currencyPipe: CurrencyPipe
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
@ -32,6 +41,16 @@ export class DriverAccountComponent implements OnInit {
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
showAccountDetail(item: any) {
|
||||
this.modal.create({
|
||||
nzTitle: '账户明细',
|
||||
nzContent: AccountDetailComponent,
|
||||
nzWidth: 600,
|
||||
nzComponentParams: {},
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
@ -146,10 +165,33 @@ export class DriverAccountComponent implements OnInit {
|
||||
{ title: '网络货运人', index: 'ltdName' },
|
||||
{ title: '银行类型', index: 'bankTypeLabel' },
|
||||
{ title: '虚拟账户', index: 'virtualAccount' },
|
||||
{ title: '可用余额', index: 'availableBalance' },
|
||||
{ title: '冻结余额', index: 'freezeBalance' },
|
||||
{ title: '本月累计提现金额', index: 'withdrawBalance', width: 150 },
|
||||
{ title: '账户总余额', index: 'availableBalance' },
|
||||
{
|
||||
title: '可用余额',
|
||||
index: 'availableBalance',
|
||||
type: 'currency',
|
||||
format: item => `${this.currencyPipe.transform(item.availableBalance)}`
|
||||
},
|
||||
{
|
||||
title: '冻结余额',
|
||||
index: 'freezeBalance',
|
||||
type: 'currency',
|
||||
format: item => `${this.currencyPipe.transform(item.availableBalance)}`
|
||||
},
|
||||
{
|
||||
title: '本月累计提现金额',
|
||||
index: 'withdrawBalance',
|
||||
width: 150,
|
||||
type: 'currency',
|
||||
format: item => `${this.currencyPipe.transform(item.availableBalance)}`
|
||||
},
|
||||
{
|
||||
title: '账户总余额',
|
||||
index: 'availableBalance',
|
||||
className: 'text-right',
|
||||
type: 'link',
|
||||
format: item => `${this.currencyPipe.transform(item.availableBalance)}`,
|
||||
click: item => this.showAccountDetail(item)
|
||||
},
|
||||
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 },
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
Reference in New Issue
Block a user