客户 干系人调整

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

@ -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 })
})

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

@ -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,
},
},
{

@ -1,15 +1,16 @@
<template>
<div>
<BasicTable class="ds-table-detail" @register="registerTable">
<!-- <template #tableTitle>
<template #tableTitle>
<span class="title">干系人列表</span>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
<a-button type="link" @click="handleDel">
<!-- <a-button type="link" @click="handleDel">
<span class="iconfont icon-shanchu2"></span>
删除
</a-button>
</a-button> -->
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
@ -23,7 +24,7 @@
]"
/>
</template>
</template> -->
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
<a-modal
@ -138,8 +139,8 @@
}
function handleCreate() {
openModal(true, {
isParent: false,
isUpdate: false,
clientId: props.clientId,
})
}
function handleDel() {
@ -160,3 +161,17 @@
reload()
}
</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