edit
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
/* eslint-disable import/no-duplicates */
|
/* eslint-disable import/no-duplicates */
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { default as ngLang } from '@angular/common/locales/zh';
|
import { default as ngLang } from '@angular/common/locales/zh';
|
||||||
import { APP_INITIALIZER, LOCALE_ID, NgModule, Type } from '@angular/core';
|
import { APP_INITIALIZER, DEFAULT_CURRENCY_CODE, LOCALE_ID, NgModule, Type } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { SimpleInterceptor } from '@delon/auth';
|
import { SimpleInterceptor } from '@delon/auth';
|
||||||
@ -40,7 +40,8 @@ const APPINIT_PROVIDES = [
|
|||||||
useFactory: StartupServiceFactory,
|
useFactory: StartupServiceFactory,
|
||||||
deps: [StartupService],
|
deps: [StartupService],
|
||||||
multi: true
|
multi: true
|
||||||
}
|
},
|
||||||
|
{ provide: DEFAULT_CURRENCY_CODE, useValue: '¥' }
|
||||||
];
|
];
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,14 @@
|
|||||||
|
import { CurrencyPipe } from '@angular/common';
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
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 { ShipperBaseService } from '@shared';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
|
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';
|
import { FreightAccountService } from '../../services/freight-account.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -24,7 +28,12 @@ export class FreightAccountComponent implements OnInit {
|
|||||||
|
|
||||||
_$expand = false;
|
_$expand = false;
|
||||||
|
|
||||||
constructor(public service: FreightAccountService, private router: Router) {}
|
constructor(
|
||||||
|
public service: FreightAccountService,
|
||||||
|
private router: Router,
|
||||||
|
private modal: NzModalService,
|
||||||
|
private currencyService: CurrencyService
|
||||||
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
|
|
||||||
@ -36,6 +45,15 @@ export class FreightAccountComponent implements OnInit {
|
|||||||
return requestOptions;
|
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: 'ltdName' },
|
||||||
{ title: '银行类型', index: 'bankTypeLabel' },
|
{ title: '银行类型', index: 'bankTypeLabel' },
|
||||||
{ title: '虚拟账户', index: 'virtualAccount' },
|
{ title: '虚拟账户', index: 'virtualAccount' },
|
||||||
{ title: '可用余额', index: 'availableBalance' },
|
{
|
||||||
{ title: '冻结余额', index: 'freezeBalance' },
|
title: '可用余额',
|
||||||
{ title: '累计消费金额', index: 'description' },
|
index: 'availableBalance',
|
||||||
{ title: '账户总余额', render: 'description' },
|
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: '创建时间', index: 'createTime', type: 'date', width: 150 },
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
<st #st [data]="url" [columns]="columns"
|
||||||
|
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||||
|
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||||
|
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||||
|
[loading]="service.http.loading" [scroll]="{ y: '370px' }">
|
||||||
|
</st>
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
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'
|
||||||
|
})
|
||||||
|
export class AccountDetailComponent implements OnInit {
|
||||||
|
@ViewChild('st', { static: true })
|
||||||
|
st!: STComponent;
|
||||||
|
columns: STColumn[] = [
|
||||||
|
{ title: '网络货运人', index: 'phone' },
|
||||||
|
{ title: '平安账户余额', index: 'ltdName' },
|
||||||
|
{ title: '浦发账户余额', index: 'bankTypeLabel' }
|
||||||
|
];
|
||||||
|
|
||||||
|
url = '';
|
||||||
|
|
||||||
|
isCanCreate = false;
|
||||||
|
constructor(public service: BaseService) {}
|
||||||
|
|
||||||
|
ngOnInit(): void {}
|
||||||
|
|
||||||
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
|
return requestOptions;
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -26,6 +26,7 @@ import { AmapModule } from './components/amap/amap.module';
|
|||||||
import { ImageListModule } from './components/imagelist';
|
import { ImageListModule } from './components/imagelist';
|
||||||
import { DictSelectComponent } from './components/dict-select';
|
import { DictSelectComponent } from './components/dict-select';
|
||||||
import { PipeModule } from './pipes';
|
import { PipeModule } from './pipes';
|
||||||
|
import { AccountDetailComponent } from './components/account-detail/account-detail.component';
|
||||||
|
|
||||||
const MODULES = [
|
const MODULES = [
|
||||||
AddressModule,
|
AddressModule,
|
||||||
@ -44,7 +45,7 @@ const MODULES = [
|
|||||||
];
|
];
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent];
|
const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, AccountDetailComponent];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@ -57,7 +58,7 @@ const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent];
|
|||||||
DelonFormModule,
|
DelonFormModule,
|
||||||
...SHARED_DELON_MODULES,
|
...SHARED_DELON_MODULES,
|
||||||
...SHARED_ZORRO_MODULES,
|
...SHARED_ZORRO_MODULES,
|
||||||
...MODULES,
|
...MODULES
|
||||||
// third libs
|
// third libs
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
|
|||||||
Reference in New Issue
Block a user