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/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/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/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`, /** * 登录路径 */