客户 干系人调整

szh-new
张同海 1 month ago
parent 409d4257a1
commit b2660508d2

@ -3,7 +3,7 @@
v-bind="$attrs" v-bind="$attrs"
:use-wrapper="true" :use-wrapper="true"
:title="getTitle" :title="getTitle"
width="60%" width="30%"
@register="registerModal" @register="registerModal"
@ok="handleSave" @ok="handleSave"
> >
@ -57,6 +57,8 @@
}) })
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
console.log(data)
resetFields() resetFields()
setModalProps({ confirmLoading: false, loading: true }) setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
@ -68,12 +70,9 @@
setFieldsValue({ setFieldsValue({
...res.data, ...res.data,
}) })
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
} }
// setModalProps({ confirmLoading: false });
} else { } else {
setFieldsValue({ permissionIdentity: unref(2) }) setFieldsValue({ clientId: data.clientId })
} }
setModalProps({ loading: false }) setModalProps({ loading: false })
}) })

@ -33,12 +33,12 @@ export function ApiGet(query) {
params: query, params: query,
}) })
} }
// 获取客户干系人 (Auth) // 更新客户干系人 (Auth)
export function ApiEdit(query) { export function ApiEdit(data) {
return request<DataResult>({ return request<DataResult>({
url: Api.edit, url: Api.edit,
method: 'get', method: 'post',
params: query, data,
}) })
} }
// 详情 (Auth) // 详情 (Auth)

@ -1,4 +1,5 @@
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetUserList } from '/@/api/common'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
@ -45,20 +46,57 @@ export const formSchema: FormSchema[] = [
show: false, show: false,
}, },
{ {
field: 'carrierId',
label: '', label: '',
field: 'clientId',
component: 'Input', component: 'Input',
show: false, 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', field: 'startDate',
label: '生效日期', label: '生效日期',
component: 'DatePicker', component: 'DatePicker',
required: true, required: true,
colProps: { span: 20 }, colProps: { span: 24 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
style: 'width:100%', style: 'width:100%',
getPopupContainer: () => document.body,
}, },
}, },
{ {
@ -66,10 +104,11 @@ export const formSchema: FormSchema[] = [
label: '失效日期', label: '失效日期',
component: 'DatePicker', component: 'DatePicker',
required: true, required: true,
colProps: { span: 20 }, colProps: { span: 24 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
style: 'width:100%', style: 'width:100%',
getPopupContainer: () => document.body,
}, },
}, },
{ {

@ -1,15 +1,16 @@
<template> <template>
<div> <div>
<BasicTable class="ds-table-detail" @register="registerTable"> <BasicTable class="ds-table-detail" @register="registerTable">
<!-- <template #tableTitle> <template #tableTitle>
<span class="title">干系人列表</span>
<a-button type="link" @click="handleCreate"> <a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
添加 添加
</a-button> </a-button>
<a-button type="link" @click="handleDel"> <!-- <a-button type="link" @click="handleDel">
<span class="iconfont icon-shanchu2"></span> <span class="iconfont icon-shanchu2"></span>
删除 删除
</a-button> </a-button> -->
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
@ -23,7 +24,7 @@
]" ]"
/> />
</template> </template>
</template> --> </template>
</BasicTable> </BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" /> <TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
<a-modal <a-modal
@ -138,8 +139,8 @@
} }
function handleCreate() { function handleCreate() {
openModal(true, { openModal(true, {
isParent: false,
isUpdate: false, isUpdate: false,
clientId: props.clientId,
}) })
} }
function handleDel() { function handleDel() {
@ -160,3 +161,17 @@
reload() reload()
} }
</script> </script>
<style lang="less" scoped>
.ds-table-detail {
margin-top: -16px;
.title {
font-size: 12px;
font-weight: 700;
letter-spacing: 1px;
line-height: 15.84px;
color: rgba(51, 56, 61, 1);
text-align: left;
vertical-align: bottom;
}
}
</style>

Loading…
Cancel
Save