Browse Source

活动详情-显示权益客户信息

cxmo 1 year ago
parent
commit
058e275ad1

+ 23 - 10
src/views/roadshow_manage/compononts/addActivityBtnDia.vue

@@ -125,16 +125,26 @@
             companyInfo
           "
         >
-          <template v-if="companyInfo.EnglishCompany===1">
-            <p>所属国家:{{companyInfo.EnglishCountry}}</p>
-            <p>累计点击量:{{companyInfo.EnglishViewTotal}}</p>
-          </template>
-          <template v-else>
-            <p>客户状态:{{ companyInfo.Status }}</p>
-            <p>所属行业:{{ companyInfo.IndustryName }}</p>
-            <p>开通品种:{{ companyInfo.PermissionName }}</p>
-            <p>累计报告阅读次数:{{ companyInfo.ReportReadTotal }}</p> 
-          </template>
+        <!-- ficc角色看ficc信息 -->
+        <template v-if="isRaiRole">
+            <template v-if="companyInfo.EnglishCompany===1">
+                <p>所属国家:{{companyInfo.EnglishCountry}}</p>
+                <p>累计点击量:{{companyInfo.EnglishViewTotal}}</p>
+            </template>
+            <template v-else>
+                <p>客户状态:{{ companyInfo.Status }}</p>
+                <p>所属行业:{{ companyInfo.IndustryName }}</p>
+                <p>开通品种:{{ companyInfo.PermissionName }}</p>
+                <p>累计报告阅读次数:{{ companyInfo.ReportReadTotal }}</p> 
+            </template>
+        </template>
+        <!-- 权益角色看权益信息 -->
+        <template v-else>
+            <p style="margin: 6px 0;">客户状态:{{companyInfo.Status}}</p>
+            <p style="margin: 6px 0;">所属行业:{{companyInfo.IndustryName}}</p>
+            <p style="margin: 6px 0;text-indent: -70px;margin-left: 70px;">行业权限:{{companyInfo.PermissionName}}</p>
+            <p style="margin: 6px 0;">累计互动次数:{{companyInfo.ReportReadTotal}}</p>
+        </template>
         </div>
         <el-form-item
           label="会议形式"
