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
index 0b59dd38..d15f1d0b 100644
--- 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
@@ -2,7 +2,10 @@ 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',
@@ -53,7 +56,7 @@ export class MainAccountComponent implements OnInit {
buttons: [
{
text: '财务设置',
- click: item => this.routeTo(item)
+ click: item => this.settingFinanical(item)
},
{
text: '合同设置',
@@ -64,7 +67,7 @@ export class MainAccountComponent implements OnInit {
];
reqParams = { pageIndex: 1, pageSize: 10 };
- constructor(public service: SystemService, private router: Router) {}
+ constructor(public service: SystemService, private router: Router, private nzModalService: NzModalService) {}
ngOnInit(): void {}
@@ -76,6 +79,17 @@ export class MainAccountComponent implements OnInit {
}
}
+ 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']);
}
diff --git a/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.html b/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.html
new file mode 100644
index 00000000..10785fb6
--- /dev/null
+++ b/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.html
@@ -0,0 +1,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.less b/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.less
new file mode 100644
index 00000000..e69de29b
diff --git a/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.ts b/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.ts
new file mode 100644
index 00000000..8a9865ba
--- /dev/null
+++ b/src/app/routes/financial-management/components/main-account/setting-financial/setting-financial.component.ts
@@ -0,0 +1,130 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
+import { EAEnterpriseService } from '@shared';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzModalRef } from 'ng-zorro-antd/modal';
+import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
+
+@Component({
+ selector: 'app-setting-financial',
+ templateUrl: './setting-financial.component.html',
+ styleUrls: ['./setting-financial.component.less']
+})
+export class SettingFinancialComponent implements OnInit {
+ @ViewChild('sf', { static: false })
+ sf!: SFComponent;
+ i: any;
+ schema!: SFSchema;
+ roleList = [];
+ roleNames: any = [];
+ constructor(
+ private modal: NzModalRef,
+ public msgSrv: NzMessageService,
+ public service: SystemService,
+ private enterpriseSrv: EAEnterpriseService
+ ) {}
+
+ ngOnInit(): void {
+ if (this.i?.id !== 0) {
+ this.i.roleIds = this.i.roleId !== '' ? this.i.roleId.split(',') : [];
+ }
+
+ this.initSF(this.i);
+ }
+ initSF(staff: any) {
+ console.log(staff);
+ this.schema = {
+ properties: {
+ name: {
+ title: '公司名称',
+ type: 'string',
+ ui: { widget: 'string', placeholder: '请输入公司名称' },
+ default: staff.name
+ },
+ phone: {
+ title: '纳税人识别号',
+ type: 'string',
+ format: 'mobile',
+ ui: { widget: 'string', placeholder: '请输入纳税人识别号' },
+ default: staff.phone
+ },
+ phone2: {
+ title: '税收分类编码',
+ type: 'string',
+ format: 'mobile',
+ ui: { widget: 'string', placeholder: '请输入税收分类编码' },
+ default: staff.phone
+ },
+ phone3: {
+ title: '发票税率',
+ type: 'string',
+ format: 'mobile',
+ ui: { widget: 'string', placeholder: '请输入发票税率' },
+ default: staff.phone
+ },
+ phone4: {
+ title: '附加费比例',
+ type: 'string',
+ format: 'mobile',
+ ui: { widget: 'string', placeholder: '请输入附加费比例' },
+ default: staff.phone
+ }
+ },
+ required: ['name', 'phone', 'phone2', 'phone3', 'phone4']
+ };
+ }
+
+ sure() {
+ if (!this.sf.value.roleIds || this.sf.value.roleIds.length === 0) {
+ this.service.msgSrv.error('员工角色不能为空!');
+ return;
+ }
+ this.roleNames = [];
+ this.roleList.forEach((item: { id: any; roleName: string }) => {
+ this.sf.value.roleIds.forEach((ele: any) => {
+ if (ele === item.id) {
+ this.roleNames.push(item.roleName);
+ }
+ });
+ });
+ if (this.i.id === 0) {
+ const params: any = {
+ ...this.sf.value,
+ roleId: this.sf.value.roleIds,
+ roleNames: this.roleNames.join(','),
+ telephone: this.sf.value.phone,
+ staffName: this.sf.value.name
+ };
+ // this.service.request(this.service.$api_addStaff, params).subscribe((res) => {
+ // console.log(res);
+ // if (res) {
+ // this.service.msgSrv.success('保存成功!');
+ // this.modal.close(true);
+ // }
+ // // this.showInviteFlag = true;
+ // // this.inviteCode = res.inviteCode;
+ // });
+ } else {
+ const params: any = {
+ appUserId: this.i.appUserId,
+ staffName: this.sf.value.name,
+ roleId: this.sf.value.roleIds,
+ telephone: this.i.telephone
+ };
+ // this.service.request(this.service.$api_editorStaff, params).subscribe((res) => {
+ // this.service.msgSrv.success('编辑成功!');
+ // // this.loadMyIdentity();
+ // this.modal.close(true);
+ // });
+ }
+ }
+ loadMyIdentity() {
+ this.enterpriseSrv.loadEnterpises().subscribe((data: any[]) => {
+ this.enterpriseSrv.setCache(data);
+ });
+ }
+
+ close() {
+ this.modal.destroy();
+ }
+}
diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html
new file mode 100644
index 00000000..b808d0a0
--- /dev/null
+++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+ 天津怡亚通物流科技有限公司
+
+
+ EA202110012313
+
+
+ 已完成
+
+
+ 2021-10-11 08:50:08
+
+
+ 茅台集团
+
+
+ 6202110111234
+
+
+ 10000.00
+
+
+ 10.00
+
+
+ 招商银行(8889)
+
+
+ P20181230123012385756
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.less b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.less
new file mode 100644
index 00000000..e299b7d1
--- /dev/null
+++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.less
@@ -0,0 +1,17 @@
+:host::ng-deep {
+
+ .ant-alert-info {
+ background-color: #f3f3f3;
+ border : 1px solid #dbdbdb;
+
+ .ant-alert-message {
+ color: rgba(0, 0, 0, 0.85);
+ font-weight: 600;
+ font-size: 16px;
+ }
+ }
+
+ .ant-form-item {
+ margin-bottom: 15px;
+ }
+}
\ No newline at end of file
diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts
new file mode 100644
index 00000000..ad974c63
--- /dev/null
+++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts
@@ -0,0 +1,17 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-withdrawals-detail',
+ templateUrl: './withdrawals-detail.component.html',
+ styleUrls: ['./withdrawals-detail.component.less']
+})
+export class WithdrawalsDetailComponent implements OnInit {
+ formDate: any = {};
+ constructor() {}
+
+ ngOnInit(): void {}
+
+ goBack() {
+ history.go(-1);
+ }
+}
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
index f802b078..44588236 100644
--- 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
@@ -164,7 +164,7 @@ export class WithdrawalsRecordComponent implements OnInit {
add(): void {}
routeTo(item: any) {
- this.router.navigate(['/ticket/invoice-requested-detail/1']);
+ this.router.navigate(['/financial-management/withdrawals-detail/1']);
}
auditAction(item: any) {
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 4bc5c3c7..8027248a 100644
--- a/src/app/routes/financial-management/financial-managemen-routing.module.ts
+++ b/src/app/routes/financial-management/financial-managemen-routing.module.ts
@@ -7,6 +7,7 @@ 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';
+import { WithdrawalsDetailComponent } from './components/withdrawals-record/withdrawals-detail/withdrawals-detail.component';
const routes: Routes = [
{ path: 'freight-account', component: FreightAccountComponent },
@@ -15,6 +16,7 @@ const routes: Routes = [
{ path: 'driver-account-detail/:id', component: DriverAccountDetailComponent },
{ path: 'recharge-record', component: RechargeRecordComponent },
{ path: 'withdrawals-record', component: WithdrawalsRecordComponent },
+ { path: 'withdrawals-detail/:id', component: WithdrawalsDetailComponent },
{ path: 'main-account', component: MainAccountComponent }
];
diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts
index 14b718e6..ec200d1e 100644
--- a/src/app/routes/financial-management/financial-management.module.ts
+++ b/src/app/routes/financial-management/financial-management.module.ts
@@ -9,16 +9,19 @@ 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';
const ROUTESCOMPONENTS = [
FreightAccountComponent,
DriverAccountComponent,
RechargeRecordComponent,
WithdrawalsRecordComponent,
- MainAccountComponent
+ MainAccountComponent,
+ WithdrawalsDetailComponent
];
-const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent];
+const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, SettingFinancialComponent];
@NgModule({
declarations: [...ROUTESCOMPONENTS, ...NOTROUTECOMPONENTS],
diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json
index 63354c9a..8bb7c691 100644
--- a/src/assets/mocks/menu-data.json
+++ b/src/assets/mocks/menu-data.json
@@ -4,11 +4,6 @@
"text": "样例",
"hideInBreadcrumb": true,
"children": [
- {
- "text": "仪表盘",
- "icon": "anticon anticon-dashboard",
- "link": "/dashboard"
- },
{
"text": "样例",
"icon": "anticon anticon-dashboard",