mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-08-09 07:31:52 +08:00
crm-客户:公海抽离,完善跟进
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="820">
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle" :width="820">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="110px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input input-style="width:190px;" v-model="formData.name" placeholder="请输入姓名" />
|
||||
<el-input v-model="formData.name" input-style="width:190px;" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人" prop="ownerUserId">
|
||||
<el-select
|
||||
v-model="formData.ownerUserId"
|
||||
lable-key="nickname"
|
||||
placeholder="请选择负责人"
|
||||
value-key="id"
|
||||
lable-key="nickname"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
@@ -36,9 +36,9 @@
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-select
|
||||
v-model="formData.customerId"
|
||||
lable-key="name"
|
||||
placeholder="请选择客户"
|
||||
value-key="id"
|
||||
lable-key="name"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in customerList"
|
||||
@@ -66,8 +66,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
input-style="width:190px;"
|
||||
v-model="formData.mobile"
|
||||
input-style="width:190px;"
|
||||
placeholder="请输入手机号"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -82,8 +82,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input
|
||||
input-style="width:190px;"
|
||||
v-model="formData.email"
|
||||
input-style="width:190px;"
|
||||
placeholder="请输入邮箱"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -98,8 +98,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="微信" prop="wechat">
|
||||
<el-input
|
||||
input-style="width:190px;"
|
||||
v-model="formData.wechat"
|
||||
input-style="width:190px;"
|
||||
placeholder="请输入微信"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -108,9 +108,9 @@
|
||||
<el-form-item label="下次联系时间" prop="contactNextTime">
|
||||
<el-date-picker
|
||||
v-model="formData.contactNextTime"
|
||||
placeholder="选择下次联系时间"
|
||||
type="datetime"
|
||||
value-format="x"
|
||||
placeholder="选择下次联系时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -129,8 +129,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="detailAddress">
|
||||
<el-input
|
||||
input-style="width:190px;"
|
||||
v-model="formData.detailAddress"
|
||||
input-style="width:190px;"
|
||||
placeholder="请输入地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -143,16 +143,16 @@
|
||||
<el-option
|
||||
v-for="item in allContactList"
|
||||
:key="item.id"
|
||||
:disabled="item.id == formData.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:disabled="item.id == formData.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职位" prop="post">
|
||||
<el-input input-style="width:190px;" v-model="formData.post" placeholder="请输入职位" />
|
||||
<el-input v-model="formData.post" input-style="width:190px;" placeholder="请输入职位" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -180,14 +180,14 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
<script lang="ts" setup>
|
||||
import * as ContactApi from '@/api/crm/contact'
|
||||
import { DICT_TYPE, getIntDictOptions, getBoolDictOptions } from '@/utils/dict'
|
||||
import { DICT_TYPE, getBoolDictOptions, getIntDictOptions } from '@/utils/dict'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import * as CustomerApi from '@/api/crm/customer'
|
||||
import * as AreaApi from '@/api/system/area'
|
||||
@@ -242,7 +242,7 @@ const open = async (type: string, id?: number) => {
|
||||
resetForm()
|
||||
allContactList.value = await ContactApi.getSimpleContactList()
|
||||
userList.value = await UserApi.getSimpleUserList()
|
||||
customerList.value = await CustomerApi.queryAllList()
|
||||
customerList.value = await CustomerApi.getSimpleCustomerList()
|
||||
areaList.value = await AreaApi.getAreaTree()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
|
@@ -2,21 +2,21 @@
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
:model="queryParams"
|
||||
class="-mb-15px"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="客户" prop="customerId">
|
||||
<el-select
|
||||
v-model="queryParams.customerId"
|
||||
class="!w-240px"
|
||||
clearable
|
||||
lable-key="name"
|
||||
placeholder="请选择客户"
|
||||
value-key="id"
|
||||
lable-key="name"
|
||||
@keyup.enter="handleQuery"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in customerList"
|
||||
@@ -30,8 +30,8 @@
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
class="!w-240px"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
placeholder="请输入姓名"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -39,8 +39,8 @@
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
class="!w-240px"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
placeholder="请输入手机号"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -48,8 +48,8 @@
|
||||
<el-input
|
||||
v-model="queryParams.telephone"
|
||||
class="!w-240px"
|
||||
placeholder="请输入电话"
|
||||
clearable
|
||||
placeholder="请输入电话"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -57,8 +57,8 @@
|
||||
<el-input
|
||||
v-model="queryParams.qq"
|
||||
class="!w-240px"
|
||||
placeholder="请输入QQ"
|
||||
clearable
|
||||
placeholder="请输入QQ"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -66,8 +66,8 @@
|
||||
<el-input
|
||||
v-model="queryParams.wechat"
|
||||
class="!w-240px"
|
||||
placeholder="请输入微信"
|
||||
clearable
|
||||
placeholder="请输入微信"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -75,25 +75,33 @@
|
||||
<el-input
|
||||
v-model="queryParams.email"
|
||||
class="!w-240px"
|
||||
placeholder="请输入电子邮箱"
|
||||
clearable
|
||||
placeholder="请输入电子邮箱"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"> <Icon icon="ep:search" class="mr-5px" /> 搜索 </el-button>
|
||||
<el-button @click="resetQuery"> <Icon icon="ep:refresh" class="mr-5px" /> 重置 </el-button>
|
||||
<el-button type="primary" @click="openForm('create')" v-hasPermi="['crm:contact:create']">
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
<el-button @click="handleQuery">
|
||||
<Icon class="mr-5px" icon="ep:search" />
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<Icon class="mr-5px" icon="ep:refresh" />
|
||||
重置
|
||||
</el-button>
|
||||
<el-button v-hasPermi="['crm:contact:create']" type="primary" @click="openForm('create')">
|
||||
<Icon class="mr-5px" icon="ep:plus" />
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['crm:contact:export']"
|
||||
:loading="exportLoading"
|
||||
plain
|
||||
type="success"
|
||||
@click="handleExport"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
<Icon class="mr-5px" icon="ep:download" />
|
||||
导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -101,30 +109,30 @@
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="姓名" fixed="left" align="center" prop="name" width="140">
|
||||
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
|
||||
<el-table-column align="center" fixed="left" label="姓名" prop="name" width="140">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" :underline="false" @click="openDetail(scope.row.id)">
|
||||
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
|
||||
{{ scope.row.name }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户名称" fixed="left" align="center" prop="customerName" width="120">
|
||||
<el-table-column align="center" fixed="left" label="客户名称" prop="customerName" width="120">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
type="primary"
|
||||
@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 align="center" label="手机" prop="mobile" width="120" />
|
||||
<el-table-column align="center" label="电话" prop="telephone" width="120" />
|
||||
<el-table-column align="center" label="邮箱" prop="email" width="120" />
|
||||
<el-table-column align="center" label="职位" prop="post" width="120" />
|
||||
<el-table-column align="center" label="地址" prop="detailAddress" width="120" />
|
||||
<el-table-column
|
||||
:formatter="dateFormatter"
|
||||
align="center"
|
||||
@@ -132,56 +140,56 @@
|
||||
prop="contactNextTime"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="关键决策人" align="center" prop="master" width="100">
|
||||
<el-table-column align="center" label="备注" prop="remark" />
|
||||
<el-table-column align="center" label="关键决策人" 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 align="center" label="直属上级" prop="parentName" width="140" />
|
||||
<el-table-column
|
||||
label="最后跟进时间"
|
||||
align="center"
|
||||
prop="contactLastTime"
|
||||
:formatter="dateFormatter"
|
||||
align="center"
|
||||
label="最后跟进时间"
|
||||
prop="contactLastTime"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="性别" align="center" prop="sex">
|
||||
<el-table-column align="center" label="性别" 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="ownerUserName" width="120" />
|
||||
<el-table-column label="创建人" align="center" prop="creatorName" width="120" />
|
||||
<el-table-column align="center" label="负责人" prop="ownerUserName" width="120" />
|
||||
<el-table-column align="center" label="创建人" prop="creatorName" width="120" />
|
||||
<el-table-column
|
||||
:formatter="dateFormatter"
|
||||
align="center"
|
||||
label="更新时间"
|
||||
align="center"
|
||||
prop="updateTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
align="center"
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200">
|
||||
<el-table-column align="center" fixed="right" label="操作" width="200">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-hasPermi="['crm:contact:update']"
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['crm:contact:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasPermi="['crm:contact:delete']"
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['crm:contact:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
@@ -190,9 +198,9 @@
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
v-model:page="queryParams.pageNo"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
@@ -201,7 +209,7 @@
|
||||
<ContactForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script lang="ts" setup>
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import * as ContactApi from '@/api/crm/contact'
|
||||
@@ -295,6 +303,7 @@ const { push } = useRouter()
|
||||
const openDetail = (id: number) => {
|
||||
push({ name: 'CrmContactDetail', params: { id } })
|
||||
}
|
||||
|
||||
/** 打开客户详情 */
|
||||
const openCustomerDetail = (id: number) => {
|
||||
push({ name: 'CrmCustomerDetail', params: { id } })
|
||||
@@ -303,6 +312,6 @@ const openCustomerDetail = (id: number) => {
|
||||
/** 初始化 **/
|
||||
onMounted(async () => {
|
||||
await getList()
|
||||
customerList.value = await CustomerApi.queryAllList()
|
||||
customerList.value = await CustomerApi.getSimpleCustomerList()
|
||||
})
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user