✨ CRM:【联系人】统一字段
parent
d71097ac31
commit
5e265a9094
|
@ -8,7 +8,7 @@ export interface ContactVO {
|
|||
email: string
|
||||
post: string
|
||||
customerId: number
|
||||
address: string
|
||||
detailAddress: string
|
||||
remark: string
|
||||
ownerUserId: string
|
||||
lastTime: Date
|
||||
|
|
|
@ -49,8 +49,8 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12"
|
||||
><el-form-item label="性别" prop="sex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-select v-model="formData.sex" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)"
|
||||
|
@ -58,8 +58,9 @@
|
|||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select> </el-form-item
|
||||
></el-col>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
|
@ -72,8 +73,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="座机" prop="telephone">
|
||||
<el-input v-model="formData.telephone" placeholder="请输入座机" style="width: 215px" />
|
||||
<el-form-item label="电话" prop="telephone">
|
||||
<el-input v-model="formData.telephone" placeholder="请输入电话" style="width: 215px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -104,10 +105,10 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="下次联系时间" prop="nextTime">
|
||||
<el-form-item label="下次联系时间" prop="contactNextTime">
|
||||
<el-date-picker
|
||||
v-model="formData.nextTime"
|
||||
type="date"
|
||||
v-model="formData.contactNextTime"
|
||||
type="datetime"
|
||||
value-format="x"
|
||||
placeholder="选择下次联系时间"
|
||||
/>
|
||||
|
@ -126,15 +127,17 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-form-item label="地址" prop="detailAddress">
|
||||
<el-input
|
||||
input-style="width:190px;"
|
||||
v-model="formData.address"
|
||||
v-model="formData.detailAddress"
|
||||
placeholder="请输入地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> </el-row
|
||||
><el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- TODO @zyna:解决下 ide 报错 -->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="直属上级" prop="parentId">
|
||||
<el-select v-model="formData.parentId" placeholder="请选择">
|
||||
|
@ -152,10 +155,11 @@
|
|||
<el-form-item label="职位" prop="post">
|
||||
<el-input input-style="width:190px;" v-model="formData.post" placeholder="请输入职位" />
|
||||
</el-form-item>
|
||||
</el-col> </el-row
|
||||
><el-row>
|
||||
<el-col :span="12"
|
||||
><el-form-item label="是否关键决策人" prop="master" style="width: 400px">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="关键决策人" prop="master" style="width: 400px">
|
||||
<el-radio-group v-model="formData.master">
|
||||
<el-radio
|
||||
v-for="dict in getBoolDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING)"
|
||||
|
@ -169,8 +173,8 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24"
|
||||
><el-form-item label="备注" prop="remark">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -192,19 +196,20 @@ import { defaultProps } from '@/utils/tree'
|
|||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const areaList = ref([]) // 地区列表
|
||||
const formData = ref({
|
||||
nextTime: undefined,
|
||||
contactNextTime: undefined,
|
||||
mobile: undefined,
|
||||
telephone: undefined,
|
||||
email: undefined,
|
||||
customerId: undefined,
|
||||
customerName: undefined,
|
||||
address: undefined,
|
||||
detailAddress: undefined,
|
||||
remark: undefined,
|
||||
ownerUserId: undefined,
|
||||
lastTime: undefined,
|
||||
|
@ -279,13 +284,14 @@ const submitForm = async () => {
|
|||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
// TODO zyna:ide 告警,看看怎么去掉哈;
|
||||
formData.value = {
|
||||
nextTime: undefined,
|
||||
contactNextTime: undefined,
|
||||
mobile: undefined,
|
||||
telephone: undefined,
|
||||
email: undefined,
|
||||
customerId: undefined,
|
||||
address: undefined,
|
||||
detailAddress: undefined,
|
||||
remark: undefined,
|
||||
ownerUserId: undefined,
|
||||
lastTime: undefined,
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<el-form-item label="客户" prop="customerId">
|
||||
<el-select
|
||||
v-model="queryParams.customerId"
|
||||
class="!w-240px"
|
||||
placeholder="请选择客户"
|
||||
value-key="id"
|
||||
lable-key="name"
|
||||
|
@ -28,56 +29,55 @@
|
|||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
class="!w-240px"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
class="!w-240px"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="座机" prop="telephone">
|
||||
<el-form-item label="电话" prop="telephone">
|
||||
<el-input
|
||||
v-model="queryParams.telephone"
|
||||
class="!w-240px"
|
||||
placeholder="请输入电话"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="QQ" prop="qq">
|
||||
<el-input
|
||||
v-model="queryParams.qq"
|
||||
class="!w-240px"
|
||||
placeholder="请输入QQ"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="微信" prop="wechat">
|
||||
<el-input
|
||||
v-model="queryParams.wechat"
|
||||
class="!w-240px"
|
||||
placeholder="请输入微信"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子邮箱" prop="email">
|
||||
<el-input
|
||||
v-model="queryParams.email"
|
||||
class="!w-240px"
|
||||
placeholder="请输入电子邮箱"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
@ -102,53 +102,57 @@
|
|||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="姓名" fixed="left" align="center" prop="name">
|
||||
<el-table-column label="姓名" fixed="left" align="center" prop="name" width="140">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" :underline="false" @click="openDetail(scope.row.id)">
|
||||
{{ scope.row.name }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户" fixed="left" align="center" prop="customerName" />
|
||||
<el-table-column label="客户名称" fixed="left" align="center" prop="customerName" width="120">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
@click="openCustomerDetail(scope.row.customerId)"
|
||||
>
|
||||
{{ scope.row.customerName }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机" align="center" prop="mobile" width="120" />
|
||||
<el-table-column label="电话" align="center" prop="telephone" width="120" />
|
||||
<el-table-column label="邮箱" align="center" prop="email" width="120" />
|
||||
<el-table-column label="职位" align="center" prop="post" width="120" />
|
||||
<el-table-column label="地址" align="center" prop="detailAddress" width="120" />
|
||||
<el-table-column
|
||||
:formatter="dateFormatter"
|
||||
align="center"
|
||||
label="下次联系时间"
|
||||
prop="contactNextTime"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="关键决策人" align="center" prop="master" width="100">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.master" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="直属上级" align="center" prop="parentName" width="140" />
|
||||
<el-table-column
|
||||
label="最后跟进时间"
|
||||
align="center"
|
||||
prop="contactLastTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="性别" align="center" prop="sex">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="scope.row.sex" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="职位" align="center" prop="post" />
|
||||
<el-table-column label="是否关键决策人" align="center" prop="master">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.master" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="直属上级" align="center" prop="parentName" />
|
||||
<el-table-column label="手机号" align="center" prop="mobile" />
|
||||
<el-table-column label="座机" align="center" prop="telephone" />
|
||||
<el-table-column label="QQ" align="center" prop="qq" />
|
||||
<el-table-column label="微信" align="center" prop="wechat" />
|
||||
<el-table-column label="邮箱" align="center" prop="email" />
|
||||
<el-table-column label="地址" align="center" prop="address" />
|
||||
<el-table-column
|
||||
label="下次联系时间"
|
||||
align="center"
|
||||
prop="nextTime"
|
||||
width="180px"
|
||||
:formatter="dateFormatter"
|
||||
/>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column
|
||||
label="最后跟进时间"
|
||||
align="center"
|
||||
prop="lastTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="负责人" align="center" prop="ownerUserId">
|
||||
<template #default="scope">
|
||||
{{ scope.row.ownerUserName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="所属部门" align="center" prop="ownerUserId" /> -->
|
||||
<el-table-column label="负责人" align="center" prop="ownerUserName" width="120" />
|
||||
<el-table-column label="创建人" align="center" prop="creatorName" width="120" />
|
||||
<el-table-column
|
||||
label="更新时间"
|
||||
align="center"
|
||||
|
@ -163,21 +167,10 @@
|
|||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="创建人"
|
||||
align="center"
|
||||
prop="creator"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ userList.find((user) => user.id === scope.row.creator)?.nickname }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
plain
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['crm:contact:update']"
|
||||
|
@ -185,7 +178,7 @@
|
|||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['crm:contact:delete']"
|
||||
|
@ -228,23 +221,13 @@ const customerList = ref<CustomerApi.CustomerVO[]>([]) // 客户列表
|
|||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
nextTime: [],
|
||||
mobile: null,
|
||||
telephone: null,
|
||||
email: null,
|
||||
customerId: null,
|
||||
address: null,
|
||||
remark: null,
|
||||
ownerUserId: null,
|
||||
createTime: [],
|
||||
lastTime: [],
|
||||
parentId: null,
|
||||
name: null,
|
||||
post: null,
|
||||
qq: null,
|
||||
wechat: null,
|
||||
sex: null,
|
||||
policyMakers: null
|
||||
mobile: undefined,
|
||||
telephone: undefined,
|
||||
email: undefined,
|
||||
customerId: undefined,
|
||||
name: undefined,
|
||||
qq: undefined,
|
||||
wechat: undefined
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
@ -307,11 +290,15 @@ const handleExport = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
/** 打开客户详情 */
|
||||
/** 打开联系人详情 */
|
||||
const { push } = useRouter()
|
||||
const openDetail = (id: number) => {
|
||||
push({ name: 'CrmContactDetail', params: { id } })
|
||||
}
|
||||
/** 打开客户详情 */
|
||||
const openCustomerDetail = (id: number) => {
|
||||
push({ name: 'CrmCustomerDetail', params: { id } })
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(async () => {
|
||||
|
|
Loading…
Reference in New Issue