Forráskód Böngészése

Merge branch 'master' into new_901

bding 1 éve
szülő
commit
e0770e71ff

+ 10 - 1
src/api/modules/crmApi.js

@@ -1049,8 +1049,17 @@ const customInterence = {
    */
   saveToDoEditData:(params)=>{
     return http.post("/english_report/company_todo/add_public",params)
+  },
+  //新增开通或者关闭用户研选权限新建接口
+    /**
+   * 
+   * @param {* UserId 用户ID} params 
+   * @param {* Type 类型 } params 
+   * @returns 
+   */
+  yananxuanPermissionOpen:(params)=>{
+    return http.post("/custom/update/user/yananxuan/permission",params)
   }
-  
 };
 
 /*

+ 117 - 16
src/views/custom_manage/customList/customDetail.vue

@@ -150,11 +150,12 @@
 						<el-button type="primary" @click="addConcat">添加联系人</el-button>
 						<el-button type="primary" @click.native="importHandle">批量导入</el-button>
 						<!-- <span style="fontSize:16px;color:#AAB4CC;">(请至少添加一位联系人)</span> -->
-						<!-- <el-button v-if="RoleType=='admin' || RoleType=='权益'" style="margin-left:20px" type="primary" @click="exportDataIsShow=true">导出数据</el-button> -->
+						<!-- <el-button v-if="RoleType=='admin' || isUserYanXuanButtonShow" style="margin-left:20px" type="primary" @click="exportDataIsShow=true">导出数据</el-button> -->
 						<a :href="downTemplate" download style="fontSize:14px;color:#409eff;margin-left:30px">下载导入模板</a>
 					</div>
 				</div>
 				<div style="display: flex">
+				  <template v-if="!isUserYanXuanButtonShow">
 					<el-select 
 						v-model="IsSubscribe"
 						placeholder="是否关注公众号" 
@@ -195,6 +196,7 @@
 							{{ item.ProductName }}
 						</el-option>
 					</el-select>
+				  </template>
 					<el-input
 						placeholder="姓名/手机号码/邮箱"
 						v-model="search_txt"
@@ -249,26 +251,51 @@
 					align="center">
 						<template slot-scope="scope"> <span>{{scope.row.IsMaker==1?'是':'否'}}</span> </template>
 					</el-table-column>
-					<el-table-column
-					prop="IsRegister"
-					label="是否注册"
-					align="center">
-						<template slot-scope="scope"> <span>{{scope.row.IsRegister?'已注册':'未注册'}}</span> </template>
-					</el-table-column>
-					<el-table-column
-					prop="CreatedTime"
-					label="注册时间"
-					min-width="150"
-					align="center">
-						<template slot-scope="scope"> <span>{{scope.row.RegisterTime|formatTime}}</span> </template>
-					</el-table-column>
+					<!-- crm 14.7 -->
+					<template v-if="isUserYanXuanButtonShow">
+						<el-table-column
+						prop="IsRegister"
+						label="是否绑定"
+						width="90"
+						align="center">
+							<template slot-scope="scope">
+								<div style="text-align:left; display: flex;align-items: center;">
+									<img v-if="scope.row.MfyxIsBinding" style="width:16px;height:16px;margin-right: 5px;" src="~@/assets/img/icons/icon_1.png" alt="">
+									<img v-else style="width:16px;height:16px;margin-right: 5px;" src="~@/assets/img/icons/icon_2.png" alt="">
+									<span>{{scope.row.MfyxIsBinding?'已绑定':'未绑定'}}</span> 
+								</div>
+							</template>
+						</el-table-column>
+						<el-table-column
+						prop="CreatedTime"
+						label="绑定时间"
+						min-width="150"
+						align="center">
+							<template slot-scope="scope"> <span>{{scope.row.MfyxBindingTime}}</span> </template>
+						</el-table-column>
+					</template>
+					<template v-else>
+						<el-table-column
+						prop="IsRegister"
+						label="是否注册"
+						align="center">
+							<template slot-scope="scope"> <span>{{scope.row.IsRegister?'已注册':'未注册'}}</span> </template>
+						</el-table-column>
+						<el-table-column
+						prop="CreatedTime"
+						label="注册时间"
+						min-width="150"
+						align="center">
+							<template slot-scope="scope"> <span>{{scope.row.RegisterTime|formatTime}}</span> </template>
+						</el-table-column>
+					</template>
 					<el-table-column
 					prop="IsSubscribeHzyj"
 					label="是否关注公众号"
 					min-width="90"
 					align="center">
 						<template slot-scope="scope">
-							<div style="text-align:left">
+							<div style="text-align:left" v-if="RoleType !=='权益'">
 								<img v-if="scope.row.IsSubscribeHzyj==1" style="width:16px;height:16px" src="~@/assets/img/icons/icon_1.png" alt="">
 								<img v-else style="width:16px;height:16px" src="~@/assets/img/icons/icon_2.png" alt="">
 								<span>弘则研究</span>
@@ -280,7 +307,17 @@
 							</div>
 						</template>
 					</el-table-column>
+					<!-- crm 14.7 -->
 					<el-table-column
+					v-if="isUserYanXuanButtonShow"
+					prop="IsRegister"
+					label="互动次数"
+					align="center">
+						<template slot-scope="scope"> <span class="editsty" @click="MfyxInteractionNumHandler(scope.row)">{{scope.row.MfyxInteractionNum}}</span> </template>
+					</el-table-column>
+					<!-- crm 14.7 -->
+					<el-table-column
+					v-if="!isUserYanXuanButtonShow"
 					prop="ViewTotal"
 					label="累计阅读次数"
 					align="center">
@@ -294,18 +331,42 @@
 						<template slot-scope="scope"> <span>{{scope.row.ViewTotal?scope.row.LastViewTimeStr:''|formatTime}}</span> </template>
 					</el-table-column>
 					<el-table-column
+					v-if="!isUserYanXuanButtonShow"
 					label="研报统计"
 					align="center">
 						<template slot-scope="scope"> <span v-if="scope.row.ViewTotal!=0" class="editsty" @click="lookReport(scope.row)" :disabled="!isContractButtonShow" >点击查看</span></template>
 					</el-table-column>
 					<el-table-column
-						v-if="ficcform"
+						v-if="ficcform && !isUserYanXuanButtonShow"
 						prop="YbProductViewTotal"
 						label="其他统计"
 						min-width="110"
 						align="center">
 						<template slot-scope="scope"> <span :class="scope.row.YbProductViewTotal?'editsty':''" @click="lookReadInfo(scope.row)">{{scope.row.YbProductViewTotal||'0'}}</span> </template>
 					</el-table-column>
+					<!-- crm 14.7 -->
+					<template v-if="isUserYanXuanButtonShow">
+						<el-table-column
+						prop="IsRegister"
+						label="研选权限"
+						width="100"
+						align="center">
+							<template slot-scope="scope"> 
+								<div style="text-align:left; display: flex;align-items: center;">
+									<img v-if="scope.row.MfyxStatus=='试用'" style="width:16px;height:16px;margin-right: 5px;" src="~@/assets/img/icons/icon_1.png" alt="">
+									<img v-else style="width:16px;height:16px;margin-right: 5px;" src="~@/assets/img/icons/icon_2.png" alt="">
+									<span>{{scope.row.MfyxStatus}}</span> 
+								</div>
+							</template>
+						</el-table-column>
+						<el-table-column
+						prop="CreatedTime"
+						label="研选服务期限"
+						min-width="150"
+						align="center">
+							<template slot-scope="scope"> <span>{{scope.row.MfyxStartDate}} -- {{scope.row.MfyxEndDate}}</span> </template>
+						</el-table-column>
+					</template>
 					<el-table-column label="操作" align="center" min-width="150">
 						<template slot-scope="scope"  v-if="isContractButtonShow">
 							<div class="contact-opt-box" style="color:#4099ef; font-size:14px;">
@@ -334,6 +395,7 @@
 									style="color:#bbb"
 								>图表权限</span>
 								</block> -->
+								<p v-if="isUserYanXuanButtonShow" class="editsty" @click="isOpenMfyxStatusHandler(scope.row)">{{scope.row.MfyxStatus =='试用'?'关闭研选试用':'开通研选试用'}} </p>
 							</div>
 						</template>
 					</el-table-column>
@@ -665,6 +727,7 @@ import ExportData from '../compontents/exportData.vue'
 import ProductReadInfo from '../compontents/ProductReadInfo.vue'
 import DeductDetailDlg from './components/deductDetailDlg.vue'
 import HistoryContract from '../compontents/historyContract.vue'
+import { async } from '@antv/x6/lib/registry/marker/async'
 export default {
 	name:'',
 	components: { Ctimeline, Contactdia, Readia, ElImageViewer, CpessionTable, pdf, chartAuthDialog, ExportData, CpessionTableEquity, ProductReadInfo, DeductDetailDlg, HistoryContract },
@@ -794,6 +857,7 @@ export default {
 
 			isShowResearchNumber:false,// 研选服务点数明细 弹框
 			isShowDlgType:'',
+			isUserYanXuanButtonShow:false,//是否显示研选的按钮以及表格
 		};
 	},
 	methods: {
@@ -985,6 +1049,7 @@ export default {
 				})
 			if(res.Ret!==200) return 
 			this.isContractButtonShow=res.Data.IsContractButtonShow
+			this.isUserYanXuanButtonShow = res.Data.IsUserYanXuanButtonShow
 			this.formatCustomDetail(res)
 		},
 		formatCustomDetail(res){
@@ -1565,6 +1630,42 @@ export default {
 		this.isShowDlgType = type
 		this.isShowResearchNumber =true
 	},
+	// 点击了互助详情数量
+	MfyxInteractionNumHandler(item){
+		const { href } = this.$router.resolve({
+        path:  "/mutualList" ,
+        query: {
+          id: item.UserId,
+          CompanyId: item.CompanyId,
+        },
+      });
+      window.open(href, "_blank");
+	},
+	// 开通严选
+    isOpenMfyxStatusHandler(item) {
+	 if(item.BusinessCardUrl){
+      let str = `${item.MfyxStatus == "试用" ? "关闭" : "开通"}`;
+      this.$confirm(`确定要${str}个人的研选试用权限吗?`, `${str}试用`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const res = await customInterence.yananxuanPermissionOpen({
+            UserId: item.UserId,
+            Type: item.MfyxStatus == "试用" ? 0 : 1,
+          });
+          if (res.Ret === 200) {
+            this.$message.success("操作成功");
+            this.getuserTable();
+          }
+        })
+	 } else {
+		this.$alert('该联系人尚未添加名片,请点击编辑,上传名片后再开通试用', '开通试用', {
+          confirmButtonText: '知道了',
+        });
+	 }
+    },
 	// 设置表格行的样式
 	setRowClass({row}){
 		if(row.NotRead && row.IsFollow==1){