From a917c83275ea917ddc85cb4f68b8e144a9bbc492 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 13 Jan 2022 15:13:53 +0800 Subject: [PATCH] edit --- .../freight-account.component.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/app/routes/financial-management/components/freight-account/freight-account.component.ts b/src/app/routes/financial-management/components/freight-account/freight-account.component.ts index 77aa78e9..dadfced6 100644 --- a/src/app/routes/financial-management/components/freight-account/freight-account.component.ts +++ b/src/app/routes/financial-management/components/freight-account/freight-account.component.ts @@ -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 },