|
|
|
@ -926,79 +926,43 @@ export const formSchema: FormSchema[] = [
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
componentProps: (En) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetClientSourceSelectList,
|
|
|
|
|
labelField: 'sourceName',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: async (e, obj) => {
|
|
|
|
|
const { formModel, formActionType } = En
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.sourceId = obj.value
|
|
|
|
|
formModel.sourceName = obj.label
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.sourceId = ''
|
|
|
|
|
formModel.sourceName = ''
|
|
|
|
|
}
|
|
|
|
|
if (e) {
|
|
|
|
|
const FnsourceDetailId: any = await GetClientSourceDetailSelectList({
|
|
|
|
|
id: e,
|
|
|
|
|
})
|
|
|
|
|
if (FnsourceDetailId.succeeded) {
|
|
|
|
|
sourceDetailId.value.splice(0)
|
|
|
|
|
FnsourceDetailId.data.forEach((e) => {
|
|
|
|
|
sourceDetailId.value.push({ label: e.detailName, value: e.id })
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (formActionType) {
|
|
|
|
|
formModel.sourceDetailId = ''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// label: '业务来源',
|
|
|
|
|
// field: 'sourceId',
|
|
|
|
|
// component: 'ApiSelect',
|
|
|
|
|
// required: false,
|
|
|
|
|
// dynamicDisabled: false,
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// componentProps: ({ formActionType, formModel }) => {
|
|
|
|
|
// return {
|
|
|
|
|
// allowClear: true,
|
|
|
|
|
// showSearch: true,
|
|
|
|
|
// option: optionsStore.getOptionsByCode('GetClientSourceSelectList'),
|
|
|
|
|
// labelField: 'sourceName',
|
|
|
|
|
// valueField: 'id',
|
|
|
|
|
// filterOption: (input: string, option: any) => {
|
|
|
|
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
// },
|
|
|
|
|
// onChange: async (e, obj) => {
|
|
|
|
|
// if (e && obj) {
|
|
|
|
|
// formModel.sourceId = obj.value
|
|
|
|
|
// formModel.sourceName = obj.label
|
|
|
|
|
// }
|
|
|
|
|
// if (!e && !obj) {
|
|
|
|
|
// formModel.sourceId = ''
|
|
|
|
|
// formModel.sourceName = ''
|
|
|
|
|
// }
|
|
|
|
|
// if (e) {
|
|
|
|
|
// if (formActionType) {
|
|
|
|
|
// const { updateSchema } = formActionType
|
|
|
|
|
// let Arr: any = []
|
|
|
|
|
// await GetClientSourceDetailSelectList({ id: e }).then((res) => {
|
|
|
|
|
// res.data.forEach((item) => {
|
|
|
|
|
// Arr.push({ label: item.detailName, value: item.id })
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
// updateSchema({
|
|
|
|
|
// label: '来源明细',
|
|
|
|
|
// field: 'sourceDetailId',
|
|
|
|
|
// component: 'Select',
|
|
|
|
|
// required: false,
|
|
|
|
|
// dynamicDisabled: ({ values }) => {
|
|
|
|
|
// return !values.sourceId
|
|
|
|
|
// },
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// componentProps: ({ formModel }) => {
|
|
|
|
|
// return {
|
|
|
|
|
// allowClear: true,
|
|
|
|
|
// options: Arr,
|
|
|
|
|
// showSearch: true,
|
|
|
|
|
// filterOption: (input: string, option: any) => {
|
|
|
|
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
// },
|
|
|
|
|
// onChange: (e, obj) => {
|
|
|
|
|
// if (e && obj) {
|
|
|
|
|
// formModel.sourceDetailId = obj.value
|
|
|
|
|
// formModel.sourceDetailName = obj.label
|
|
|
|
|
// }
|
|
|
|
|
// if (!e && !obj) {
|
|
|
|
|
// formModel.sourceDetailId = ''
|
|
|
|
|
// formModel.sourceDetailName = ''
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// formModel.sourceDetailId = ''
|
|
|
|
|
// },
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// 来源明细Name
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
@ -1011,8 +975,35 @@ export const formSchema: FormSchema[] = [
|
|
|
|
|
field: 'sourceDetailId',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
required: false,
|
|
|
|
|
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
dynamicDisabled: ({ values }) => {
|
|
|
|
|
return !values.sourceId
|
|
|
|
|
},
|
|
|
|
|
componentProps: (En) => {
|
|
|
|
|
return {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
options: sourceDetailId.value,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
const { formModel } = En
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.sourceDetailId = obj.value
|
|
|
|
|
formModel.sourceDetailName = obj.label
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.sourceDetailId = ''
|
|
|
|
|
formModel.sourceDetailName = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = En
|
|
|
|
|
formActionType ? formActionType.linkageForm(En) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|