Переглянути джерело

客户跟进页面有关接口调用

lm 1 місяць тому
батько
коміт
0a028f9a7e

+ 44 - 0
src/api/customerFollowUp.ts

@@ -0,0 +1,44 @@
+import request from '../utils/request.js'
+let adminPrefix = import.meta.env.VITE_API_ADMIN_PRE
+
+// 查询顶部筛选条件信息接口
+export const getHeaderSearchOptionsApi = () => {
+    return request({
+        url: `${adminPrefix}/api/v1/follow/headSelect/data`,
+        method: 'get',
+    })
+}
+
+// 分页查询客户跟进信息列表数据接口
+export const getFollowInfoApi = (data:any) => {
+    return request({
+        url: `${adminPrefix}/api/v1/follow/customer/listPage`,
+        method: 'post',
+        data
+    })
+}
+
+// 查询日志记录信息接口
+export const getCustomerOperationLogApi = (data:any) => {
+    return request({
+        url: `${adminPrefix}/api/v1/follow/customer/oper/log/`,
+        method: 'post',
+        data
+    })
+}
+
+// 赢单申请列表信息接口
+export const getCustomerWinnerApplyListApi = (auditStatus:any) => {
+    return request({
+        url: `${adminPrefix}/api/v1/follow/auditFollow/data/${auditStatus}`,
+        method: 'get',
+    })
+}
+
+// 赢单审核操作信息接口
+export const updateCustomerWinnerAuditOperationStatusApi = (id:any,auditStatus:any) => {
+    return request({
+        url: `${adminPrefix}/api/v1/follow/auditFollow/oper/${id}/${auditStatus}`,
+        method: 'post',
+    })
+}

+ 1 - 1
src/baseComponents/FilePreview.vue

@@ -370,7 +370,7 @@ watch(()=>vuePpt.value,(newVal)=>{
     }
 
     .el-dialog__footer{
-        padding:15px 20px;
+        // padding:15px 20px;
         border-top:solid #EBEEF5 1px;
     }
 }

+ 1 - 1
src/baseComponents/PreviewDialog.vue

@@ -128,7 +128,7 @@ const HandleConfirmCheck = async () => {
 }
 
 :deep(.el-dialog__footer){
-    line-height: 1;
+    // line-height: 1;
     height: auto !important;
 }
 

+ 37 - 14
src/components/CustomerOperationDialog/index.vue

@@ -1,4 +1,4 @@
-<!-- 我的客户 和 公海客户 的客户操作记录  -->
+<!-- 我的客户 和 公海客户、 客户跟进 的客户操作记录  -->
 
 <template>
     <!-- 操作记录 弹窗 -->
@@ -11,6 +11,18 @@
         <SearchBlock :searchList="operationRecordSearchList" 
             @searchChange="HandleOperationLogSearchChange">
         </SearchBlock>
+        <!-- 带完善 -->
+        <FormSearchGroup :searchList="[
+            {
+                key:'queryStr',
+                type:'input',
+                placeholder:'请输入关键字搜索',
+                hidden:false,
+                defaultValue:'',
+                disabled:false
+            }
+        ]" @searchChange="HandleOperationLogSearchChange"/>
+
         <FollowCard :cardList="finalOperationLogRenderData">
             <template #operation><i></i></template>
         </FollowCard>
@@ -40,19 +52,20 @@ import SearchBlock from '@/baseComponents/SearchBlock.vue';
 import FollowCard from '@/components/FollowCard.vue';
 import Pagination from '@/baseComponents/Pagination.vue';
 import {operationRecordSearchList} from './searchBlock'
+
+import FormSearchGroup from '@/baseComponents/FormSearchGroup.vue';
+
+
 import {
     getOperationLogApi,
 } from '@/api/highSeasCustomer'
 
-import {
-    getPrivateOperationLogApi,
-
-} from '@/api/myCustomer'
-
+import {getPrivateOperationLogApi} from '@/api/myCustomer'
+import { getCustomerOperationLogApi} from '@/api/customerFollowUp';
 
 const props = defineProps({
     interfaceSource:{
-        type:String as ()=>'highSeasCustomer'|'myCustomer',
+        type:String as ()=>'highSeasCustomer'|'myCustomer'|'customerFollow',
         default:'highSeasCustomer',  //
     }, //查询操作日志 接口来源 
 })
@@ -114,22 +127,32 @@ const GetOperationList = async ()=>{
             pageSize: pageSize.value
         }
         res = await getOperationLogApi(params)
