This commit is contained in:
Taric Xin
2021-12-27 21:00:35 +08:00
parent 8ead989ec1
commit 1454acc726
8 changed files with 122 additions and 96 deletions

View File

@ -2,6 +2,7 @@ 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 { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
import { FreightAccountService } from '../../services/freight-account.service';
@ -23,11 +24,12 @@ export class FreightAccountComponent implements OnInit {
_$expand = false;
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(public service: FreightAccountService, private router: Router) {}
ngOnInit(): void {}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { accountType: 1 });
if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value });
}
@ -63,7 +65,7 @@ export class FreightAccountComponent implements OnInit {
hidden: true
}
},
receiveName: {
tenantName: {
type: 'string',
title: '企业名称',
ui: { placeholder: '请输入' }
@ -80,35 +82,37 @@ export class FreightAccountComponent implements OnInit {
placeholder: '请输入'
}
},
page2: {
ltdid: {
type: 'string',
title: '网络货运人',
enum: [{ label: '全部', value: '全部' }],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder()
}
},
receiveName2: {
bankType: {
type: 'string',
title: '银行类型',
enum: [{ label: '全部', value: '全部' }],
enum: [
{ label: '全部', value: null },
{ label: '平安银行', value: '1' },
{ label: '浦发银行', value: '2' }
],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName2 = i;
this.sf?.setValue('/receiveName2', i);
},
visibleIf: {
expand: (value: boolean) => value
}
}
},
default: null
},
page3: {
virtualAccount: {
type: 'string',
title: '虚拟账户',
ui: {
@ -136,24 +140,29 @@ export class FreightAccountComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '企业名称', index: 'description' },
{ title: '企业名称', index: 'tenantName' },
{ title: '联系人', index: 'description' },
{ title: '联系人电话', index: 'description' },
{ title: '网络货运人', index: 'description' },
{ title: '银行类型', index: 'description' },
{ title: '虚拟账户', index: 'description' },
{ title: '可用余额', index: 'description' },
{ title: '冻结余额', index: 'description' },
{ title: '网络货运人', index: 'ltdid' },
{ title: '银行类型', index: 'bankType', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } },
{ title: '虚拟账户', index: 'virtualAccount' },
{ title: '可用余额', index: 'availableBalance' },
{ title: '冻结余额', index: 'freezeBalance' },
{ title: '累计消费金额', index: 'description' },
{ title: '账户总余额', render: 'description1' },
{ title: '创建时间', index: 'updatedAt', type: 'date', width: 150 },
{ title: '状态', render: 'description1' },
{ title: '账户总余额', render: 'availableBalance' },
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 },
{
title: '状态',
render: 'stateLocked',
type: 'badge',
badge: { 0: { text: '正常', color: 'success' }, 1: { text: '锁定', color: 'warning' } }
},
{
title: '操作',
buttons: [
{
text: '查看明细',
click: item => this.router.navigate(['/financial-management/freight-account/detail/1'])
click: item => this.router.navigate(['/financial-management/freight-account/detail/' + item.id])
}
]
}