解决冲突

This commit is contained in:
wangshiming
2022-03-01 14:00:53 +08:00
parent c56013d9ea
commit b9f582e383
2 changed files with 14 additions and 6 deletions

View File

@ -110,9 +110,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
onSearch: (q: any) => {
if (!!q) {
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q })
.request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
@ -120,7 +121,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
}
},
change: (q: any) => {
this.getRegionCode(q);
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
this.getRegionCode(str);
}
},
} as SFSelectWidgetSchema
},

View File

@ -121,9 +121,10 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
searchLoadingText: '搜索中...',
allowClear: true,
onSearch: (q: any) => {
if (!!q) {
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q })
.request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map((res: any[]) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
@ -131,7 +132,10 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
}
},
change: (q: any) => {
this.getRegionCode(q);
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
this.getRegionCode(str);
}
}
} as SFSelectWidgetSchema
},