crm:code review 联系人详情
This commit is contained in:
parent
24773a6eaa
commit
1ba450103e
@ -1,10 +1,3 @@
|
|||||||
/*
|
|
||||||
* @Author: zyna
|
|
||||||
* @Date: 2023-11-05 13:34:41
|
|
||||||
* @LastEditTime: 2023-11-26 20:47:04
|
|
||||||
* @FilePath: \yudao-ui-admin-vue3\src\api\crm\contact\index.ts
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
export interface ContactVO {
|
export interface ContactVO {
|
||||||
@ -28,8 +21,8 @@ export interface ContactVO {
|
|||||||
creatorName: string
|
creatorName: string
|
||||||
updateTime?: Date
|
updateTime?: Date
|
||||||
createTime?: Date
|
createTime?: Date
|
||||||
customerName: string,
|
customerName: string
|
||||||
areaName: string,
|
areaName: string
|
||||||
ownerUserName: string
|
ownerUserName: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,6 +55,7 @@ export const deleteContact = async (id: number) => {
|
|||||||
export const exportContact = async (params) => {
|
export const exportContact = async (params) => {
|
||||||
return await request.download({ url: `/crm/contact/export-excel`, params })
|
return await request.download({ url: `/crm/contact/export-excel`, params })
|
||||||
}
|
}
|
||||||
|
|
||||||
export const simpleAllList = async () => {
|
export const simpleAllList = async () => {
|
||||||
return await request.get({ url: `/crm/contact/simple-all-list` })
|
return await request.get({ url: `/crm/contact/simple-all-list` })
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,7 @@ export const deleteCustomer = async (id: number) => {
|
|||||||
export const exportCustomer = async (params) => {
|
export const exportCustomer = async (params) => {
|
||||||
return await request.download({ url: `/crm/customer/export-excel`, params })
|
return await request.download({ url: `/crm/customer/export-excel`, params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 客户列表
|
// 客户列表
|
||||||
export const queryAllList = async () => {
|
export const queryAllList = async () => {
|
||||||
return await request.get({ url: `/crm/customer/query-all-list` })
|
return await request.get({ url: `/crm/customer/query-all-list` })
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="820">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="820">
|
||||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="110px" v-loading="formLoading">
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
:model="formData"
|
||||||
|
:rules="formRules"
|
||||||
|
label-width="110px"
|
||||||
|
v-loading="formLoading"
|
||||||
|
>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="姓名" prop="name">
|
<el-form-item label="姓名" prop="name">
|
||||||
@ -9,8 +15,18 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="负责人" prop="ownerUserId">
|
<el-form-item label="负责人" prop="ownerUserId">
|
||||||
<el-select v-model="formData.ownerUserId" placeholder="请选择负责人" value-key="id" lable-key="nickname">
|
<el-select
|
||||||
<el-option v-for="item in userList" :key="item.id" :label="item.nickname" :value="item.id" />
|
v-model="formData.ownerUserId"
|
||||||
|
placeholder="请选择负责人"
|
||||||
|
value-key="id"
|
||||||
|
lable-key="nickname"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in userList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -18,23 +34,41 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="客户名称" prop="customerName">
|
<el-form-item label="客户名称" prop="customerName">
|
||||||
<el-select v-model="formData.customerId" placeholder="请选择客户" value-key="id" lable-key="name">
|
<el-select
|
||||||
<el-option v-for="item in customerList" :key="item.id" :label="item.name" :value="item.id" />
|
v-model="formData.customerId"
|
||||||
|
placeholder="请选择客户"
|
||||||
|
value-key="id"
|
||||||
|
lable-key="name"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in customerList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-select v-model="formData.sex" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)" :key="dict.value"
|
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)"
|
||||||
:label="dict.label" :value="dict.value" />
|
:key="dict.value"
|
||||||
</el-select>
|
:label="dict.label"
|
||||||
</el-form-item></el-col>
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select> </el-form-item
|
||||||
|
></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="手机号" prop="mobile">
|
<el-form-item label="手机号" prop="mobile">
|
||||||
<el-input input-style="width:190px;" v-model="formData.mobile" placeholder="请输入手机号" />
|
<el-input
|
||||||
|
input-style="width:190px;"
|
||||||
|
v-model="formData.mobile"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -46,7 +80,11 @@ v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)" :key="dict.value"
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="邮箱" prop="email">
|
<el-form-item label="邮箱" prop="email">
|
||||||
<el-input input-style="width:190px;" v-model="formData.email" placeholder="请输入邮箱" />
|
<el-input
|
||||||
|
input-style="width:190px;"
|
||||||
|
v-model="formData.email"
|
||||||
|
placeholder="请输入邮箱"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -58,11 +96,21 @@ v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)" :key="dict.value"
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="微信" prop="wechat">
|
<el-form-item label="微信" prop="wechat">
|
||||||
<el-input input-style="width:190px;" v-model="formData.wechat" placeholder="请输入微信" />
|
<el-input
|
||||||
|
input-style="width:190px;"
|
||||||
|
v-model="formData.wechat"
|
||||||
|
placeholder="请输入微信"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12"> <el-form-item label="下次联系时间" prop="nextTime">
|
<el-col :span="12">
|
||||||
<el-date-picker v-model="formData.nextTime" type="date" value-format="x" placeholder="选择下次联系时间" />
|
<el-form-item label="下次联系时间" prop="nextTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.nextTime"
|
||||||
|
type="date"
|
||||||
|
value-format="x"
|
||||||
|
placeholder="选择下次联系时间"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -70,35 +118,50 @@ v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)" :key="dict.value"
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所在地" prop="areaId">
|
<el-form-item label="所在地" prop="areaId">
|
||||||
<el-tree-select
|
<el-tree-select
|
||||||
v-model="formData.areaId" :data="areaList" :props="defaultProps"
|
v-model="formData.areaId"
|
||||||
:render-after-expand="true" />
|
:data="areaList"
|
||||||
|
:props="defaultProps"
|
||||||
|
:render-after-expand="true"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="地址" prop="address">
|
<el-form-item label="地址" prop="address">
|
||||||
<el-input input-style="width:190px;" v-model="formData.address" placeholder="请输入地址" />
|
<el-input
|
||||||
|
input-style="width:190px;"
|
||||||
|
v-model="formData.address"
|
||||||
|
placeholder="请输入地址"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> </el-row
|
||||||
</el-row><el-row>
|
><el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="直属上级" prop="parentId">
|
<el-form-item label="直属上级" prop="parentId">
|
||||||
<el-select v-model="formData.parentId" placeholder="请选择">
|
<el-select v-model="formData.parentId" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in allContactList" :key="item.id" :label="item.name" :value="item.id"
|
v-for="item in allContactList"
|
||||||
:disabled="item.id == formData.id" />
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
:disabled="item.id == formData.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12"> <el-form-item label="职位" prop="post">
|
<el-col :span="12">
|
||||||
|
<el-form-item label="职位" prop="post">
|
||||||
<el-input input-style="width:190px;" v-model="formData.post" placeholder="请输入职位" />
|
<el-input input-style="width:190px;" v-model="formData.post" placeholder="请输入职位" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> </el-row
|
||||||
</el-row><el-row>
|
><el-row>
|
||||||
<el-col :span="12"><el-form-item label="是否关键决策人" prop="master" style="width: 400px">
|
<el-col :span="12"
|
||||||
|
><el-form-item label="是否关键决策人" prop="master" style="width: 400px">
|
||||||
<el-radio-group v-model="formData.master">
|
<el-radio-group v-model="formData.master">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="dict in getBoolDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING)" :key="dict.value"
|
v-for="dict in getBoolDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING)"
|
||||||
:label="dict.value">
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>
|
||||||
{{ dict.label }}
|
{{ dict.label }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -106,7 +169,8 @@ v-for="dict in getBoolDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING)" :key="dict.va
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<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-input v-model="formData.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -123,7 +187,6 @@ import * as ContactApi from '@/api/crm/contact'
|
|||||||
import { DICT_TYPE, getIntDictOptions, getBoolDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions, getBoolDictOptions } from '@/utils/dict'
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
import * as CustomerApi from '@/api/crm/customer'
|
import * as CustomerApi from '@/api/crm/customer'
|
||||||
import { ElTable } from 'element-plus'
|
|
||||||
import * as AreaApi from '@/api/system/area'
|
import * as AreaApi from '@/api/system/area'
|
||||||
import { defaultProps } from '@/utils/tree'
|
import { defaultProps } from '@/utils/tree'
|
||||||
|
|
||||||
@ -163,6 +226,7 @@ const formRules = reactive({
|
|||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
const ownerUserList = ref<any[]>([])
|
const ownerUserList = ref<any[]>([])
|
||||||
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
|
// TODO 芋艿:统一的客户选择面板
|
||||||
const customerList = ref<CustomerApi.CustomerVO[]>([]) // 客户列表
|
const customerList = ref<CustomerApi.CustomerVO[]>([]) // 客户列表
|
||||||
const allContactList = ref([]) // 所有联系人列表
|
const allContactList = ref([]) // 所有联系人列表
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
|
@ -1,10 +1,3 @@
|
|||||||
<!--
|
|
||||||
* @Author: zyna
|
|
||||||
* @Date: 2023-11-26 10:39:46
|
|
||||||
* @LastEditTime: 2023-11-26 20:43:43
|
|
||||||
* @FilePath: \yudao-ui-admin-vue3\src\views\crm\contact\detail\ContactDetails.vue
|
|
||||||
* @Description:
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<el-collapse v-model="activeNames">
|
<el-collapse v-model="activeNames">
|
||||||
<el-collapse-item name="basicInfo">
|
<el-collapse-item name="basicInfo">
|
||||||
|
Loading…
Reference in New Issue
Block a user