Procházet zdrojové kódy

修改客户跟进详情的页面展示

lm před 4 týdny
rodič
revize
00eef4d2c9

+ 27 - 1
src/components/FollowFormDialog/index.vue

@@ -3,6 +3,7 @@
         :visible="editFormDialogVisible" 
         :visible="editFormDialogVisible" 
         :submitLoading="editFormDialogSubmitLoading"
         :submitLoading="editFormDialogSubmitLoading"
         :defaultFormData="defaultFormData"
         :defaultFormData="defaultFormData"
+        :formDisabled="formDisabled"
         :formItemList="finalFormItemList"
         :formItemList="finalFormItemList"
         @close="CloseFormDialog"
         @close="CloseFormDialog"
         @confirm="HandleConfirmFormDialog"
         @confirm="HandleConfirmFormDialog"
@@ -50,6 +51,17 @@ const props = defineProps({
         type:Boolean,
         type:Boolean,
         default:false
         default:false
     }, //是否是查看(预览)表单
     }, //是否是查看(预览)表单
+    formDisabled:{
+        type:Boolean,
+        default:false
+    }, //表单是否禁选
+    itemDisabled:{
+        type:Boolean,
+        default:false
+    }, //表单元素是否禁选
+    customerId:{
+        type:String,
+    } //客户id,不在详情页获取id的时候使用
 })
 })
 const emit = defineEmits(['confirm'])
 const emit = defineEmits(['confirm'])
 const editFormDialogVisible = defineModel('visible')
 const editFormDialogVisible = defineModel('visible')
