From b5262f5a26eb1fa20f4144435589fb6bd698a74b Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 7 Dec 2021 19:39:28 +0800 Subject: [PATCH] edit --- proxy.conf.js | 8 +- src/app/core/core.module.ts | 3 +- src/app/core/guards/token.guard.ts | 40 +++ src/app/core/index.ts | 2 + src/app/core/startup/startup.service.ts | 8 +- .../driver-account-detail.component.html | 57 +++++ .../driver-account-detail.component.less | 28 +++ .../driver-account-detail.component.ts | 164 +++++++++++++ .../driver-account.component.html | 31 +++ .../driver-account.component.less | 29 +++ .../driver-account.component.ts | 112 +++++++++ .../freight-account-detail.component.html | 54 +++++ .../freight-account-detail.component.less | 28 +++ .../freight-account-detail.component.ts | 181 ++++++++++++++ .../freight-account.component.html | 46 ++++ .../freight-account.component.less | 29 +++ .../freight-account.component.ts | 148 ++++++++++++ .../main-account/main-account.component.html | 26 ++ .../main-account/main-account.component.less | 13 + .../main-account/main-account.component.ts | 89 +++++++ .../recharge-record.component.html | 49 ++++ .../recharge-record.component.less | 28 +++ .../recharge-record.component.ts | 157 ++++++++++++ .../withdrawals-record.component.html | 78 ++++++ .../withdrawals-record.component.less | 22 ++ .../withdrawals-record.component.ts | 227 ++++++++++++++++++ .../financial-managemen-routing.module.ts | 25 ++ .../financial-management.module.ts | 27 +++ src/app/routes/routes-routing.module.ts | 4 + .../shared/services/business/user.service.ts | 7 +- src/assets/mocks/menu-data.json | 48 +++- src/conf/sys.conf.ts | 2 +- 32 files changed, 1752 insertions(+), 18 deletions(-) create mode 100644 src/app/core/guards/token.guard.ts create mode 100644 src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html create mode 100644 src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.less create mode 100644 src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.ts create mode 100644 src/app/routes/financial-management/components/driver-account/driver-account.component.html create mode 100644 src/app/routes/financial-management/components/driver-account/driver-account.component.less create mode 100644 src/app/routes/financial-management/components/driver-account/driver-account.component.ts create mode 100644 src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.html create mode 100644 src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.less create mode 100644 src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts create mode 100644 src/app/routes/financial-management/components/freight-account/freight-account.component.html create mode 100644 src/app/routes/financial-management/components/freight-account/freight-account.component.less create mode 100644 src/app/routes/financial-management/components/freight-account/freight-account.component.ts create mode 100644 src/app/routes/financial-management/components/main-account/main-account.component.html create mode 100644 src/app/routes/financial-management/components/main-account/main-account.component.less create mode 100644 src/app/routes/financial-management/components/main-account/main-account.component.ts create mode 100644 src/app/routes/financial-management/components/recharge-record/recharge-record.component.html create mode 100644 src/app/routes/financial-management/components/recharge-record/recharge-record.component.less create mode 100644 src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts create mode 100644 src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html create mode 100644 src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.less create mode 100644 src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts create mode 100644 src/app/routes/financial-management/financial-managemen-routing.module.ts create mode 100644 src/app/routes/financial-management/financial-management.module.ts diff --git a/proxy.conf.js b/proxy.conf.js index 8efd28ae..34ec1aef 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -14,11 +14,11 @@ module.exports = { // secure: false, // Ignore invalid SSL certificates // changeOrigin: true // } - '//cuc': { + '//api': { target: { - host: '172.30.9.44', - protocol: 'http:', - port: 8003 + host: 'tms-api-test.eascs.com', + protocol: 'https:', + port: 443 }, secure: false, changeOrigin: true, diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts index 58522fc1..777d8016 100644 --- a/src/app/core/core.module.ts +++ b/src/app/core/core.module.ts @@ -1,9 +1,10 @@ import { NgModule, Optional, SkipSelf } from '@angular/core'; +import { EATokenGuard } from './guards/token.guard'; import { throwIfAlreadyLoaded } from './module-import-guard'; @NgModule({ - providers: [] + providers: [EATokenGuard] }) export class CoreModule { constructor(@Optional() @SkipSelf() parentModule: CoreModule) { diff --git a/src/app/core/guards/token.guard.ts b/src/app/core/guards/token.guard.ts new file mode 100644 index 00000000..061317cf --- /dev/null +++ b/src/app/core/guards/token.guard.ts @@ -0,0 +1,40 @@ +import { Inject, Injectable, Injector } from '@angular/core'; +import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router'; +import { sysConf } from '@conf/sys.conf'; +import { CoreService } from '@core'; +import { ACLGuard, ACLService } from '@delon/acl'; +import { EAUserService } from '@shared'; +import { Observable, of } from 'rxjs'; + +@Injectable() +export class EATokenGuard extends ACLGuard { + constructor(srv: ACLService, router: Router, private eaUserSrv: CoreService, private router2: Router, private inject: Injector) { + super(srv, router, inject); + } + + canActivate(route: ActivatedRouteSnapshot, _state: RouterStateSnapshot | null): Observable { + const canOpen = this.eaUserSrv.loginStatus; + if (!canOpen) { + this.router2.navigate([sysConf.login_url], { + queryParams: { + returnUrl: _state?.url + } + }); + return of(!canOpen); + } + return super.canActivate(route, _state); + } + + canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { + const canOpen = this.eaUserSrv.loginStatus; + if (!canOpen) { + this.router2.navigate([sysConf.login_url], { + queryParams: { + returnUrl: state?.url + } + }); + return of(!canOpen); + } + return super.canActivateChild(childRoute, state); + } +} diff --git a/src/app/core/index.ts b/src/app/core/index.ts index ebf89ced..9f525334 100644 --- a/src/app/core/index.ts +++ b/src/app/core/index.ts @@ -5,3 +5,5 @@ export * from './net/business.interceptor'; // Services export * from './core.service'; export * from './startup/startup.service'; + +export * from './guards/token.guard'; diff --git a/src/app/core/startup/startup.service.ts b/src/app/core/startup/startup.service.ts index b331af95..9f8fb87b 100644 --- a/src/app/core/startup/startup.service.ts +++ b/src/app/core/startup/startup.service.ts @@ -36,9 +36,9 @@ export class StartupService { let data; if (this.coreSrv.loginStatus) { // 本地菜单 - // data = this.loadMockData(); + data = this.loadMockData(); // 远程菜单 - data = this.loadRemoteData(); + // data = this.loadRemoteData(); } else { data = this.loadMockData(); } @@ -94,9 +94,7 @@ export class StartupService { const appData = this.httpClient.get(`assets/mocks/app-data.json`).pipe(map((res: any) => res.app)); // 用户数据 - const userData = this.coreSrv.loginStatus - ? this.httpClient.post(this.coreSrv.$api_get_current_user_info, {}).pipe(map((res: any) => res.data)) - : this.httpClient.get('assets/mocks/user-data.json').pipe(map((res: any) => res.user)); + const userData = this.httpClient.get('assets/mocks/user-data.json').pipe(map((res: any) => res.user)); // 菜单数据 const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.menu)); diff --git a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html new file mode 100644 index 00000000..cf9863d6 --- /dev/null +++ b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.less b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.less new file mode 100644 index 00000000..97e3643e --- /dev/null +++ b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.less @@ -0,0 +1,28 @@ +:host::ng-deep { + .search-box { + .ant-card-body { + padding-bottom: 18px; + } + } + + .content-box { + .ant-card-body { + padding-top: 16px; + } + } + + nz-range-picker { + width: 100%; + } +} + +.expend-options { + margin-top: 0px; +} + +@media (min-width: 990px) { + .expend-options { + margin-top: -40px; + } + +} \ No newline at end of file diff --git a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.ts b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.ts new file mode 100644 index 00000000..c5ac8063 --- /dev/null +++ b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.ts @@ -0,0 +1,164 @@ +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 { TicketService } from 'src/app/routes/ticket-management/services/system.service'; + +@Component({ + selector: 'app-driver-account-detail', + templateUrl: './driver-account-detail.component.html', + styleUrls: ['./driver-account-detail.component.less'] +}) +export class DriverAccountDetailComponent implements OnInit { + url = `/rule?_allow_anonymous=true`; + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + columns: STColumn[] = [ + { title: '交易时间', index: 'updatedAt', type: 'date' }, + { title: '流水号', index: 'callNo' }, + { title: '交易类型', index: 'callNo' }, + { title: '订单号', index: 'callNo' }, + { title: '所属项目', index: 'callNo' }, + { title: '收支类型', index: 'callNo' }, + { title: '交易金额', index: 'callNo' }, + { title: '账户余额', index: 'callNo' }, + { title: '无车承运人', index: 'callNo' } + ]; + searchSchema: SFSchema = { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + createTime: { + title: '交易时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + orderSn2: { + type: 'string', + title: '流水号', + ui: { + placeholder: '请输入', + autocomplete: 'off' + } + }, + orderSn3: { + type: 'string', + title: '订单号', + ui: { + placeholder: '请输入', + autocomplete: 'off' + } + }, + receiveName: { + type: 'string', + title: '交易类型', + enum: [ + { label: '全部', value: '' }, + { label: '订单支付', value: '订单支付' }, + { label: '余额充值', value: '余额充值' }, + { label: '余额提现', value: '余额提现' }, + { label: '资金分配', value: '资金分配' }, + { label: '资金回收', value: '资金回收' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName = i; + this.sf?.setValue('/receiveName', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + }, + receiveName2: { + type: 'string', + title: '收支类型', + enum: [ + { label: '全部', value: '' }, + { label: '收入', value: '收入' }, + { label: '支出', value: '支出' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName2 = i; + this.sf?.setValue('/receiveName2', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + }, + receiveName4: { + type: 'string', + title: '无车承运人', + enum: [{ label: '全部', value: '' }], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName4 = i; + this.sf?.setValue('/receiveName4', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + } + } + }; + + reqParams = {}; + _$expand = false; + constructor(public service: TicketService) {} + + ngOnInit(): void {} + + stChange(e: STChange): void { + switch (e.type) { + case 'filter': + this.st.load(); + break; + } + } + + goBack() { + history.go(-1); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } +} 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 new file mode 100644 index 00000000..e422109b --- /dev/null +++ b/src/app/routes/financial-management/components/driver-account/driver-account.component.html @@ -0,0 +1,31 @@ + + + + +
+
+ +
+
+ + + + +
+
+
+ + + + + \ No newline at end of file diff --git a/src/app/routes/financial-management/components/driver-account/driver-account.component.less b/src/app/routes/financial-management/components/driver-account/driver-account.component.less new file mode 100644 index 00000000..f8d28003 --- /dev/null +++ b/src/app/routes/financial-management/components/driver-account/driver-account.component.less @@ -0,0 +1,29 @@ +:host::ng-deep { + .search-box { + .ant-card-body { + padding-bottom: 18px; + } + } + + .content-box { + .ant-card-body { + padding-top: 14px; + } + } + + nz-range-picker { + width: 100%; + } +} + +.expend-options { + margin-top: 0px; +} + + +@media (min-width: 1200px) { + .expend-options { + margin-top: -40px; + } + +} \ No newline at end of file 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 new file mode 100644 index 00000000..e5b5dff8 --- /dev/null +++ b/src/app/routes/financial-management/components/driver-account/driver-account.component.ts @@ -0,0 +1,112 @@ +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 { SystemService } from 'src/app/routes/sys-setting/services/system.service'; + +@Component({ + selector: 'app-driver-account', + templateUrl: './driver-account.component.html', + styleUrls: ['./driver-account.component.less'] +}) +export class DriverAccountComponent 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: '请输入' } + }, + page: { + type: 'string', + title: '手机号', + ui: { + placeholder: '请输入' + } + }, + createTime: { + title: '创建时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + } + } + }; + + columns: STColumn[] = [ + { title: '司机姓名', index: 'description' }, + { title: '证件号码', index: 'description' }, + { title: '手机号', index: 'description' }, + { title: '账户余额', index: 'description' }, + { title: '油卡余额', index: 'description' }, + { title: '创建时间', index: 'updatedAt', type: 'date' }, + { + title: '操作', + buttons: [ + { + text: '查看明细', + click: item => this.routeTo(item) + } + ] + } + ]; + reqParams = { pageIndex: 1, pageSize: 10 }; + _$expand = false; + + constructor(public service: SystemService, private router: Router) {} + + ngOnInit(): void {} + + stChange(e: STChange): void { + switch (e.type) { + case 'filter': + this.st.load(); + break; + } + } + + routeTo(item?: any) { + this.router.navigate(['/financial-management/driver-account-detail/1']); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } +} diff --git a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.html b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.html new file mode 100644 index 00000000..4217e361 --- /dev/null +++ b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.less b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.less new file mode 100644 index 00000000..97e3643e --- /dev/null +++ b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.less @@ -0,0 +1,28 @@ +:host::ng-deep { + .search-box { + .ant-card-body { + padding-bottom: 18px; + } + } + + .content-box { + .ant-card-body { + padding-top: 16px; + } + } + + nz-range-picker { + width: 100%; + } +} + +.expend-options { + margin-top: 0px; +} + +@media (min-width: 990px) { + .expend-options { + margin-top: -40px; + } + +} \ No newline at end of file diff --git a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts new file mode 100644 index 00000000..ee5d32b1 --- /dev/null +++ b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts @@ -0,0 +1,181 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { STComponent, STColumn, STChange } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { TicketService } from 'src/app/routes/ticket-management/services/system.service'; + +@Component({ + selector: 'app-freight-account-detail', + templateUrl: './freight-account-detail.component.html', + styleUrls: ['./freight-account-detail.component.less'] +}) +export class FreightAccountDetailComponent implements OnInit { + url = `/rule?_allow_anonymous=true`; + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + columns: STColumn[] = [ + { title: '交易时间', index: 'updatedAt', type: 'date' }, + { title: '流水号', index: 'callNo' }, + { title: '交易类型', index: 'callNo' }, + { title: '订单号', index: 'callNo' }, + { title: '所属项目', index: 'callNo' }, + { title: '收支类型', index: 'callNo' }, + { title: '交易金额', index: 'callNo' }, + { title: '账户余额', index: 'callNo' }, + { title: '无车承运人', index: 'callNo' } + ]; + searchSchema: SFSchema = { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + createTime: { + title: '交易时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + orderSn2: { + type: 'string', + title: '流水号', + ui: { + placeholder: '请输入', + autocomplete: 'off' + } + }, + orderSn3: { + type: 'string', + title: '订单号', + ui: { + placeholder: '请输入', + autocomplete: 'off' + } + }, + receiveName: { + type: 'string', + title: '交易类型', + enum: [ + { label: '全部', value: '' }, + { label: '订单支付', value: '订单支付' }, + { label: '余额充值', value: '余额充值' }, + { label: '余额提现', value: '余额提现' }, + { label: '资金分配', value: '资金分配' }, + { label: '资金回收', value: '资金回收' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName = i; + this.sf?.setValue('/receiveName', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + }, + receiveName2: { + type: 'string', + title: '收支类型', + enum: [ + { label: '全部', value: '' }, + { label: '收入', value: '收入' }, + { label: '支出', value: '支出' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName2 = i; + this.sf?.setValue('/receiveName2', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + }, + receiveName3: { + type: 'string', + title: '所属项目', + enum: [{ label: '全部', value: '' }], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName3 = i; + this.sf?.setValue('/receiveName3', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + }, + receiveName4: { + type: 'string', + title: '无车承运人', + enum: [{ label: '全部', value: '' }], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName4 = i; + this.sf?.setValue('/receiveName4', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + } + } + }; + + reqParams = {}; + _$expand = false; + constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} + + ngOnInit(): void {} + + stChange(e: STChange): void { + switch (e.type) { + case 'filter': + this.st.load(); + break; + } + } + + goBack() { + history.go(-1); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } +} 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 new file mode 100644 index 00000000..064cb300 --- /dev/null +++ b/src/app/routes/financial-management/components/freight-account/freight-account.component.html @@ -0,0 +1,46 @@ + + + + +
+
+ +
+
+ + + + +
+
+
+ + + + + {{item.callNo}} + + + + + + + + {{item.callNo}} + + + \ No newline at end of file diff --git a/src/app/routes/financial-management/components/freight-account/freight-account.component.less b/src/app/routes/financial-management/components/freight-account/freight-account.component.less new file mode 100644 index 00000000..f8d28003 --- /dev/null +++ b/src/app/routes/financial-management/components/freight-account/freight-account.component.less @@ -0,0 +1,29 @@ +:host::ng-deep { + .search-box { + .ant-card-body { + padding-bottom: 18px; + } + } + + .content-box { + .ant-card-body { + padding-top: 14px; + } + } + + nz-range-picker { + width: 100%; + } +} + +.expend-options { + margin-top: 0px; +} + + +@media (min-width: 1200px) { + .expend-options { + margin-top: -40px; + } + +} \ No newline at end of file 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 new file mode 100644 index 00000000..74eca6e4 --- /dev/null +++ b/src/app/routes/financial-management/components/freight-account/freight-account.component.ts @@ -0,0 +1,148 @@ +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 { SystemService } from 'src/app/routes/sys-setting/services/system.service'; + +@Component({ + selector: 'app-freight-account', + templateUrl: './freight-account.component.html', + styleUrls: ['./freight-account.component.less'] +}) +export class FreightAccountComponent implements OnInit { + @ViewChild('accountModal', { static: true }) + accountModal: any; + @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: '请输入' } + }, + page: { + type: 'string', + title: '联系人电话', + ui: { + placeholder: '请输入' + } + }, + createTime: { + title: '创建时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + receiveName2: { + type: 'string', + title: '无车承运人', + enum: [{ label: '全部', value: '全部' }], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName2 = i; + this.sf?.setValue('/receiveName2', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + } + } + } + }; + + columns: STColumn[] = [ + { title: '企业名称', index: 'description' }, + { title: '统一社会信用代码', index: 'description' }, + { title: '联系人', index: 'description' }, + { title: '联系人电话', index: 'description' }, + { title: '累计消费金额', index: 'description' }, + { title: '账户余额', render: 'description1' }, + { title: '创建时间', index: 'updatedAt', type: 'date' }, + { + title: '操作', + buttons: [ + { + text: '查看明细', + click: item => this.routeTo(item) + } + ] + } + ]; + selectedRows: any[] = []; + + reqParams = { pageIndex: 1, pageSize: 10 }; + _$expand = false; + + accountList = [{ description: 222 }, { description: 222 }, { description: 222 }]; + constructor(public service: SystemService, private nzModalService: NzModalService, private router: Router) {} + + ngOnInit(): void {} + + stChange(e: STChange): void { + switch (e.type) { + case 'checkbox': + this.selectedRows = e.checkbox!; + break; + case 'filter': + this.st.load(); + break; + } + } + + showAccount(item: any) { + const modal = this.nzModalService.create({ + nzTitle: '账户明细', + nzContent: this.accountModal, + nzFooter: [] + }); + modal.afterClose.subscribe(res => { + this.st.load(); + }); + } + + routeTo(item?: any) { + this.router.navigate(['/financial-management/freight-account-detail/1']); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } +} 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 new file mode 100644 index 00000000..d77a59d2 --- /dev/null +++ b/src/app/routes/financial-management/components/main-account/main-account.component.html @@ -0,0 +1,26 @@ + + + + +
+
+ +
+
+ + + +
+
+
+ + + + + \ 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 new file mode 100644 index 00000000..607d94b6 --- /dev/null +++ b/src/app/routes/financial-management/components/main-account/main-account.component.less @@ -0,0 +1,13 @@ +: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 new file mode 100644 index 00000000..0b59dd38 --- /dev/null +++ b/src/app/routes/financial-management/components/main-account/main-account.component.ts @@ -0,0 +1,89 @@ +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 { SystemService } from 'src/app/routes/sys-setting/services/system.service'; + +@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.routeTo(item) + }, + { + text: '合同设置', + click: item => this.routeTo(item) + } + ] + } + ]; + reqParams = { pageIndex: 1, pageSize: 10 }; + + constructor(public service: SystemService, private router: Router) {} + + ngOnInit(): void {} + + stChange(e: STChange): void { + switch (e.type) { + case 'filter': + this.st.load(); + break; + } + } + + 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/recharge-record/recharge-record.component.html b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html new file mode 100644 index 00000000..7e99d504 --- /dev/null +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.less b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.less new file mode 100644 index 00000000..97e3643e --- /dev/null +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.less @@ -0,0 +1,28 @@ +:host::ng-deep { + .search-box { + .ant-card-body { + padding-bottom: 18px; + } + } + + .content-box { + .ant-card-body { + padding-top: 16px; + } + } + + nz-range-picker { + width: 100%; + } +} + +.expend-options { + margin-top: 0px; +} + +@media (min-width: 990px) { + .expend-options { + margin-top: -40px; + } + +} \ No newline at end of file diff --git a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts new file mode 100644 index 00000000..2b0e69aa --- /dev/null +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts @@ -0,0 +1,157 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STComponent, STColumn, STChange } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { TicketService } from 'src/app/routes/ticket-management/services/system.service'; + +@Component({ + selector: 'app-recharge-record', + templateUrl: './recharge-record.component.html', + styleUrls: ['./recharge-record.component.less'] +}) +export class RechargeRecordComponent implements OnInit { + url = `/rule?_allow_anonymous=true`; + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + columns: STColumn[] = [ + { title: '充值时间', index: 'updatedAt', type: 'date' }, + { title: '充值单号', index: 'callNo' }, + { title: '账户主体', index: 'callNo' }, + { title: '账户名称', index: 'callNo' }, + { title: '虚拟账户', index: 'callNo' }, + { title: '账户类型', index: 'callNo' }, + { title: '充值金额', index: 'callNo' }, + { title: '充值方式', index: 'callNo' }, + { title: '充值状态', index: 'callNo' }, + { title: '银行流水号', index: 'callNo' } + ]; + searchSchema: SFSchema = { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + orderSn2: { + type: 'string', + title: '充值单号', + ui: { + placeholder: '请输入', + autocomplete: 'off' + } + }, + receiveName: { + type: 'string', + title: '充值状态', + enum: [ + { label: '全部', value: '' }, + { label: '充值中', value: '充值中' }, + { label: '已完成', value: '已完成' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName = i; + this.sf?.setValue('/receiveName', i); + } + }, + default: '' + }, + createTime: { + title: '充值时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd' + } as SFDateWidgetSchema + }, + orderSn3: { + type: 'string', + title: '账户名称', + ui: { + placeholder: '请输入', + autocomplete: 'off', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + receiveName2: { + type: 'string', + title: '账户类型', + enum: [ + { label: '全部', value: '' }, + { label: '个人', value: '个人' }, + { label: '企业', value: '企业' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName2 = i; + this.sf?.setValue('/receiveName2', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + }, + receiveName4: { + type: 'string', + title: '账户主体', + enum: [{ label: '全部', value: '' }], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName4 = i; + this.sf?.setValue('/receiveName4', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + } + } + }; + + reqParams = {}; + _$expand = false; + constructor(public service: TicketService) {} + + ngOnInit(): void {} + + stChange(e: STChange): void { + switch (e.type) { + case 'filter': + this.st.load(); + break; + } + } + + goBack() { + history.go(-1); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } +} diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html new file mode 100644 index 00000000..e54a033b --- /dev/null +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + +
+
+
+ + + + + + + + + +
+ +
+ 已选择 + {{ selectedRows.length }} 条数据   累计提现 {{ + totalCallNo }} + 清空 +
+
+ + +
+ + +
+
+ + + +
+
+
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.less b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.less new file mode 100644 index 00000000..d8a7024c --- /dev/null +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.less @@ -0,0 +1,22 @@ +:host::ng-deep { + .search-box { + .ant-card-body { + padding-bottom: 18px; + } + } + + .content-box { + .ant-card-body { + padding-top: 0; + } + } + + nz-range-picker { + width: 100%; + } + + .ant-tabs-tab-btn { + padding-left : 16px; + padding-right: 16px; + } +} diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts new file mode 100644 index 00000000..f802b078 --- /dev/null +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts @@ -0,0 +1,227 @@ +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 { TicketService } from 'src/app/routes/ticket-management/services/system.service'; + +@Component({ + selector: 'app-withdrawals-record', + templateUrl: './withdrawals-record.component.html', + styleUrls: ['./withdrawals-record.component.less'] +}) +export class WithdrawalsRecordComponent implements OnInit { + url = `/rule?_allow_anonymous=true`; + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + @ViewChild('auditModal', { static: false }) + auditModal!: any; + columns: STColumn[] = [ + { title: '', index: 'key', type: 'checkbox' }, + { title: '提现时间', index: 'no' }, + { title: '提现单号', index: 'callNo' }, + { title: '账户主体', index: 'callNo' }, + { title: '账户名称', index: 'callNo' }, + { title: '虚拟账户', index: 'callNo' }, + { title: '账户类型', index: 'callNo' }, + { title: '提现金额', index: 'callNo' }, + { title: '提现手续费', index: 'callNo' }, + { title: '银行账户', index: 'callNo' }, + { title: '提现状态', index: 'callNo' }, + { + title: '操作', + buttons: [ + { + text: '审核', + click: item => this.auditAction(item) + }, + { + text: '详情', + click: item => this.routeTo(item) + } + ] + } + ]; + searchSchema: SFSchema = { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + orderSn: { + type: 'string', + title: '提现单号', + ui: { + autocomplete: 'off' + } + }, + receiveName: { + type: 'string', + title: '提现状态', + enum: [ + { label: '全部', value: '全部' }, + { label: '待审核', value: '待审核' }, + { label: '处理中', value: '处理中' }, + { label: '已完成', value: '已完成' }, + { label: '已拒绝', value: '已拒绝' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName = i; + this.sf?.setValue('/receiveName', i); + } + } + }, + createTime: { + title: '提现时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd' + } as SFDateWidgetSchema + }, + orderSn2: { + type: 'string', + title: '账户名称', + ui: { + placeholder: '请输入', + autocomplete: 'off', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + receiveName2: { + type: 'string', + title: '账户类型', + enum: [ + { label: '全部', value: '全部' }, + { label: '个人', value: '个人' }, + { label: '企业', value: '企业' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName2 = i; + this.sf?.setValue('/receiveName2', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + } + }, + receiveName3: { + type: 'string', + title: '账户主体', + enum: [{ label: '全部', value: '全部' }], + ui: { + widget: 'select', + placeholder: '请选择', + change: (i: any) => { + this.sf.value.receiveName3 = i; + this.sf?.setValue('/receiveName3', i); + }, + visibleIf: { + expand: (value: boolean) => value + } + } + } + } + }; + + reqParams = {}; + + _$expand = false; + + selectedRows: any[] = []; + totalCallNo = 0; + constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} + + ngOnInit(): void {} + + stChange(e: STChange): void { + switch (e.type) { + case 'checkbox': + this.selectedRows = e.checkbox!; + this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0); + break; + case 'filter': + this.st.load(); + break; + } + } + + approval(): void {} + + add(): void {} + + routeTo(item: any) { + this.router.navigate(['/ticket/invoice-requested-detail/1']); + } + + auditAction(item: any) { + const modal = this.nzModalService.create({ + nzTitle: '审核', + nzContent: this.auditModal, + nzFooter: [ + { + label: '拒绝', + type: 'default', + onClick: () => { + modal.destroy(); + } + }, + { + label: '通过', + type: 'primary', + onClick: () => { + modal.destroy(); + } + } + ] + }); + modal.afterClose.subscribe(res => { + this.st.load(); + }); + } + + showReason(item: any) { + const modal = this.nzModalService.create({ + nzTitle: '查看原因', + nzContent: '运单数据异常,暂时无法开票,请联系客服400-xxxx-xxxx', + nzFooter: [ + { + label: '关闭', + type: 'primary', + onClick: () => { + modal.destroy(); + } + } + ] + }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } +} diff --git a/src/app/routes/financial-management/financial-managemen-routing.module.ts b/src/app/routes/financial-management/financial-managemen-routing.module.ts new file mode 100644 index 00000000..4bc5c3c7 --- /dev/null +++ b/src/app/routes/financial-management/financial-managemen-routing.module.ts @@ -0,0 +1,25 @@ +import { FreightAccountComponent } from './components/freight-account/freight-account.component'; +import { DriverAccountComponent } from './components/driver-account/driver-account.component'; +import { RechargeRecordComponent } from './components/recharge-record/recharge-record.component'; +import { WithdrawalsRecordComponent } from './components/withdrawals-record/withdrawals-record.component'; +import { MainAccountComponent } from './components/main-account/main-account.component'; +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +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'; + +const routes: Routes = [ + { path: 'freight-account', component: FreightAccountComponent }, + { path: 'freight-account-detail/:id', component: FreightAccountDetailComponent }, + { path: 'driver-account', component: DriverAccountComponent }, + { path: 'driver-account-detail/:id', component: DriverAccountDetailComponent }, + { path: 'recharge-record', component: RechargeRecordComponent }, + { path: 'withdrawals-record', component: WithdrawalsRecordComponent }, + { path: 'main-account', component: MainAccountComponent } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class FinancialManagementRoutingModule {} diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts new file mode 100644 index 00000000..14b718e6 --- /dev/null +++ b/src/app/routes/financial-management/financial-management.module.ts @@ -0,0 +1,27 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FreightAccountComponent } from './components/freight-account/freight-account.component'; +import { DriverAccountComponent } from './components/driver-account/driver-account.component'; +import { RechargeRecordComponent } from './components/recharge-record/recharge-record.component'; +import { WithdrawalsRecordComponent } from './components/withdrawals-record/withdrawals-record.component'; +import { MainAccountComponent } from './components/main-account/main-account.component'; +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'; + +const ROUTESCOMPONENTS = [ + FreightAccountComponent, + DriverAccountComponent, + RechargeRecordComponent, + WithdrawalsRecordComponent, + MainAccountComponent +]; + +const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent]; + +@NgModule({ + declarations: [...ROUTESCOMPONENTS, ...NOTROUTECOMPONENTS], + imports: [CommonModule, FinancialManagementRoutingModule, SharedModule] +}) +export class FinancialManagementModule {} diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index 930bd03e..3872b60b 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -10,6 +10,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; // layout import { LayoutProComponent } from '@brand'; +import { EATokenGuard } from '@core'; import { environment } from '@env/environment'; // dashboard pages @@ -19,6 +20,8 @@ const routes: Routes = [ { path: '', component: LayoutProComponent, + canActivate: [EATokenGuard], + canActivateChild: [EATokenGuard], children: [ { path: '', redirectTo: 'dashboard', pathMatch: 'full' }, { path: 'dashboard', component: DashboardComponent }, @@ -38,6 +41,7 @@ const routes: Routes = [ { path: 'supply-management', loadChildren: () => import('./supply-management/supply-management.module').then((m) => m.SupplyManagementModule) }, { path: 'order-management', loadChildren: () => import('./order-management/order-management.module').then((m) => m.OrderManagementModule) }, { path: 'waybill-management', loadChildren: () => import('./waybill-management/waybill-management.module').then((m) => m.WaybillManagementModule) }, + { path: 'financial-management', loadChildren: () => import('./financial-management/financial-management.module').then((m) => m.FinancialManagementModule) }, ] }, // passport diff --git a/src/app/shared/services/business/user.service.ts b/src/app/shared/services/business/user.service.ts index 43be9ca4..06b257b0 100644 --- a/src/app/shared/services/business/user.service.ts +++ b/src/app/shared/services/business/user.service.ts @@ -25,7 +25,7 @@ export class EAUserService extends BaseService { /** * 账号密码登录 */ - $api_login_by_account = `/cuc/user/login?_allow_anonymous=true`; + $api_login_by_account = `/api/mdc/cuc/user/login?_allow_anonymous=true`; /** * 手机号登录 */ @@ -117,14 +117,15 @@ export class EAUserService extends BaseService { if (res?.token) { this.tokenSrv.set({ token: res.token }); this.doAfterLogin(); + this.router.navigate([this.ar.snapshot.queryParams.returnUrl || '/']); // this.eventSrv.event.emit(eventConf.reflesh_login_status, this.ar.snapshot.queryParams.returnUrl || '/'); } }); } async doAfterLogin() { - await this.loadUserInfo(); - await this.loadUserMenus(); + // await this.loadUserInfo(); + // await this.loadUserMenus(); await this.loadUserRoles(); } diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index e5b4fb6d..e92ef85b 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -98,8 +98,9 @@ "icon": "anticon anticon-dashboard", "link": "/usercenter/driver/captain" } + ] + } ] - }] }, { "text": "票务管理", @@ -141,12 +142,19 @@ "text": "货源管理", "icon": "anticon anticon-dashboard", "group": true, - "children": [{ + "children": [ + { "text": "货源管理", "icon": "anticon anticon-dashboard", "link": "/supply-management/index", "reuse": true }, + { + "text": "货源管理", + "icon": "anticon anticon-dashboard", + "link": "/supply-management/index", + "hide": true + }, { "text": "货源详情", "icon": "anticon anticon-dashboard", @@ -196,7 +204,7 @@ "icon": "anticon anticon-dashboard", "link": "/order-management/car-manage" } - ] + ] }, { "text": "补录单", @@ -212,7 +220,7 @@ "link": "/order-management/additionalc-detail/:id", "hide": true } - ] + ] }, { "text": "风险单管理", @@ -285,6 +293,38 @@ } ] }, + { + "text": "财务管理", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "货主账户", + "icon": "anticon anticon-dashboard", + "link": "/financial-management/freight-account" + }, + { + "text": "司机账户", + "icon": "anticon anticon-dashboard", + "link": "/financial-management/driver-account" + }, + { + "text": "充值记录", + "icon": "anticon anticon-dashboard", + "link": "/financial-management/recharge-record" + }, + { + "text": "提现记录", + "icon": "anticon anticon-dashboard", + "link": "/financial-management/withdrawals-record" + }, + { + "text": "账户主体", + "icon": "anticon anticon-dashboard", + "link": "/financial-management/main-account" + } + ] + }, { "text": "系统设置", "icon": "anticon anticon-dashboard", diff --git a/src/conf/sys.conf.ts b/src/conf/sys.conf.ts index c28d18bf..450ddcde 100644 --- a/src/conf/sys.conf.ts +++ b/src/conf/sys.conf.ts @@ -15,7 +15,7 @@ export const sysConf = { /** * 登录路径 */ - login_url: `/account/login`, + login_url: `/passport/login`, /** * 缓存过期时间 */