-    }else if(props.interfaceSource == 'myCustomer'){
+    }else if(props.interfaceSource == 'myCustomer'){ 
         let params = {
             customerId: route.query.id,
             operUserId: searchParams.value.personnel == 'all' ? '' : searchParams.value.personnel,
-            "startDate": "",
+            "startDate": "",   //带完善
             "endDate": "",
             pageNum: currentPage.value,
             pageSize: pageSize.value
         }
         res = await getPrivateOperationLogApi(params)
+    }else if(props.interfaceSource == 'customerFollow'){
+        let params = {
+            customerId: '', //待完善
+            operUserId: '',
+            groupId: '',
+            startDate: "",
+            endDate: "",
+            pageNum: currentPage.value,
+            pageSize: pageSize.value,
+        }
+        res = await getCustomerOperationLogApi(params)
     }
    
     if(res?.code == 200){
        const {data:operationData, dateData, groupData, memberData} =  res?.data
        totalNum.value = operationData.total
-
         let memberOption = memberData?.map(item=>{
             return {
                 label:item.username,
@@ -163,14 +186,14 @@ const GetOperationList = async ()=>{
             }else if(item.operDataType === 0){ //客户
                 if([12].includes(item.operAction)){
                     operationAim = '学校信息'
+                }else if([2].includes(item.operAction)){ //转让
+                    operationAim = '归属人'
                 }else{
                     operationAim = ''
                 }
-                // 这两个 记录的结果待完善
+                // 这个 记录的结果待完善
                 // case 1:
                 //     return '跟进'
-                // case 2:
-                //     return '转让'
             }
 
             // 具体操作信息
@@ -178,7 +201,7 @@ const GetOperationList = async ()=>{
             let operationDetail = ''
             let content = item.content.split(',')
             if([11,12,13].includes(item.operAction)){
-                if(item.operAction === 12){
+                if([12,2].includes(item.operAction)){
                     operationDetail = content[0] + ` <span style="color:#2E64FA">调整为</span> ` + content[1]
                 }else if(item.operAction === 11){
                     operationDetail =  `<span style="color:#2E64FA">新增</span> ` + content[0]  

+ 14 - 0
src/components/CustomerOperationDialog/searchBlock.ts

@@ -2,6 +2,20 @@ import { ref } from "vue";
 
 
 export const operationRecordSearchList = ref([
+    {
+        label: '时间',
+        key: 'time',
+        type: 'single',
+        options: [],
+        defaultValue: 'all'
+    },
+    {
+        label: '小组',
+        key: 'group',
+        type: 'single',
+        options: [],
+        defaultValue: 'all'
+    },
     {
         label: '人员',
         key: 'personnel',

+ 1 - 4
src/components/FollowCard.vue

@@ -24,10 +24,7 @@
                 </div>
                 <!-- 右侧操作信息 -->
                 <div class="header_right">
-                    <slot name="operation" :row="item">
-                        <el-button class="delete_button_border_no_bg">驳回赢单</el-button>
-                        <el-button class="button_border">通过赢单</el-button>
-                    </slot>
+                    <slot name="operation" :row="item"></slot>
                 </div>
             </div>
             <!-- 2. 中部描述信息-->

+ 320 - 295
src/views/customerFollowUp/index.vue

@@ -6,15 +6,17 @@
                     <div class="content_left">
                         <SearchBlock :searchList="headerSearchList"  @searchChange="HandleBlockSearchChange">
                             <template #rowItem-time>
+
                                 <el-date-picker
                                     v-if="listSearchParams.time == 'custom'"
                                     style="height: 28px;flex-grow: 0;width: 225px;"
                                     v-model="listSearchParams.startAndEndTime"
-                                    type="daterange"
+                                    type="datetimerange"
                                     range-separator="至"
-                                    start-placeholder="开始日期"
-                                    end-placeholder="结束日期"
+                                    start-placeholder="开始时间"
+                                    end-placeholder="结束时间"
                                     size="default"
+                                    @change="(val)=>HandleBlockSearchChange({startAndEndTime:val},'startAndEndTime')"
                                 />
                             </template>
                         </SearchBlock>
@@ -37,15 +39,17 @@
                     defaultValue:'',
                     disabled:false
                 }
-            ]" @searchChange="HandleBlurSearchChange"/>
+            ]" @searchChange="HandleBlockSearchChange"/>
             <Table :currentPage="currentPage" :pageSize="pageSize" :totalNum="totalNum" 
-                :tableColumns="tableColumns" :tableData="tableData">
+                :tableColumns="tableColumns" :tableData="tableData" 
+                @paginationChange="HandlePaginationChange">
                 <template #num="{currentIndex}">
                     {{ (currentPage - 1) * pageSize + currentIndex }}
                 </template>
                 
-                <template #followUpContent="{row}">
-                    <span class="two_line_ellipsis">{{ row.followUpContent }}</span>
+
+                <template #followContent="{row}">
+                    <span class="two_line_ellipsis">{{ row.followContent }}</span>
                 </template>
 
                 <template #operation="{row}">
@@ -65,9 +69,16 @@
             title="审核申请" 
             :customFooter="true"
             @close="CloseAuditDialog">
-            <TabSearch :tabList="tabList" :defaultTabKey="defaultAuditStatus" tab-type="box" />
+            <TabSearch tab-type="box" :tabList="tabList" 
+                :defaultTabKey="defaultAuditStatus"  
+                @tabChange="HandleTabChange" />
             
-            <FollowCard  :cardList="finalAuditRenderData"></FollowCard>
+            <FollowCard  :cardList="auditList">
+                <template #operation="{row}">
+                    <el-button class="delete_button_border_no_bg" @click="HandleAuditOperation(row,2)">驳回赢单</el-button>
+                    <el-button class="button_border" @click="HandleAuditOperation(row,1)">通过赢单</el-button>
+                </template>
+            </FollowCard>
           
             <template #close>
                 <el-button @click="CloseAuditDialog" class="button_background" >关闭</el-button>
@@ -76,172 +87,303 @@
         </PreviewDialog>
 
         <!-- 操作日志弹窗 -->
-         <PreviewDialog title="操作记录" 
-            class="operation_log_dialog"
-            :customFooter="true"
-            :previewVisible="operationLogDialogVisible" 
-            @close="CloseOperationLogDialog">
-
-
-            <!-- 搜索列表 -->
-            <SearchBlock :searchList="operationLogSearchList" 
-                @searchChange="HandleLogBlockSearchChange">
-                <template #rowItem-time>
-                    <el-date-picker
-                        v-if="logSearchParams.time === 'custom'"
-                        style="height: 28px;flex-grow: 0;width: 225px;"
-                        v-model="logSearchParams.startAndEndTime"
-                        type="daterange"
-                        range-separator="至"
-                        start-placeholder="开始日期"
-                        end-placeholder="结束日期"
-                        size="default"
-                    />
-                </template>
-            </SearchBlock>
-
-            <FormSearchGroup :searchList="[
-                    {
-                        key:'queryStr',
-                        type:'input',
-                        placeholder:'请输入关键字搜索',
-                        hidden:false,
-                        defaultValue:'',
-                        disabled:false
-                    }
-                ]" @searchChange="HandleLogBlurSearchChange"/>
-
-
-            <!-- 日志列表 -->
-            <div>
-                <FollowCard class="log_list_container"  :cardList="finalOperationLogRenderData">
-                    <template #operation><i></i></template>
-                </FollowCard>
-
-                <div class="page_pagination">
-                    <span style="flex:1 1;color: #666666;font-size: 14px;">共 {{ logTotalNum  }} 条数据</span>
-                    <!-- background layout="sizes, prev, pager, next"  -->
-                    <el-pagination 
-                        :current-page="logCurrentPage" 
-                        :page-size="logPageSize" 
-                        :page-sizes="[20, 50, 100]" 
-                        background layout="sizes, prev, pager, next" 
-                        :total="Number(logTotalNum)" 
-                        @current-change="(val)=>HandleLogPaginaionChange({type:'currentPage',val})" 
-                        @size-change="(val)=>HandleLogPaginaionChange({type:'pageSize',val})" />
-                </div>
-            </div>
-
-            <template #close>
-                <el-button @click="CloseOperationLogDialog" class="button_background" >关闭</el-button>
-            </template>
-            <template #confirm><i></i></template>
-
-         </PreviewDialog>
-
+        <CustomerOperationDialog
+            v-if="operationLogDialogVisible" 
+            v-model:dialogVisible="operationLogDialogVisible">
+        </CustomerOperationDialog>
     </div>
 </template>
 
 
 <script setup lang="ts">
-import { computed, ref } from 'vue';
+import { computed, onMounted, ref } from 'vue';
+import {ElMessage} from 'element-plus'
 import SearchBlock from '@/baseComponents/SearchBlock.vue';
-import {headerSearchList, operationLogSearchList} from './searchBlock'
+import {headerSearchList} from './searchBlock'
 import Table from '@/baseComponents/Table.vue';
 import FormSearchGroup from '@/baseComponents/FormSearchGroup.vue';
 
 import PreviewDialog from '@/baseComponents/PreviewDialog.vue';
 import {tableColumns} from './table'
 import TabSearch from '@/baseComponents/TabSearch.vue';
+import CustomerOperationDialog from '@/components/CustomerOperationDialog/index.vue'
 
 import FollowCard from '@/components/FollowCard.vue';
+import { 
+    getHeaderSearchOptionsApi,
+    getFollowInfoApi,
+    getCustomerWinnerApplyListApi,
+    updateCustomerWinnerAuditOperationStatusApi,
+ } from '@/api/customerFollowUp';
+
+import {
+        formatTime,    
+        getTodayRange,
+        getThisWeekRange,
+        getRecentMonthsRange
+    } from '@/utils/timeRangeGet'
 
 
 /**
- * 1. 默认列表 表格数据有关内容
+ * 1. 头部筛选项有关数据
  */
-const tableData = ref([
-    {
-        id: 1,
-        customerType: '首单客户',
-        schoolName: '流星花园学校',
-        contactPerson: '张三',
-        jobTitle: '校长',
-        educationStage: '中学',
-        province: '北京市', // 新增列数据
-        region: '西城区',   // 新增列数据
-        groupName: '1小组', // 新增列数据
-        followUpUser: '张三',
-        followUpProduct: '大数据精准教学',
-        followUpStatus: '试用测试',
-        followUpContent: '跟进文案跟进文案跟进文案跟进文案跟进文案跟进文案跟进文案跟进文案',
-        followUpTime: '2026-03-11 9:00',
-    },
-    {
-        id: 2,
-        customerType: '首单客户',
-        schoolName: '北京师达',
-        contactPerson: '张三',
-        jobTitle: '校长',
-        educationStage: '中学',
-        province: '北京市',
-        region: '西城区',
-        groupName: '1小组',
-        followUpUser: '张三',
-        followUpProduct: '大数据精准教学',
-        followUpStatus: '试用测试',
-        followUpContent: '跟进文案跟进文案跟进文案跟进文案...',
-        followUpTime: '2026-03-11 9:00',
-    },
-    {
-        id: 3,
-        customerType: '首单客户',
-        schoolName: '北京五十七中学',
-        contactPerson: '张三',
-        jobTitle: '校长',
-        educationStage: '中学',
-        province: '北京市',
-        region: '西城区',
-        groupName: '1小组',
-        followUpUser: '张三',
-        followUpProduct: '大数据精准教学',
-        followUpStatus: '试用测试',
-        followUpContent: '跟进文案跟进文案跟进文案',
-        followUpTime: '2026-03-11 9:00',
+const provinceOption = ref([])  //省份配置项
+const memberOption = ref([])  //人员配置项
+const GetHeaderSearchOptions = async ()=>{
+    const res = await getHeaderSearchOptionsApi()
+    if(res?.code == 200){
+        const {
+            auditCount,
+            productData,stageData,regionData,groupData,memberData,
+        } = res.data
+        winnerOrderNum.value = auditCount || 0
+        const groupOption = groupData?.map(item=>{
+            return{
+                label:item.name,
+                value:item.id
+            }
+        }) || []
+
+        memberOption.value = memberData?.map(item=>{
+            return{
+                label:item.username,
+                value:item.id,
+                cityIds:item.cityIds,
+                groupIds:item.groupIds,
+                provinceIds:item.provinceIds,
+            }
+        }) || []
+
+        const productOption = productData?.map(item=>{
+            return {
+                label:item.name,
+                value:item.id,
+            }
+        }) || []
+        
+        provinceOption.value = regionData?.map(item=>{
+            return{
+                label:item.name,
+                value:item.id,
+                subData:item.subData?.map(subItm=>{
+                    return {
+                        label:subItm.name,
+                        value:subItm.id,
+                    }
+                }) || [],
+            }
+        }) || []
+
+        const stageOption = stageData?.map(item=>{
+            return {
+                label:item.name,
+                value:item.id,
+            }
+        }) || []
+
+        headerSearchList.value = headerSearchList.value.map(item=>{
+            switch(item.key){
+                case 'group':
+                    item.options = [
+                        { label: '全部', value: 'all' },
+                        ...groupOption,
+                    ]
+                    break
+                case 'personnel':{
+                    item.options = [
+                        { label: '全部', value: 'all' },
+                        ...memberOption.value,
+                    ]
+                    break
+                }
+                case 'product':
+                    item.options = [
+                        { label: '全部', value: 'all' },
+                        ...productOption,
+                    ]
+                    break
+                case 'province':
+                    item.options = [
+                        { label: '全部', value: 'all' },
+                        ...provinceOption.value,
+                    ]
+                    break
+                case 'region':{
+                    item.options = []
+                    item.hidden =  true
+                    break
+                }
+                case 'educationStage':
+                    item.options = [
+                        { label: '全部', value: 'all' },
+                        ...stageOption,
+                    ]
+                    break
+            }
+            item.defaultValue = listSearchParams.value[item.key]
+            return item
+        })
     }
-]);
+}
 
+/**
+ * 2. 客户跟进列表有关数据 及操作
+ */
+const tableData = ref([]);
 const currentPage = ref(1)
 const pageSize = ref(20)
 const totalNum = ref(0)
+// 获取客户跟进列表
+const GetFollowInfo = async ()=>{
+    let timeRange = {
+        startTime: '',
+        endTime: '',
+    }
+    switch(listSearchParams.value.time){
+        case 'all':
+            timeRange = {
+                startTime: '',
+                endTime: '',
+            }
+            break
+        case 'today':
+            timeRange = getTodayRange()
+            break
+        case 'thisWeek':
+            timeRange = getThisWeekRange()
+            break
+        case 'last1Month':
+            timeRange = getRecentMonthsRange(1)
+            break
+        case 'last3Month':
+            timeRange = getRecentMonthsRange(3)
+            break
+        case 'halfYear':
+            timeRange = getRecentMonthsRange(6)
+            break
+        case 'custom':
+            timeRange = {
+                startTime:formatTime(listSearchParams.value.startAndEndTime?.[0]),
+                endTime: formatTime(listSearchParams.value.startAndEndTime?.[1]),
+            }
+            break
+    }
+    listSearchParams.value.time  
+    let params = {
+        startDatetime: timeRange.startTime,
+        endDatetime: timeRange.endTime,
+        // typeId: '',
+        stageId: listSearchParams.value.educationStage == 'all' ? '' : listSearchParams.value.educationStage,
+        provinceId: listSearchParams.value.province == 'all' ? '' : listSearchParams.value.province,
+        cityId: listSearchParams.value.region == 'all' ? '' : listSearchParams.value.region,
+        groupId: listSearchParams.value.group == 'all' ? '' : listSearchParams.value.group,
+        userId: listSearchParams.value.personnel == 'all' ? '' : listSearchParams.value.personnel,
+        productId: listSearchParams.value.product == 'all' ? '' : listSearchParams.value.product,
+        queryStr: listSearchParams.value.queryStr || '',
+        pageNum: currentPage.value,
+        pageSize: pageSize.value
+    }
+    const res = await getFollowInfoApi(params)
+    if(res?.code == 200){
+        totalNum.value = res.data.total
+        tableData.value = res.data.records || []
+    }
+}
+
+//  表格分页变更触发的操作
+const HandlePaginationChange = async (params)=>{
+    const {type,val} = params
+    if(type == 'currentPage'){
+        currentPage.value = val
+    }else if(type == 'pageSize'){
+        pageSize.value = val
+    }
+    await GetFollowInfo()
+}
 
 
 /**
- * 2.默认列表 筛选项有关数据
+ * 3.默认列表 筛选项有关数据 及操作
  */
-const listSearchParams = ref({})
-const HandleBlockSearchChange = (params,key)=>{
+const listSearchParams = ref({
+    time:'all',
+    group:'all',
+    personnel:'all',
+    product:'all',
+    province:'all',
+    region:'all',
+    educationStage:'all',
+    type:'all',
+    queryStr:'',
+    startAndEndTime:[]
+})
+// 筛选项变更触发的操作
+const HandleBlockSearchChange = async (params,key)=>{
     listSearchParams.value = {
         ...listSearchParams.value,
         ...params
     }
-}
-const HandleBlurSearchChange = (params,key)=>{
-    // console.log('blurl--',params)
-    listSearchParams.value = {
-        ...listSearchParams.value,
-        ...params
+    switch(key){
+        case 'group':
+        case 'province':
+        case 'region':
+            listSearchParams.value.personnel = 'all'
+            break
+    }
+   headerSearchList.value = headerSearchList.value.map(item=>{
+    switch(item.key){
+        case 'personnel':{
+            let finalOption = memberOption.value.filter(item=>{
+                return (listSearchParams.value.group == 'all' ? true : item.groupIds.includes(listSearchParams.value.group)) 
+                        && (listSearchParams.value.province == 'all' ? true : item.provinceIds.includes(listSearchParams.value.province))
+                        && (listSearchParams.value.region == 'all' ? true : item.cityIds.includes(listSearchParams.value.region))
+            }) || []
+            item.options = [
+                { label: '全部', value: 'all' },
+                ...finalOption,
+            ]
+            break
+        }
+        case 'region':{
+            let regionOption = provinceOption.value.find(item=>{
+                return item.value == listSearchParams.value.province
+            })?.subData || []
+            item.options = [
+                { label: '全部', value: 'all' },
+                ...regionOption,
+            ]
+            item.hidden =  listSearchParams.value.province == 'all'
+            break
+        }
     }
+    item.defaultValue = listSearchParams.value[item.key]
+    return item
+   })
+    await GetFollowInfo()
 }
 
-/**
- * 3. 赢单申请有关数据
- */
-const winnerOrderNum = ref(5)
+/** 4.  获取操作记录列表*/
+// 操作日志弹窗数据 及相关操作 
+const operationLogDialogVisible = ref(false)
+// 打开操作日志弹窗
+const OpenOperationLogDialog = async ()=>{
+    operationLogDialogVisible.value = true
+}
+
+/** 5.赢单申请有关数据 */
+const winnerOrderNum = ref(0) //赢单申请总数
 // 审核弹窗数据
 const auditDialogVisible = ref(false)
 const defaultAuditStatus = ref(0)
+const OpenAuditDialog = async ()=>{
+    auditDialogVisible.value = true
+    await GetWinnerApplyList()
+}
+const CloseAuditDialog = ()=>{
+    auditDialogVisible.value = false
+}
 
+//审核弹窗tab切换数据 及操作
 const waitAuditNum = ref(0)
 const auditPassNum = ref(0)
 const auditRejectNum = ref(0)
@@ -263,171 +405,54 @@ const tabList = computed(()=>[
     },
 
 ])
-const auditList = ref([
-    {
-        id:'1',
-        followUpTime: '26-02-19 19:00',
-        schoolName: '北京师达学校',
-        followUpProduct: '大数据精准教学',
-        followUpStatus: '赢单',
-        followUpUser: '张三',
-        contactPerson: '严谨',
-        jobTitle: '校长',
-        followUpContent: '跟进文案跟进文案跟进文案跟进文案跟进文案北京市东城区葱店西街56号跟进文案跟进文案跟进文案跟进文案跟进文'
-    },
-    {
-        id:'2',
-        followUpTime: '26-02-19 19:00',
-        schoolName: '北京师达学校',
-        followUpProduct: '大数据精准教学',
-        followUpStatus: '赢单',
-        followUpUser: '张三',
-        contactPerson: '严谨',
-        jobTitle: '校长',
-        followUpContent: '跟进文案跟进文案跟进文案跟进文案跟进文案北京市东城区葱店西街56号跟进文案跟进文案跟进文案跟进文案跟进文案北京\n文案跟进文案跟进文案北京市东城区葱店西街56号跟进文案跟进文案跟进文案跟进文案跟进文案北京市东城区葱店西街56号'
-    },
-     {
-        id:'3',
-        followUpTime: '26-02-19 19:00',
-        schoolName: '北京师达学校',
-        followUpProduct: '大数据精准教学',
-        followUpStatus: '赢单',
-        followUpUser: '张三',
-        contactPerson: '严谨',
-        jobTitle: '校长',
-        followUpContent: '跟进文案跟进文案跟进文案跟进文案跟进文案北京市东城区葱店西街56号跟进文案跟进文案跟进文案跟进文案跟进文案北京\n文案跟进文案跟进文案北京市东城区葱店西街56号跟进文案跟进文案跟进文案跟进文案跟进文案北京市东城区葱店西街56号'
-    }
-])
-
-const finalAuditRenderData = computed(()=>{
-    return auditList.value.map(item=>{
-        return {
-            headerTitleList:[
-                item.followUpTime,
-                item.schoolName,
-                item.followUpProduct
-            ],
-            headerTags:[
-                item.followUpStatus,
-            ],
-            middleDesc:[
-                `跟进人:${item.followUpUser}`,
-                `联系人:${item.contactPerson}`,
-                `职务:${item.jobTitle}`
-            ],
-            bottomDesc:`跟进内容:${item.followUpContent}`
-        }
-    })
-})
-
-
-const OpenAuditDialog = ()=>{
-    auditDialogVisible.value = true
-}
-const CloseAuditDialog = ()=>{
-    auditDialogVisible.value = false
+const auditList = ref([])  //赢单审核列表
+const HandleTabChange = async (val)=>{
+    defaultAuditStatus.value = val
+    await GetWinnerApplyList()
 }
-
-/**
- * 4. 操作日志有关数据
- */
-const operationLogList = ref([
-    {
-        id:1,
-        operationTime: '26-02-19 19:00',
-        operatorName: '张安顺',
-        schoolName: '北京师达学校',
-        operationType: '编辑学校信息',
-        operationContent: '学校名称【北京109中学】学段【初中】调整为学校名称【北京一零九中学】学段【九年一贯】。'
-    },
-    {
-        id:2,
-        operationTime: '26-02-19 19:00',
-        operatorName: '张安顺',
-        schoolName: '北京师达学校',
-        operationType: '删除联系人',
-        operationContent: '删除 姓名【张三】职务【校长】手机电话【17820681226】办公电话【17820681226】备注【文案文案】。'
-    },
-    {
-        id:3,
-        operationTime: '26-02-19 19:00',
-        operatorName: '张安顺',
-        schoolName: '北京师达学校',
-        operationType: '新增联系人',
-        operationContent: '新增 姓名【张三】职务【校长】手机电话【17820681226】办公电话【17820681226】备注【文案文案】。'
-    },
-    {
-        id:4,
-        operationTime: '26-02-19 19:00',
-        operatorName: '张安顺',
-        schoolName: '北京师达学校',
-        operationType: '编辑联系人',
-        operationContent: '联系人姓名【张三】职务【校长】手机电话【17820681226】备注【文案文案】调整为 联系人姓名【李四】职务【校长】手机电话【17820681226】备注【文案文案】。'
-    },
-    {
-        id:5,
-        operationTime: '26-02-19 19:00',
-        operatorName: '张安顺',
-        schoolName: '北京师达学校',
-        operationType: '转至公海',
-        operationContent: '将客户转至公海。'
-    }
-]);
-
-const finalOperationLogRenderData = computed(()=>{
-    return operationLogList.value.map(item=>{
-        return {
-            headerTitleList:[
-                item.operationTime,
-                item.operatorName,
-                item.schoolName,
-                item.operationType
-            ],
-            headerTags:[],
-            middleDesc:[],
-            bottomDesc:`操作内容:${item.operationContent}`
-        }
-    })
-})
-
-//操作日志搜索项 及操作
-const logSearchParams = ref({})
-const HandleLogBlockSearchChange = (params,key)=>{
-    logSearchParams.value = {
-        ...logSearchParams.value,
-        ...params
-    }
-}
-const HandleLogBlurSearchChange = (params,key)=>{
-    listSearchParams.value = {
-        ...listSearchParams.value,
-        ...params
+// 获取赢单审核列表数据
+const GetWinnerApplyList = async ()=>{
+    let  res = await getCustomerWinnerApplyListApi(defaultAuditStatus.value)
+    if(res?.code == 200){
+        const {audit0,audit1,audit2,auditData} = res?.data|| {}
+        waitAuditNum.value = audit0 || 0
+        auditPassNum.value = audit1 || 0
+        auditRejectNum.value = audit2 || 0
+        auditList.value = auditData?.map(item=>{
+            return {
+                headerTitleList:[
+                    item.claimDatetime,
+                    item.customerName,
+                    item.productName
+                ],
+                headerTags:[
+                    item.followName,
+                ],
+                middleDesc:[
+                    `跟进人:${item.claimUserName}`,
+                    `联系人:${item.customerPersonName}`,
+                    `职务:${item.positionName}`
+                ],
+                bottomDesc:`跟进内容:${item.followContent}`,
+                ...item,
+            }
+        })
     }
-} 
-
-// 操作日志弹窗数据 及相关操作 
-const operationLogDialogVisible = ref(false)
-const OpenOperationLogDialog = ()=>{
-    operationLogDialogVisible.value = true
 }
-const CloseOperationLogDialog = ()=>{
-    operationLogDialogVisible.value = false
-}
-
-// 日志分页有关数据 及操作
-const logCurrentPage = ref(1)
-const logPageSize = ref(20)
-const logTotalNum = ref(0)
-const HandleLogPaginaionChange = (params)=>{
-    const {type,val} = params
-    if(type == 'currentPage'){
-        // 处理页面跳转
 
-    }else if(type == 'pageSize'){
-        // 处理页容量
+// 驳回/通过 赢单
+const HandleAuditOperation = async (row:any,auditStatus:any)=>{
+    let res = await updateCustomerWinnerAuditOperationStatusApi(row.id,auditStatus)
+    if(res?.code == 200){
+        ElMessage.success('操作成功')
+        await GetWinnerApplyList()
     }
 }
 
+onMounted( async ()=>{
+    await GetHeaderSearchOptions()
+    await GetFollowInfo()
+})
 
 </script>
 

+ 7 - 122
src/views/customerFollowUp/searchBlock.ts

@@ -21,157 +21,42 @@ export const headerSearchList = ref([
         label: '分组',
         key: 'group',
         type: 'single',
-        options: [
-            { label: '全部', value: 'all' },
-            { label: '分组1', value: 'group1' },
-            { label: '分组2', value: 'group2' },
-            { label: '分组3', value: 'group3' },
-            { label: '分组4', value: 'group4' },
-            { label: '分组5', value: 'group5' },
-            { label: '分组6', value: 'group6' },
-        ],
+        options: [],
         defaultValue: 'all'
     },
     {
         label: '人员',
         key: 'personnel',
         type: 'single',
-        options: [
-            { label: '全部', value: 'all' },
-            { label: '马丁', value: 'martin' },
-            { label: '王诗雅', value: 'wangshiya' },
-            { label: '王梓木', value: 'wangzimu' },
-            { label: '殷思源', value: 'yinsiyuan' },
-            { label: '付文杰', value: 'fuwenjie' },
-            { label: '李润曦', value: 'lirunxi' },
-        ],
+        options: [],
         defaultValue: 'all'
     },
     {
         label: '产品',
         key: 'product',
         type: 'single',
-        options: [
-            { label: '全部', value: 'all' },
-            { label: '大数据教学诊断', value: 'big_data_diagnosis' },
-            { label: '智能判分', value: 'smart_grading' },
-            { label: '材料采集', value: 'material_collection' },
-            { label: '校内通知', value: 'school_notification' },
-            { label: '校本研修', value: 'school_research' },
-            { label: '协同备课', value: 'collaborative_prep_1' },
-            { label: '协同备课', value: 'collaborative_prep_2' }, // 图片中此项有重复
-            { label: '协同备课', value: 'collaborative_prep_3' }, // 图片中此项有重复
-        ],
+        options: [],
         defaultValue: 'all'
     },
     {
         label: '省份',
         key: 'province',
         type: 'single',
-        options: [
-            { label: '全部', value: 'all' },
-            { label: '北京', value: 'beijing' },
-            { label: '上海', value: 'shanghai' },
-            { label: '天津', value: 'tianjin' },
-            { label: '广东', value: 'guangdong' },
-            { label: '广西', value: 'guangxi' },
-        ],
+        options: [],
         defaultValue: 'all'
     },
     {
         label: '地区',
         key: 'region',
         type: 'single',
-        options: [
-            { label: '全部', value: 'all' },
-            { label: '东城区', value: 'dongcheng' },
-            { label: '西城区', value: 'xicheng' },
-            { label: '海淀区', value: 'haidian' },
-            { label: '朝阳区', value: 'chaoyang' },
-            { label: '丰台区', value: 'fengtai' },
-            { label: '石景山区', value: 'shijingshan' },
-        ],
+        options: [],
         defaultValue: 'all'
     },
     {
         label: '学段',
-        key: 'education_stage',
-        type: 'single',
-        options: [
-            { label: '全部', value: 'all' },
-            { label: '幼儿园', value: 'kindergarten' },
-            { label: '小学', value: 'primary_school' },
-            { label: '初中', value: 'junior_high' },
-            { label: '高中', value: 'senior_high' },
-            { label: '完全中学', value: 'complete_middle' },
-            { label: '九年一贯', value: 'nine_year' },
-            { label: '十二年一贯', value: 'twelve_year' },
-            { label: '职高', value: 'vocational_high' },
-            { label: '大学', value: 'university' },
-        ],
-        defaultValue: 'all'
-    },
-    {
-        label: '类型',
-        key: 'type',
-        type: 'single',
-        options: [
-            { label: '全部', value: 'all' },
-            { label: '首单客户', value: 'first_order' },
-            { label: '存量客户', value: 'existing_customer' },
-        ],
-        defaultValue: 'all'
-    }
-]);
-
-
-
-
-// 操作日志筛选配置
-export const operationLogSearchList = ref([
-    {
-        label: '时间',
-        key: 'time',
+        key: 'educationStage',
         type: 'single',
-        options:[
-            { label: '全部', value: 'all' },
-            { label: '今天', value: 'today' },
-            { label: '昨天', value: 'yesterday' },
-            { label: '近3天', value: 'last3Days' },
-            { label: '近1周', value: 'last1Week' },
-            { label: '近1月', value: 'last1Month' },
-            { label: '自定义', value: 'custom' }
-        ],
-        defaultValue: 'all'
-    },
-    {
-        label: '小组',
-        key: 'group',
-        type: 'single',
-        options: [
-            { label: '全部', value: 'all' },
-            { label: '分组1', value: 'group1' },
-            { label: '分组2', value: 'group2' },
-            { label: '分组3', value: 'group3' },
-            { label: '分组4', value: 'group4' },
-            { label: '分组5', value: 'group5' },
-            { label: '分组6', value: 'group6' },
-        ],
-        defaultValue: 'all'
-    },
-    {
-        label: '人员',
-        key: 'personnel',
-        type: 'single',
-        options: [
-            { label: '全部', value: 'all' },
-            { label: '马丁', value: 'martin' },
-            { label: '王诗雅', value: 'wangshiya' },
-            { label: '王梓木', value: 'wangzimu' },
-            { label: '殷思源', value: 'yinsiyuan' },
-            { label: '付文杰', value: 'fuwenjie' },
-            { label: '李润曦', value: 'lirunxi' },
-        ],
+        options: [],
         defaultValue: 'all'
     },
 ]);

+ 20 - 20
src/views/customerFollowUp/table.ts

@@ -12,17 +12,17 @@ export const tableColumns = ref([
         custom: true,
        
     },
+    // {
+    //     name: 'customerType',
+    //     label: '客户类型',
+    //     width: '100',
+    //     fixed: 'left',
+    //     align: 'center',
+    //     minWidth: '',
+    //     custom: false,
+    // },
     {
-        name: 'customerType',
-        label: '客户类型',
-        width: '100',
-        fixed: 'left',
-        align: 'center',
-        minWidth: '',
-        custom: false,
-    },
-    {
-        name: 'schoolName',
+        name: 'customerName',
         label: '学校名称',
         width: '150',
         fixed: 'left',
@@ -31,7 +31,7 @@ export const tableColumns = ref([
         custom: false,
     },
     {
-        name: 'contactPerson',
+        name: 'customerPersonName',
         label: '联系人',
         width: '100',
         fixed: 'left',
@@ -40,7 +40,7 @@ export const tableColumns = ref([
         custom: false,
     },
     {
-        name: 'jobTitle',
+        name: 'positionName',
         label: '职务',
         width: '80',
         fixed: 'left',
@@ -49,7 +49,7 @@ export const tableColumns = ref([
         custom: false,
     },
     {
-        name: 'educationStage',
+        name: 'stageName',
         label: '学段',
         width: '80',
         fixed: '',
@@ -58,7 +58,7 @@ export const tableColumns = ref([
         custom: false,
     },
     {
-        name: 'province',
+        name: 'provinceName',
         label: '省份',
         width: '100', 
         fixed: '',
@@ -67,7 +67,7 @@ export const tableColumns = ref([
         custom: false,
     },
     {
-        name: 'region',
+        name: 'cityName',
         label: '地区',
         width: '100',
         fixed: '',
@@ -85,7 +85,7 @@ export const tableColumns = ref([
         custom: false,
     },
     {
-        name: 'followUpUser',
+        name: 'claimUserName',
         label: '跟进人员',
         width: '100',
         fixed: 'right',
@@ -94,7 +94,7 @@ export const tableColumns = ref([
         custom: false,
     },
     {
-        name: 'followUpProduct',
+        name: 'productName',
         label: '跟进产品',
         width: '120',
         fixed: 'right',
@@ -103,7 +103,7 @@ export const tableColumns = ref([
         custom: false,
     },
     {
-        name: 'followUpStatus',
+        name: 'followName',
         label: '跟进状态',
         width: '100',
         fixed: 'right',
@@ -112,7 +112,7 @@ export const tableColumns = ref([
         custom: false,
     },
     {
-        name: 'followUpContent',
+        name: 'followContent',
         label: '跟进内容',
         width: '200',
         fixed: 'right',
@@ -121,7 +121,7 @@ export const tableColumns = ref([
         custom: true,
     },
     {
-        name: 'followUpTime',
+        name: 'claimDatetime',
         label: '跟进时间',
         width: '160',
         fixed: 'right',

+ 1 - 1
src/views/myCustomer/myCustomerDetail/index.vue

@@ -314,7 +314,7 @@ const OpenOperationRecordDialog=()=>{
 }
 
 
-/** 6.编辑学校 有关数据 及操作  待完善*/
+/** 6.编辑学校 有关数据 及操作 */
 const schoolVisible = ref(false)
 const schoolSubmitLoading = ref(false)
 const schoolDefaultFormData = ref({})