This commit is contained in:
Taric Xin
2022-02-11 15:20:43 +08:00
parent 16aebd5930
commit 038e0f5891
17 changed files with 306 additions and 183 deletions

View File

@ -22,11 +22,8 @@
</nz-card>
<nz-card class="content-box">
<st #st [data]="service.$api_get_driver_account_page" [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">
<st #st [data]="service.$api_get_driver_account_page" [columns]="columns" [req]="{ process: beforeReq }"
[loading]="service.http.loading" [scroll]="{ x: '1200px' }">
<ng-template st-row="availableBalance" let-item let-index="index">
<a (click)="showAccountDetail(item)">{{ (parseFloat(item.availableBalance) +
parseFloat(item.freezeBalance)).toFixed(2) | currency}}</a>

View File

@ -119,10 +119,6 @@ export class DriverAccountComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName2 = i;
this.sf?.setValue('/receiveName2', i);
},
visibleIf: {
expand: (value: boolean) => value
}
@ -157,12 +153,12 @@ export class DriverAccountComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '司机姓名', index: 'name' },
{ title: '证件号码', index: 'idNo' },
{ title: '手机号', index: 'phone' },
{ title: '网络货运人', index: 'ltdName' },
{ title: '银行类型', index: 'bankTypeLabel' },
{ title: '虚拟账户', index: 'virtualAccount' },
{ title: '司机姓名', width: 140, index: 'name' },
{ title: '证件号码', width: 140, index: 'idNo' },
{ title: '手机号', width: 140, index: 'phone' },
{ title: '网络货运人', width: 140, index: 'ltdName' },
{ title: '银行类型', width: 120, index: 'bankTypeLabel' },
{ title: '虚拟账户', width: 140, index: 'virtualAccount' },
{
title: '可用余额',
index: 'availableBalance',
@ -187,10 +183,13 @@ export class DriverAccountComponent implements OnInit {
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.withdrawBalance }) }
},
{ title: '账户总余额', render: 'availableBalance', className: 'text-right', width: 180 },
{ title: '账户总余额', render: 'availableBalance', className: 'text-right', width: 180 },
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 },
{
title: '操作',
width: 120,
className: 'text-center',
fixed: 'right',
buttons: [
{
text: '查看明细',

View File

@ -22,11 +22,8 @@
</nz-card>
<nz-card class="content-box">
<st #st [data]="service.$api_get_shipper_account_page" [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">
<st #st [data]="service.$api_get_shipper_account_page" [columns]="columns" [req]="{ process: beforeReq }"
[loading]="service.http.loading" [scroll]="{ x: '1200px' }">
<ng-template st-row="description" let-item let-index="index">
<a (click)="showAccountDetail(item)">{{ (parseFloat(item.availableBalance) +
parseFloat(item.freezeBalance)).toFixed(2) | currency}}</a>

View File

@ -159,12 +159,12 @@ export class FreightAccountComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '企业名称', index: 'tenantName' },
{ title: '联系人', index: 'name' },
{ title: '联系人电话', index: 'phone' },
{ title: '网络货运人', index: 'ltdName' },
{ title: '银行类型', index: 'bankTypeLabel' },
{ title: '虚拟账户', index: 'virtualAccount' },
{ title: '企业名称', width: 140, index: 'tenantName' },
{ title: '联系人', width: 120, index: 'name' },
{ title: '联系人电话', width: 140, index: 'phone' },
{ title: '网络货运人', width: 140, index: 'ltdName' },
{ title: '银行类型',width: 120, index: 'bankTypeLabel' },
{ title: '虚拟账户', width: 140, index: 'virtualAccount' },
{
title: '可用余额',
index: 'availableBalance',
@ -184,17 +184,20 @@ export class FreightAccountComponent implements OnInit {
{
title: '账户总余额',
render: 'description',
width: 140,
className: 'text-right'
},
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 },
{
title: '状态',
index: 'stateDeleted',
type: 'badge',
badge: { 0: { text: '正常', color: 'success' }, 1: { text: '停用', color: 'warning' } }
index: 'stateDeletedLabel',
width: 80,
},
{
title: '操作',
width: 120,
className: 'text-center',
fixed: 'right',
buttons: [
{
text: '查看明细',

View File

@ -1,26 +0,0 @@
<page-header-wrapper title="账户主体">
</page-header-wrapper>
<nz-card class="search-box">
<div nz-row nzGutter="8">
<div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 110,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button>
</div>
</div>
</nz-card>
<nz-card class="content-box">
<st #st [data]="url" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[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" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -1,13 +0,0 @@
:host::ng-deep {
.search-box {
.ant-card-body {
padding-bottom: 18px;
}
}
.content-box {
.ant-card-body {
padding-top: 14px;
}
}
}

View File

@ -1,103 +0,0 @@
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 { SettingFinancialComponent } from './setting-financial/setting-financial.component';
@Component({
selector: 'app-main-account',
templateUrl: './main-account.component.html',
styleUrls: ['./main-account.component.less']
})
export class MainAccountComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
url = `/rule?_allow_anonymous=true`;
searchSchema: SFSchema = {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
receiveName: {
type: 'string',
title: '公司名称',
ui: { placeholder: '请输入' }
},
phone: {
type: 'string',
title: '纳税人识别号',
ui: { placeholder: '请输入' }
}
}
};
columns: STColumn[] = [
{ title: '公司名称', index: 'description' },
{ title: '纳税人识别号', index: 'description' },
{ title: '发票税率', index: 'description' },
{ title: '电子发票账号', index: 'description' },
{ title: 'ETC账号', index: 'description' },
{ title: '电子合同账号', index: 'description' },
{ title: '开户行', index: 'description' },
{ title: '虚拟账户', index: 'description' },
{ title: '附加费比例', index: 'description' },
{
title: '操作',
buttons: [
{
text: '财务设置',
click: item => this.settingFinanical(item)
},
{
text: '合同设置',
click: item => this.routeTo(item)
}
]
}
];
reqParams = { pageIndex: 1, pageSize: 10 };
constructor(public service: SystemService, 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();
}
}

View File

@ -0,0 +1,58 @@
<page-header-wrapper title="平台账户">
</page-header-wrapper>
<nz-card>
<nz-row [nzGutter]="16">
<nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
<nz-statistic [nzValue]="'100,000,000.00 '" nzTitle="平台账户余额"
[nzValueStyle]="{'font-size':'16px','font-weight':'bold'}" class="bold">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
<nz-statistic [nzValue]="'100,000.00 '" [nzTitle]="'货主账户余额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
<nz-statistic [nzValue]="'100,000.00 '" [nzTitle]="'司机账户余额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
<nz-statistic [nzValue]="'100,000.00 '" [nzTitle]="'累计充值金额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
<nz-statistic [nzValue]="'100,000.00 '" [nzTitle]="'货主累计提现金额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="4" [nzLg]="6" [nzSm]="12">
<nz-statistic [nzValue]="'100,000.00 '" [nzTitle]="'司机累计提现金额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic>
</nz-col>
</nz-row>
</nz-card>
<nz-card class="search-box">
<div nz-row nzGutter="8">
<div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 110,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button>
</div>
</div>
</nz-card>
<nz-card class="content-box">
<st #st [data]="url" [columns]="columns" [req]="{ params: reqParams }" [scroll]="{ x: '1200px' }"
[loading]="service.http.loading" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -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)
}
]
}
];
}
}

