bding 1 жил өмнө
parent
commit
184147ff32

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

@@ -1042,8 +1042,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)
   }
-  
 };
 
 /*

+ 64 - 12
src/views/custom_manage/customList/customDetail.vue

@@ -248,19 +248,26 @@
 						<template slot-scope="scope"> <span>{{scope.row.IsMaker==1?'是':'否'}}</span> </template>
 					</el-table-column>
 					<!-- crm 14.7 -->
-					<template v-if="1==1">
+					<template v-if="RoleType=='权益'">
 						<el-table-column
 						prop="IsRegister"
 						label="是否绑定"
+						width="90"
 						align="center">
-							<template slot-scope="scope"> <span>{{scope.row.IsRegister?'已注册':'未注册'}}</span> </template>
+							<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.RegisterTime|formatTime}}</span> </template>
+							<template slot-scope="scope"> <span>{{scope.row.MfyxBindingTime}}</span> </template>
 						</el-table-column>
 					</template>
 					<template v-else>
@@ -284,7 +291,7 @@
 					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>
@@ -298,15 +305,15 @@
 					</el-table-column>
 					<!-- crm 14.7 -->
 					<el-table-column
-					v-if="1==1"
+					v-if="RoleType=='权益'"
 					prop="IsRegister"
-					label="研选权限"
+					label="互动次数"
 					align="center">
-						<template slot-scope="scope"> <span>{{scope.row.IsRegister?'已注册':'未注册'}}</span> </template>
+						<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="false"
+					v-if="RoleType!=='权益'"
 					prop="ViewTotal"
 					label="累计阅读次数"
 					align="center">
@@ -320,7 +327,7 @@
 						<template slot-scope="scope"> <span>{{scope.row.ViewTotal?scope.row.LastViewTimeStr:''|formatTime}}</span> </template>
 					</el-table-column>
 					<el-table-column
-					v-if="false"
+					v-if="RoleType!=='权益'"
 					label="研报统计"
 					align="center">
 						<template slot-scope="scope"> <span v-if="scope.row.ViewTotal!=0" class="editsty" @click="lookReport(scope.row)" :disabled="!isContractButtonShow" >点击查看</span></template>
@@ -334,19 +341,26 @@
 						<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="1==1">
+					<template v-if="RoleType =='权益'">
 						<el-table-column
 						prop="IsRegister"
 						label="研选权限"
+						width="100"
 						align="center">
-							<template slot-scope="scope"> <span>{{scope.row.IsRegister?'已注册':'未注册'}}</span> </template>
+							<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.RegisterTime|formatTime}}</span> </template>
+							<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">
@@ -374,6 +388,7 @@
 									style="color:#bbb"
 								>图表权限</span>
 								</block> -->
+								<p class="editsty" @click="isOpenMfyxStatusHandler(scope.row)">{{scope.row.MfyxStatus =='试用'?'关闭研选试用':'开通研选试用'}} </p>
 							</div>
 						</template>
 					</el-table-column>
@@ -705,6 +720,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 },
@@ -1583,6 +1599,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) {
+      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();
+          }
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
 	},
 	mounted() {
 		this.getDetail();