This commit is contained in:
Taric Xin
2022-04-11 14:04:49 +08:00
parent e8df63e1e6
commit ebd8fc816f
4 changed files with 19 additions and 8 deletions

View File

@ -195,8 +195,8 @@ export class CostManagementComponent implements OnInit {
let str = q.replace(/^\s+|\s+$/g, '');
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.request(this.service.$api_crm_enterpriceList, { enterpriseName: str })
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.enterpriseId } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
@ -220,8 +220,8 @@ export class CostManagementComponent implements OnInit {
let str = q.replace(/^\s+|\s+$/g, '');
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.request(this.service.$api_crm_enterpriceList, { enterpriseName: str })
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.crmUserId } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);