@@ -70,6 +82,11 @@ const CloseFormDialog = ()=>{
 
 
 // 新增确认
 // 新增确认
 const HandleConfirmFormDialog = async (params)=>{
 const HandleConfirmFormDialog = async (params)=>{
+    if(props.itemDisabled){
+        CloseFormDialog()
+        emit('confirm')
+        return 
+    }
     const {formData} = params
     const {formData} = params
     if(!props.previewForm){
     if(!props.previewForm){
         editFormDialogSubmitLoading.value = true
         editFormDialogSubmitLoading.value = true
@@ -125,7 +142,7 @@ const contactPeopleList = ref([])
 // 获取联系人列表
 // 获取联系人列表
 const GetContactList = async ()=>{
 const GetContactList = async ()=>{
     let params = {
     let params = {
-        customerId: route.query.id    ,
+        customerId: route.query.id || props.customerId,
         userId:'',
         userId:'',
         queryStr: "",
         queryStr: "",
         positionId:''
         positionId:''
@@ -242,6 +259,15 @@ watch(()=>props.previewForm,async (newVal)=>{
     }
     }
 },{immediate:true})
 },{immediate:true})
 
 
+
+watch(()=>props.itemDisabled,(newVal)=>{
+    if(newVal){
+        finalFormItemList.value = finalFormItemList.value.map(item=>{
+            item.disabled = true
+            return item
+        })
+    }
+},{immediate:true})
 onMounted(async ()=>{
 onMounted(async ()=>{
     const disabledData = (date)=>{
     const disabledData = (date)=>{
     // 如果传入的日期时间戳小于当前时间戳,则禁用(返回 true)
     // 如果传入的日期时间戳小于当前时间戳,则禁用(返回 true)

+ 44 - 10
src/views/customerFollowUp/index.vue

@@ -51,7 +51,7 @@
                 </template>
                 </template>
                 <template #operation="{row}">
                 <template #operation="{row}">
                     <div class="table_row_option">
                     <div class="table_row_option">
-                        <span class="option_button_editor" @click="GoToDetail(row)">详情</span>
+                        <span class="option_button_editor" @click="OpenFollowlFormDialog(row)">详情</span>
                     </div>
                     </div>
                 </template>
                 </template>
                 <template #paginationDesc>
                 <template #paginationDesc>
@@ -92,6 +92,16 @@
             v-model:dialogVisible="operationLogDialogVisible"
             v-model:dialogVisible="operationLogDialogVisible"
             interfaceSource="customerFollow">
             interfaceSource="customerFollow">
         </CustomerOperationDialog>
         </CustomerOperationDialog>
+
+        <!-- 客户跟进查看弹窗 -->
+         <FollowFormDialog 
+            v-if="followVisible"
+            :itemDisabled="true"
+            :customerId="followDefaultFormData.customerId"
+            v-model:visible="followVisible"
+            :defaultFormData="followDefaultFormData"
+            @confirm="followDefaultFormData = {}">
+        </FollowFormDialog>
     </div>
     </div>
 </template>
 </template>
 
 
@@ -109,6 +119,7 @@ import PreviewDialog from '@/baseComponents/PreviewDialog.vue';
 import {tableColumns} from './table'
 import {tableColumns} from './table'
 import TabSearch from '@/baseComponents/TabSearch.vue';
 import TabSearch from '@/baseComponents/TabSearch.vue';
 import CustomerOperationDialog from '@/components/CustomerOperationDialog/index.vue'
 import CustomerOperationDialog from '@/components/CustomerOperationDialog/index.vue'
+import FollowFormDialog from '@/components/FollowFormDialog/index.vue'
 
 
 import FollowCard from '@/components/FollowCard.vue';
 import FollowCard from '@/components/FollowCard.vue';
 import { 
 import { 
@@ -307,15 +318,6 @@ const HandlePaginationChange = async (params)=>{
     await GetFollowInfo()
     await GetFollowInfo()
 }
 }
 
 
-// 跳转详情 
-const GoToDetail = (row)=>{
-    sessionStorage.setItem('customerMsg',JSON.stringify({
-        ...row,
-        name:row.customerName,
-        lastFollowDatetime:row.lastClaimDatetime
-    }))
-    router.push(`myCustomerDetail?id=${row.id}`)
-}
 
 
 /**
 /**
  * 3.默认列表 筛选项有关数据 及操作
  * 3.默认列表 筛选项有关数据 及操作
@@ -464,6 +466,38 @@ const HandleAuditOperation = async (row:any,auditStatus:any)=>{
     }
     }
 }
 }
 
 
+/** 6.  查看跟进详情弹窗 */
+const followVisible = ref(false)
+const followDefaultFormData = ref({})
+const OpenFollowlFormDialog = (row)=>{
+    followVisible.value = true
+    followDefaultFormData.value = {
+        ...row,
+        school:row.customerName,
+        product:JSON.stringify({
+            label:row.productName,
+            value:row.productId
+        }),
+        status:JSON.stringify({
+            label:row.followName,
+            value:row.followId
+        }),
+        contact:JSON.stringify({
+            id:row.customerPersonId,
+            positionId:row.positionId,
+            positionName:row.positionName
+        }),
+        position:JSON.stringify({
+            label:row.positionName,
+            value:row.positionId,
+        }),
+        content:row.followContent,
+        appointmentType:row.orderType,
+        appointmentTime:row.orderDatetime,
+        todoTime:row.orderDatetime,
+    }
+}
+
 onMounted( async ()=>{
 onMounted( async ()=>{
     await GetHeaderSearchOptions()
     await GetHeaderSearchOptions()
     await GetFollowInfo()
     await GetFollowInfo()

+ 1 - 1
src/views/highSeasCustomer/highSeasCustomerDetail/customerStatusOverview/index.vue

@@ -42,7 +42,7 @@
         <!-- 右侧:跟进记录统计 -->
         <!-- 右侧:跟进记录统计 -->
         <div class="right_panel">
         <div class="right_panel">
             <!-- 之前归属人的跟进记录 -->
             <!-- 之前归属人的跟进记录 -->
-            <!-- 历史跟进的状态是否展示 要判断是否给当前用户开放历史跟进权限——待完善 -->
+            <!-- 历史跟进的状态是否展示 要判断是否给当前用户开放历史跟进权限 -->
             <div class="history_statistics">
             <div class="history_statistics">
                 <div class="stat_header">
                 <div class="stat_header">
                     <span>跟进记录</span>
                     <span>跟进记录</span>