diff --git a/src/app/core/core.service.ts b/src/app/core/core.service.ts index 3324f528..53cd814a 100644 --- a/src/app/core/core.service.ts +++ b/src/app/core/core.service.ts @@ -22,7 +22,7 @@ export class CoreService { public $api_get_current_user_info = `/scm/cuc/cuc/user/getUserDetail`; // 获取当前用户所拥有的菜单 - public $api_get_current_user_menus = `/scm/cuc/cuc/functionInfo/getUserHaveFunctionsList`; + public $api_get_current_user_menus = `/api/mdc/cuc/functionInfo/getUserHaveFunctionsList`; position = { lat: '', lng: '' }; diff --git a/src/app/core/startup/startup.service.ts b/src/app/core/startup/startup.service.ts index 4e68b7e9..a96e3147 100644 --- a/src/app/core/startup/startup.service.ts +++ b/src/app/core/startup/startup.service.ts @@ -4,6 +4,7 @@ import { cacheConf } from '@conf/cache.conf'; import { sysConf } from '@conf/sys.conf'; import { ACLService } from '@delon/acl'; import { MenuService, SettingsService, TitleService, _HttpClient } from '@delon/theme'; +import { environment } from '@env/environment'; import { AmapService, EACacheService, EAUserService } from '@shared'; import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { NzIconService } from 'ng-zorro-antd/icon'; @@ -46,7 +47,7 @@ export class StartupService { }); let data; - if (this.coreSrv.loginStatus) { + if (this.coreSrv.loginStatus && environment.production) { // 本地菜单 // data = this.loadMockData(); // 远程菜单 @@ -133,12 +134,12 @@ export class StartupService { const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token, {}).pipe(map((res: any) => res.data)); // 菜单数据 - // const menuData = this.httpClient - // .post(this.coreSrv.$api_get_current_user_menus, { - // appId: this.coreSrv.envSrv.getEnvironment().appId - // }) - // .pipe(map((res: any) => res.data)); - const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu)); + const menuData = this.httpClient + .post(this.coreSrv.$api_get_current_user_menus, { + appId: this.coreSrv.envSrv.getEnvironment().appId + }) + .pipe(map((res: any) => res.data)); + // const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu)); return zip(appData, userData, menuData); } 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 71895d39..ad96964b 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 @@ -78,12 +78,12 @@ export class DriverAccountComponent implements OnInit { hidden: true } }, - name: { + userName: { type: 'string', title: '司机姓名', ui: { placeholder: '请输入' } }, - idNo: { + certificateNumber: { type: 'string', title: '证件号码', ui: { placeholder: '请输入' } 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 63daa1e8..35557171 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 @@ -89,7 +89,7 @@ export class FreightAccountComponent implements OnInit { title: '企业名称', ui: { placeholder: '请输入' } }, - name: { + userName: { type: 'string', title: '联系人', ui: { placeholder: '请输入' } diff --git a/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.html b/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.html new file mode 100644 index 00000000..d3b5c732 --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.html @@ -0,0 +1,71 @@ + + + + + + + +

天津怡亚通物流科技有限公司(浦发银行)

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ + + + +
+
+
+ + + + \ No newline at end of file diff --git a/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.ts b/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.ts new file mode 100644 index 00000000..2b670990 --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.ts @@ -0,0 +1,221 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { FreightAccountService } from '../../../services/freight-account.service'; + +@Component({ + selector: 'app-platform-account-detail', + templateUrl: './platform-account-detail.component.html', + styleUrls: ['../../../../commom/less/box.less', '../../../../commom/less/expend-but.less'] +}) +export class PlatformAccountDetailComponent implements OnInit { + + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + columns: STColumn[] = this.initST(); + searchSchema: SFSchema = this.initSF(); + + _$expand = false; + + info: any = {}; + params: any = {}; + constructor(public service: FreightAccountService, private route: ActivatedRoute) { + this.params = route.snapshot.queryParams; + } + + ngOnInit(): void { + this.loadInfo(); + } + + beforeReq = (requestOptions: STRequestOptions) => { + Object.assign(requestOptions.body, { + ltdId: this.params.ltdId, + projectId: this.params.projectId, + enterpriseId: this.params.enterpriseId, + roleId: this.params.roleId + }); + if (this.sf) { + Object.assign(requestOptions.body, { + ...this.sf.value, + createTime: { + start: this.sf.value?.createTime?.[0] || '', + end: this.sf.value?.createTime?.[1] || '' + } + }); + } + return requestOptions; + }; + + loadInfo() { + this.service + .request(this.service.$api_get_driver_account_balance_detail, { + ...this.sf?.value, + ltdId: this.params.ltdId, + projectId: this.params.projectId, + enterpriseId: this.params.enterpriseId, + roleId: this.params.roleId, + pageIndex: this.st.pi, + pageSize: this.st.ps, + createTime: { + start: this.sf?.value?.createTime?.[0] || '', + end: this.sf?.value?.createTime?.[1] || '' + } + }) + .subscribe(res => { + if (res) { + this.info = res; + } + }); + } + + stChange(e: STChange): void {} + + exportList() { + this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps }); + } + + goBack() { + history.go(-1); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } + + private initSF(): SFSchema { + return { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + createTime: { + title: '交易时间', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd', + placeholder: '请选择', + nzShowTime: true + } as SFDateWidgetSchema + }, + transactionNumber: { + type: 'string', + title: '流水号', + ui: { + placeholder: '请输入' + } + }, + businessNumber: { + type: 'string', + title: '交易单号', + ui: { + placeholder: '请输入' + } + }, + tradeType: { + type: 'string', + title: '交易类型', + ui: { + widget: 'dict-select', + params: { dictKey: 'trade:type' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + }, + incomeType: { + type: 'string', + title: '收支类型', + ui: { + widget: 'dict-select', + params: { dictKey: 'income:type' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + }, + incomeType1: { + type: 'string', + title: '货主', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + }, + incomeType2: { + type: 'string', + title: '所属项目', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + } + } + }; + } + + private initST(): STColumn[] { + return [ + { title: '交易时间', index: 'createTime', type: 'date' }, + { title: '流水号', index: 'channelPaySn' }, + { title: '交易类型', index: 'tradeTypeLabel', className: 'text-center' }, + { title: '交易单号', index: 'businessNumber' }, + { title: '订单号', index: 'businessNumber' }, + { title: '运单号', index: 'businessNumber' }, + { title: '账户类型', index: 'incomeTypeLabel', className: 'text-center' }, + { title: '账户名称', index: 'incomeTypeLabel', className: 'text-center' }, + { title: '所属项目', index: 'incomeTypeLabel', className: 'text-center' }, + { title: '收支类型', index: 'incomeTypeLabel', className: 'text-center' }, + { + title: '交易金额', + index: 'amount', + width: 150, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } + }, + { + title: '账户余额', + index: 'accountBalance', + width: 150, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.accountBalance }) } + }, + { title: '付款方', index: 'incomeTypeLabel', className: 'text-center' }, + { title: '收款方', index: 'incomeTypeLabel', className: 'text-center' }, + { title: '备注', index: 'incomeTypeLabel', className: 'text-center' }, + ]; + } + +} 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 index 0b41934c..c504f1e5 100644 --- 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 @@ -52,7 +52,7 @@ - + \ 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 index 441b99dd..8fc9458a 100644 --- 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 @@ -1,12 +1,9 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; -import { STComponent, STColumn, STChange } from '@delon/abc/st'; +import { STComponent, STColumn, STChange, STRequestOptions } 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', @@ -18,40 +15,22 @@ export class PlatformAccountComponent implements OnInit { st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; + searchSchema: SFSchema = this.initSF(); + columns: STColumn[] = this.initST(); 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; + beforeReq = (requestOptions: STRequestOptions) => { + if (this.sf) { + Object.assign(requestOptions.body, { ...this.sf.value }); } - } - - 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']); - } + return requestOptions; + }; /** * 重置表单 @@ -192,7 +171,7 @@ export class PlatformAccountComponent implements OnInit { buttons: [ { text: '查看明细', - click: item => this.routeTo(item) + click: item => this.router.navigate(['/financial-management/platform-account/detail/' + item.id]) } ] } 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 833e9c16..583c91d7 100644 --- a/src/app/routes/financial-management/financial-managemen-routing.module.ts +++ b/src/app/routes/financial-management/financial-managemen-routing.module.ts @@ -28,6 +28,7 @@ import { VoucherListComponent } from './components/voucher-summary/voucher-list/ 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'; +import { PlatformAccountDetailComponent } from './components/platform-account/platform-account-detail/platform-account-detail.component'; const routes: Routes = [ { path: 'freight-account', component: FreightAccountComponent, data: { guard: { ability: ['FINANCIAL-FREIGHT-ACOUNT-list'] } } }, @@ -35,6 +36,7 @@ const routes: Routes = [ { path: 'driver-account', component: DriverAccountComponent }, { path: 'driver-account/detail/:id', component: DriverAccountDetailComponent }, { path: 'platform-account', component: PlatformAccountComponent }, + { path: 'platform-account/detail/:id', component: PlatformAccountDetailComponent }, { path: 'recharge-record', component: RechargeRecordComponent }, { path: 'withdrawals-record', component: WithdrawalsRecordComponent }, { path: 'withdrawals-record/detail/:id', component: WithdrawalsDetailComponent }, diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts index df932fdb..a61972f6 100644 --- a/src/app/routes/financial-management/financial-management.module.ts +++ b/src/app/routes/financial-management/financial-management.module.ts @@ -31,7 +31,7 @@ import { PaymentOrderDetailComponent } from './components/payment-order/payment- 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'; +import { PlatformAccountDetailComponent } from './components/platform-account/platform-account-detail/platform-account-detail.component'; const ROUTESCOMPONENTS = [ FreightAccountComponent, @@ -57,12 +57,13 @@ const ROUTESCOMPONENTS = [ ReceivableOrderDetailComponent, PayableOrderDetailComponent, PlatformAccountComponent, + PlatformAccountDetailComponent, PaymentOrderDetailComponent, VoucherListComponent, ReceiptOrderDetailComponent ]; -const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, SettingFinancialComponent, ClearingModalComponent]; +const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, ClearingModalComponent]; @NgModule({ declarations: [...ROUTESCOMPONENTS, ...NOTROUTECOMPONENTS], diff --git a/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts b/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts index ba637fe0..c61cab04 100644 --- a/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts +++ b/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts @@ -52,7 +52,7 @@ export class ApiAuthComponent implements OnInit { this.listOfMapData.forEach(item => { this.mapOfExpandedData[item.key] = this.service.convertTreeToList(item); }); - console.log(this.listOfMapData, this.mapOfExpandedData); + // console.log(this.listOfMapData, this.mapOfExpandedData); } }); } diff --git a/src/app/routes/menu-manager/components/index/index.component.html b/src/app/routes/menu-manager/components/index/index.component.html index 5bb4a5e1..3c79eac9 100644 --- a/src/app/routes/menu-manager/components/index/index.component.html +++ b/src/app/routes/menu-manager/components/index/index.component.html @@ -70,12 +70,15 @@ - {{ item.text }} + {{ item.title }} {{ item.keyCode }} {{ item.link }} - + + + + {{ item.sorted }} diff --git a/src/app/routes/menu-manager/components/index/index.component.ts b/src/app/routes/menu-manager/components/index/index.component.ts index 00f03d03..ce54dd07 100644 --- a/src/app/routes/menu-manager/components/index/index.component.ts +++ b/src/app/routes/menu-manager/components/index/index.component.ts @@ -54,7 +54,7 @@ export class MenuManagerComponentsIndexComponent implements OnInit { this.listOfMapData.forEach(item => { this.mapOfExpandedData[item.key] = this.service.convertTreeToList(item); }); - console.log(this.listOfMapData, this.mapOfExpandedData); + // console.log(this.listOfMapData, this.mapOfExpandedData); } }); } diff --git a/src/app/routes/menu-manager/components/index/menu-modal/menu-modal.component.ts b/src/app/routes/menu-manager/components/index/menu-modal/menu-modal.component.ts index 5ff57973..b55bde12 100644 --- a/src/app/routes/menu-manager/components/index/menu-modal/menu-modal.component.ts +++ b/src/app/routes/menu-manager/components/index/menu-modal/menu-modal.component.ts @@ -33,7 +33,7 @@ export class MenuModalComponent implements OnInit { initSF(data?: any) { this.schema = { properties: { - text: { + title: { title: '菜单名称', type: 'string', default: this.formData.text, @@ -99,7 +99,7 @@ export class MenuModalComponent implements OnInit { } } }, - required: ['text'] + required: ['title'] }; this.ui = { '*': { @@ -131,16 +131,16 @@ export class MenuModalComponent implements OnInit { const params = { ...this.sf.value, ...this.params, - i18n: this.sf.value.keyCode, + i18n: null, + // i18n: this.sf.value.keyCode, menuType: 0, reuse: 0, shortcut: 0, hideInBreadcrumb: 0, functionType: 0, - sortId: this.sf.value.sortId?.toString() || null + sortId: this.sf.value.sortId?.toString() || null, + text: this.sf.value.title }; - console.log(params); - this.service.request(this.service.$api_add_one, params).subscribe(res => { if (res) { this.service.msgSrv.success(this.formData.id ? '修改菜单成功' : '新增菜单成功'); diff --git a/src/app/routes/menu-manager/services/menu-manager.service.ts b/src/app/routes/menu-manager/services/menu-manager.service.ts index 5aebd04b..6900c587 100644 --- a/src/app/routes/menu-manager/services/menu-manager.service.ts +++ b/src/app/routes/menu-manager/services/menu-manager.service.ts @@ -20,11 +20,11 @@ export class MenuManagerService extends BaseService { // 获取菜单下按钮权限列表 $api_get_functions_by_id = `/api/mdc/cuc/functionButton/getFunctionButtonByFunctionId`; // 获取所有按钮信息 - $api_get_functions= `/api/mdc/cuc/buttonInfo/getButtonInfoList`; + $api_get_functions = `/api/mdc/cuc/buttonInfo/getButtonInfoList`; // 保存菜单按钮关联 - $api_save_menu_function= `/api/mdc/cuc/functionButton/saveFunctionButton`; + $api_save_menu_function = `/api/mdc/cuc/functionButton/saveFunctionButton`; // 删除菜单按钮关联表 - $api_delete_menu_function= `/api/mdc/cuc/functionButton/deletebatch`; + $api_delete_menu_function = `/api/mdc/cuc/functionButton/deletebatch`; constructor(public injector: Injector) { super(injector); @@ -112,7 +112,7 @@ export class MenuManagerService extends BaseService { level: node.level! + 1, expand: false, parent: node, - iconType: this.formatIcon(node.children[i].icon) + ...this.formatIcon(node.children[i].icon) }); } } @@ -128,13 +128,17 @@ export class MenuManagerService extends BaseService { } } - private formatIcon(icon: any) { + private formatIcon(icon: any): { iconType: string; value: string } { let value = icon; + let type = 'icon'; // compatible `anticon anticon-user` if (~icon.indexOf(`anticon-`)) { value = value.split('-').slice(1).join('-'); } - return value; + if (~icon.indexOf(`iconfont`)) { + type = 'iconfont'; + } + return { iconType: type, value }; } }