import { CurrencyPipe } from '@angular/common'; import { Component, OnInit, ViewChild } from '@angular/core'; import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st'; import { BaseService } from '../../services'; @Component({ selector: 'app-account-detail', templateUrl: './account-detail.component.html', providers: [CurrencyPipe] }) export class AccountDetailComponent implements OnInit { @ViewChild('st', { static: true }) st!: STComponent; columns: STColumn[] = []; url = ''; isCanCreate = false; constructor(public service: BaseService, private currencyPipe: CurrencyPipe) { this.initST(); } ngOnInit(): void {} createPA(item: any) {} createPF(item: any) {} beforeReq = (requestOptions: STRequestOptions) => { return requestOptions; }; initST() { this.columns = [ { title: '网络货运人', index: 'phone', className: 'text-center' }, { title: '平安账户余额', render: 'ltdName', type: 'currency', format: item => `${this.currencyPipe.transform(item.availableBalance)}` }, { title: '浦发账户余额', render: 'bankTypeLabel', type: 'currency', format: item => `${this.currencyPipe.transform(item.availableBalance)}` } ]; } }