【招生用户端】 新增# 线索管理:对接线索记录接口
parent
15679b26ee
commit
8b92a8407f
|
@ -8,3 +8,7 @@ export function clueDetail(params?: any) {
|
||||||
export function clueLists(params?: any) {
|
export function clueLists(params?: any) {
|
||||||
return request.get({ url: '/clue/list', params })
|
return request.get({ url: '/clue/list', params })
|
||||||
}
|
}
|
||||||
|
// 线索记录列表
|
||||||
|
export function clueRecordLists(params?: any) {
|
||||||
|
return request.get({ url: '/record/list', params })
|
||||||
|
}
|
||||||
|
|
|
@ -78,6 +78,20 @@ export const templateTypeMap: Record<templateTypeEum, string> = {
|
||||||
[templateTypeEum.TELE]: '电销',
|
[templateTypeEum.TELE]: '电销',
|
||||||
[templateTypeEum.RECEULT]: '招生'
|
[templateTypeEum.RECEULT]: '招生'
|
||||||
}
|
}
|
||||||
|
export enum clueStepEnum {
|
||||||
|
ADD_FLLOW = 0,
|
||||||
|
RECEIVE_CLUE = 1,
|
||||||
|
ADD_CLUE_PROGRESS = 2,
|
||||||
|
CLUE_COMPLETED = 3,
|
||||||
|
UPDATE_CLUSE_PROGRESS = 4
|
||||||
|
}
|
||||||
|
export const clueStepMap: Record<clueStepEnum, string> = {
|
||||||
|
[clueStepEnum.ADD_FLLOW]: '添加跟进',
|
||||||
|
[clueStepEnum.RECEIVE_CLUE]: '领取线索',
|
||||||
|
[clueStepEnum.ADD_CLUE_PROGRESS]: '添加进展',
|
||||||
|
[clueStepEnum.CLUE_COMPLETED]: '转化完成',
|
||||||
|
[clueStepEnum.UPDATE_CLUSE_PROGRESS]: '修改跟进'
|
||||||
|
}
|
||||||
|
|
||||||
const keys: Record<string, any> = {
|
const keys: Record<string, any> = {
|
||||||
conversionMap: conversionMap,
|
conversionMap: conversionMap,
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
{{ item.user }}
|
{{ item.user }}
|
||||||
<span class="text-black2">「{{ item.step }}」</span>
|
<span class="text-black2">「{{ item.step }}」</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.content" class="bg-primary-light-10 w-full p-[12px] rounded-[6px] flex flex-col gap-[6px]">
|
<div v-if="item.content.length > 0" class="bg-primary-light-10 w-full p-[12px] rounded-[6px] flex flex-col gap-[6px]">
|
||||||
<span v-for="(value, key) in item.content" :key="key">{{ key }}:{{ value }}</span>
|
<span v-for="(itemy, index) in item.content" :key="index">{{ itemy.title }}{{ itemy.content }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-space>
|
</el-space>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
|
@ -16,56 +16,51 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { clueRecordLists } from '@/api/clue'
|
||||||
|
import { clueStepEnum, clueStepMap } from '@/enums'
|
||||||
|
|
||||||
|
interface IClueRecord {
|
||||||
|
date: string
|
||||||
|
user: string
|
||||||
|
step: string
|
||||||
|
content: { title: string; content: string }[] | []
|
||||||
|
}
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'clueRecord'
|
default: 'clueRecord'
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
type: Number
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
const recordList = ref<IClueRecord[]>([])
|
||||||
|
const fetchClueRecord = async () => {
|
||||||
|
const { id: clueId } = props
|
||||||
|
try {
|
||||||
|
loading.value = true
|
||||||
|
const result = await clueRecordLists({ clueId })
|
||||||
|
const data = result.lists.map(item => {
|
||||||
|
return {
|
||||||
|
date: item.createTime,
|
||||||
|
user: `${item.postName}:${item.userName}`,
|
||||||
|
step: clueStepMap[item.repairStep as clueStepEnum],
|
||||||
|
content: item.contentList ?? []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
recordList.value = data
|
||||||
|
} catch (error) {}
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
() => {
|
() => {
|
||||||
console.log('线索来源')
|
fetchClueRecord()
|
||||||
loading.value = true
|
|
||||||
setTimeout(() => {
|
|
||||||
loading.value = false
|
|
||||||
}, 500)
|
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
const recordList = ref([
|
|
||||||
{
|
|
||||||
date: '2025-02-12 15:47:00',
|
|
||||||
user: '电销老师:张三',
|
|
||||||
step: '添加跟进',
|
|
||||||
content: {
|
|
||||||
客户姓名: '韩梅梅',
|
|
||||||
联系电话: '188866668888',
|
|
||||||
基本情况:
|
|
||||||
'学生爸爸接电话,学生高三毕业,300多分,家长不清楚学生收到录取通知,家长说学生不读书了,我让家长先问问学生对未来的规划先和学生沟通一下,家长同意我们加他微信发专业资料给他看看,可以在微信上问问学生具体情况。推荐3'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ date: '2025-02-12 15:47:00', user: '招生老师:王五', step: '领取线索', content: null },
|
|
||||||
{
|
|
||||||
date: '2025-02-12 15:47:00',
|
|
||||||
user: '招生老师:王五',
|
|
||||||
step: '添加进展',
|
|
||||||
content: {
|
|
||||||
状态: '账号已添加'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: '2025-02-12 15:47:00',
|
|
||||||
user: '招生老师:王五',
|
|
||||||
step: '转化完成',
|
|
||||||
content: {
|
|
||||||
是否转化成功: '是',
|
|
||||||
备注: '已交部分定位金'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
])
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-space) {
|
:deep(.el-space) {
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
<el-button type="primary" link @click="handleEdit(row)">编辑</el-button>
|
<el-button type="primary" link @click="handleEdit(row)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</customer-list>
|
</customer-list>
|
||||||
|
<div class="flex justify-end pb-[20px] bg-white">
|
||||||
|
<pagination v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<customer-dialog ref="customerDialogRef" @refresh-list="getLists" />
|
<customer-dialog ref="customerDialogRef" @refresh-list="getLists" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="bg-primary-light-10 p-[16px] rounded-[6px] flex-1">
|
<div class="bg-primary-light-10 p-[16px] rounded-[6px] flex-1">
|
||||||
<el-form-item label="表单类型" prop="formType">
|
<el-form-item label="表单类型" prop="formType">
|
||||||
<el-radio-group v-model="item.formType">
|
<el-radio-group v-model="item.formType">
|
||||||
<el-radio v-for="type in templateTypeOptions" :key="type.value" :label="type.value">{{ type.label }}</el-radio>
|
<el-radio v-for="type in formTypeOptions" :key="type.value" :label="type.value">{{ type.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="表单标题" prop="formTitle">
|
<el-form-item label="表单标题" prop="formTitle">
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import type { Item } from './template-drawer.vue'
|
import type { Item } from './template-drawer.vue'
|
||||||
import { formTypeEum, templateTypeOptions } from '@/enums'
|
import { formTypeEum, formTypeOptions } from '@/enums'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
|
|
|
@ -32,8 +32,7 @@ import ProDrawer, { type IParams } from '@/components/ProDrawer/index.vue'
|
||||||
import addItem from './add-item.vue'
|
import addItem from './add-item.vue'
|
||||||
import { postLists } from '@/api/account_center/postion'
|
import { postLists } from '@/api/account_center/postion'
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import { templateAdd, templateDetail, templateEdit, templateLists } from '@/api/summary'
|
import { templateAdd, templateDetail, templateEdit } from '@/api/summary'
|
||||||
import { toast } from '@/utils/util'
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
|
|
||||||
export interface Item {
|
export interface Item {
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
<el-button type="primary" link @click="handleDelete(row)">删除</el-button>
|
<el-button type="primary" link @click="handleDelete(row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</ProTable>
|
</ProTable>
|
||||||
|
<div class="flex justify-end mt-4">
|
||||||
|
<pagination v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
</el-space>
|
</el-space>
|
||||||
<template-drawer ref="templateDrawerRef" @refreshList="getLists" />
|
<template-drawer ref="templateDrawerRef" @refreshList="getLists" />
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue