Bläddra i källkod

修改公海客户页面权限

lm 1 månad sedan
förälder
incheckning
6ec97e5bca

+ 14 - 2
src/views/highSeasCustomer/highSeasCustomerDetail/contactDetail/index.vue

@@ -13,6 +13,16 @@
             <template #num="{currentIndex}">
                 {{ currentIndex }}
             </template>
+
+            <template #phoneNo="{row}">
+                <span v-if="userInfo.roles.includes('Admin')"> {{ row.phoneNo }} </span>
+                <span v-else>{{ row.phoneNo.slice(0,3)+ '****'+ row.phoneNo.slice(-4)}} </span>
+            </template>
+            <template #officePhoneNo="{row}">
+                <span v-if="userInfo.roles.includes('Admin')"> {{ row.officePhoneNo }} </span>
+                <span v-else>{{ row.officePhoneNo.slice(0,3)+ '****'+ row.officePhoneNo.slice(-4)}} </span>
+            </template>
+
             <template #lastFollowDate="{row}">
                 {{ row.lastFollowDate ? row.lastFollowDate : '-' }}
             </template>
@@ -47,7 +57,7 @@
 
 
 <script setup lang="ts">
-import { onMounted, ref, watch } from 'vue';
+import { computed, onMounted, ref, watch } from 'vue';
 import { useStore } from 'vuex';
 import { useRoute } from 'vue-router';
 import SearchBlock from '@/baseComponents/SearchBlock.vue';
@@ -73,6 +83,9 @@ const props = defineProps({
 const store = useStore()
 const route  =  useRoute ()
 
+const userInfo = computed(()=>{
+    return JSON.parse(localStorage.getItem('userInfo') || '{}')
+})
 
 /**
  * 1. 获取职位列表信息
@@ -196,7 +209,6 @@ const HandleDeleteConfirm = async ()=>{
     }
 }
 
-
 watch(()=>props.reloadFlag,async (newVal)=>{
     await GetConcactPeopleList()
 })

+ 2 - 2
src/views/highSeasCustomer/highSeasCustomerDetail/contactDetail/table.ts

@@ -30,7 +30,7 @@ export const tableColumns = ref([
     label: '手机号',
     width: '140',
     align: 'center',
-    custom: false,
+    custom: true,
     hidden: false
   },
   {
@@ -38,7 +38,7 @@ export const tableColumns = ref([
     label: '办公电话',
     width: '140',
     align: 'center',
-    custom: false,
+    custom: true,
     hidden: false
   },
   {

+ 17 - 2
src/views/highSeasCustomer/highSeasCustomerDetail/customerStatusOverview/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="message_overview">
+    <div v-if="hasHistoryPermission" class="message_overview">
         <!-- 左侧:产品概览与最新状态 -->
         <div class="left_panel hide_scrollbar">
             <div v-if="productDataList?.length > 0" class="product_list">
@@ -67,6 +67,9 @@
             </div>
         </div>
     </div>
+    <div v-else  class="message_overview no_data_bg"> 
+        <span>暂无权限 </span>
+    </div>
 </template>
 
 <script setup lang="ts">
@@ -110,6 +113,8 @@ const historyFollowData = ref({
 const currentPage = ref(1)
 const pageSize = ref(20)
 const totalNum = ref(0)
+
+const hasHistoryPermission = ref(true)  //是否有查看历史跟进记录的权限
 const handlePaginationChange = async (params)=>{
     const {type,val} = params
     if(type == 'currentPage'){
@@ -120,6 +125,7 @@ const handlePaginationChange = async (params)=>{
     await GetHighSeasCustomerDetail()
 }
 
+
 // 跟进记录筛选条件
 const historyFollowSearchParams = ref({
     member:'all',
@@ -140,8 +146,10 @@ const GetHighSeasCustomerDetail = async ()=>{
     let res = await getHighSeasCustomerDetailApi(params)
     if(res?.code == 200){
         const {followOverViewData,productOverviewData,
-                selectData,dataPageList
+                selectData,dataPageList,historyFollowStatus
         } = res?.data || {}
+
+        hasHistoryPermission.value = historyFollowStatus === 0 ? false : true 
         // 右侧 跟进记录
         historyFollowData.value = {
             hsitoryProductNum:followOverViewData.historyProductCount,
@@ -272,6 +280,13 @@ onMounted(async ()=>{
     font-size: 14px;
     color: #333;
 
+    &.no_data_bg{
+        span{
+            margin-top: 0px;
+            padding-top:290px;
+        }
+    }
+
     > * {
         height: 100%;
         overflow: auto;

+ 11 - 4
src/views/highSeasCustomer/highSeasCustomerDetail/index.vue

@@ -15,10 +15,12 @@
                 </div>
                 <div class="action">
                     <el-button class="button_background" @click="ClaimCustomer"><img :src="peopleAuthenticationIcon" alt=""> 认领</el-button>
-                    <el-button class="button_border" @click="OpenConcactPeoplelFormDialog"><img :src="addIcon" alt=""> 新增联系人</el-button>
-                    <el-button class="button_refresh" @click="OpenSchoolFormDialog"><img :src="editIcon" alt="" > 编辑</el-button>
-                    <el-button class="button_refresh" @click="OpenOperationRecordDialog"><img :src="logIcon" alt=""> 操作记录</el-button>
-                    <el-button class="delete_button_border_no_bg" @click="OpenDeleteDialog"><el-icon class="img"><Delete /></el-icon>删除</el-button>
+                    <template v-if="userInfo.roles.includes('Admin')">
+                        <el-button class="button_border" @click="OpenConcactPeoplelFormDialog"><img :src="addIcon" alt=""> 新增联系人</el-button>
+                        <el-button class="button_refresh" @click="OpenSchoolFormDialog"><img :src="editIcon" alt="" > 编辑</el-button>
+                        <el-button class="button_refresh" @click="OpenOperationRecordDialog"><img :src="logIcon" alt=""> 操作记录</el-button>
+                        <el-button class="delete_button_border_no_bg" @click="OpenDeleteDialog"><el-icon class="img"><Delete /></el-icon>删除</el-button>
+                    </template>
                 </div>
             </template>
         </TopBackNav>
@@ -115,6 +117,11 @@ const router = useRouter()
 
 const customerBaseMsg = ref<CustomerBaseMsg>({}); //客户基础信息
 
+
+const userInfo = computed(()=>{
+    return JSON.parse(localStorage.getItem('userInfo') || '{}')
+})
+
 /**
  * 1. 信息展示切换
  */

+ 4 - 2
src/views/highSeasCustomer/index.vue

@@ -6,7 +6,7 @@
                     <div class="content_left">
                         <SearchBlock :searchList="blockSearchList" @searchChange="HandleSearchChange"></SearchBlock>
                     </div>
-                    <div class="content_right">
+                    <div v-if="userInfo.roles.includes('Admin')" class="content_right">
                         <el-button class="button_refresh" @click="OpenBatchImportDialog">批量导入</el-button>
                         <el-button class="button_background" @click="OpenSchoolFormDialog()">新增学校</el-button>
                     </div>
@@ -105,7 +105,9 @@ import { getHeaderSearchParamsApi,
 
 const router = useRouter()
 
-
+const userInfo = computed(()=>{
+    return JSON.parse(localStorage.getItem('userInfo') || '{}')
+})
 
 /** 1. 头部筛选 有关操作 */
 const searchParams = ref({