CRM:完善联系人的列表

(cherry picked from commit 094b1925d6)
pull/420/head
YunaiV 2024-02-20 21:18:38 +08:00 committed by shizhong
parent 02241056b8
commit fdd379f63d
3 changed files with 33 additions and 109 deletions

View File

@ -1,72 +0,0 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="600px">
<el-transfer
v-model="value"
:data="data"
:titles="transferTitles"
:props="transferDataProp"
:right-default-checked="[1]"
/>
<el-row justify="end">
<el-col :span="4">
<el-button type="primary" @click="confirmOwerSelect"></el-button>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="confirmOwerSelect"></el-button>
</el-col>
</el-row>
</Dialog>
</template>
<script setup lang="ts">
// TODO
import * as UserApi from '@/api/system/user'
import { parseBigInt } from 'jsencrypt/lib/lib/jsbn/jsbn'
const dialogVisible = ref(false) //
const dialogTitle = ref('选择') //
const formLoading = ref(false) // 12
const formType = ref('')
const transferTitles = ref(['待选择', '已选择'])
const transferDataProp = ref({
key: 'id',
label: 'nickname'
})
const emit = defineEmits(['confirmOwerSelect'])
const data = ref<UserApi.UserVO[]>([])
const value = ref<any[]>([])
const rightDefaultChecked = ref<any[]>([])
/** 打开弹窗 */
const open = async (type: string, ownerUserList: any[]) => {
dialogVisible.value = true
formType.value = type
//
if (ownerUserList) {
formLoading.value = true
try {
ownerUserList.forEach((item) => {
value.value.push(item.id)
})
} finally {
formLoading.value = false
}
}
rightDefaultChecked.value = []
data.value = await UserApi.getSimpleUserList()
}
defineExpose({ open }) // open
const confirmOwerSelect = () => {
const returnData = ref<any[]>([])
data.value.forEach((item) => {
if (value.value.indexOf(item.id) > -1) {
returnData.value.push(item)
}
})
emit('confirmOwerSelect', returnData)
dialogVisible.value = false
value.value = []
}
</script>
<style>
.el-row {
margin-top: 20px;
}
</style>

View File

@ -110,7 +110,7 @@
<!-- 列表 -->
<ContentWrap>
<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">
<el-table-column align="center" fixed="left" label="联系人姓名" prop="name" width="160">
<template #default="scope">
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
{{ scope.row.name }}
@ -129,10 +129,23 @@
</template>
</el-table-column>
<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="telephone" width="130" />
<el-table-column align="center" label="邮箱" prop="email" width="180" />
<el-table-column align="center" label="职位" prop="post" width="120" />
<el-table-column align="center" label="地址" prop="detailAddress" width="120" />
<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 align="center" label="直属上级" prop="parentName" width="160">
<template #default="scope">
<el-link :underline="false" type="primary" @click="openDetail(scope.row.parentId)">
{{ scope.row.parentName }}
</el-link>
</template>
</el-table-column>
<el-table-column label="地址" align="center" prop="detailAddress" width="180" />
<el-table-column
:formatter="dateFormatter"
align="center"
@ -140,13 +153,12 @@
prop="contactNextTime"
width="180px"
/>
<el-table-column align="center" label="备注" prop="remark" />
<el-table-column align="center" label="关键决策人" prop="master" width="100">
<el-table-column align="center" label="性别" prop="sex">
<template #default="scope">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.master" />
<dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="scope.row.sex" />
</template>
</el-table-column>
<el-table-column align="center" label="直属上级" prop="parentName" width="140" />
<el-table-column align="center" label="备注" prop="remark" />
<el-table-column
:formatter="dateFormatter"
align="center"
@ -154,13 +166,8 @@
prop="contactLastTime"
width="180px"
/>
<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 align="center" label="负责人" prop="ownerUserName" width="120" />
<el-table-column align="center" label="创建人" prop="creatorName" width="120" />
<el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100" />
<el-table-column
:formatter="dateFormatter"
align="center"
@ -175,6 +182,7 @@
prop="createTime"
width="180px"
/>
<el-table-column align="center" label="创建人" prop="creatorName" width="120" />
<el-table-column align="center" fixed="right" label="操作" width="200">
<template #default="scope">
<el-button

View File

@ -97,32 +97,31 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
<el-table-column align="center" label="编号" prop="id" />
<el-table-column align="center" label="客户名称" prop="name" width="160">
<el-table-column align="center" label="客户名称" fixed="left" prop="name" width="160">
<template #default="scope">
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
{{ scope.row.name }}
</el-link>
</template>
</el-table-column>
<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="source" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_SOURCE" :value="scope.row.source" />
</template>
</el-table-column>
<el-table-column align="center" label="所属行业" prop="industryId" width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_INDUSTRY" :value="scope.row.industryId" />
</template>
</el-table-column>
<el-table-column align="center" label="客户级别" prop="level" width="120">
<el-table-column label="手机" align="center" prop="mobile" width="120" />
<el-table-column label="电话" align="center" prop="telephone" width="130" />
<el-table-column label="邮箱" align="center" prop="email" width="180" />
<el-table-column align="center" label="客户级别" prop="level" width="135">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column align="center" label="网址" prop="website" width="200" />
<el-table-column align="center" label="客户行业" prop="industryId" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_INDUSTRY" :value="scope.row.industryId" />
</template>
</el-table-column>
<el-table-column
:formatter="dateFormatter"
align="center"
@ -136,9 +135,6 @@
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" />
</template>
</el-table-column>
<el-table-column align="center" label="距离进入公海" prop="poolDay">
<template #default="scope"> {{ scope.row.poolDay }}</template>
</el-table-column>
<el-table-column
:formatter="dateFormatter"
align="center"
@ -146,10 +142,11 @@
prop="contactLastTime"
width="180px"
/>
<el-table-column align="center" label="最后跟进记录" prop="contactLastContent" width="200" />
<el-table-column
:formatter="dateFormatter"
align="center"
label="创建时间"
label="更新时间"
prop="updateTime"
width="180px"
/>
@ -160,16 +157,7 @@
prop="createTime"
width="180px"
/>
<el-table-column align="center" label="负责人" prop="ownerUserName" width="100px" />
<el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" />
<el-table-column align="center" label="创建人" prop="creatorName" width="100px" />
<el-table-column align="center" fixed="right" label="操作" min-width="150">
<template #default="scope">
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
详情
</el-link>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination