车辆对接
This commit is contained in:
@ -5,6 +5,7 @@ import {
|
||||
SFComponent,
|
||||
SFNumberWidgetSchema,
|
||||
SFSchema,
|
||||
SFSchemaEnum,
|
||||
SFSelectWidgetSchema,
|
||||
SFTextareaWidgetSchema,
|
||||
SFUISchema
|
||||
@ -17,6 +18,8 @@ import { SupplyManagementService } from '../../services/supply-management.servic
|
||||
import { debug } from 'console';
|
||||
import { PublishAddressListComponent } from './address-list/address-list.component';
|
||||
import { PublishSuccessComponent } from './publish-success/publish-success.component';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { of } from 'rxjs';
|
||||
@Component({
|
||||
selector: 'app-publish-goods-onecar-publish',
|
||||
templateUrl: './onecar-publish.component.html',
|
||||
@ -113,14 +116,30 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
initSF1() {
|
||||
this.schema1 = {
|
||||
properties: {
|
||||
shipperAppUserName: {
|
||||
type: 'string',
|
||||
shipperAppUserId: {
|
||||
title: '货主',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
widget: 'select',
|
||||
serverSearch: true,
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q})
|
||||
.pipe(map((res) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
title: '项目',
|
||||
type: 'string',
|
||||
|
||||
Reference in New Issue
Block a user