View File

@ -40,10 +40,7 @@
</div>
</div>
<st #st [data]="service.$api_get_receipt_page" [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] }"
<st #st [data]="service.$api_get_receipt_page" [columns]="columns" [req]="{ process: beforeReq }"
[loading]="service.http.loading" [scroll]="{ x: '1200px' }" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -118,7 +118,8 @@ export class ReceiptOrderComponent implements OnInit {
type: 'string',
title: '收款类型',
ui: {
widget: 'select',
widget: 'dict-select',
params: { dictKey: 'driverrecord:receive:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
@ -129,7 +130,8 @@ export class ReceiptOrderComponent implements OnInit {
type: 'string',
title: '收款方式',
ui: {
widget: 'select',
widget: 'dict-select',
params: { dictKey: 'receive:mode' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value

View File

@ -27,12 +27,14 @@ import { SummaryDetailComponent } from './components/voucher-summary/summary-det
import { VoucherListComponent } from './components/voucher-summary/voucher-list/voucher-list.component';
import { ReceiptOrderDetailComponent } from './components/receipt-order/receipt-order-detail/receipt-order-detail.component';
import { PaymentOrderDetailComponent } from './components/payment-order/payment-order-detail/payment-order-detail.component';
import { PlatformAccountComponent } from './components/platform-account/platform-account.component';
const routes: Routes = [
{ path: 'freight-account', component: FreightAccountComponent },
{ path: 'freight-account', component: FreightAccountComponent, data: { guard: { ability: ['FINANCIAL-FREIGHT-ACOUNT-list'] } } },
{ path: 'freight-account/detail/:id', component: FreightAccountDetailComponent },
{ path: 'driver-account', component: DriverAccountComponent },
{ path: 'driver-account/detail/:id', component: DriverAccountDetailComponent },
{ path: 'platform-account', component: PlatformAccountComponent },
{ path: 'recharge-record', component: RechargeRecordComponent },
{ path: 'withdrawals-record', component: WithdrawalsRecordComponent },
{ path: 'withdrawals-record/detail/:id', component: WithdrawalsDetailComponent },
@ -56,7 +58,7 @@ const routes: Routes = [
{ path: 'receivable-order', component: ReceivableOrderComponent },
{ path: 'receivable-order/detail/:id', component: ReceivableOrderDetailComponent },
{ path: 'payable-order', component: PayableOrderComponent },
{ path: 'payable-order/detail/:id', component: PayableOrderDetailComponent },
{ path: 'payable-order/detail/:id', component: PayableOrderDetailComponent }
];
@NgModule({

View File

@ -8,7 +8,6 @@ import { SharedModule } from '@shared';
import { FinancialManagementRoutingModule } from './financial-managemen-routing.module';
import { FreightAccountDetailComponent } from './components/freight-account/freight-account-detail/freight-account-detail.component';
import { DriverAccountDetailComponent } from './components/driver-account/driver-account-detail/driver-account-detail.component';
import { SettingFinancialComponent } from './components/main-account/setting-financial/setting-financial.component';
import { WithdrawalsDetailComponent } from './components/withdrawals-record/withdrawals-detail/withdrawals-detail.component';
import { CostManagementComponent } from './components/cost-management/cost-management.component';
import { AbnormalGoldComponent } from './components/abnormal-gold/abnormal-gold.component';
@ -31,6 +30,8 @@ import { SummaryDetailComponent } from './components/voucher-summary/summary-det
import { PaymentOrderDetailComponent } from './components/payment-order/payment-order-detail/payment-order-detail.component';
import { VoucherListComponent } from './components/voucher-summary/voucher-list/voucher-list.component';
import { ReceiptOrderDetailComponent } from './components/receipt-order/receipt-order-detail/receipt-order-detail.component';
import { PlatformAccountComponent } from './components/platform-account/platform-account.component';
import { SettingFinancialComponent } from './components/platform-account/setting-financial/setting-financial.component';
const ROUTESCOMPONENTS = [
FreightAccountComponent,
@ -54,13 +55,17 @@ const ROUTESCOMPONENTS = [
ReceivableOrderComponent,
PayableOrderComponent,
ReceivableOrderDetailComponent,
PayableOrderDetailComponent
PayableOrderDetailComponent,
PlatformAccountComponent,
PaymentOrderDetailComponent,
VoucherListComponent,
ReceiptOrderDetailComponent
];
const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, SettingFinancialComponent, ClearingModalComponent];
@NgModule({
declarations: [...ROUTESCOMPONENTS, ...NOTROUTECOMPONENTS, PaymentOrderDetailComponent, VoucherListComponent, ReceiptOrderDetailComponent],
declarations: [...ROUTESCOMPONENTS, ...NOTROUTECOMPONENTS],
imports: [CommonModule, FinancialManagementRoutingModule, SharedModule]
})
export class FinancialManagementModule {}

View File

@ -274,6 +274,10 @@
"hide": true,
"link": "/financial-management/freight-account/detail/:id"
},
{
"text": "平台账户",
"link": "/financial-management/platform-account"
},
{
"text": "司机账户",
"link": "/financial-management/driver-account"