|
|
@ -1,30 +1,33 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="relative"> |
|
|
|
<div class="relative"> |
|
|
|
<el-tabs v-model="searchForm.mode" size="small"> |
|
|
|
<el-tabs v-model="queryType" size="small"> |
|
|
|
<el-tab-pane label="全部" name="0" /> |
|
|
|
<el-tab-pane label="全部" name="0" /> |
|
|
|
<el-tab-pane name="1"> |
|
|
|
<el-tab-pane name="1"> |
|
|
|
<template #label> |
|
|
|
<template #label> |
|
|
|
<Tooltip message="除了无效线索和已成交的线索" /> |
|
|
|
<Tooltip message="除了无效线索和已成交的线索" /> |
|
|
|
<el-badge :value="123" :max="9999"> |
|
|
|
<el-badge v-if="clueCount.unSignNum" :value="clueCount.unSignNum" :max="9999"> |
|
|
|
<span class="ml-3px">未成交</span> |
|
|
|
<span class="ml-3px">未成交</span> |
|
|
|
</el-badge> |
|
|
|
</el-badge> |
|
|
|
|
|
|
|
<span v-else class="ml-3px">未成交</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane name="2"> |
|
|
|
<el-tab-pane name="2"> |
|
|
|
<template #label> |
|
|
|
<template #label> |
|
|
|
<Tooltip message="下次跟进时间在今日之前的未成交线索" /> |
|
|
|
<Tooltip message="下次跟进时间在今日之前的未成交线索" /> |
|
|
|
<el-badge :value="234" :max="9999"> |
|
|
|
<el-badge v-if="clueCount.followNum" :value="clueCount.followNum" :max="9999"> |
|
|
|
<span class="ml-3px">待跟进</span> |
|
|
|
<span class="ml-3px">待跟进</span> |
|
|
|
</el-badge> |
|
|
|
</el-badge> |
|
|
|
|
|
|
|
<span v-else class="ml-3px">待跟进</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane name="3"> |
|
|
|
<el-tab-pane name="3"> |
|
|
|
<template #label> |
|
|
|
<template #label> |
|
|
|
<Tooltip message="只有创建时间,无下次跟进时间的未成交线索" /> |
|
|
|
<Tooltip message="只有创建时间,无下次跟进时间的未成交线索" /> |
|
|
|
<el-badge :value="423" :max="9999"> |
|
|
|
<el-badge v-if="clueCount.newNum" :value="clueCount.newNum" :max="9999"> |
|
|
|
<span class="ml-3px">新线索</span> |
|
|
|
<span class="ml-3px">新线索</span> |
|
|
|
</el-badge> |
|
|
|
</el-badge> |
|
|
|
|
|
|
|
<span v-else class="ml-3px">新线索</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="公海" name="4" /> |
|
|
|
<el-tab-pane label="公海" name="4" /> |
|
|
@ -37,7 +40,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search :schema="allSchemas.searchSchema" labelWidth="0"> |
|
|
|
<Search v-if="!loading" ref="searchRef" :schema="allSchemas.searchSchema" labelWidth="0"> |
|
|
|
<template #actionMore> |
|
|
|
<template #actionMore> |
|
|
|
<el-button @click="getTableList" v-hasPermi="['clue:pool:search']"> 搜索 </el-button> |
|
|
|
<el-button @click="getTableList" v-hasPermi="['clue:pool:search']"> 搜索 </el-button> |
|
|
|
<el-button @click="resetQuery" v-hasPermi="['clue:pool:reset']"> 重置 </el-button> |
|
|
|
<el-button @click="resetQuery" v-hasPermi="['clue:pool:reset']"> 重置 </el-button> |
|
|
@ -45,6 +48,7 @@ |
|
|
|
</Search> |
|
|
|
</Search> |
|
|
|
<!-- 列表 --> |
|
|
|
<!-- 列表 --> |
|
|
|
<SSTable |
|
|
|
<SSTable |
|
|
|
|
|
|
|
v-if="!loading" |
|
|
|
class="mt-20px" |
|
|
|
class="mt-20px" |
|
|
|
v-model:tableObject="tableObject" |
|
|
|
v-model:tableObject="tableObject" |
|
|
|
:tableColumns="allSchemas.tableColumns" |
|
|
|
:tableColumns="allSchemas.tableColumns" |
|
|
@ -74,6 +78,9 @@ |
|
|
|
<span>{{ row[item.field] }}</span> |
|
|
|
<span>{{ row[item.field] }}</span> |
|
|
|
<Icon class="ml-5px" icon="ep:phone" @click="makeCall(row.contact)" /> |
|
|
|
<Icon class="ml-5px" icon="ep:phone" @click="makeCall(row.contact)" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-else-if="item.form?.component == 'DatePicker'"> |
|
|
|
|
|
|
|
<span>{{ formatDate(row[item.field]) }}</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
<span v-else>{{ row[item.field] }}</span> |
|
|
|
<span v-else>{{ row[item.field] }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
@ -116,27 +123,44 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script setup name="CluePool"> |
|
|
|
<script setup name="CluePool"> |
|
|
|
import { allSchemas } from './cluePool.data' |
|
|
|
import { getSimpleFieldList } from '@/api/clue/clueField' |
|
|
|
import DialogClue from './Comp/DialogClue.vue' |
|
|
|
import DialogClue from './Comp/DialogClue.vue' |
|
|
|
import DrawerClue from './Comp/DrawerClue.vue' |
|
|
|
import DrawerClue from './Comp/DrawerClue.vue' |
|
|
|
import DialogSuccess from './Comp/DialogSuccess.vue' |
|
|
|
import DialogSuccess from './Comp/DialogSuccess.vue' |
|
|
|
import DialogFollow from './Comp/DialogFollow.vue' |
|
|
|
import DialogFollow from './Comp/DialogFollow.vue' |
|
|
|
|
|
|
|
|
|
|
|
const searchForm = ref({ |
|
|
|
import { removeNullField } from '@/utils' |
|
|
|
mode: '2' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
import * as ClueApi from '@/api/clue' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const searchRef = ref() |
|
|
|
|
|
|
|
const queryType = ref('2') |
|
|
|
|
|
|
|
|
|
|
|
const formRef = ref() |
|
|
|
const formRef = ref() |
|
|
|
const drawerRef = ref() |
|
|
|
const drawerRef = ref() |
|
|
|
const successRef = ref() |
|
|
|
const successRef = ref() |
|
|
|
const followRef = ref() |
|
|
|
const followRef = ref() |
|
|
|
|
|
|
|
|
|
|
|
// const { tableObject, tableMethods } = useTable({ |
|
|
|
const loading = ref(true) |
|
|
|
// getListApi: MailTemplateApi.getMailTemplatePage, // 分页接口 |
|
|
|
|
|
|
|
// delListApi: MailTemplateApi.deleteMailTemplate // 删除接口 |
|
|
|
const allSchemas = ref({}) |
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
async function getCurdSchemas() { |
|
|
|
|
|
|
|
loading.value = true |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
const data = await getSimpleFieldList() |
|
|
|
|
|
|
|
allSchemas.value = useCrudSchemas(data).allSchemas |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
loading.value = false |
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
|
|
getTableList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const tableObject = ref({ |
|
|
|
const tableObject = ref({ |
|
|
|
tableList: [{ name: '测试', contact: '17318531354' }], |
|
|
|
tableList: [], |
|
|
|
loading: false, |
|
|
|
loading: false, |
|
|
|
total: 1, |
|
|
|
total: 1, |
|
|
|
pageSize: 20, |
|
|
|
pageSize: 20, |
|
|
@ -151,15 +175,39 @@ function getCheckedColumns(list) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function resetQuery() { |
|
|
|
function resetQuery() { |
|
|
|
searchForm.value = { |
|
|
|
searchRef.value.reset() |
|
|
|
pageNo: 1, |
|
|
|
tableObject.value.currentPage = 1 |
|
|
|
pageSize: 10 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
getTableList() |
|
|
|
getTableList() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getTableList() { |
|
|
|
async function getTableList() { |
|
|
|
// 查询 |
|
|
|
// 查询 |
|
|
|
|
|
|
|
tableObject.value.loading = true |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
const queryParams = await searchRef.value.getFormModel() |
|
|
|
|
|
|
|
const params = { |
|
|
|
|
|
|
|
...queryParams, |
|
|
|
|
|
|
|
pageNo: tableObject.value.currentPage, |
|
|
|
|
|
|
|
pageSize: tableObject.value.pageSize, |
|
|
|
|
|
|
|
queryType: queryType.value |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const data = await ClueApi.getCluePage(removeNullField(params)) |
|
|
|
|
|
|
|
tableObject.value.tableList = data.list |
|
|
|
|
|
|
|
tableObject.value.total = data.total |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
tableObject.value.loading = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const clueCount = ref({ |
|
|
|
|
|
|
|
unSignNum: 0, |
|
|
|
|
|
|
|
followNum: 0, |
|
|
|
|
|
|
|
newNum: 0 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
function getSearchCount() { |
|
|
|
|
|
|
|
ClueApi.getClueCount().then((data) => { |
|
|
|
|
|
|
|
clueCount.value = data |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 新增 |
|
|
|
// 新增 |
|
|
@ -172,7 +220,7 @@ function handleEdit(row) { |
|
|
|
} |
|
|
|
} |
|
|
|
// 详情 |
|
|
|
// 详情 |
|
|
|
function handleDetail(row) { |
|
|
|
function handleDetail(row) { |
|
|
|
drawerRef.value.open(row) |
|
|
|
drawerRef.value.open(row.clueId) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function handleFollow(row) { |
|
|
|
function handleFollow(row) { |
|
|
@ -187,6 +235,11 @@ async function makeCall(phone) { |
|
|
|
function handleSuccess(row) { |
|
|
|
function handleSuccess(row) { |
|
|
|
successRef.value.open(row) |
|
|
|
successRef.value.open(row) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
|
|
|
getSearchCount() |
|
|
|
|
|
|
|
getCurdSchemas() |
|
|
|
|
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style> |
|
|
|
<style lang="scss" scoped></style> |
|
|
|