📖 CRM:code review 待办项目的实现

(cherry picked from commit 06e2019adf)
This commit is contained in:
YunaiV 2024-02-17 18:02:40 +08:00 committed by shizhong
parent 27b86974bc
commit 0e3108ce5b
5 changed files with 14 additions and 28 deletions

View File

@ -538,17 +538,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
activeMenu: '/crm/product' activeMenu: '/crm/product'
}, },
component: () => import('@/views/crm/product/detail/index.vue') component: () => import('@/views/crm/product/detail/index.vue')
},
{
path: 'backlog',
name: 'CrmBacklog',
meta: {
title: '待办事项',
noCache: true,
hidden: true
},
// TODO @db52后面搞搞成菜单
component: () => import('@/views/crm/backlog/index.vue')
} }
] ]
} }

View File

@ -1,4 +1,3 @@
<!-- TODO @dhb52: 存在很多重复的 table 定义如Customer: TodayCustomer,FollowCustomer,PutInPoolRemind -->
<template> <template>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4" class="min-w-[200px]"> <el-col :span="4" class="min-w-[200px]">
@ -90,10 +89,8 @@ const leftSides = ref([
} }
]) ])
/** /** 侧边点击 */
* 侧边点击 const sideClick = (item: any) => {
*/
const sideClick = (item) => {
leftType.value = item.infoType leftType.value = item.infoType
} }
</script> </script>

View File

@ -126,8 +126,6 @@ import { fenToYuanFormat } from '@/utils/formatter'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { AUDIT_STATUS } from './common' import { AUDIT_STATUS } from './common'
const { push } = useRouter() //
const loading = ref(true) // const loading = ref(true) //
const total = ref(0) // const total = ref(0) //
const list = ref([]) // const list = ref([]) //
@ -157,6 +155,7 @@ const handleQuery = () => {
} }
/** 打开客户详情 */ /** 打开客户详情 */
const { push } = useRouter() //
const openCustomerDetail = (id: number) => { const openCustomerDetail = (id: number) => {
push({ name: 'CrmCustomerDetail', params: { id } }) push({ name: 'CrmCustomerDetail', params: { id } })
} }

View File

@ -43,8 +43,8 @@
</ContentWrap> </ContentWrap>
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true"> <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="编号" fixed="left" 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"> <template #default="scope">
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)"> <el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
{{ scope.row.name }} {{ scope.row.name }}
@ -82,7 +82,7 @@
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" /> <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" />
</template> </template>
</el-table-column> </el-table-column>
<!-- TODO @puhui999距进入公海天数 --> <el-table-column align="center" label="距进入公海天数" prop="poolDay" width="130" />
<el-table-column <el-table-column
:formatter="dateFormatter" :formatter="dateFormatter"
align="center" align="center"
@ -119,11 +119,13 @@
</template> </template>
<script lang="ts" setup name="TodayCustomer"> <script lang="ts" setup name="TodayCustomer">
import * as CustomerApi from '@/api/crm/customer' import * as BacklogApi from '@/api/crm/backlog'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { CONTACT_STATUS, SCENE_TYPES } from './common' import { CONTACT_STATUS, SCENE_TYPES } from './common'
// defineOptions({ name: 'TodayCustomer' }) TODO @dhb5212 CustomerTodayTable ++ tables components
const { push } = useRouter() const { push } = useRouter()
const loading = ref(true) // const loading = ref(true) //
@ -133,8 +135,7 @@ const queryParams = ref({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
contactStatus: 1, contactStatus: 1,
sceneType: 1, sceneType: 1
pool: null //
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
@ -142,7 +143,7 @@ const queryFormRef = ref() // 搜索的表单
const getList = async () => { const getList = async () => {
loading.value = true loading.value = true
try { try {
const data = await CustomerApi.getCustomerPage(queryParams.value) const data = await BacklogApi.getTodayCustomerPage(queryParams.value)
list.value = data.list list.value = data.list
total.value = data.total total.value = data.total
} finally { } finally {

View File

@ -110,8 +110,8 @@
<el-tab-pane label="下属负责的" name="3" /> <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 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="编号" fixed="left" 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"> <template #default="scope">
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)"> <el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
{{ scope.row.name }} {{ scope.row.name }}
@ -149,7 +149,7 @@
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" /> <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="距离进入公海" prop="poolDay"> <el-table-column align="center" label="距离进入公海" prop="poolDay" width="120">
<template #default="scope"> {{ scope.row.poolDay }} </template> <template #default="scope"> {{ scope.row.poolDay }} </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column