-
-
-
- 关闭
- 开启
-
-
-
-
- 全天
- 自定义
-
-
-
-
-
-
- 每天
-
-
添加时间段
-
-
- --
-
- 删除
-
-
-
-
-
-
- 每周
-
-
添加星期
-
-
-
-
-
-
-
- --
-
-
- 删除
-
-
添加时间段
-
-
-
-
-
-
-
-
- 每日最多可提现
-
-
-
-
-
- 每月最多可提现
-
-
-
-
+
+
+
+
+
+ {{item.itemValue.falseLable}}
+ {{item.itemValue.trueLable}}
+
+
+
+
+
+
+
+
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`,
/**
* 登录路径
*/