edit
This commit is contained in:
@ -0,0 +1,201 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemStaffStaffModalComponent } from 'src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component';
|
||||
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
|
||||
import { FreightAccountService } from '../../services/freight-account.service';
|
||||
import { SettingFinancialComponent } from './setting-financial/setting-financial.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-platform-account',
|
||||
templateUrl: './platform-account.component.html',
|
||||
styleUrls: ['../../../commom/less/box.less']
|
||||
})
|
||||
export class PlatformAccountComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
columns: STColumn[] = this.initST();
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
|
||||
constructor(public service: FreightAccountService, private router: Router, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
settingFinanical(item: any) {
|
||||
const modal = this.nzModalService.create({
|
||||
nzContent: SettingFinancialComponent,
|
||||
nzComponentParams: item ? { i: { ...item, roleId: '1,2,3', name: '用户名', phone: 18555555555 } } : { i: { id: 0 } },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
this.st.load();
|
||||
});
|
||||
}
|
||||
|
||||
routeTo(item?: any) {
|
||||
this.router.navigate(['/financial-management/driver-account-detail/1']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
ltdId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getNetworkFreightForwarder()
|
||||
}
|
||||
},
|
||||
bankType: {
|
||||
type: 'string',
|
||||
title: '银行类型',
|
||||
enum: [
|
||||
{ label: '全部', value: null },
|
||||
{ label: '平安银行', value: '1' },
|
||||
{ label: '浦发银行', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
default: null
|
||||
},
|
||||
virtualAccount: {
|
||||
type: 'string',
|
||||
title: '虚拟账户',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '网络货运人', index: 'description', width: 180 },
|
||||
{ title: '银行类型', index: 'description', width: 120 },
|
||||
{ title: '虚拟账户', index: 'description', width: 140 },
|
||||
{
|
||||
title: '平台账户可用余额',
|
||||
index: 'description',
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.availableBalance }) }
|
||||
},
|
||||
{
|
||||
title: '平台账户冻结余额',
|
||||
index: 'description',
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.availableBalance }) }
|
||||
},
|
||||
{
|
||||
title: '货主账户可用余额',
|
||||
index: 'description',
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.availableBalance }) }
|
||||
},
|
||||
{
|
||||
title: '货主账户冻结余额',
|
||||
index: 'description',
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.availableBalance }) }
|
||||
},
|
||||
{
|
||||
title: '司机账户可用余额',
|
||||
index: 'description',
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.availableBalance }) }
|
||||
},
|
||||
{
|
||||
title: '司机账户冻结余额',
|
||||
index: 'description',
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.availableBalance }) }
|
||||
},
|
||||
{
|
||||
title: '累计充值金额',
|
||||
index: 'description',
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.availableBalance }) }
|
||||
},
|
||||
{
|
||||
title: '货主累计提现金额',
|
||||
index: 'description',
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.availableBalance }) }
|
||||
},
|
||||
{
|
||||
title: '司机累计提现金额',
|
||||
index: 'description',
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.availableBalance }) }
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: 100,
|
||||
className: 'text-center',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
text: '查看明细',
|
||||
click: item => this.routeTo(item)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user