车辆对接

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(),
},
},
goodsName: {
// goodsName: {
// type: 'string',
// title: '货物名称',
// ui: {
// widget: 'select',
// placeholder: '请选择',
// visibleIf: {
// _$expand: (value: boolean) => value,
// },
// allowClear: true,
// asyncData: () => this.getCatalogueMember(),
// },
// },
goodsTypeId: {
type: 'string',
title: '货物名称',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.getCatalogueMember(),
},
errors: { required: '请选择货物类型' },
asyncData: () =>
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: {
title: '服务类型',

View File

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

View File

@ -261,18 +261,25 @@ tabs = {
},
} as SFSelectWidgetSchema,
},
goodsName: {
goodsNameId: {
type: 'string',
title: '货物名称',
ui: {
widget: 'select',
placeholder: '请选择',
errors: { required: '请选择货物类型' },
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.getCatalogueMember(),
_$expand: (value: boolean) => value
},
asyncData: () =>
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: {
title: '服务类型',

View File

@ -102,9 +102,6 @@ export class WaybillManagementVehicleComponent implements OnInit {
serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => {
console.log(q)
if (!!q) {
@ -260,19 +257,36 @@ export class WaybillManagementVehicleComponent implements OnInit {
asyncData: () => this.service2.getNetworkFreightForwarder()
}
},
goodsName: {
// goodsName: {
// type: 'string',
// title: '货物名称',
// ui: {
// placeholder: '请选择',
// visibleIf: {
// _$expand: (value: boolean) => value
// },
// }
// }
goodsNameId: {
type: 'string',
title: '货物名称',
ui: {
widget: 'select',
placeholder: '请选择',
errors: { required: '请选择货物类型' },
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true,
asyncData: () => this.getCatalogueMember()
}
}
asyncData: () =>
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'
};

View File

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