diff --git a/src/views/baseinfo/infoclient/ClientStakeholder/TenantAuditStepModal.vue b/src/views/baseinfo/infoclient/ClientStakeholder/TenantAuditStepModal.vue index 2c05ca94..3527187c 100644 --- a/src/views/baseinfo/infoclient/ClientStakeholder/TenantAuditStepModal.vue +++ b/src/views/baseinfo/infoclient/ClientStakeholder/TenantAuditStepModal.vue @@ -3,7 +3,7 @@ v-bind="$attrs" :use-wrapper="true" :title="getTitle" - width="60%" + width="30%" @register="registerModal" @ok="handleSave" > @@ -57,6 +57,8 @@ }) const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { + console.log(data) + resetFields() setModalProps({ confirmLoading: false, loading: true }) isUpdate.value = !!data?.isUpdate @@ -68,12 +70,9 @@ setFieldsValue({ ...res.data, }) - // console.log('返回数据Form', getFieldsValue()); - // setFieldsValue({ trainId: unref(res.data.trainId) }); } - // setModalProps({ confirmLoading: false }); } else { - setFieldsValue({ permissionIdentity: unref(2) }) + setFieldsValue({ clientId: data.clientId }) } setModalProps({ loading: false }) }) diff --git a/src/views/baseinfo/infoclient/ClientStakeholder/api.ts b/src/views/baseinfo/infoclient/ClientStakeholder/api.ts index c2904cd6..508f8555 100644 --- a/src/views/baseinfo/infoclient/ClientStakeholder/api.ts +++ b/src/views/baseinfo/infoclient/ClientStakeholder/api.ts @@ -33,12 +33,12 @@ export function ApiGet(query) { params: query, }) } -// 获取客户干系人 (Auth) -export function ApiEdit(query) { +// 更新客户干系人 (Auth) +export function ApiEdit(data) { return request({ url: Api.edit, - method: 'get', - params: query, + method: 'post', + data, }) } // 详情 (Auth) diff --git a/src/views/baseinfo/infoclient/ClientStakeholder/columns.tsx b/src/views/baseinfo/infoclient/ClientStakeholder/columns.tsx index defd34ee..d8a0a4ff 100644 --- a/src/views/baseinfo/infoclient/ClientStakeholder/columns.tsx +++ b/src/views/baseinfo/infoclient/ClientStakeholder/columns.tsx @@ -1,4 +1,5 @@ import { BasicColumn, FormSchema } from '/@/components/Table' +import { GetUserList } from '/@/api/common' export const columns: BasicColumn[] = [ { @@ -45,20 +46,57 @@ export const formSchema: FormSchema[] = [ show: false, }, { - field: 'carrierId', label: '', + field: 'clientId', component: 'Input', show: false, }, + { + label: '干系人Name', + field: 'createByName', + component: 'Input', + show: false, + }, + { + label: '干系人', + field: 'createBy', + component: 'ApiSelect', + required: false, + defaultValue: null, + dynamicDisabled: false, + colProps: { span: 24 }, + componentProps: ({ formModel }) => { + return { + api: GetUserList, + labelField: 'label', + valueField: 'value', + resultField: 'data', + getPopupContainer: () => document.body, + onChange: (e, obj) => { + if (e && obj) { + console.log(e, obj) + formModel.createBy = obj.value + formModel.createByName = obj.label + } + if (!e && !obj) { + formModel.createBy = '' + formModel.createByName = '' + } + }, + } + }, + }, + { field: 'startDate', label: '生效日期', component: 'DatePicker', required: true, - colProps: { span: 20 }, + colProps: { span: 24 }, defaultValue: '', componentProps: { style: 'width:100%', + getPopupContainer: () => document.body, }, }, { @@ -66,10 +104,11 @@ export const formSchema: FormSchema[] = [ label: '失效日期', component: 'DatePicker', required: true, - colProps: { span: 20 }, + colProps: { span: 24 }, defaultValue: '', componentProps: { style: 'width:100%', + getPopupContainer: () => document.body, }, }, { diff --git a/src/views/baseinfo/infoclient/ClientStakeholder/index.vue b/src/views/baseinfo/infoclient/ClientStakeholder/index.vue index fdfa400a..868012f5 100644 --- a/src/views/baseinfo/infoclient/ClientStakeholder/index.vue +++ b/src/views/baseinfo/infoclient/ClientStakeholder/index.vue @@ -1,15 +1,16 @@ --> + +