diff --git a/src/app/core/net/business.interceptor.ts b/src/app/core/net/business.interceptor.ts index 8179cedc..9e34709e 100644 --- a/src/app/core/net/business.interceptor.ts +++ b/src/app/core/net/business.interceptor.ts @@ -62,7 +62,7 @@ export class BusinessInterceptor implements HttpInterceptor { const header: any = { appId: this.envSrv.env.appId, tenantId: this.envSrv.env.tenantId, - enterpriseId: '0', + enterpriseId: this.envSrv.env.enterpriseId, ...position }; diff --git a/src/app/core/startup/startup.service.ts b/src/app/core/startup/startup.service.ts index 392f5e31..95350c7b 100644 --- a/src/app/core/startup/startup.service.ts +++ b/src/app/core/startup/startup.service.ts @@ -1,8 +1,10 @@ import { HttpClient } from '@angular/common/http'; import { Inject, Injectable } from '@angular/core'; +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 { AmapService, EAUserService } from '@shared'; +import { AmapService, EACacheService, EAUserService } from '@shared'; import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { NzIconService } from 'ng-zorro-antd/icon'; import { Observable, zip } from 'rxjs'; @@ -27,6 +29,7 @@ export class StartupService { private httpClient: _HttpClient, private userSrv: EAUserService, private amapService: AmapService, + public cacheSrv: EACacheService, private coreSrv: CoreService ) { iconSrv.addIcon(...ICONS_AUTO, ...ICONS); @@ -83,6 +86,11 @@ export class StartupService { this.settingService.setApp(appData); // 用户信息:包括姓名、头像、邮箱地址 this.settingService.setUser(userData); + this.cacheSrv.set(cacheConf.env, { + appId: sysConf.appId, + tenantId: userData?.tenantId || sysConf.tenantId, + enterpriseId: userData?.enterpriseId || sysConf.enterpriseId + }); // ACL:设置权限为全量 this.aclService.setFull(true); // 初始化菜单 diff --git a/src/app/routes/contract-management/components/policy/policy.component.html b/src/app/routes/contract-management/components/policy/policy.component.html new file mode 100644 index 00000000..ce3db2d0 --- /dev/null +++ b/src/app/routes/contract-management/components/policy/policy.component.html @@ -0,0 +1,65 @@ + + + + + +
+ +
+ +
+ + + +
+ +
+
+ + + +
+
+
+
+ + + + + + + + + +
+
+ + + {{paramValue}} + + + +
+
+
\ No newline at end of file diff --git a/src/app/routes/contract-management/components/policy/policy.component.spec.ts b/src/app/routes/contract-management/components/policy/policy.component.spec.ts new file mode 100644 index 00000000..b369df96 --- /dev/null +++ b/src/app/routes/contract-management/components/policy/policy.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ContractManagementPolicyComponent } from './policy.component'; + +describe('ContractManagementPolicyComponent', () => { + let component: ContractManagementPolicyComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ ContractManagementPolicyComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ContractManagementPolicyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/contract-management/components/policy/policy.component.ts b/src/app/routes/contract-management/components/policy/policy.component.ts new file mode 100644 index 00000000..6026a506 --- /dev/null +++ b/src/app/routes/contract-management/components/policy/policy.component.ts @@ -0,0 +1,205 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent, STChange } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { TicketService } from '../../services/contract-management.service'; +import { Router } from '@angular/router'; + +@Component({ + selector: 'app-contract-management-policy', + templateUrl: './policy.component.html' +}) +export class ContractManagementPolicyComponent implements OnInit { + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + @ViewChild('auditModal', { static: false }) + auditModal!: any; + schema: SFSchema = {}; + columns: STColumn[] = []; + ui: SFUISchema = {}; + @ViewChild('promoterModal', { static: false }) + promoterModal!: any; + _$expand = false; + + selectedRows: any[] = []; + paramValue = ''; + constructor(public service: TicketService, private modal: NzModalService, private router: Router) {} + + /** + * 查询参数 + */ + get reqParams() { + const params: any = { + ...(this.sf && this.sf.value) + }; + delete params.expand; + return params; + } + + ngOnInit(): void { + this.initST(); + this.initSF(); + } + + openDetail(item?: any) { + this.paramValue = item?.paramValue + const modal = this.modal.create({ + nzTitle: '传入值', + nzContent: this.promoterModal, + nzOnOk: () => { + return; + } + }); + + } + + initST() { + this.columns = [ + { title: '', type: 'checkbox', width: '50px', className: 'text-center' }, + { + title: '订单ID', + width: '100px', + className: 'text-center', + index: 'billId' + }, + { + title: '项目ID', + width: '100px', + className: 'text-center', + index: 'enterpriseProjectId' + }, + { + title: '保险公司', + width: '100px', + className: 'text-center', + index: 'insuranceCompany' + }, + { + title: '投保金额', + width: '100px', + className: 'text-center', + index: 'insureAmount' + }, + + { + title: '保单号', + width: '100px', + className: 'text-center', + index: 'policyNo' + }, + { + title: '保单地址', + width: '100px', + className: 'text-center', + index: 'policyUrl' + }, + { + title: '保费', + width: '100px', + className: 'text-center', + index: 'premium' + }, + { + title: '处理消息', + width: '100px', + className: 'text-center', + index: 'processMessage' + }, + { + title: '处理结果', + width: '100px', + className: 'text-center', + index: 'processResult' + }, + { + title: '操作', + width: '170px', + className: 'text-center', + buttons: [ + { + text: '查看传入值', + click: item => { + this.openDetail(item) + } + } + ] + } + ]; + } + + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + billId: { + type: 'string', + title: '订单id' + }, + enterpriseProjectId: { + type: 'string', + title: '项目id' + }, + insuranceCompany: { + type: 'string', + title: '保险公司' + }, + policyNo: { + type: 'string', + title: '保单号' + }, + processResult: { + type: 'string', + title: '处理结果', + enum: [ + { label: '全部', value: '' }, + { label: '成功', value: 1 }, + { label: '失败', value: 2 } + ], + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value + }, + allowClear: true + } + } + }, + type: 'object' + }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + stChange(e: STChange): void { + switch (e.type) { + case 'checkbox': + this.selectedRows = e.checkbox!; + break; + case 'filter': + this.st.load(); + break; + } + } +} diff --git a/src/app/routes/contract-management/contract-management-routing.module.ts b/src/app/routes/contract-management/contract-management-routing.module.ts index 6459588c..a8109ccf 100644 --- a/src/app/routes/contract-management/contract-management-routing.module.ts +++ b/src/app/routes/contract-management/contract-management-routing.module.ts @@ -9,9 +9,10 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { ContractManagementContractListComponent } from './components/contract-list/contract-list.component'; +import { ContractManagementPolicyComponent } from './components/policy/policy.component'; const routes: Routes = [ { path: 'list', component: ContractManagementContractListComponent }, -]; + { path: 'policy', component: ContractManagementPolicyComponent }]; @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/routes/contract-management/contract-management.module.ts b/src/app/routes/contract-management/contract-management.module.ts index 8364e34d..10102991 100644 --- a/src/app/routes/contract-management/contract-management.module.ts +++ b/src/app/routes/contract-management/contract-management.module.ts @@ -11,10 +11,11 @@ import { CommonModule } from '@angular/common'; import { SharedModule } from '@shared'; import { ContractManagementManagementRoutingModule } from './contract-management-routing.module'; import { ContractManagementContractListComponent } from './components/contract-list/contract-list.component'; +import { ContractManagementPolicyComponent } from './components/policy/policy.component'; const COMPONENTS: any = [ - ContractManagementContractListComponent -]; + ContractManagementContractListComponent, + ContractManagementPolicyComponent]; const NOTROUTECOMPONENTS: any = []; @NgModule({ declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS], diff --git a/src/app/routes/contract-management/services/contract-management.service.ts b/src/app/routes/contract-management/services/contract-management.service.ts index 59cef689..c9e912ce 100644 --- a/src/app/routes/contract-management/services/contract-management.service.ts +++ b/src/app/routes/contract-management/services/contract-management.service.ts @@ -5,6 +5,9 @@ import { BaseService } from 'src/app/shared/services'; providedIn: 'root' }) export class TicketService extends BaseService { + + $api_get_getPremiumInformationPage = `/api/sdc/billOperate/listPremiumInformationPage`; + constructor(public injector: Injector) { super(injector); } diff --git a/src/app/routes/sys-setting/components/basic-setting/basic-setting.component copy.html b/src/app/routes/sys-setting/components/basic-setting/basic-setting.component copy.html new file mode 100644 index 00000000..de6dd3ad --- /dev/null +++ b/src/app/routes/sys-setting/components/basic-setting/basic-setting.component copy.html @@ -0,0 +1,166 @@ + +
+
+
    +
  • + {{ item.name }} +
  • +
+
+ +
+ +

货主提现设置

+
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+ + + + +
+
+
+
+
+ + +

路桥发票设置

+
+
+ + + + + + + +

开启自动申请后,运单完成卸货后会自动根据运单信息申请ETC发票。

+
+
+
+
+ + +

风险单监控

+
+
+ + + + + + + + + + +

当前时间与计划时间对比,允许如上合理范围内执行不报异常,差异在范围外则报异常

+
+ + + + + + + + + + +

当前时间与计划时间对比,允许如上合理范围内执行不报异常,差异在范围外则报异常

+
+ + + + + + + + + + +

签收量与装运量对比,允许如上合理范围内损耗不报异常,差异在范围外则报异常

+
+ + + + + + + + + + +

装货地和发货地、签收地和收货地距离对比,允许如上合理范围内执行不报异常,差异在范围外则报异常

+
+
+
+
+ +
+ +
+
+
+
\ No newline at end of file diff --git a/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.html b/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.html index de6dd3ad..e1e56e16 100644 --- a/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.html +++ b/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.html @@ -13,73 +13,24 @@

货主提现设置

-
- - - - - - - - - - - - - - - - - - - -
- - - - -
-
- - - - -
+
+ + + + + + + + + + + + + +
diff --git a/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.ts b/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.ts index d8bba040..fcaf3dd5 100644 --- a/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.ts +++ b/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.ts @@ -39,13 +39,71 @@ export class BasicSettingComponent implements OnInit { { label: '周日', value: '周日' } ]; + configList: any = [ + { + configId: '1475393700370898945', + itemKey: 'goods.name.config.type.3.3', + itemType: 1, + itemValue: '{"data":false,"type":"radio","trueLable":"开启","falseLable":"关闭"}', + name: '货主是否可以设置车队长', + parentId: '0', + remark: '' + }, + { + configId: '1475393700370898945', + itemKey: 'goods.name.config.type.3.4', + itemType: 1, + itemValue: '{"data":false,"type":"radio","trueLable":"开启","falseLable":"关闭"}', + name: '货主企业四要素校验开关', + parentId: '0', + remark: '' + }, + { + configId: '1475393700370898945', + itemKey: 'goods.name.config.type.3.5', + itemType: 1, + itemValue: '{"data":false,"type":"radio","trueLable":"开启","falseLable":"关闭"}', + name: '货主提现功能开关', + parentId: '0', + remark: '' + }, + { + configId: '1475393700370898945', + itemKey: 'goods.name.config.type.3.5', + itemType: 1, + itemValue: '{"data":"","type":"input","afterLable":"%"}', + name: '货主费率配置', + parentId: '0', + remark: '' + }, + { + configId: '1475393700370898945', + itemKey: 'goods.name.config.type.3.5', + itemType: 1, + itemValue: '{"data":"5","type":"input","afterLable":"次"}', + name: '单个用户每天最大发送短信次数', + parentId: '0', + remark: '' + }, + { + configId: '1475393700370898945', + itemKey: 'goods.name.config.type.3.5', + itemType: 1, + itemValue: '{"data":true,"type":"radio","trueLable":"开启","falseLable":"关闭","isCustom":true}', + name: '合同单权限', + parentId: '0', + remark: '' + } + ]; + constructor(private service: SystemService) {} - ngOnInit() {} + ngOnInit() { + this.configList = this.configList.map((item: any) => ({ ...item, itemValue: JSON.parse(item.itemValue) })); + } changeType(type: number): void { this.selectedTab = type; console.log(type); - } } diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.spec.ts b/src/app/routes/sys-setting/components/role-management/edit/edit.component.spec.ts deleted file mode 100644 index 0690cbe6..00000000 --- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { CucRoleEditComponent } from './edit.component'; - -describe('CucRoleEditComponent', () => { - let component: CucRoleEditComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [CucRoleEditComponent], - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(CucRoleEditComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/routes/sys-setting/components/staff-management/staff-management.component.ts b/src/app/routes/sys-setting/components/staff-management/staff-management.component.ts index 846d6e7b..4142d33c 100644 --- a/src/app/routes/sys-setting/components/staff-management/staff-management.component.ts +++ b/src/app/routes/sys-setting/components/staff-management/staff-management.component.ts @@ -61,17 +61,17 @@ export class StaffManagementComponent implements OnInit { }, { text: '冻结', - iif: item => item.stateLocked === 0, + iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1, click: item => this.action(item, 1) }, { text: '超管转授', - iif: item => item.status === 0, + iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1, click: item => this.transpowerAction(item) }, { text: '删除', - iif: item => item.stateLocked === 0, + iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1, click: item => this.action(item, 3) } ] @@ -124,12 +124,15 @@ export class StaffManagementComponent implements OnInit { transpowerAction(item: any) { const modal = this.nzModalService.create({ + nzTitle: '超级管理员转授', nzContent: BuyerTranspowerComponent, nzComponentParams: { i: { ...item } }, nzFooter: null }); modal.afterClose.subscribe(res => { - this.st.load(); + if (res) { + this.st.load(); + } }); } diff --git a/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.html b/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.html index 1d16b237..87d7b3b2 100644 --- a/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.html +++ b/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.html @@ -2,23 +2,9 @@
- - - - -
- -
- -
{{ i.phone }}
-
-
-
-
-
-
+
+ \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.ts b/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.ts index 3ecab520..1fb167e4 100644 --- a/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.ts +++ b/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component.ts @@ -8,8 +8,7 @@ import { SystemService } from '../../../services/system.service'; @Component({ selector: 'app-system-add', - templateUrl: './staff-modal.component.html', - styleUrls: ['./staff-modal.less'] + templateUrl: './staff-modal.component.html' }) export class SystemStaffStaffModalComponent implements OnInit { @ViewChild('sf', { static: false }) @@ -17,20 +16,12 @@ export class SystemStaffStaffModalComponent implements OnInit { i: any; schema!: SFSchema; ui!: SFUISchema; - roleList = []; - roleNames: any = []; constructor(private modal: NzModalRef, public msgSrv: NzMessageService, public service: SystemService) {} ngOnInit(): void { - if (this.i?.userId !== 0) { - // this.i.roleIds = this.i.roleId !== '' ? this.i.roleId.split(',') : []; - } - this.initSF(this.i); } initSF(staff: any) { - console.log(staff); - this.schema = { properties: { staffName: { @@ -59,10 +50,11 @@ export class SystemStaffStaffModalComponent implements OnInit { asyncData: () => { return this.service.request(this.service.$api_getAppRoleList).pipe( map((res: any) => { - this.roleList = res; - return res.map((item: any) => { - return { label: item.roleName, value: item.id }; - }); + return res + .filter((role: any) => role.roleCode !== 'Administrator') + .map((item: any) => { + return { label: item.roleName, value: item.id }; + }); }) ); } @@ -81,10 +73,10 @@ export class SystemStaffStaffModalComponent implements OnInit { } sure() { - // if (!this.sf.value.roleIds || this.sf.value.roleIds.length === 0) { - // this.service.msgSrv.error('员工角色不能为空!'); - // return; - // } + if (!this.sf.value.roleId || this.sf.value.roleId.length === 0) { + this.service.msgSrv.error('员工角色不能为空!'); + return; + } if (this.i.userId === 0) { const params: any = { ...this.sf.value, diff --git a/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.less b/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.less deleted file mode 100644 index 79ab5bb0..00000000 --- a/src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.less +++ /dev/null @@ -1,25 +0,0 @@ -.info { - width: 100%; - margin: 0 auto 10px auto; - color: #333; - text-indent: 24px; -} -.staffBox { - display: flex; - img { - width: 30px; - height: 30px; - overflow: hidden; - border-radius: 50px; - } - dl { - margin: 0 0 0 5px; - dt { - font-size: 14px; - line-height: 28px; - } - dd { - font-size: 12px; - } - } -} diff --git a/src/app/routes/sys-setting/components/staff-management/transpower/transpower.component.html b/src/app/routes/sys-setting/components/staff-management/transpower/transpower.component.html index 767478a2..47c06860 100644 --- a/src/app/routes/sys-setting/components/staff-management/transpower/transpower.component.html +++ b/src/app/routes/sys-setting/components/staff-management/transpower/transpower.component.html @@ -1,22 +1,17 @@ - -
- 张三(13411223344) + + {{i.name}}({{i.telephone}})
为了账户安全,需超管手机验证({{ superPhone }})
-
-
-
- -
-
- -
+
+
+ +
+
+
diff --git a/src/app/routes/sys-setting/components/staff-management/transpower/transpower.component.ts b/src/app/routes/sys-setting/components/staff-management/transpower/transpower.component.ts index 7b9106d4..ff704a04 100644 --- a/src/app/routes/sys-setting/components/staff-management/transpower/transpower.component.ts +++ b/src/app/routes/sys-setting/components/staff-management/transpower/transpower.component.ts @@ -4,24 +4,21 @@ import { interval } from 'rxjs'; import { take } from 'rxjs/operators'; import { DunHelper } from 'src/app/shared/components/captcha/dun.helper'; import { EACaptchaService } from 'src/app/shared/services/business/captcha.service'; +import { SystemService } from '../../../services/system.service'; @Component({ selector: 'app-buyer-transpower', - templateUrl: './transpower.component.html', - styleUrls: ['./transpower.less'] + templateUrl: './transpower.component.html' }) export class BuyerTranspowerComponent implements OnInit { - record: any = {}; count = 0; - interval$: any; i: any; smsVerifyCode = ''; superPhone = ''; - staffId = 1; - staffList: any = []; constructor( private modal: NzModalRef, - public captchaService: EACaptchaService, + public service: SystemService, + public eACaptchaService: EACaptchaService, private dunHelper: DunHelper, private cdr: ChangeDetectorRef ) {} @@ -30,24 +27,24 @@ export class BuyerTranspowerComponent implements OnInit { this.getPhone(); } getPhone() { - // this.service.request(this.service.$api_getAppLesseeAdmin).subscribe((res) => { - // console.log(res); - // if (res) { - // this.superPhone = res.telephone; - // } - // }); + this.service.request(this.service.$api_get_app_admin_info).subscribe(res => { + if (res) { + this.superPhone = res.telephone; + } + }); } sure() { const params = { appUserId: this.i.appUserId, - smsVerifyCode: this.smsVerifyCode + smsVerifyCode: this.smsVerifyCode, + telephone: this.i.telephone }; - // this.service.request(this.service.$api_shiftResellerAdmin, params).subscribe((res) => { - // if (res) { - // this.service.msgSrv.success('操作成功!'); - // this.modal.close(true); - // } - // }); + this.service.request(this.service.$api_set_shift_admin, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('操作成功!'); + this.modal.close(true); + } + }); } close() { this.modal.destroy(); @@ -56,9 +53,9 @@ export class BuyerTranspowerComponent implements OnInit { * 获取手机验证码 */ sendCode() { - this.captchaService.getAppLesseeAdminSMVerificationCode().subscribe(res => { + this.eACaptchaService.request(this.eACaptchaService.$api_getAppLesseeAdminSMVerificationCode).subscribe(res => { if (res.success && res.data.code === '1') { - this.captchaService.msgSrv.success('发送验证码成功'); + this.eACaptchaService.msgSrv.success('发送验证码成功'); this.createInterval(); } else if (res.data.code === '503046') { this.dunHelper.popUp().subscribe(_ => { @@ -66,7 +63,7 @@ export class BuyerTranspowerComponent implements OnInit { this.dunHelper.destory(); }); } else { - this.captchaService.msgSrv.warning(res.msg); + this.eACaptchaService.msgSrv.warning(res.msg); } }); } diff --git a/src/app/routes/sys-setting/components/staff-management/transpower/transpower.less b/src/app/routes/sys-setting/components/staff-management/transpower/transpower.less deleted file mode 100644 index 665d6a15..00000000 --- a/src/app/routes/sys-setting/components/staff-management/transpower/transpower.less +++ /dev/null @@ -1,41 +0,0 @@ -.info { - width : 90%; - margin : 0 auto; - color : #333; - text-indent: 24px; -} - -.staffBox { - display : flex; - align-items: center; - - img { - width : 30px; - height : 30px; - overflow : hidden; - border-radius: 50px; - } - - dl { - margin: 0 0 0 5px; - - dt { - font-size : 14px; - line-height: 28px; - } - - dd { - font-size: 12px; - } - } -} - -.inputBox { - position: relative; - - a { - position: absolute; - top : 0; - right : 5px; - } -} \ No newline at end of file diff --git a/src/app/routes/sys-setting/services/system.service.ts b/src/app/routes/sys-setting/services/system.service.ts index 26d49caf..32d1f4fa 100644 --- a/src/app/routes/sys-setting/services/system.service.ts +++ b/src/app/routes/sys-setting/services/system.service.ts @@ -23,6 +23,11 @@ export class SystemService extends BaseService { $api_delete_staff = '/api/mdc/cuc/userApp/deleteAppUser'; // 冻结或恢复员工 $api_free_or_resume_staff = '/api/mdc/cuc/userApp/freezeOrResumeStaff'; + // 获取应用企业的管理员用户 + $api_get_app_admin_info = `/api/mdc/cuc/userApp/getAppEnterpriseAdmin`; + // 运营管理后台转授超管角色 + $api_set_shift_admin = `/api/mdc/cuc/userAuthority/shiftAdmin`; + // 分页获取应用角色列表 $api_get_role_page = '/api/mdc/cuc/roleInfo/getAppRoleInfoList'; diff --git a/src/app/shared/services/business/captcha.service.ts b/src/app/shared/services/business/captcha.service.ts index 73cfad31..43621559 100644 --- a/src/app/shared/services/business/captcha.service.ts +++ b/src/app/shared/services/business/captcha.service.ts @@ -10,7 +10,7 @@ import { Observable, Subject } from 'rxjs'; import { BaseService } from '../core/base.service'; @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class EACaptchaService extends BaseService { // 通过手机号发送短信验证码 @@ -26,7 +26,7 @@ export class EACaptchaService extends BaseService { $api_captcha_sms_code = `/scce/pbc/pbc/verification/getSMVerificationCodeByToken`; // 获取应用租户的管理员用户发送验证码 - $api_getAppLesseeAdminSMVerificationCode = `/chiauserBasicInfo/getAppLesseeAdminSMVerificationCode`; + $api_getAppLesseeAdminSMVerificationCode = `/api/mdc/cuc/userAuthority/adminSmverificationCode?_allow_badcode=true`; /** * 根据当前登录用户绑定的手机号码获取短信验证码 @@ -34,12 +34,7 @@ export class EACaptchaService extends BaseService { getCaptchaBySMSNoPhone(): Observable { return this.request(this.$api_captcha_sms_code, { appId: this.envSrv.getEnvironment().appId }, 'POST', true, 'FORM'); } - /** - * 获取应用租户的管理员用户发送验证码 - */ - getAppLesseeAdminSMVerificationCode(): Observable { - return this.request(this.$api_getAppLesseeAdminSMVerificationCode, { appId: this.envSrv.getEnvironment().appId }, 'POST', true, 'FORM'); - } + constructor(public injector: Injector) { super(injector); } @@ -54,7 +49,7 @@ export class EACaptchaService extends BaseService { { appId: this.envSrv.getEnvironment()?.appId, phoneNumber: mobile }, 'POST', true, - 'FORM', + 'FORM' ); } @@ -70,7 +65,7 @@ export class EACaptchaService extends BaseService { { appId: this.envSrv.getEnvironment()?.appId, phoneNumber: mobile, user: mobile, validate }, 'POST', true, - 'FORM', + 'FORM' ); } } diff --git a/src/app/shared/services/business/environment.service.ts b/src/app/shared/services/business/environment.service.ts index 1ed41ede..f34b276c 100644 --- a/src/app/shared/services/business/environment.service.ts +++ b/src/app/shared/services/business/environment.service.ts @@ -5,7 +5,7 @@ import { BaseService } from '../core/base.service'; import { EACacheService } from './../core/cache.service'; @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class EAEnvironmentService extends BaseService { constructor(public injector: Injector, private eaCacheSrv: EACacheService) { @@ -15,12 +15,13 @@ export class EAEnvironmentService extends BaseService { /** * 环境信息 */ - public get env(): { appId: string; tenantId: string } { + public get env(): { appId: string; tenantId: string; enterpriseId: string } { const cacheEnv: any = this.eaCacheSrv.get(cacheConf.env); // 附加环境变量 - const env: { appId: string; tenantId: string } = { + const env: { appId: string; tenantId: string; enterpriseId: string } = { appId: cacheEnv?.appId || sysConf.appId, tenantId: cacheEnv?.tenantId || sysConf.tenantId, + enterpriseId: cacheEnv?.enterpriseId || sysConf.enterpriseId }; return env; } diff --git a/src/app/shared/services/business/user.service.ts b/src/app/shared/services/business/user.service.ts index 83e1f246..c1d6ef52 100644 --- a/src/app/shared/services/business/user.service.ts +++ b/src/app/shared/services/business/user.service.ts @@ -135,6 +135,11 @@ export class EAUserService extends BaseService { */ async loadUserInfo() { return this.asyncRequest(this.$api_get_user_by_token).then(res => { + this.cacheSrv.set(cacheConf.env, { + appId: sysConf.appId, + tenantId: res?.tenantId || sysConf.tenantId, + enterpriseId: res?.enterpriseId || sysConf.enterpriseId + }); this.cacheSrv.set(cacheConf.user, res); this.settings.setUser(res); }); diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 99c58d62..5d094f24 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -380,6 +380,10 @@ "icon": "anticon anticon-dashboard", "group": true, "children": [ + { + "text": "保单管理", + "link": "/contract-management/policy" + }, { "text": "合同列表", "link": "/contract-management/list" diff --git a/src/conf/sys.conf.ts b/src/conf/sys.conf.ts index 450ddcde..1ffcff91 100644 --- a/src/conf/sys.conf.ts +++ b/src/conf/sys.conf.ts @@ -12,6 +12,10 @@ export const sysConf = { * 租户ID */ tenantId: `1`, + /** + * 企业ID + */ + enterpriseId: `0`, /** * 登录路径 */