diff --git a/src/views/baseinfo/infoclient/columns.tsx b/src/views/baseinfo/infoclient/columns.tsx index f48fdfaa..16055ff7 100644 --- a/src/views/baseinfo/infoclient/columns.tsx +++ b/src/views/baseinfo/infoclient/columns.tsx @@ -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 + }, + } + }, }, { diff --git a/src/views/taskmanage/taskList/BLConfirmation/columns.tsx b/src/views/taskmanage/taskList/BLConfirmation/columns.tsx index caf90e68..60b9c608 100644 --- a/src/views/taskmanage/taskList/BLConfirmation/columns.tsx +++ b/src/views/taskmanage/taskList/BLConfirmation/columns.tsx @@ -29,7 +29,6 @@ export const formSchema5: FormSchema[] = [ label: '分提单号', field: 'hblno', component: 'Input', - required: true, defaultValue: null, colProps: { span: 12 }, }, diff --git a/src/views/taskmanage/taskList/BLConfirmation/index.vue b/src/views/taskmanage/taskList/BLConfirmation/index.vue index c27acf14..26e7d699 100644 --- a/src/views/taskmanage/taskList/BLConfirmation/index.vue +++ b/src/views/taskmanage/taskList/BLConfirmation/index.vue @@ -31,24 +31,30 @@