@@ -488,6 +498,9 @@ export default {
     isShow(newval) {
       newval && this.getResearcherList();
       newval && this.getTypeList();
+      if(this.isRaiRole){
+        this.formData.activityType = "路演"
+      }
     },
     start_date(value){
       this.formData.selectResearchers[0].startDate = activityBtnDiaConfig.defaultStartTime(value)

+ 20 - 10
src/views/roadshow_manage/compononts/addActivityCellDia.vue

@@ -191,16 +191,26 @@
         </el-form-item>
         <!-- 客户信息 -->
         <div class="company-info" v-if="formData.activityType === '路演' && formData.companyId && companyInfo">
-          <template v-if="companyInfo.EnglishCompany===1">
-            <p>所属国家:{{companyInfo.EnglishCountry}}</p>
-            <p>累计点击量:{{companyInfo.EnglishViewTotal}}</p>
-          </template>
-          <template v-else>
-            <p>客户状态:{{ companyInfo.Status }}</p>
-            <p>所属行业:{{ companyInfo.IndustryName }}</p>
-            <p>开通品种:{{ companyInfo.PermissionName }}</p>
-            <p>累计报告阅读次数:{{ companyInfo.ReportReadTotal }}</p> 
-          </template>
+            <!-- ficc角色看ficc信息 -->
+            <template v-if="isRaiRole">
+                <template v-if="companyInfo.EnglishCompany===1">
+                    <p>所属国家:{{companyInfo.EnglishCountry}}</p>
+                    <p>累计点击量:{{companyInfo.EnglishViewTotal}}</p>
+                </template>
+                <template v-else>
+                    <p>客户状态:{{ companyInfo.Status }}</p>
+                    <p>所属行业:{{ companyInfo.IndustryName }}</p>
+                    <p>开通品种:{{ companyInfo.PermissionName }}</p>
+                    <p>累计报告阅读次数:{{ companyInfo.ReportReadTotal }}</p> 
+                </template>
+            </template>
+            <!-- 权益角色看权益信息 -->
+            <template v-else>
+                <p style="margin: 6px 0;">客户状态:{{companyInfo.Status}}</p>
+                <p style="margin: 6px 0;">所属行业:{{companyInfo.IndustryName}}</p>
+                <p style="margin: 6px 0;text-indent: -70px;margin-left: 70px;">行业权限:{{companyInfo.PermissionName}}</p>
+                <p style="margin: 6px 0;">累计互动次数:{{companyInfo.ReportReadTotal}}</p>
+            </template>
         </div>
         <el-form-item
           label="会议形式"

+ 61 - 8
src/views/roadshow_manage/myCalendar.vue

@@ -58,15 +58,25 @@
                 <el-tooltip effect="dark" placement="top-start" v-if="row.CompanyId"  @mouseenter.native="getCompanyInfo(row)" popper-class="company-tip-poper">
                   <i class="el-icon-info"/>
                   <div slot="content" v-if="companyInfo">
-                    <template v-if="companyInfo.EnglishCompany===1">
-                      <p style="margin: 6px 0;">所属国家:{{companyInfo.EnglishCountry}}</p>
-                      <p style="margin: 6px 0;">累计点击量:{{companyInfo.EnglishViewTotal}}</p>
+                    <!-- 权益客户 -->
+                    <template v-if="companyInfo.type==='rai'">
+                        <p style="margin: 6px 0;">客户状态:{{companyInfo.Status}}</p>
+                        <p style="margin: 6px 0;">所属行业:{{companyInfo.IndustryName}}</p>
+                        <p style="margin: 6px 0;text-indent: -70px;margin-left: 70px;">行业权限:{{companyInfo.PermissionName}}</p>
+                        <p style="margin: 6px 0;">累计互动次数:{{companyInfo.ReportReadTotal}}</p>
                     </template>
+                    <!-- ficc客户分国内海外 -->
                     <template v-else>
-                      <p style="margin: 6px 0;">客户状态:{{companyInfo.Status}}</p>
-                      <p style="margin: 6px 0;">所属行业:{{companyInfo.IndustryName}}</p>
-                      <p style="margin: 6px 0;text-indent: -70px;margin-left: 70px;">开通品种:{{companyInfo.PermissionName}}</p>
-                      <p style="margin: 6px 0;">累计报告阅读次数:{{companyInfo.ReportReadTotal}}</p>
+                        <template v-if="companyInfo.EnglishCompany===1">
+                            <p style="margin: 6px 0;">所属国家:{{companyInfo.EnglishCountry}}</p>
+                            <p style="margin: 6px 0;">累计点击量:{{companyInfo.EnglishViewTotal}}</p>
+                        </template>
+                        <template v-else>
+                            <p style="margin: 6px 0;">客户状态:{{companyInfo.Status}}</p>
+                            <p style="margin: 6px 0;">所属行业:{{companyInfo.IndustryName}}</p>
+                            <p style="margin: 6px 0;text-indent: -70px;margin-left: 70px;">开通品种:{{companyInfo.PermissionName}}</p>
+                            <p style="margin: 6px 0;">累计报告阅读次数:{{companyInfo.ReportReadTotal}}</p>
+                        </template>
                     </template>
                   </div>
                 </el-tooltip>
@@ -401,9 +411,51 @@ export default {
     },
     
     /* 获取客户信息 */
-    async getCompanyInfo({CompanyId,EnglishCompany}) {
+    async getCompanyInfo({CompanyId,EnglishCompany,ActivityType,ResearcherId}) {
       const { Data }  = await roadshowInterence.componyDetail({ CompanyId,EnglishCompany });
       this.companyInfo = Data;
+      //若是路演,则判断该路演是否有权益研究员,若有,将companyInfo.type置为rai
+      if(ActivityType === "路演"){
+        const ResearcherTypes = ResearcherId.split(',').map(i=>this.findType(Number(i)))
+        if(ResearcherTypes.includes('rai')){
+            this.companyInfo.type = 'rai'
+        }
+      }
+    },
+    // 获取研究员列表
+    async getResearcherList() {
+      const res = await roadshowInterence.getResearcherList();
+      if (res.Ret === 200) {
+        this.researcherList = this.formatResearcherList(res.Data);
+      }
+    },
+    // 对获取到的研究员列表做处理
+    formatResearcherList(list) {
+      list.forEach((group) => {
+        // 对组做处理
+        group.label = group.GroupName;
+        // 如果有列表
+        if (group.ResearcherList) {
+          group.ResearcherList.forEach((item) => {
+            // 对研究员做处理
+            item.label = item.RealName;
+            item.value = item.AdminId;
+          });
+        } else {
+          // 没有列表
+          group.value = group.GroupId;
+        }
+      });
+      return list;
+    },
+    findType(id){
+        const flat_arr = _.cloneDeep(this.researcherList)
+        .map((item) => item.ResearcherList || [])
+        .flat(Infinity);
+
+        return flat_arr.find((user) => user.AdminId === id) //RoleTypeCode字段待定
+            ? flat_arr.find((user) => user.AdminId === id).RoleTypeCode==='aaa'?'ficc':'rai'
+            : 'ficc';
     },
 
     // 撤回操作
@@ -695,6 +747,7 @@ export default {
   },
   mounted() {
     this.init();
+    this.getResearcherList()
 
   },
 };

+ 1 - 1
src/views/roadshow_manage/roleConfig/activityBtnDiaConfig.js

@@ -1,6 +1,6 @@
 //销售
 const seller_obj = {
-    defaultActivityType: '路演',
+    defaultActivityType: '内部会议',
     activityTypeList:['路演','内部会议','公开会议'],
 }