|
|
|
|
@ -9,7 +9,7 @@
|
|
|
|
|
:inline="true"
|
|
|
|
|
:model="queryParams"
|
|
|
|
|
class="-mb-15px"
|
|
|
|
|
label-width="68px"
|
|
|
|
|
min-label-width="68px"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="客户名称" prop="name">
|
|
|
|
|
<el-input
|
|
|
|
|
@ -20,12 +20,12 @@
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="手机" prop="mobile">
|
|
|
|
|
<el-form-item label="联系人手机" prop="mobile">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.mobile"
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入手机"
|
|
|
|
|
placeholder="请输入联系人手机"
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -87,10 +87,10 @@
|
|
|
|
|
<Icon class="mr-5px" icon="ep:plus" />
|
|
|
|
|
新增
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button v-hasPermi="['mes:customer:import']" plain type="warning" @click="handleImport">
|
|
|
|
|
<!-- <el-button v-hasPermi="['mes:customer:import']" plain type="warning" @click="handleImport">
|
|
|
|
|
<Icon icon="ep:upload" />
|
|
|
|
|
导入
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-button> -->
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['mes:customer:export']"
|
|
|
|
|
:loading="exportLoading"
|
|
|
|
|
@ -107,27 +107,27 @@
|
|
|
|
|
|
|
|
|
|
<!-- 列表 -->
|
|
|
|
|
<ContentWrap>
|
|
|
|
|
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
|
|
|
|
<!-- <el-tabs v-model="activeName" @tab-click="handleTabClick">
|
|
|
|
|
<el-tab-pane label="我负责的" name="1" />
|
|
|
|
|
<el-tab-pane label="我参与的" name="2" />
|
|
|
|
|
<el-tab-pane label="下属负责的" name="3" />
|
|
|
|
|
</el-tabs>
|
|
|
|
|
</el-tabs> -->
|
|
|
|
|
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
|
|
|
|
|
<el-table-column align="center" fixed="left" label="客户名称" prop="name" width="160" sortable>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
|
|
|
|
|
{{ scope.row.name }}
|
|
|
|
|
</el-link>
|
|
|
|
|
<span>{{ scope.row.name }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" fixed="left" label="客户编码" prop="customerCode" width="140" sortable />
|
|
|
|
|
<el-table-column align="center" label="联系人" prop="contactName" 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="mobile" 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="mobile" 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="level" width="135">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="scope.row.level" />
|
|
|
|
|
@ -227,7 +227,7 @@ import download from '@/utils/download'
|
|
|
|
|
import * as CustomerApi from '@/api/mes/customer'
|
|
|
|
|
import CustomerForm from './CustomerForm.vue'
|
|
|
|
|
import CustomerImportForm from './CustomerImportForm.vue'
|
|
|
|
|
import { TabsPaneContext } from 'element-plus'
|
|
|
|
|
// import { TabsPaneContext } from 'element-plus'
|
|
|
|
|
|
|
|
|
|
defineOptions({ name: 'MesCustomer' })
|
|
|
|
|
|
|
|
|
|
@ -250,13 +250,13 @@ const queryParams = reactive({
|
|
|
|
|
})
|
|
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
|
|
|
const activeName = ref('1') // 列表 tab
|
|
|
|
|
// const activeName = ref('1') // 列表 tab
|
|
|
|
|
|
|
|
|
|
/** tab 切换 */
|
|
|
|
|
const handleTabClick = (tab: TabsPaneContext) => {
|
|
|
|
|
queryParams.sceneType = tab.paneName as string
|
|
|
|
|
handleQuery()
|
|
|
|
|
}
|
|
|
|
|
// const handleTabClick = (tab: TabsPaneContext) => {
|
|
|
|
|
// queryParams.sceneType = tab.paneName as string
|
|
|
|
|
// handleQuery()
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/** 查询列表 */
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
@ -283,10 +283,10 @@ const resetQuery = () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 打开客户详情 */
|
|
|
|
|
const { currentRoute, push } = useRouter()
|
|
|
|
|
const openDetail = (id: number) => {
|
|
|
|
|
push({ name: 'MesCustomerDetail', params: { id } })
|
|
|
|
|
}
|
|
|
|
|
const { currentRoute } = useRouter()
|
|
|
|
|
// const openDetail = (id: number) => {
|
|
|
|
|
// push({ name: 'MesCustomerDetail', params: { id } })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/** 添加/修改操作 */
|
|
|
|
|
const formRef = ref()
|
|
|
|
|
@ -309,9 +309,9 @@ const handleDelete = async (id: number) => {
|
|
|
|
|
|
|
|
|
|
/** 导入按钮操作 */
|
|
|
|
|
const importFormRef = ref<InstanceType<typeof CustomerImportForm>>()
|
|
|
|
|
const handleImport = () => {
|
|
|
|
|
importFormRef.value?.open()
|
|
|
|
|
}
|
|
|
|
|
// const handleImport = () => {
|
|
|
|
|
// importFormRef.value?.open()
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
const handleExport = async () => {
|
|
|
|
|
|