车辆对接

This commit is contained in:
wangshiming
2022-01-12 14:33:13 +08:00
parent 22ee46d6b6
commit 0352cd2f08
5 changed files with 59 additions and 23 deletions

View File

@ -287,18 +287,35 @@ tabs = {
asyncData: () => this.service2.getNetworkFreightForwarder(), asyncData: () => this.service2.getNetworkFreightForwarder(),
}, },
}, },
goodsName: { // goodsName: {
// type: 'string',
// title: '货物名称',
// ui: {
// widget: 'select',
// placeholder: '请选择',
// visibleIf: {
// _$expand: (value: boolean) => value,
// },
// allowClear: true,
// asyncData: () => this.getCatalogueMember(),
// },
// },
goodsTypeId: {
type: 'string', type: 'string',
title: '货物名称', title: '货物名称',
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
visibleIf: { errors: { required: '请选择货物类型' },
_$expand: (value: boolean) => value, asyncData: () =>
}, this.service2.loadConfigByKey('goods.name.config.type').pipe(
allowClear: true, map((data: any) => {
asyncData: () => this.getCatalogueMember(), return data[0].children?.map((m: any) => {
}, return { label: m.name, value: m.id };
});
})
),
} as SFSelectWidgetSchema
}, },
serviceType: { serviceType: {
title: '服务类型', title: '服务类型',

View File

@ -305,13 +305,10 @@ resourceStatus: any;
type: 'string', type: 'string',
title: '货物名称', title: '货物名称',
ui: { ui: {
widget: 'select',
placeholder: '请选择', placeholder: '请选择',
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
allowClear: true,
asyncData: () => this.getCatalogueMember(),
}, },
}, },
serviceType: { serviceType: {

View File

@ -261,18 +261,25 @@ tabs = {
}, },
} as SFSelectWidgetSchema, } as SFSelectWidgetSchema,
}, },
goodsName: { goodsNameId: {
type: 'string', type: 'string',
title: '货物名称', title: '货物名称',
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
errors: { required: '请选择货物类型' },
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value
}, },
allowClear: true, asyncData: () =>
asyncData: () => this.getCatalogueMember(), this.service2.loadConfigByKey('goods.name.config.type').pipe(
}, map((data: any) => {
return data[0].children?.map((m: any) => {
return { label: m.name, value: m.id };
});
})
),
} as SFSelectWidgetSchema
}, },
serviceType: { serviceType: {
title: '服务类型', title: '服务类型',

View File

@ -102,9 +102,6 @@ export class WaybillManagementVehicleComponent implements OnInit {
serverSearch: true, serverSearch: true,
searchDebounceTime: 300, searchDebounceTime: 300,
searchLoadingText: '搜索中...', searchLoadingText: '搜索中...',
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => { onSearch: (q: any) => {
console.log(q) console.log(q)
if (!!q) { if (!!q) {
@ -260,19 +257,36 @@ export class WaybillManagementVehicleComponent implements OnInit {
asyncData: () => this.service2.getNetworkFreightForwarder() asyncData: () => this.service2.getNetworkFreightForwarder()
} }
}, },
goodsName: { // goodsName: {
// type: 'string',
// title: '货物名称',
// ui: {
// placeholder: '请选择',
// visibleIf: {
// _$expand: (value: boolean) => value
// },
// }
// }
goodsNameId: {
type: 'string', type: 'string',
title: '货物名称', title: '货物名称',
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
errors: { required: '请选择货物类型' },
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, },
allowClear: true, asyncData: () =>
asyncData: () => this.getCatalogueMember() this.service2.loadConfigByKey('goods.name.config.type').pipe(
} map((data: any) => {
} return data[0].children?.map((m: any) => {
return { label: m.name, value: m.id };
});
})
),
} as SFSelectWidgetSchema
},
}, },
type: 'object' type: 'object'
}; };

View File

@ -140,6 +140,7 @@ export class ShipperBaseService extends BaseService {
getNetworkTransporterById(id: string) { getNetworkTransporterById(id: string) {
return this.request(this.$api_get_network_freight_forwarder_one, { id }); return this.request(this.$api_get_network_freight_forwarder_one, { id });
} }
// 根据FullKey获取系统子配置(树) // 根据FullKey获取系统子配置(树)
loadConfigByKey(configFullKey:string ='') { loadConfigByKey(configFullKey:string ='') {
return this.http.post(this.$api_getSysConfigTreeByParentFullKey, { configFullKey }).pipe( return this.http.post(this.$api_getSysConfigTreeByParentFullKey, { configFullKey }).pipe(