This commit is contained in:
Taric Xin
2022-01-13 15:13:53 +08:00
parent bcd5543d77
commit a917c83275

View File

@ -14,7 +14,8 @@ import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-freight-account',
templateUrl: './freight-account.component.html',
styleUrls: ['./freight-account.component.less']
styleUrls: ['./freight-account.component.less'],
providers: [CurrencyPipe]
})
export class FreightAccountComponent implements OnInit {
@ViewChild('st', { static: true })
@ -32,7 +33,7 @@ export class FreightAccountComponent implements OnInit {
public service: FreightAccountService,
private router: Router,
private modal: NzModalService,
private currencyService: CurrencyService
private currencyPipe: CurrencyPipe
) {}
ngOnInit(): void {}
@ -168,14 +169,20 @@ export class FreightAccountComponent implements OnInit {
title: '可用余额',
index: 'availableBalance',
type: 'currency',
format: item => `${this.currencyService.format(item.availableBalance)}`
format: item => `${this.currencyPipe.transform(item.availableBalance)}`
},
{
title: '冻结余额',
index: 'freezeBalance',
type: 'currency',
format: item => `${this.currencyPipe.transform(item.availableBalance)}`
},
{ title: '冻结余额', index: 'freezeBalance', type: 'currency' },
{
title: '账户总余额',
render: 'description',
index: 'description',
className: 'text-right',
type: 'link',
format: item => `${new CurrencyPipe('cny').transform(item.availableBalance)}`,
format: item => `${this.currencyPipe.transform(item.availableBalance)}`,
click: item => this.showAccountDetail(item)
},
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 },