wip: CRM-代办消息-修改模块为backlog

(cherry picked from commit 48693b50f2)
This commit is contained in:
dhb52 2024-01-15 22:45:12 +08:00 committed by shizhong
parent 748eb2b576
commit 65ee931335
6 changed files with 45 additions and 72 deletions

View File

@ -0,0 +1,18 @@
import request from '@/config/axios'
import { type CustomerVO } from '../customer'
import { type ClueVO } from '../clue'
// 查询客户列表
// TODO @芋艿:看看是不是后续融合到 getCustomerPage 里;
export const getTodayCustomerPage = async (params) => {
return await request.get({ url: `/crm/backlog/today-customer-page`, params })
}
// 查询线索列表
export const getFollowLeadsPage = async (params) => {
return await request.get({ url: `/crm/backlog/page`, params })
}
export { type CustomerVO, type ClueVO }

View File

@ -1,40 +0,0 @@
import request from '@/config/axios'
export interface CustomerVO {
id?: number
name: string
industryId: number
level: number
source: number
followUpStatus?: boolean
lockStatus?: boolean
dealStatus?: boolean
mobile: string
telephone: string
website: string
qq: string
wechat: string
email: string
description: string
remark: string
ownerUserId?: number
ownerUserName?: string
ownerUserDept?: string
roUserIds?: string
rwUserIds?: string
areaId?: number
areaName?: string
detailAddress: string
contactLastTime?: Date
contactNextTime: Date
createTime?: Date
updateTime?: Date
creator?: string
creatorName?: string
}
// 查询客户列表
// TODO @芋艿:看看是不是后续融合到 getCustomerPage 里;
export const getTodayCustomerPage = async (params) => {
return await request.get({ url: `/crm/message/todayCustomer`, params })
}

View File

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

View File

@ -17,13 +17,25 @@
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="24">
<TodayCustomer v-if="leftType === 'todayCustomer'" /> <TodayCustomer v-if="leftType === 'todayCustomer'" />
<FollowLeads v-if="leftType === 'followLeads'" /> <FollowLeads v-if="leftType === 'followLeads'" />
<CheckContract v-if="leftType === 'checkContract'" />
<CheckReceivables v-if="leftType === 'checkReceivables'" />
<EndContract v-if="leftType === 'endContract'" />
<FollowCustomer v-if="leftType === 'followCustomer'" />
<PutInPoolRemind v-if="leftType === 'putInPoolRemind'" />
<RemindReceivables v-if="leftType === 'remindReceivables'" />
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<!-- @dbh52模块改成 backlog 会更合适待办事项 -->
<script lang="ts" setup> <script lang="ts" setup>
import TodayCustomer from './tables/TodayCustomer.vue' import CheckContract from './tables/CheckContract.vue'
import CheckReceivables from './tables/CheckReceivables.vue'
import EndContract from './tables/EndContract.vue'
import FollowCustomer from './tables/FollowCustomer.vue'
import FollowLeads from './tables/FollowLeads.vue' import FollowLeads from './tables/FollowLeads.vue'
import PutInPoolRemind from './tables/PutInPoolRemind.vue'
import RemindReceivables from './tables/RemindReceivables.vue'
import TodayCustomer from './tables/TodayCustomer.vue'
const leftType = ref('todayCustomer') const leftType = ref('todayCustomer')
const leftSides = ref([ const leftSides = ref([
@ -66,7 +78,7 @@ const leftSides = ref([
}, },
{ {
name: '待回款提醒', name: '待回款提醒',
infoType: 'remindReceivablesPlan', infoType: 'remindReceivables',
msgCount: 4, msgCount: 4,
tips: '' tips: ''
}, },

View File

@ -1,4 +1,5 @@
<!-- 分配给我的线索 --> <!-- 分配给我的线索 -->
<!-- TODO: 后续再统一改名字 -->
<template> <template>
<div> <div>
TODO: 分配给我的线索 TODO: 分配给我的线索

View File

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<div class="pb-5 text-xl"> <div class="pb-5 text-xl">
{{ title }} 今日需联系客户
</div> </div>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form <el-form
@ -12,7 +12,7 @@
label-width="68px" label-width="68px"
> >
<el-form-item label="状态" prop="contactStatus"> <el-form-item label="状态" prop="contactStatus">
<el-select v-model="queryParams.contactStatus" class="!w-240px" placeholder="状态"> <el-select v-model="queryParams.contactStatus" class="!w-240px" placeholder="状态" @change="handleQuery">
<el-option <el-option
v-for="(option, index) in CONTACT_STATUS" v-for="(option, index) in CONTACT_STATUS"
:label="option.label" :label="option.label"
@ -22,7 +22,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="归属" prop="sceneType"> <el-form-item label="归属" prop="sceneType">
<el-select v-model="queryParams.sceneType" class="!w-240px" placeholder="归属"> <el-select v-model="queryParams.sceneType" class="!w-240px" placeholder="归属" @change="handleQuery">
<el-option <el-option
v-for="(option, index) in SCENE_TYPES" v-for="(option, index) in SCENE_TYPES"
:label="option.label" :label="option.label"
@ -31,16 +31,6 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item>
<el-button @click="handleQuery">
<Icon class="mr-5px" icon="ep:search" />
搜索
</el-button>
<el-button @click="resetQuery(undefined)">
<Icon class="mr-5px" icon="ep:refresh" />
重置
</el-button>
</el-form-item>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
<ContentWrap> <ContentWrap>
@ -123,19 +113,12 @@
<script lang="ts" setup name="TodayCustomer"> <script lang="ts" setup name="TodayCustomer">
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as MessageApi from '@/api/crm/message' import * as BacklogApi from '@/api/crm/backlog'
const title = ref('今日需联系客户') // TODO @dbh52
const loading = ref(true) // const loading = ref(true) //
const total = ref(0) // const total = ref(0) //
const list = ref([]) // const list = ref([]) //
const queryParams = ref<{ const queryParams = ref({
// TODO @dbh52 ref idea idea
pageNo: number
pageSize: number
contactStatus: number | undefined
sceneType: number | undefined
}>({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
contactStatus: 1, contactStatus: 1,
@ -152,16 +135,15 @@ const CONTACT_STATUS = [
const SCENE_TYPES = [ const SCENE_TYPES = [
// TODO // TODO
{ label: '我负责的', value: 1 }, { label: '我负责的', value: 1 },
{ label: '我跟进的', value: 2 }, { label: '我参与的', value: 2 },
{ label: '我参与的', value: 3 }, { label: '下属负责的', value: 3 }
{ label: '下属负责的', value: 4 }
] ]
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {
loading.value = true loading.value = true
try { try {
const data = await MessageApi.getTodayCustomerPage(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 {