客户列表 添加渠道筛选
This commit is contained in:
@@ -19,6 +19,17 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="客户渠道" prop="channel_id">
|
||||||
|
<el-select v-model="selectchannel_id" filterable placeholder="请选择客户渠道">
|
||||||
|
<el-option label="全部" value="" />
|
||||||
|
<el-option
|
||||||
|
v-for="item in channelOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" @click="exportfn" v-if="hasAuth('customer@export')">
|
<el-button type="primary" @click="exportfn" v-if="hasAuth('customer@export')">
|
||||||
<i class="iconfont-sys"></i> 导出
|
<i class="iconfont-sys"></i> 导出
|
||||||
@@ -346,6 +357,7 @@
|
|||||||
const activecolor = '#3471ff'
|
const activecolor = '#3471ff'
|
||||||
const { hasAuth } = useAuth()
|
const { hasAuth } = useAuth()
|
||||||
const selectValue = ref<string[]>([])
|
const selectValue = ref<string[]>([])
|
||||||
|
const selectchannel_id = ref<string>('')
|
||||||
const showMore = ref(false)
|
const showMore = ref(false)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const detailDialogVisible = ref(false)
|
const detailDialogVisible = ref(false)
|
||||||
@@ -373,6 +385,12 @@
|
|||||||
customer_id: '',
|
customer_id: '',
|
||||||
user_id: ''
|
user_id: ''
|
||||||
})
|
})
|
||||||
|
const channelOptions = ref<any>()
|
||||||
|
//渠道
|
||||||
|
const getgetChannel = async () => {
|
||||||
|
const res = await CrmService.getChannel()
|
||||||
|
channelOptions.value = res || []
|
||||||
|
}
|
||||||
const userOptions = ref<any>()
|
const userOptions = ref<any>()
|
||||||
const getuserList = async () => {
|
const getuserList = async () => {
|
||||||
// 这里调用获取用户列表的接口
|
// 这里调用获取用户列表的接口
|
||||||
@@ -402,12 +420,13 @@
|
|||||||
// 表格数据
|
// 表格数据
|
||||||
const tableData = ref<any[]>([])
|
const tableData = ref<any[]>([])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getgetChannel()
|
||||||
getuserList()
|
getuserList()
|
||||||
gettableList()
|
gettableList()
|
||||||
tagGrouplistfn()
|
tagGrouplistfn()
|
||||||
})
|
})
|
||||||
// tabs 切换联动
|
// tabs 切换联动
|
||||||
watch([selectValue, keyword], () => {
|
watch([selectValue, keyword, selectchannel_id], () => {
|
||||||
pagination.currentPage = 1
|
pagination.currentPage = 1
|
||||||
gettableList()
|
gettableList()
|
||||||
})
|
})
|
||||||
@@ -425,6 +444,9 @@
|
|||||||
if (keyword.value) {
|
if (keyword.value) {
|
||||||
params.keyword = keyword.value
|
params.keyword = keyword.value
|
||||||
}
|
}
|
||||||
|
if (selectchannel_id.value) {
|
||||||
|
params.channel_id = selectchannel_id.value
|
||||||
|
}
|
||||||
// 标签参数,所有选中的标签id组成数组
|
// 标签参数,所有选中的标签id组成数组
|
||||||
const selectedTagIds = Object.values(tagActiveMap).filter(Boolean)
|
const selectedTagIds = Object.values(tagActiveMap).filter(Boolean)
|
||||||
if (selectedTagIds.length) {
|
if (selectedTagIds.length) {
|
||||||
|
|||||||
@@ -116,9 +116,22 @@
|
|||||||
<!-- 详情对话框 -->
|
<!-- 详情对话框 -->
|
||||||
<el-dialog v-model="detailDialogVisible" title="详情" width="75%">
|
<el-dialog v-model="detailDialogVisible" title="详情" width="75%">
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="plzyDialogVisiblefn">
|
<div style="display: flex; justify-content: space-between">
|
||||||
<i class="iconfont-sys"></i> 批量转移
|
<el-button type="primary" @click="plzyDialogVisiblefn">
|
||||||
</el-button>
|
<i class="iconfont-sys"></i> 批量转移
|
||||||
|
</el-button>
|
||||||
|
<el-form-item label="客户渠道" prop="channel_id">
|
||||||
|
<el-select v-model="selectchannel_id" filterable placeholder="请选择客户渠道">
|
||||||
|
<el-option label="全部" value="" />
|
||||||
|
<el-option
|
||||||
|
v-for="item in channelOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<ArtTable
|
<ArtTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
@@ -410,11 +423,13 @@
|
|||||||
import { systemService } from '@/api/systemApi'
|
import { systemService } from '@/api/systemApi'
|
||||||
import { formatMenuTitle } from '@/router/utils/utils'
|
import { formatMenuTitle } from '@/router/utils/utils'
|
||||||
import { UserService } from '@/api/usersApi'
|
import { UserService } from '@/api/usersApi'
|
||||||
|
import { CrmService } from '@/api/crmApi'
|
||||||
defineOptions({ name: 'UserList' })
|
defineOptions({ name: 'UserList' })
|
||||||
const { hasAuth } = useAuth()
|
const { hasAuth } = useAuth()
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
const selectValue = ref('1')
|
const selectValue = ref('1')
|
||||||
const company_id = ref('')
|
const company_id = ref('')
|
||||||
|
const selectchannel_id = ref('')
|
||||||
const keyword = ref<string>('')
|
const keyword = ref<string>('')
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const loadingkh = ref(false)
|
const loadingkh = ref(false)
|
||||||
@@ -542,6 +557,10 @@
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
watch([selectchannel_id], () => {
|
||||||
|
paginationkh.currentPage = 1
|
||||||
|
gettableListkh(zyForm.customer_id)
|
||||||
|
})
|
||||||
const gettableListkh = async (user_id: any) => {
|
const gettableListkh = async (user_id: any) => {
|
||||||
loadingkh.value = true
|
loadingkh.value = true
|
||||||
try {
|
try {
|
||||||
@@ -551,6 +570,9 @@
|
|||||||
size: pageSize,
|
size: pageSize,
|
||||||
user_id: user_id
|
user_id: user_id
|
||||||
}
|
}
|
||||||
|
if (selectchannel_id.value) {
|
||||||
|
params.channel_id = selectchannel_id.value
|
||||||
|
}
|
||||||
const { data, current, size, total } = await manageService.getcrmCustomerList(params)
|
const { data, current, size, total } = await manageService.getcrmCustomerList(params)
|
||||||
tableDatakh.value = data.map((item: any) => ({
|
tableDatakh.value = data.map((item: any) => ({
|
||||||
...item
|
...item
|
||||||
@@ -585,7 +607,14 @@
|
|||||||
if (status === 0) return 'status-lost'
|
if (status === 0) return 'status-lost'
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
const channelOptions = ref<any>()
|
||||||
|
//渠道
|
||||||
|
const getgetChannel = async () => {
|
||||||
|
const res = await CrmService.getChannel()
|
||||||
|
channelOptions.value = res || []
|
||||||
|
}
|
||||||
const gotransfer = (row: any) => {
|
const gotransfer = (row: any) => {
|
||||||
|
getgetChannel()
|
||||||
paginationkh.currentPage = 1
|
paginationkh.currentPage = 1
|
||||||
paginationkh.pageSize = 10
|
paginationkh.pageSize = 10
|
||||||
paginationkh.total = 0
|
paginationkh.total = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user