diff --git a/src/app/routes/financial-management/components/driver-account/driver-account.component.html b/src/app/routes/financial-management/components/driver-account/driver-account.component.html index 3bd0c921..48f0dd3c 100644 --- a/src/app/routes/financial-management/components/driver-account/driver-account.component.html +++ b/src/app/routes/financial-management/components/driver-account/driver-account.component.html @@ -22,11 +22,8 @@ - + {{ (parseFloat(item.availableBalance) + parseFloat(item.freezeBalance)).toFixed(2) | currency}} diff --git a/src/app/routes/financial-management/components/driver-account/driver-account.component.ts b/src/app/routes/financial-management/components/driver-account/driver-account.component.ts index 4b4c24b8..71895d39 100644 --- a/src/app/routes/financial-management/components/driver-account/driver-account.component.ts +++ b/src/app/routes/financial-management/components/driver-account/driver-account.component.ts @@ -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: '查看明细', diff --git a/src/app/routes/financial-management/components/freight-account/freight-account.component.html b/src/app/routes/financial-management/components/freight-account/freight-account.component.html index 443fc0e8..6af871f4 100644 --- a/src/app/routes/financial-management/components/freight-account/freight-account.component.html +++ b/src/app/routes/financial-management/components/freight-account/freight-account.component.html @@ -22,11 +22,8 @@ - + {{ (parseFloat(item.availableBalance) + parseFloat(item.freezeBalance)).toFixed(2) | currency}} diff --git a/src/app/routes/financial-management/components/freight-account/freight-account.component.ts b/src/app/routes/financial-management/components/freight-account/freight-account.component.ts index 0a3f4c01..63daa1e8 100644 --- a/src/app/routes/financial-management/components/freight-account/freight-account.component.ts +++ b/src/app/routes/financial-management/components/freight-account/freight-account.component.ts @@ -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: '查看明细', diff --git a/src/app/routes/financial-management/components/main-account/main-account.component.html b/src/app/routes/financial-management/components/main-account/main-account.component.html deleted file mode 100644 index 9d6c0a9f..00000000 --- a/src/app/routes/financial-management/components/main-account/main-account.component.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - -
-
- -
-
- - - -
-
-
- - - - - \ No newline at end of file diff --git a/src/app/routes/financial-management/components/main-account/main-account.component.less b/src/app/routes/financial-management/components/main-account/main-account.component.less deleted file mode 100644 index 607d94b6..00000000 --- a/src/app/routes/financial-management/components/main-account/main-account.component.less +++ /dev/null @@ -1,13 +0,0 @@ -:host::ng-deep { - .search-box { - .ant-card-body { - padding-bottom: 18px; - } - } - - .content-box { - .ant-card-body { - padding-top: 14px; - } - } -} \ No newline at end of file diff --git a/src/app/routes/financial-management/components/main-account/main-account.component.ts b/src/app/routes/financial-management/components/main-account/main-account.component.ts deleted file mode 100644 index d15f1d0b..00000000 --- a/src/app/routes/financial-management/components/main-account/main-account.component.ts +++ /dev/null @@ -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(); - } -} diff --git a/src/app/routes/financial-management/components/platform-account/platform-account.component.html b/src/app/routes/financial-management/components/platform-account/platform-account.component.html new file mode 100644 index 00000000..0b41934c --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/platform-account.component.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+
+ + + + + \ No newline at end of file diff --git a/src/app/routes/financial-management/components/platform-account/platform-account.component.ts b/src/app/routes/financial-management/components/platform-account/platform-account.component.ts new file mode 100644 index 00000000..441b99dd --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/platform-account.component.ts @@ -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) + } + ] + } + ]; + } +} diff --git a/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.html b/src/app/routes/financial-management/components/platform-account/setting-financial/setting-financial.component.html similarity index 100% rename from src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.html rename to src/app/routes/financial-management/components/platform-account/setting-financial/setting-financial.component.html diff --git a/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.less b/src/app/routes/financial-management/components/platform-account/setting-financial/setting-financial.component.less similarity index 100% rename from src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.less rename to src/app/routes/financial-management/components/platform-account/setting-financial/setting-financial.component.less diff --git a/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.ts b/src/app/routes/financial-management/components/platform-account/setting-financial/setting-financial.component.ts similarity index 100% rename from src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.ts rename to src/app/routes/financial-management/components/platform-account/setting-financial/setting-financial.component.ts diff --git a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html index cbe2eb88..fc27ab71 100644 --- a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html +++ b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html @@ -40,10 +40,7 @@ -
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts index b3de66df..d1eb05f1 100644 --- a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts +++ b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts @@ -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 diff --git a/src/app/routes/financial-management/financial-managemen-routing.module.ts b/src/app/routes/financial-management/financial-managemen-routing.module.ts index aa3c0756..833e9c16 100644 --- a/src/app/routes/financial-management/financial-managemen-routing.module.ts +++ b/src/app/routes/financial-management/financial-managemen-routing.module.ts @@ -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({ diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts index d1f513ce..df932fdb 100644 --- a/src/app/routes/financial-management/financial-management.module.ts +++ b/src/app/routes/financial-management/financial-management.module.ts @@ -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 {} diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index f9f3d571..8e5e74af 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -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"