车辆对接
This commit is contained in:
@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
@ -79,7 +80,7 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
count: 0,
|
||||
},
|
||||
];
|
||||
constructor(public service: SupplyManagementService, private modal: NzModalService) { }
|
||||
constructor(public service: SupplyManagementService, private modal: NzModalService,public service2: ShipperBaseService,) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -104,41 +105,50 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
/**
|
||||
* 初始化查询表单
|
||||
*/
|
||||
initSF() {
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
no: {
|
||||
billCode: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
title: '订单号'
|
||||
},
|
||||
no2: {
|
||||
resourceCode: {
|
||||
type: 'string',
|
||||
title: '货源编号'
|
||||
},
|
||||
no1: {
|
||||
externalResourceCode: {
|
||||
type: 'string',
|
||||
title: '货主'
|
||||
title: '外部订单号'
|
||||
},
|
||||
no3: {
|
||||
loadingPlace: {
|
||||
type: 'string',
|
||||
title: '装货地',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
no4: {
|
||||
dischargePlace: {
|
||||
type: 'string',
|
||||
title: '卸货地',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
brandId: {
|
||||
// driverName: {
|
||||
// type: 'string',
|
||||
// title: '承运司机',
|
||||
// ui: {
|
||||
// visibleIf: {
|
||||
// _$expand: (value: boolean) => value,
|
||||
// },
|
||||
// }
|
||||
// },
|
||||
driverId: {
|
||||
title: '承运司机',
|
||||
type: 'string',
|
||||
ui: {
|
||||
@ -149,68 +159,72 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
return this.service
|
||||
.request(this.service.$api_get_getDriverInfo, { keyword: q,
|
||||
model: 1, type: 1 })
|
||||
.pipe(map((res) => (res as any[]).map((i) => ({ label: i.name, value: i.id } as SFSchemaEnum))))
|
||||
.request(this.service.$api_get_getDriverInfo, { keyword: q, model: 1, type: 1 })
|
||||
.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,
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
no9: {
|
||||
type: 'string',
|
||||
title: '车牌号',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
brandId2: {
|
||||
title: '车队长',
|
||||
no10: {
|
||||
type: 'string',
|
||||
title: '收款人',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
wayBillType: {
|
||||
title: '运单类型',
|
||||
type: 'string',
|
||||
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([]);
|
||||
}
|
||||
},
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'goodresourceType' },
|
||||
containAllLable: true,
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
sex: {
|
||||
title: '支付状态',
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
shipperId: {
|
||||
title: '托运人',
|
||||
type: 'string',
|
||||
default: 0,
|
||||
enum: [
|
||||
{ label: '未知', value: 0 },
|
||||
{ label: '男', value: 1 },
|
||||
{ label: '女', value: 2 },
|
||||
{ label: '保密', value: 3 },
|
||||
],
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'BulkFreightUnitPriceType' },
|
||||
containAllLable: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
enterpriseInfoName: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
allowClear: true,
|
||||
asyncData: () => this.service2.getNetworkFreightForwarder()
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
title: '创建时间',
|
||||
@ -220,72 +234,12 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFDateWidgetSchema,
|
||||
},
|
||||
appId: {
|
||||
type: 'string',
|
||||
title: '是否风险单',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.getCatalogueMember(),
|
||||
},
|
||||
},
|
||||
sex3: {
|
||||
title: '网络货运人',
|
||||
type: 'string',
|
||||
default: 0,
|
||||
enum: [
|
||||
{ label: '未知', value: 0 },
|
||||
{ label: '男', value: 1 },
|
||||
{ label: '女', value: 2 },
|
||||
{ label: '保密', value: 3 },
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
sex4: {
|
||||
title: '货物名称',
|
||||
type: 'string',
|
||||
default: 0,
|
||||
enum: [
|
||||
{ label: '未知', value: 0 },
|
||||
{ label: '男', value: 1 },
|
||||
{ label: '女', value: 2 },
|
||||
{ label: '保密', value: 3 },
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
serviceType: {
|
||||
title: '服务类型',
|
||||
type: 'string',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'ServiceType' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
}
|
||||
},
|
||||
type: 'object',
|
||||
type: 'object'
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
@ -296,12 +250,11 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' },
|
||||
|
||||
{
|
||||
title: '订单号',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
render: 'goodsId'
|
||||
render: 'billCode'
|
||||
},
|
||||
{
|
||||
title: '运费明细',
|
||||
|
||||
Reference in New Issue
Block a user