This commit is contained in:
Taric Xin
2022-03-22 17:41:58 +08:00
parent 873ff7f61b
commit e3a14bb57f
15 changed files with 218 additions and 249 deletions

View File

@ -17,10 +17,10 @@ export class ShipperBaseService extends BaseService {
$api_get_network_freight_forwarder_one = `/api/mdc/cuc/networkTransporter/get`; // 获取网络货运人
// 根据FullKey获取系统子配置(树)
$api_getSysConfigTreeByParentFullKey = `/api/mdc/pbc/sysConfig/getSysConfigTreeByParentFullKey`;
envCache: any;
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
// 获取全部返佣配置
$api_get_rebate_config = `/api/mdc/rebateConfig/list/listRebateConfig`;
constructor(public injector: Injector) {
super(injector);
this.envCache = this.eaCacheSrv.get(cacheConf.env);
}
/**
@ -44,22 +44,22 @@ export class ShipperBaseService extends BaseService {
* 获取所属项目
* @returns
*/
getEnterpriseProject(params?: any) {
getEnterpriseProject(params?: any) {
return this.request(this.$api_get_enterprise_project, params).pipe(
map((res: any) => {
if (!res) {
return [];
}
const list = res.map(((item: any) => {
const list = res.map((item: any) => {
return {
label: item.projectName,
value: item.id
}
}))
};
});
const obj = [{ value: '', label: '全部' }];
return [...obj, ...list];
})
)
);
}
/**
@ -204,4 +204,23 @@ export class ShipperBaseService extends BaseService {
})
);
}
/**
* 获取全部返佣配置
* @returns
*/
getRebateConfig() {
const params = {};
return this.request(this.$api_get_rebate_config, params, 'POST').pipe(
map(res => {
if (res) {
return res.map((m: any) => {
return { label: m.configName, value: m.id };
});
} else {
return [];
}
})
);
}
}