车辆对接

This commit is contained in:
wangshiming
2021-12-16 20:28:23 +08:00
parent 7150f45b31
commit 4350fecab1
23 changed files with 494 additions and 231 deletions

View File

@ -1,8 +1,9 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { SupplyManagementService } from '../../services/waybill-management.service';
@ -13,7 +14,6 @@ import { SupplyManagementService } from '../../services/waybill-management.servi
styleUrls: ['./vehicle.component.less']
})
export class WaybillManagementVehicleComponent implements OnInit {
url = `/user?_allow_anonymous=true`;
ui: SFUISchema = {};
schema: SFSchema = {};
auditMany = false;
@ -118,7 +118,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
},
no1: {
type: 'string',
title: '托运公司'
title: '货主'
},
no3: {
type: 'string',
@ -156,15 +156,30 @@ export class WaybillManagementVehicleComponent implements OnInit {
},
}
},
no10: {
brandId2: {
title: '车队长',
type: 'string',
title: '收款人',
ui: {
widget: 'select',
serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
onSearch: (q: any) => {
if (!!q) {
return this.service
.request(this.service.$api_get_getDriverInfo, { keyword: q,
model: 1, type: 2 })
.pipe(map((res) => (res as any[]).map((i) => ({ label: i.name, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
visibleIf: {
_$expand: (value: boolean) => value,
},
}
},
} as SFSelectWidgetSchema,
},
sex: {
title: '支付状态',
type: 'string',
@ -207,6 +222,33 @@ export class WaybillManagementVehicleComponent implements OnInit {
asyncData: () => this.getCatalogueMember(),
},
},
appId2: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.getCatalogueMember(),
},
},
appId4: {
type: 'string',
title: '货物名称',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.getCatalogueMember(),
},
},
},
type: 'object',
};