edit
This commit is contained in:
		| @ -1,10 +1,14 @@ | ||||
| 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 { CurrencyService } from '@delon/util'; | ||||
| import { CurrencyCNYPipe } from '@delon/util/pipes/currency/cny.pipe'; | ||||
| import { ShipperBaseService } from '@shared'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { SystemService } from 'src/app/routes/sys-setting/services/system.service'; | ||||
| import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component'; | ||||
| import { FreightAccountService } from '../../services/freight-account.service'; | ||||
|  | ||||
| @Component({ | ||||
| @ -24,7 +28,12 @@ export class FreightAccountComponent implements OnInit { | ||||
|  | ||||
|   _$expand = false; | ||||
|  | ||||
|   constructor(public service: FreightAccountService, private router: Router) {} | ||||
|   constructor( | ||||
|     public service: FreightAccountService, | ||||
|     private router: Router, | ||||
|     private modal: NzModalService, | ||||
|     private currencyService: CurrencyService | ||||
|   ) {} | ||||
|  | ||||
|   ngOnInit(): void {} | ||||
|  | ||||
| @ -36,6 +45,15 @@ export class FreightAccountComponent implements OnInit { | ||||
|     return requestOptions; | ||||
|   }; | ||||
|  | ||||
|   showAccountDetail(item: any) { | ||||
|     this.modal.create({ | ||||
|       nzTitle: '账户明细', | ||||
|       nzContent: AccountDetailComponent, | ||||
|       nzComponentParams: {}, | ||||
|       nzFooter: null | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 重置表单 | ||||
|    */ | ||||
| @ -146,10 +164,20 @@ export class FreightAccountComponent implements OnInit { | ||||
|       { title: '网络货运人', index: 'ltdName' }, | ||||
|       { title: '银行类型', index: 'bankTypeLabel' }, | ||||
|       { title: '虚拟账户', index: 'virtualAccount' }, | ||||
|       { title: '可用余额', index: 'availableBalance' }, | ||||
|       { title: '冻结余额', index: 'freezeBalance' }, | ||||
|       { title: '累计消费金额', index: 'description' }, | ||||
|       { title: '账户总余额', render: 'description' }, | ||||
|       { | ||||
|         title: '可用余额', | ||||
|         index: 'availableBalance', | ||||
|         type: 'currency', | ||||
|         format: item => `¥${this.currencyService.format(item.availableBalance)}` | ||||
|       }, | ||||
|       { title: '冻结余额', index: 'freezeBalance', type: 'currency' }, | ||||
|       { | ||||
|         title: '账户总余额', | ||||
|         render: 'description', | ||||
|         type: 'link', | ||||
|         format: item => `${new CurrencyPipe('cny').transform(item.availableBalance)}`, | ||||
|         click: item => this.showAccountDetail(item) | ||||
|       }, | ||||
|       { title: '创建时间', index: 'createTime', type: 'date', width: 150 }, | ||||
|       { | ||||
|         title: '状态', | ||||
|  | ||||
		Reference in New Issue
	
	Block a user