Browse Source

Merge branch 'master' of http://8.136.199.33:3000/hongze/hz_crm_web into CRM15.5

cxmo 4 months ago
parent
commit
315f5df7a4
76 changed files with 6142 additions and 979 deletions
  1. 2 1
      config/dev.env.js
  2. 2 1
      config/prod.env.js
  3. 2 1
      config/prod.test.env.js
  4. 3 2
      src/api/api.js
  5. 19 0
      src/api/modules/businessCustom.js
  6. 16 2
      src/api/modules/contractApi.js
  7. 43 1
      src/api/modules/crmApi.js
  8. 37 0
      src/api/modules/overseasCustom.js
  9. 12 1
      src/api/modules/rai/YanXuanApi.js
  10. 8 1
      src/api/modules/roadshowApi.js
  11. 34 1
      src/api/modules/setApi.js
  12. BIN
      src/assets/img/home/mfyx_icon.png
  13. 19 1
      src/routes/modules/contractRoutes.js
  14. 36 4
      src/routes/modules/customRoutes.js
  15. 32 1
      src/routes/modules/ficcXcxRoutes.js
  16. 19 0
      src/routes/modules/researchRoutes.js
  17. 12 2
      src/views/Home.vue
  18. 3 2
      src/views/Login.vue
  19. 19 5
      src/views/business_ETA_manage/addBusiness.vue
  20. 14 1
      src/views/business_ETA_manage/businessDetail.vue
  21. 70 12
      src/views/business_ETA_manage/businessEdit.vue
  22. 17 2
      src/views/business_ETA_manage/businessList.vue
  23. 30 10
      src/views/business_ETA_manage/components/AddRenewal.vue
  24. 10 4
      src/views/contract_manage/components/ServiceDialog.vue
  25. 45 33
      src/views/contract_manage/components/allocationNumber.vue
  26. 134 0
      src/views/contract_manage/components/tableColums.js
  27. 326 0
      src/views/contract_manage/paymentRecords.vue
  28. 335 0
      src/views/contract_manage/refundRecord.vue
  29. 9 1
      src/views/custom_manage/approvalTurn.vue
  30. 1 1
      src/views/custom_manage/approvalUpdate.vue
  31. 74 189
      src/views/custom_manage/compontents/CauthList.vue
  32. 28 7
      src/views/custom_manage/compontents/CpessionTable.vue
  33. 32 4
      src/views/custom_manage/compontents/CpessionTableEquity.vue
  34. 23 5
      src/views/custom_manage/compontents/FreezAuthList.vue
  35. 27 7
      src/views/custom_manage/customList/addCustom.vue
  36. 66 23
      src/views/custom_manage/customList/applyTurn.vue
  37. 4 5
      src/views/custom_manage/customList/components/raiPermissionbox.vue
  38. 17 2
      src/views/custom_manage/customList/customAllList.vue
  39. 3 0
      src/views/custom_manage/customList/customDetail.vue
  40. 95 139
      src/views/custom_manage/customList/customList.vue
  41. 167 151
      src/views/custom_manage/customList/customShareList.vue
  42. 5 5
      src/views/custom_manage/customList/editCustom.vue
  43. 98 0
      src/views/custom_manage/customList/mixins/quartersMixin.js
  44. 29 7
      src/views/custom_manage/customList/updateServe.vue
  45. 95 142
      src/views/custom_manage/customSearch.vue
  46. 0 1
      src/views/custom_manage/overseasList/overseasCustomList.vue
  47. 680 0
      src/views/custom_manage/overseasList/overseasCustomRoadshow.vue
  48. 437 0
      src/views/custom_manage/points/AddNewEntries.vue
  49. 231 0
      src/views/custom_manage/points/EntryRecords.vue
  50. 211 0
      src/views/custom_manage/points/RankingOverview.vue
  51. 258 0
      src/views/custom_manage/points/RatingOverview.vue
  52. 85 0
      src/views/custom_manage/points/XClassCustom.vue
  53. 38 3
      src/views/dataReport_manage/statistic/newCustomlist.vue
  54. 364 0
      src/views/ficc_manage/chapterVariety.vue
  55. 807 0
      src/views/ficc_manage/reportVariety.vue
  56. 4 0
      src/views/ficc_manage/userTableColums.js
  57. 0 1
      src/views/interaction_manage/bannerStatistics.vue
  58. 7 2
      src/views/interaction_manage/components/connectiveReportDialog.vue
  59. 104 0
      src/views/interaction_manage/components/moneyDetailsChart.vue
  60. 155 0
      src/views/interaction_manage/registrationDetails.vue
  61. 98 0
      src/views/interaction_manage/researchStatistics.vue
  62. 30 6
      src/views/interaction_manage/videoManage.vue
  63. 2 1
      src/views/login_manage/ForgetPassModel.vue
  64. 11 8
      src/views/rai_manage/activityManage/activityManage.vue
  65. 16 20
      src/views/rai_manage/activityManage/applyManage.vue
  66. 3 1
      src/views/rai_manage/activityManage/roadShowList.vue
  67. 2 0
      src/views/rai_manage/cygxManage/components/lableDlg.vue
  68. 52 2
      src/views/rai_manage/reportManage/components/specialDlg.vue
  69. 10 0
      src/views/rai_manage/reportManage/components/yanXuanLable.js
  70. 61 13
      src/views/rai_manage/reportManage/yanXuanSpecial.vue
  71. 3 3
      src/views/report_manage/dayWeekUpdate.vue
  72. 40 41
      src/views/report_manage/dayilyNews.vue
  73. 170 0
      src/views/research_manage/shareRecord.vue
  74. 55 19
      src/views/roadshow_manage/compononts/activityDetailDia.vue
  75. 123 69
      src/views/system_manage/assistance_center/assistanceDocAdd.vue
  76. 13 13
      src/views/system_manage/components/addUserDialog.vue

+ 2 - 1
config/dev.env.js

@@ -11,5 +11,6 @@ module.exports = merge(prodEnv, {
   HR_MANAGEMENT_SYSTEM:'"http://8.136.199.33:8391/login"',
   FINANCIAL_MANAGEMENT_SYSTEM:'"http://8.136.199.33:8618/login"',
   ETA_SYSTEM:'"http://8.136.199.33:7778/temppage"',
-  CYGX_WEB:'"https://clpttest.hzinsights.com"' // 查研观向网页版首页地址
+  CYGX_WEB:'"https://clpttest.hzinsights.com"', // 查研观向网页版首页地址
+  ETA_Forum:'"http://8.136.199.33:8900/autoLogin"',//ETA社区
 });

+ 2 - 1
config/prod.env.js

@@ -7,5 +7,6 @@ module.exports = {
 	HR_MANAGEMENT_SYSTEM:'"https://hr.hzinsights.com/login"',
 	FINANCIAL_MANAGEMENT_SYSTEM:'"https://fms.hzinsights.com/login"',
 	ETA_SYSTEM:'"https://eta.hzinsights.com/temppage"',
-	CYGX_WEB:'"https://web.hzinsights.com"' // 查研观向网页版首页地址
+	CYGX_WEB:'"https://web.hzinsights.com"', // 查研观向网页版首页地址
+	ETA_Forum:'"https://forumadmin.hzinsights.com/autoLogin"',//ETA社区
 }

+ 2 - 1
config/prod.test.env.js

@@ -9,5 +9,6 @@ module.exports = {
 	HR_MANAGEMENT_SYSTEM:'"http://8.136.199.33:8391/login"',
   FINANCIAL_MANAGEMENT_SYSTEM:'"http://8.136.199.33:8618/login"',
   ETA_SYSTEM:'"http://8.136.199.33:7778/temppage"',
-	CYGX_WEB:'"https://clpttest.hzinsights.com"' // 查研观向网页版首页地址
+	CYGX_WEB:'"https://clpttest.hzinsights.com"', // 查研观向网页版首页地址
+	ETA_Forum:'"http://8.136.199.33:8900/autoLogin"',//ETA社区
 }

+ 3 - 2
src/api/api.js

@@ -22,7 +22,7 @@ import { departInterence, videoInterence ,InteractionInterence,enAuthInterence}
 import { dataMainInterface } from './modules/statisticApi';
 
 //crm
-import { customInterence ,equityContacts} from './modules/crmApi';
+import { customInterence ,equityContacts ,xClassCustomApi} from './modules/crmApi';
 
 //合同
 import { contractInterface } from './modules/contractApi';
@@ -114,7 +114,8 @@ export {
   businessTripInterence,
   reportVarietyENInterence,
   businessCustomInterence,
-  assistanceDocInterence
+  assistanceDocInterence,
+  xClassCustomApi
 };
 
 //老接口 研报 ppt等

+ 19 - 0
src/api/modules/businessCustom.js

@@ -51,6 +51,25 @@ export const businessCustomInterence = {
     addNewContract:(params)=>{
         return http.post('/eta_business/signing',params)
     },
+    /** 
+     * 编辑续约
+     * @param EtaBusinessId Integer 商家ID
+     * @param EtaBusinessContractId Integer 商家合约ID
+     * @param SigningTime String 签约时间
+     * @param ExpiredTime String 到期时间
+     * @returns 
+    */
+    editContract:(params)=>{
+        return http.post('/eta_business/edit_sign',params)
+    },
+    /**
+     * 删除续约信息
+     * @param EtaBusinessContractId Integer 商家合约ID
+     * @returns 
+     */
+    removeContract:(params)=>{
+        return http.post('/eta_business/remove_sign',params)
+    },
     /**
      * 修改销售
      * @param EtaBusinessId Integer 商家ID

+ 16 - 2
src/api/modules/contractApi.js

@@ -245,8 +245,22 @@ const contractInterface={
 	getAllocationStatistic:params=>{
 		return http.get('/cygx/allocation/statistics',params)
 	},
-
-	
+	// 订单列表接口
+	getOrderList:params=>{
+		return http.get('/cygx/order/list',params)
+	},
+	// 退款
+	orderRefund:params=>{
+		return http.post('/cygx/order/refund',params)
+	},
+	// 退款记录
+	orderRefundList:params=>{
+		return http.get('/cygx/order/refund/list',params)
+	},
+	// 退款撤销接口
+	refundRevokeOrder:params=>{
+		return http.get('/cygx/order/refund_revoke',params)
+	},
 }
 
 export {

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

@@ -129,6 +129,10 @@ const customInterence = {
     // return http.get('/custom/seller/check/list',params)
     return http.get("/custom/seller/check/listV2", params);
   },
+  /* 获取正式客户共享-原销售列表 */
+  getShareSale:(params)=>{
+    return http.get("/custom/seller/check/Sharelist2",params)
+  },
   /* 客户详情
 		CompanyId 
 	*/
@@ -481,6 +485,12 @@ const customInterence = {
   salesShareList: (params) => {
     return http.get("/custom/seller/share/list", params);
   },
+  /**
+   * 获取分配销售列表,根据用户角色返回 共享客户组 or 权益销售组
+   */
+  getShareSaleList:(params)=>{
+    return http.get("/custom/seller/share/list", params);
+  },
   /**
    * 获取 共享客户列表
    * SortParam 排序字段
@@ -1265,4 +1275,36 @@ const customAllInterence = {
     },
 }
 
-export { customInterence,customAllInterence, equityContacts,etaTrialInterence};
+/* X类客户评分 */
+const xClassCustomApi = {
+  //模板 列表
+  enterScoreDetail:(params)=>{
+      return http.get("/cygx/enterScore/detail",params)
+  },
+   //添加/ 更新录分
+   enterScoreUpdate:(params)=>{
+    return http.post("/cygx/enterScore/update",params)
+  },  
+  // X试用类客户检索
+  enterScoreSearchlist:(params)=>{
+      return http.get("/cygx/enterScore/company/searchlist",params)
+  },
+  // 录分列表接口
+  enterScoreList:(params)=>{
+    return http.get("/cygx/enterScore/list",params)
+  },
+  // 录分列表接口
+  enterScoreDelete:(params)=>{
+    return http.post("/cygx/enterScore/delete",params)
+  },  
+  // 评分总览接口
+  enterScoreScoreOverview:(params)=>{
+    return http.get("/cygx/enterScore/scoreOverview",params)
+  }, 
+  // 排名总览接口
+  enterScoreRankingOverview:(params)=>{
+    return http.get("/cygx/enterScore/rankingOverview",params)
+  }, 
+}
+
+export { customInterence,customAllInterence, equityContacts,etaTrialInterence,xClassCustomApi};

+ 37 - 0
src/api/modules/overseasCustom.js

@@ -94,6 +94,43 @@ export const overseasCustomInterence = {
      */
     overseasCustomInterence:(params)=>{
         return http.get('/overseas_custom/custom/label/statistics',params)
+    },
+    
+    /**
+     * 海外客户路演 销售 研究列表
+     * @param {*} params AdminType: researcher seller
+     * @returns 
+     */
+    getOverseasRoadShowUsers: params => {
+        return http.get('/roadshow/overseas_custom/sys_user/list',params)
+    },
+
+    /**
+     * 海外客户路演列表 - 客户维度
+     * @param {*} params 
+     * ResearcherId SellerId  StartDate EndDate  CompanyStatus
+     * @returns 
+     */
+    getOverseasRoadShowList: params => {
+        return http.get('/roadshow/overseas_custom/calendar/list',params)
+    },
+    /**
+     * 海外客户路演列表 - 销售维度
+     * @param {*} params 
+     * DataType StartDate EndDate
+     * @returns 
+    */
+    getOverseasSellerRoadShowList: params => {
+        return http.get('/roadshow/overseas_custom/seller/list',params)
+    },
+    /**
+     * 海外客户路演列表 - 研究员维度
+     * @param {*} params 
+     * DataType StartDate EndDate
+     * @returns 
+    */
+    getOverseasResearcherRoadShowList: params => {
+        return http.get('/roadshow/overseas_custom/researcher/list',params)
     }
 
 }

+ 12 - 1
src/api/modules/rai/YanXuanApi.js

@@ -45,7 +45,18 @@ const YanXuanApi = {
   getYanxuanShowButton: (params) => {
     return http.get("/cygx/yanxuan_special/show_button", params);
   },
-  
+  // 分享记录列表接口
+  getShareRecordList: (params) => {
+    return http.get("/cygx/mfyx/admin/share/list", params);
+  },
+  // 修改推荐人 备注信息
+  yanxuan_specialAuthorUpdate: (params) => {
+    return http.post("/cygx/yanxuan_special/author/update", params);
+  },
+  // 作者模糊查询
+  yanxuan_specialAuthorSearch: (params) => {
+    return http.get("/cygx/yanxuan_special/author/search", params);
+  },
 };
 
 export default YanXuanApi;

+ 8 - 1
src/api/modules/roadshowApi.js

@@ -222,7 +222,14 @@ const roadshowInterence={
 	statisticDetailList: params => {
 		return http.get('/roadshow/report/calendar/list',params)
 	},
-
+	/**
+	 * 统计详情列表-海外路演
+	 * @param {} params DataType StartDate EndDate AdminIds AdminType
+	 * @returns 
+	 */
+	overseaStatisticDetailList: params => {
+		return http.get('/roadshow/overseas/calendar/list',params)
+	},
 	/**
 	 * 选择的研究员接口
 	 * @param {AdminIds} params DataType StartDate EndDate AdminId AdminType

+ 34 - 1
src/api/modules/setApi.js

@@ -325,7 +325,40 @@ const departInterence = {
 	 */
 	getBannerStatistic:params=>{
 		return http.get('/banner/statistic',params)
-	}
+	},
+	/**
+	 * 调研报名统计
+	 * @returns 
+	 */
+	getResearchStatistics:params=>{
+		return http.get('/banner/research_statistics/list',params)
+	},
+	/**
+	 * 调研报名统计-活动报名详情
+	 * @returns 
+	 */
+	getResearchStatisticsItem:params=>{
+		return http.get('/banner/research_statistics/item',params)
+	},
+	/**
+	 * 调研报名统计-分享人报名详情
+	 * @returns 
+	 */
+	getResearchStatisticsDetail:params=>{
+		return http.get('/banner/research_statistics/detail',params)
+	},
+	/**
+	 * 调研报名修改付款金额
+	 * @returns 
+	 */
+	getResearchStatisticsAmount:params=>{
+		return http.get('/banner/research_statistics/amount',params)
+	},
+
+	//获取跳转到ETA社区的code
+	getToETAForumCode:()=>{
+		return http.get('/sysuser/forum_admin/auth_code',{})
+	},
 }
 
 /* 视频管理 */

BIN
src/assets/img/home/mfyx_icon.png


+ 19 - 1
src/routes/modules/contractRoutes.js

@@ -167,7 +167,25 @@ export default [
 				meta: {
 					keepAlive: false
 				}
-			}
+			},
+			{
+				path:"paymentRecords",
+				component:()=>import("@/views/contract_manage/paymentRecords.vue"),
+				name:"研选支付记录",
+				hidden:false,
+				meta: {
+					keepAlive: false
+				}
+			},
+			{
+				path:"refundRecord",
+				component:()=>import("@/views/contract_manage/refundRecord.vue"),
+				name:"研选退款记录",
+				hidden:false,
+				meta: {
+					keepAlive: false
+				}
+			},
 		]
 	},
 ]

+ 36 - 4
src/routes/modules/customRoutes.js

@@ -52,7 +52,7 @@ export default [
       {
         path: "customListEn",
         component: () => import("@/views/custom_manage/customList/customListEn.vue"),
-        name: "英文客户列表",
+        name: "英文报告权限",
         hidden: false,
       },
       {
@@ -111,7 +111,7 @@ export default [
         hidden: true,
         meta: {
           pathFrom: "customListEn",
-          pathName: "英文客户列表",
+          pathName: "英文报告权限",
         },
       },
       {
@@ -121,7 +121,7 @@ export default [
         hidden: true,
         meta: {
           pathFrom: "customListEn",
-          pathName: "英文客户列表",
+          pathName: "英文报告权限",
         },
       },
       {
@@ -142,7 +142,7 @@ export default [
         hidden: true,
         meta: {
           pathFrom: "customListEn",
-          pathName: "英文客户列表",
+          pathName: "英文报告权限",
         },
       },
       {
@@ -431,6 +431,38 @@ export default [
           pathFrom: "businessETAList",
           pathName: "商家管理",
         }
+      },
+      {
+        path:'overseasCustomRoadshow',
+        name:"海外客户路演",
+        component: () => import('@/views/custom_manage/overseasList/overseasCustomRoadshow.vue'),
+        hidden: false
+      },
+      {
+        path:'XClassCustomPoints',
+        name:"X类客户派点",
+        component: () => import('@/views/custom_manage/points/XClassCustom.vue'),
+        hidden: false
+      },
+      {
+        path:'AddNewEntries',
+        name:"新增录分",
+        component: () => import('@/views/custom_manage/points/AddNewEntries.vue'),
+        hidden: false,
+        meta:{
+          pathFrom: "XClassCustomPoints",
+          pathName: "X类客户派点",
+        }
+      },
+      {
+        path:'EditNewEntries',
+        name:"查看明细",
+        component: () => import('@/views/custom_manage/points/AddNewEntries.vue'),
+        hidden: false,
+        meta:{
+          pathFrom: "XClassCustomPoints",
+          pathName: "X类客户派点",
+        }
       }
     ],
   },

+ 32 - 1
src/routes/modules/ficcXcxRoutes.js

@@ -96,7 +96,38 @@ export default [
 				name:'banner 统计',
 				hidden:true
 			},
-
+			{
+				path:'reportVariety',
+				component:()=> import('@/views/ficc_manage/reportVariety.vue'),
+				name:'报告分类配置',
+				hidden:true
+			},
+			{
+				path: "chapterVariety",
+				component: () => import("@/views/ficc_manage/chapterVariety.vue"),
+				name: "章节设置",
+				hidden: true,
+				meta: {
+				  pathFrom: "reportVariety",
+				  pathName: "报告分类配置",
+				},
+			  },
+			{
+				path:'researchStatisticsFICC',
+				component:()=> import('@/views/interaction_manage/researchStatistics.vue'),
+				name:'调研报名统计',
+				hidden:true
+			},
+			{
+				path:'registrationDetails',
+				component:()=> import('@/views/interaction_manage/registrationDetails.vue'),
+				name:'报名详情',
+				hidden:true,
+				meta: {
+					pathFrom: "researchStatisticsFICC",
+					pathName: "调研报名统计",
+				}
+			},
         ]
     }
 ]

+ 19 - 0
src/routes/modules/researchRoutes.js

@@ -0,0 +1,19 @@
+const home = (r) => require.ensure([], () => r(require("@/views/Home.vue")), "Home"); //主页
+
+export default [
+  {
+    path: "/",
+    component: home,
+    name: "买方研选管理",
+    hidden: false,
+    icon_path: require('@/assets/img/home/mfyx_icon.png'),
+    children: [
+      {
+        path: "shareRecordResearch",
+        component: () => import("@/views/research_manage/shareRecord.vue"),
+        name: "分享记录",
+        hidden: false,
+      },
+    ],
+  },
+];

+ 12 - 2
src/views/Home.vue

@@ -62,12 +62,13 @@
                   </template>
                   <el-menu-item
                     v-for="child in item.children"
-                    :index="child.path"
+                    :index="child.path=='etaForum'?null:child.path"
                     :path="child.path"
                     :key="child.path"
                     v-show="!child.hidden"
                   >
-                    <a :href="`/${child.path}`" :style="`display: block;color:${child.path===activePath ? '#FDB863 ' : '#fff'}`" @click="(e) => e.preventDefault() ">
+                    <span v-if="child.path==='etaForum'" :style="`display: block;color:${child.path===activePath ? '#FDB863 ' : '#fff'}`" @click.prevent="linkToOtherMS('ETA_Forum')">{{child.name}}</span>
+                    <a v-else :href="`/${child.path}`" :style="`display: block;color:${child.path===activePath ? '#FDB863 ' : '#fff'}`" @click="(e) => e.preventDefault() ">
                       {{child.name}}
                     </a>
                   </el-menu-item>
@@ -733,6 +734,15 @@ export default {
           href=`${href}?code=${res.Data}`
         }
       }
+      if(key==='ETA_Forum'){
+        const res=await departInterence.getToETAForumCode()
+        if(res.Ret===200){
+          href=`${href}?code=${res.Data}`
+        }else{
+          this.$message.warning(res.Msg)
+          return
+        }
+      }
       window.open(href,'_blank');
     },
     // 切换通知消息类型

+ 3 - 2
src/views/Login.vue

@@ -541,7 +541,8 @@ export default {
 			departInterence.userLogin({
 				LoginType:2,
 				Mobile:mobile,
-				VerifyCode:checkCode
+				VerifyCode:checkCode,
+				TelAreaCode:this.$refs[model].areaCodeSelect,
 			}).then(res=>{
 				if(res.Ret!==200){
 					//刷新图形验证码
@@ -560,7 +561,7 @@ export default {
 			departInterence.userLogin({
 				LoginType:3,
 				Email:email,
-				VerifyCode:checkCode
+				VerifyCode:checkCode,
 			}).then(res=>{
 				if(res.Ret!==200){
 					//刷新图形验证码

+ 19 - 5
src/views/business_ETA_manage/addBusiness.vue

@@ -54,7 +54,7 @@
                     <el-form-item label="社会信用码" prop="creditCode">
                         <el-input disabled placeholder="请输入社会信用码" v-model="firstFormData.creditCode"/>
                     </el-form-item>
-                    <el-form-item label="商家地址" prop="address">
+                    <el-form-item label="商家地址" prop="address" v-if="firstFormData.areaType=='国内'">
                         <el-cascader 
                             v-model="firstFormData.address"
                             :props="locationProps"
@@ -64,6 +64,16 @@
                             placeholder="请选择客户地址" 
                         />
                     </el-form-item>
+                    <el-form-item label="所属国家" prop="nation" v-else>
+                        <el-select v-model="firstFormData.nation" placeholder="请选择所属国家" filterable style="width: 360px;">
+                            <el-option :label="item.cnName" :value="item.cnName" v-for="item in countryData" :key="item.code" >
+                            <div style="display: flex;justify-content: space-between;">
+                                <span>{{ item.cnName }}</span>
+                                <span style="color: #8492a6; font-size: 13px">{{ item.code }}</span>
+                            </div>
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
                 </div>
                 <div class="form-line">
                     <el-form-item label="决策人" prop="decisionMaker">
@@ -174,9 +184,11 @@ import { customInterence,roadshowInterence,businessCustomInterence } from '@/api
 import autocomplete from "@/components/autocomplete.vue";
 import Steps from "./components/Steps.vue";
 import {locationOptions} from "@/views/custom_manage/customList/location"
+import country from "@/utils/countryData"
 export default {
     components: {autocomplete,Steps},
     data() {
+        this.countryData = country
         return {
             /* 城市地址数据 */
             locationOptions,
@@ -221,6 +233,7 @@ export default {
                 name:[{ required: true, message: '请输入商家名称', trigger: 'blur' },],
                 creditCode:[{ required: true, message: '请输入社会信用码', trigger: 'blur' },],
                 address:[{ required: true, message: '请选择商家地址', trigger: 'change' },],
+                nation:[{ required: true, message: '请选择所属国家', trigger: 'change' },],
                 decisionMaker:[{required: true, message: '请输入决策人', trigger: 'blur' },],
                 teamSize:[{required: true, message: '请选择研究团队规模', trigger: 'change' },],
                 industry:[{required: true, message: '请选择所属行业', trigger: 'change' },],
@@ -236,6 +249,7 @@ export default {
                 name:'',
                 creditCode:'',
                 address:'',
+                nation:'',
                 decisionMaker:'',
                 teamSize:'',
                 fundsize:'',
@@ -255,11 +269,11 @@ export default {
                 console.log('watch?',newVal)
                 if(newVal==='海外'){
                     this.firstFormData.creditCode = 'HZ' + new Date().getTime()
-                    this.firstFormData.address = ['海外','其他市']
-                    this.selectRegion(['海外','其他市'])
+                    // this.firstFormData.address = ['海外','其他市']
+                    // this.selectRegion(['海外','其他市'])
                 }else{
                     this.firstFormData.creditCode = ''
-                    this.firstFormData.address = []
+                    // this.firstFormData.address = []
                 }
             }
         }
@@ -278,6 +292,7 @@ export default {
                 RegionType:params.areaType,
                 Province:params.province,
                 City:params.city,
+                Nation:params.nation,
                 SellerId:Number(cascaderNodes[0]?cascaderNodes[0].value:0),
                 SellerName:cascaderNodes[0]?cascaderNodes[0].label:'',
                 Leader:params.decisionMaker,
@@ -302,7 +317,6 @@ export default {
                         if(res.Ret!==200) return 
                         this.step++
                     })
-                    
                 }
             })
         },

+ 14 - 1
src/views/business_ETA_manage/businessDetail.vue

@@ -31,7 +31,7 @@
                                 <el-radio label="海外" border>海外</el-radio>
                             </el-radio-group>
                         </el-form-item>
-                        <el-form-item label="商家地址" prop="address">
+                        <el-form-item label="商家地址" prop="address" v-if="firstFormData.RegionType=='国内'">
                             <el-cascader 
                                 v-model="firstFormData.address"
                                 :props="locationProps"
@@ -41,6 +41,16 @@
                                 placeholder="请选择客户地址" 
                             />
                         </el-form-item>
+                        <el-form-item label="所属国家" prop="Nation" v-else>
+                            <el-select v-model="firstFormData.Nation" placeholder="请选择所属国家" filterable style="width: 360px;">
+                                <el-option :label="item.cnName" :value="item.cnName" v-for="item in countryData" :key="item.code" >
+                                <div style="display: flex;justify-content: space-between;">
+                                    <span>{{ item.cnName }}</span>
+                                    <span style="color: #8492a6; font-size: 13px">{{ item.code }}</span>
+                                </div>
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
                     </div>
                     <div class="form-line">
                         <el-form-item label="社会信用码" prop="CreditCode">
@@ -157,9 +167,11 @@ import { customInterence , businessCustomInterence} from '@/api/api.js'
 import Steps from "./components/Steps.vue";
 import AddRenewal from "./components/AddRenewal";
 import {locationOptions} from "@/views/custom_manage/customList/location"
+import country from "@/utils/countryData"
 export default {
     components: {Steps,AddRenewal},
     data() {
+        this.countryData = country
         return {
             locationOptions,
             locationProps:{
@@ -189,6 +201,7 @@ export default {
                 BusinessName:'',
                 CreditCode:'',
                 Address:'',
+                Nation:'',
                 Leader:'',
                 ResearchTeamSize:'',
                 CapitalScale:'',

+ 70 - 12
src/views/business_ETA_manage/businessEdit.vue

@@ -30,7 +30,7 @@
                                 <el-radio label="海外" border>海外</el-radio>
                             </el-radio-group>
                         </el-form-item>
-                        <el-form-item label="商家地址" prop="address">
+                        <el-form-item label="商家地址" prop="address" v-if="firstFormData.RegionType=='国内'">
                             <el-cascader 
                                 v-model="firstFormData.address"
                                 :props="locationProps"
@@ -40,6 +40,16 @@
                                 placeholder="请选择客户地址" 
                             />
                         </el-form-item>
+                        <el-form-item label="所属国家" prop="Nation" v-else>
+                            <el-select v-model="firstFormData.Nation" placeholder="请选择所属国家" filterable style="width: 360px;">
+                                <el-option :label="item.cnName" :value="item.cnName" v-for="item in countryData" :key="item.code" >
+                                <div style="display: flex;justify-content: space-between;">
+                                    <span>{{ item.cnName }}</span>
+                                    <span style="color: #8492a6; font-size: 13px">{{ item.code }}</span>
+                                </div>
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
                     </div>
                     <div class="form-line">
                         <el-form-item label="社会信用码" prop="CreditCode">
@@ -95,6 +105,7 @@
                 </el-form>
             </div>
             <div class="second-step-form-wrap" v-show="step===2">
+                <el-button type="primary" @click="addRenewalHandle" style="margin-top: 15px;">添加续约</el-button>
                 <el-table :data="recordData" border>
                     <el-table-column
                         v-for="item in tableColOpts"
@@ -104,8 +115,14 @@
                         align="center"
                     >
                     </el-table-column>
+                    <el-table-column label="操作" align="center">
+                        <template slot-scope="scope">
+                            <span class="editsty" @click="editRenewal(scope.row)" style="padding: 0 3px;">编辑</span>
+                            <span class="deletesty" @click="deleteRenewal(scope.row)" style="padding: 0 3px;">删除</span>
+                        </template>
+                    </el-table-column>
                 </el-table>
-                <el-button type="text" @click="showRenewal=true">添加续约</el-button>
+                <!-- <el-button type="text" @click="showRenewal=true">添加续约</el-button> -->
             </div>
         </div>
         <div class="business-other">
@@ -133,7 +150,7 @@
 
         <!-- 添加续约 -->
         <el-dialog
-            title="添加续约"
+            :title="renewalDiaTitle"
             :visible.sync="showRenewal"
             :modal-append-to-body="false"
             :close-on-click-modal="false"
@@ -142,7 +159,8 @@
         >
             <AddRenewal 
                 @addRenewal="handleAddRenewal"
-                @close="showRenewal=false"/>
+                @close="showRenewal=false"
+                :renewalForm="renewalForm"/>
         </el-dialog>
     </div>
 </template>
@@ -152,9 +170,11 @@ import { customInterence , businessCustomInterence} from '@/api/api.js'
 import Steps from "./components/Steps.vue";
 import AddRenewal from "./components/AddRenewal";
 import {locationOptions} from "@/views/custom_manage/customList/location"
+import country from "@/utils/countryData"
 export default {
     components: {Steps,AddRenewal},
     data() {
+        this.countryData = country
         return {
             locationOptions,
             locationProps:{
@@ -184,6 +204,7 @@ export default {
                 BusinessName:'',
                 CreditCode:'',
                 Address:'',
+                Nation:'',
                 Leader:'',
                 ResearchTeamSize:'',
                 CapitalScale:'',
@@ -194,6 +215,7 @@ export default {
                 City:''
             },
             rules:{
+                Nation:[{ required: true, message: '请选择所属国家', trigger: 'change' },],
                 address:[{ required: true, message: '请选择商家地址', trigger: 'change' },],
                 decisionMaker:[{required: true, message: '请输入决策人', trigger: 'blur' },],
                 teamSize:[{required: true, message: '请选择研究团队规模', trigger: 'change' },],
@@ -204,7 +226,7 @@ export default {
             recordData:[],
             tableColOpts:[
                 {
-                    label:'签约时间',
+                    label:'运维时间',
                     key:'SigningTime'
                 },{
                     label:'到期时间',
@@ -216,6 +238,8 @@ export default {
             ],
             activities:[],
             showRenewal:false,
+            renewalDiaTitle:"添加续约",
+            renewalForm:{}
         }
     },
     created() {
@@ -277,13 +301,13 @@ export default {
         // 保存商家
         handleSaveDetail(){
             const {EtaBusinessId,CapitalScale,
-                   address,Leader,IndustryId,
+                   address,Leader,IndustryId,Nation,
                    ResearchTeamSize,UserMax} = this.firstFormData
             const IndustryName = this.tradeArr.find(item=>item.IndustryId===IndustryId).IndustryName
             businessCustomInterence.editBusiness({
                 EtaBusinessId,Leader,
                 IndustryName,CapitalScale,
-                ResearchTeamSize,
+                ResearchTeamSize,Nation,
                 IndustryId:Number(IndustryId),
                 UserMax:Number(UserMax),
                 Province:address[0],
@@ -294,15 +318,49 @@ export default {
                 this.getBusinessDetail()
             })
         },
-        //添加续约
-        handleAddRenewal({signDate,expirationDate}){
-            businessCustomInterence.addNewContract({
+        // 添加续约
+        addRenewalHandle(){
+            this.renewalForm={}
+            this.renewalDiaTitle="添加续约"
+            this.showRenewal=true
+        },
+        // 编辑续约
+        editRenewal(row){
+            this.renewalDiaTitle="编辑续约"
+            this.renewalForm={
+                id:row.EtaBusinessContractId,
+                signDate:row.SigningTime,
+                expirationDate:row.ExpiredTime
+            }
+            this.showRenewal=true
+        },
+        deleteRenewal(row){
+            this.$confirm("是否确认删除该签约信息?", "提示", {
+                type: "warning"
+            }).then(() => {
+                businessCustomInterence.
+                removeContract({EtaBusinessContractId:row.EtaBusinessContractId})
+                .then(res=>{
+                    if(res.Ret == 200){
+                        this.$message.success("删除成功")
+                        this.getTableData(Number(this.$route.query.id))
+                        this.getTimeLineData(Number(this.$route.query.id))
+                    }
+                })
+            }).catch(() => {});
+        },
+        //添加续约-保存
+        handleAddRenewal({signDate,expirationDate,id}){
+            // id-商家合约ID
+            let api = Number(id) ? 'editContract' : 'addNewContract'
+            businessCustomInterence[api]({
                 EtaBusinessId:Number(this.$route.query.id),
+                EtaBusinessContractId:Number(id),
                 SigningTime:signDate,
                 ExpiredTime:expirationDate
             }).then(res=>{
                 if(res.Ret!==200) return 
-                this.$message.success('添加续约成功')
+                this.$message.success(this.renewalDiaTitle+'成功')
                 this.showRenewal=false
                 this.getTableData(Number(this.$route.query.id))
                 this.getTimeLineData(Number(this.$route.query.id))
@@ -345,7 +403,7 @@ export default {
             }
         }
         .el-table{
-            margin-top: 30px;
+            margin-top: 15px;
         }
     }
     .business-other{

+ 17 - 2
src/views/business_ETA_manage/businessList.vue

@@ -57,6 +57,14 @@
                     @change="changeSelectOptions('location')" 
                     placeholder="请选择客户地址" 
                 />
+                <el-select v-model="nation" placeholder="请选择所属国家" filterable clearable @change="changeSelectOptions('nation')">
+                    <el-option :label="item.cnName" :value="item.cnName" v-for="item in countryData" :key="item.code" >
+                        <div style="display: flex;justify-content: space-between;">
+                            <span>{{ item.cnName }}</span>
+                            <span style="color: #8492a6; font-size: 13px">{{ item.code }}</span>
+                        </div>
+                    </el-option>
+                </el-select>
                 <el-select 
                     v-model="signStatus" 
                     placeholder="请选择签约状态" 
@@ -94,6 +102,9 @@
                             <span v-else-if="item.key==='BusinessName'" class="link" @click="handleShowDetail(scope.row)">
                                 {{ scope.row.BusinessName }}
                             </span>
+                            <span v-else-if="item.key==='Address'">
+                                {{ scope.row.RegionType=='海外'?scope.row.Nation || scope.row.Address:scope.row.Address }}
+                            </span>  
                             <span v-else>{{scope.row[item.key]}}</span>
                         </template>
                     </el-table-column>
@@ -175,9 +186,11 @@ import { customInterence ,businessCustomInterence , roadshowInterence} from '@/a
 import {locationOptions} from "@/views/custom_manage/customList/location"
 import AddRenewal from './components/AddRenewal.vue'
 import ModifySaller from './components/ModifySaller.vue'
+import country from "@/utils/countryData"
 export default {
     components:{AddRenewal,ModifySaller},
     data() {
+        this.countryData = country
         return {
             /* dialog */
             showRenewal:false,//显示添加续约
@@ -194,6 +207,7 @@ export default {
             valueLocation:[],
             provinceValue:'',
             cityValue:'',
+            nation:'',
             locationProps:{
                 multiple: true,
                 value:'name',
@@ -234,7 +248,7 @@ export default {
                     key:'BusinessCode'
                 },
                 {
-                    label:'商家地址',
+                    label:'商家地址/所属国家',
                     key:'Address'
                 },
                 {
@@ -246,7 +260,7 @@ export default {
                     key:'SigningStatus'
                 },
                 {
-                    label:'最新签约时间',
+                    label:'运维开始时间',
                     key:'SigningTime',
                     sort:true
                 },
@@ -321,6 +335,7 @@ export default {
                 Province:this.provinceValue,
                 City:this.cityValue,
                 IndustryId:Number(this.trade),
+                Nation:this.nation,
                 PageSize:this.pageSize,
                 CurrentIndex:this.page,
                 SortParam:this.sortParam,

+ 30 - 10
src/views/business_ETA_manage/components/AddRenewal.vue

@@ -7,7 +7,7 @@
             label-width="100px" 
             class="demo-ruleForm"
         >
-            <el-form-item label="签约时间" prop="signDate">
+            <el-form-item label="运维时间" prop="signDate">
                 <el-date-picker
                     v-model="ruleForm.signDate"
                     type="date"
@@ -33,13 +33,34 @@
 
 <script>
 export default {
+    props:{
+        renewalForm:{
+            type:Object,
+            default:()=>{
+                return {}
+            }
+        }
+    },
+    watch:{
+        renewalForm:{
+            handler:function(value){
+                if(value.id){
+                    this.ruleForm.id = value.id || 0
+                    this.ruleForm.signDate = value.signDate || ''
+                    this.ruleForm.expirationDate = value.expirationDate || ''
+                }
+            },
+            immediate:true
+        }
+    },
     data() {
         return {
             rules:{
-                signDate:[{required: true, message: '请选择签署日期', trigger: 'change' },],
-                expirationDate:[{required: true, message: '请选择签署日期', trigger: 'change' },],
+                signDate:[{required: true, message: '请选择运维时间', trigger: 'change' },],
+                expirationDate:[{required: true, message: '请选择到期时间', trigger: 'change' },],
             },
             ruleForm:{
+                id:0,
                 signDate:'',
                 expirationDate:''
             }
@@ -51,7 +72,7 @@ export default {
                 if(valid){
                     const flag=this.$moment(this.ruleForm.signDate).isBefore(this.ruleForm.expirationDate);
                     if(!flag){
-                        this.$message.warning('到期时间不得早于签约时间')
+                        this.$message.warning('到期时间不得早于运维时间')
                         return
                     }
                     this.$emit('addRenewal',this.ruleForm)
@@ -60,9 +81,12 @@ export default {
             })
         },
         initForm(){
+            this.ruleForm.id = 0
             this.ruleForm.signDate = ''
             this.ruleForm.expirationDate = ''
-            this.$refs.ruleForm.resetFields();
+            this.$nextTick(()=>{
+                this.$refs.ruleForm.clearValidate();
+            })
         },
         handleClose(){
             this.initForm()
@@ -70,8 +94,4 @@ export default {
         }
     },
 }
-</script>
-
-<style>
-
-</style>
+</script>

+ 10 - 4
src/views/contract_manage/components/ServiceDialog.vue

@@ -113,7 +113,7 @@
               >{{ item.ClassifyName }}:</el-checkbox
             >
             <el-checkbox-group :disabled="selectRowIndex === null" v-model="item.CheckList" @change="handleCheckChange(item)">
-              <el-checkbox :disabled="contractType!=='补充协议'&&tag.PermissionName==='宏观经济'" :label="tag.ChartPermissionId" v-for="tag in item.Items" :key="tag.ChartPermissionId">{{ tag.PermissionName }}</el-checkbox>
+              <el-checkbox :disabled="contractType!=='补充协议'&&tag.IsPublic==1" :label="tag.ChartPermissionId" v-for="tag in item.Items" :key="tag.ChartPermissionId">{{ tag.PermissionName }}</el-checkbox>
             </el-checkbox-group>
           </div>
         </div>
@@ -425,6 +425,7 @@ export default {
         if (res.Ret === 200) {
           let arr = res.Data.List;
           arr.forEach((item) => {
+            item.Items=item.Items||[]
             item.CheckList = [];
             item.CheckAll = false;
             item.indeterminate = false;
@@ -467,9 +468,14 @@ export default {
       e.CheckList = e.CheckAll ? arr : [];
       e.indeterminate = false;
       // 需求更改,合同类型为补充协议时不默认勾选宏观经济
-      if(e.ClassifyName==='宏观经济'&&this.contractType!=='补充协议'){
-        e.CheckList.push(1)
-      }
+      if(this.contractType!=='补充协议'){
+        e.Items.forEach(_e=>{
+          if(_e.IsPublic==1){
+            e.CheckList.push(_e.ChartPermissionId)
+          }
+        })
+        
+      } 
     },
 
     //选择单个

+ 45 - 33
src/views/contract_manage/components/allocationNumber.vue

@@ -7,37 +7,31 @@
           <el-button style="margin-top: 20px" type="primary" size="mini" @click="averageaAllocation">平均分配</el-button>
         </div>
 
-        <p>
-          1)单行业套餐只能在对应行业内部分配研究员贡献百分比<br />
-          2)多行业套餐先在行业间分配百分比(最低不低于平均值的一半),再分配到个人<br />
-          3)允许总额20%以内的负分<br />
-          4)转正后一个季度内可以提交和修改
-          <br />
-        </p>
+        <div>
+          <p v-for="(item, index) in textualList" :key="item.text">{{ index + 1 }}{{ item.text }}</p>
+        </div>
       </div>
       <div class="content-box">
         <div v-for="item in listArr" :key="item.ChartPermissionName">
-          <div class="industry-ul">
-            <span :class="['industry-name', item.ChartPermissionId == '31' && 'name-yanxuan', item.ChartPermissionId == '52' && 'points-name']">{{ item.ChartPermissionName }}</span>
-            <template v-if="item.ChartPermissionId != '31' && item.ChartPermissionId != '52'">
-              <el-input :min="-100" :max="100" type="number" v-model="item.Proportion" size="small" @input="restrictInput(item)" style="width: 76px; margin: 0 5px 0 8px">
+          <div :class="['industry-ul', item.ChartPermissionName.includes('研选') && 'ul-yanxuan']">
+            <span :class="['industry-name', item.ChartPermissionName.includes('研选') && 'name-yanxuan']">{{ item.ChartPermissionName }}</span>
+            <template>
+              <el-input :min="-100" :max="100" type="number" v-model="item.Proportion" size="small" @input="restrictInput(item)" style="width: 80px; margin: 0 5px 0 8px">
                 <div class="per_cent_" slot="suffix">%</div>
               </el-input>
               <p style="width: 38px">{{ roundedResult(item) }}</p>
             </template>
-            <p style="width: 38px; height: 32px; line-height: 32px; text-align: center" v-else>{{ item.Money }}</p>
           </div>
-          <div v-for="study in item.List" :key="study.RealName" class="industry-ul">
-            <span :class="['study-name', item.ChartPermissionId == '31' && 'name-yanxuan', item.ChartPermissionId == '52' && 'points-name']">{{ study.RealName }}</span>
-            <template v-if="!study.RealName.includes('研选')">
+          <div v-for="study in item.List" :key="study.RealName" :class="['industry-ul', item.ChartPermissionName.includes('研选') && 'ul-yanxuan']">
+            <span :class="['study-name', item.ChartPermissionName.includes('研选') && 'name-yanxuan']">{{ study.RealName }}</span>
+            <template>
               <el-input :min="-100" :max="100" type="number" v-model="study.Proportion" size="small" style="width: 76px; margin: 0 5px 0 8px">
                 <div class="per_cent_" slot="suffix">%</div>
               </el-input>
               <p style="width: 38px">{{ roundedResult(study) }}</p>
             </template>
-            <p style="width: 38px; height: 32px; line-height: 32px; text-align: center" v-else>{{ study.Money }}</p>
           </div>
-          <div class="all-item" v-if="item.ChartPermissionId != '31' && item.ChartPermissionId != '52'">
+          <div class="all-item">
             <span> {{ allPerCentHandler(item) == 0 ? "" : `总占比:` }}</span>
             <span> {{ allPerCentHandler(item) == 0 ? "" : `${allPerCentHandler(item)}` }}</span>
           </div>
@@ -72,9 +66,32 @@ export default {
       listArr: [],
       allNum: 0,
       TotalPointsContent: "",
+      isXClass: false,
     };
   },
-  computed: {},
+  computed: {
+    textualList() {
+      let items = [
+        {
+          text: ")单行业套餐只能在对应行业内部分配研究员贡献百分比",
+        },
+        {
+          text: ")多行业套餐先在行业间分配百分比(最低不低于平均值的一半),再分配到个人",
+        },
+        {
+          text: ")允许总额20%以内的负分",
+        },
+        {
+          text: ")转正后一个季度内可以提交和修改",
+        },
+      ];
+      if (this.isXClass) {
+        return items.filter((item, index) => index == 0 || index == 3);
+      } else {
+        return items;
+      }
+    },
+  },
   watch: {
     allocationVisible: {
       handler(newVal) {
@@ -138,27 +155,19 @@ export default {
       if (res.Ret === 200) {
         this.allNum = res.Data.Money;
         this.listArr = res.Data.List;
+        this.isXClass = res.Data.IsXClass;
         this.TotalPointsContent = res.Data.TotalPointsContent;
       }
     },
     // 平均分配
     averageaAllocation() {
-      let isName = [];
-      this.listArr.forEach((item) => {
-        if (!item.ChartPermissionName.includes("研选")) {
-          isName.push(true);
-        }
-      });
-      let num = 100 / isName.length;
+      let num = (100 / this.listArr.length).toFixed(2);
+      console.log(num);
       this.listArr.forEach((item) => {
-        if (item.ChartPermissionName != "研选订阅" && item.ChartPermissionName != "研选扣点包") {
-          item.Proportion = num;
-        }
-        let childrenNum = num / item.List.length;
+        item.Proportion = num;
+        let childrenNum = (num / item.List.length).toFixed(2);
         item.List.forEach((key) => {
-          if (key.RealName != "研选订阅" && key.RealName != "研选扣点包") {
-            key.Proportion = childrenNum;
-          }
+          key.Proportion = childrenNum;
         });
       });
     },
@@ -181,7 +190,7 @@ export default {
       display: flex;
       align-items: center;
       margin: 30px 0;
-      width: 180px;
+      width: 188px;
       color: #333;
       margin-right: 25px;
       .per_cent_ {
@@ -224,6 +233,9 @@ export default {
   .points-name {
     width: 80px !important;
   }
+  .ul-yanxuan {
+    width: 220px !important;
+  }
   /* 取消[type='number']的input的上下箭头 */
   input::-webkit-inner-spin-button {
     -webkit-appearance: none !important;

+ 134 - 0
src/views/contract_manage/components/tableColums.js

@@ -0,0 +1,134 @@
+//表格列
+export const tableColums = (type) => {
+  return type == 1
+    ? [
+        {
+          label: "订单号",
+          key: "OrderCode",
+          widthsty: 190,
+        },
+        {
+          label: "姓名",
+          key: "RealName",
+          widthsty: 80,
+        },
+        {
+          label: "手机号",
+          key: "Mobile",
+          widthsty: 110,
+        },
+        {
+          label: "公司名称",
+          key: "CompanyName",
+        },
+        {
+          label: "所属销售",
+          key: "SellerName",
+          widthsty: 100,
+        },
+        {
+          label: "推荐人",
+          key: "InviteName",
+          widthsty: 100,
+        },
+        {
+          label: "金额",
+          key: "OrderMoney",
+          widthsty: 80,
+        },
+        {
+          label: "创建时间",
+          key: "CreateTime",
+        },
+        {
+          label: "畅读卡类型",
+          key: "PaymentProject",
+          widthsty: 100,
+        },
+        {
+          label: "支付渠道",
+          key: "PaymentTypeText",
+        },
+        {
+          label: "有效期",
+          key: "StartDate",
+        },
+        {
+          label: "付款对象",
+          key: "SourceTitle",
+        },
+        {
+          label: "状态",
+          key: "OrderStatusText",
+          widthsty: 90,
+        },
+        {
+          label: "支付时间",
+          key: "PayTime",
+        },
+       
+      ]
+    : type == 2
+    ? [
+        {
+          label: "订单号",
+          key: "OrderCode",
+          widthsty: 190,
+        },
+        {
+          label: "姓名",
+          key: "RealName",
+          widthsty: 80,
+        },
+        {
+          label: "手机号",
+          key: "Mobile",
+          widthsty: 110,
+        },
+        {
+          label: "公司名称",
+          key: "CompanyName",
+        },
+        {
+          label: "所属销售",
+          key: "SellerName",
+          widthsty: 100,
+        },
+        {
+          label: "推荐人",
+          key: "InviteName",
+          widthsty: 100,
+        },
+        {
+          label: "金额",
+          key: "OrderMoney",
+          widthsty: 80,
+        },
+        {
+          label: "创建时间",
+          key: "CreateTime",
+        },
+        {
+          label: "付款项目",
+          key: "PaymentProject",
+        },
+        {
+          label: "支付渠道",
+          key: "PaymentTypeText",
+        },
+        {
+          label: "标题",
+          key: "SourceTitle",
+        },
+        {
+          label: "状态",
+          key: "OrderStatusText",
+          widthsty: 90,
+        },
+        {
+          label: "支付时间",
+          key: "PayTime",
+        },
+      ]
+    : [];
+};

+ 326 - 0
src/views/contract_manage/paymentRecords.vue

@@ -0,0 +1,326 @@
+<template>
+  <div class="container payment-records-container">
+    <div class="dataReport-top">
+      <span v-for="item in tabsList" :key="item.key" :class="tabs_index == item.key ? 'tab_active' : ''" @click="tabActive(item)">{{ item.lable }}</span>
+    </div>
+    <el-card>
+      <div class="select-box">
+        <el-date-picker
+          style="margin-bottom: 20px; margin-right: 20px; width: 300px"
+          v-model="timeRange"
+          type="daterange"
+          @change="handleSelectChange"
+          value-format="yyyy-MM-dd"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        >
+        </el-date-picker>
+        <el-cascader
+          v-model="sales"
+          placeholder="所属销售"
+          style="width: 220px; margin: 0 20px 20px 0"
+          :options="salesArr"
+          :props="defaultSalesProps"
+          :show-all-levels="false"
+          collapse-tags
+          clearable
+          filterable
+          @change="handleSelectChange"
+        >
+        </el-cascader>
+
+        <el-select v-if="tabs_index != 1" @change="handleSelectChange" style="margin-right: 20px; width: 220px" v-model="payInfo" placeholder="付款项目" clearable>
+          <el-option v-for="item in paymentProjectList" :key="item" :label="item" :value="item"> </el-option>
+        </el-select>
+        <el-select v-if="tabs_index == 1" @change="handleSelectChange" style="margin-right: 20px; width: 220px" v-model="vipType" placeholder="会员类型" clearable>
+          <el-option v-for="item in vipTypeList" :key="item.key" :label="item.lable" :value="item.key"> </el-option>
+        </el-select>
+        <el-select @change="handleSelectChange" style="margin-right: 20px; width: 220px" v-model="paymentType" placeholder="支付渠道" clearable>
+          <el-option v-for="item in paymentTypeList" :key="item.key" :label="item.lable" :value="item.key"> </el-option>
+        </el-select>
+
+        <el-cascader
+          v-model="salesRai"
+          placeholder="推荐人"
+          style="width: 220px; margin: 0 20px 20px 0"
+          :options="salesArrRai"
+          :props="defaultSalesProps"
+          :show-all-levels="false"
+          collapse-tags
+          clearable
+          filterable
+          @change="handleSelectChange"
+        >
+        </el-cascader>
+
+        <el-select @change="handleSelectChange" style="margin-right: 20px; width: 220px" v-model="payStatus" placeholder="支付状态" clearable>
+          <el-option v-for="item in payStatusList" :key="item.key" :label="item.lable" :value="item.key"> </el-option>
+        </el-select>
+        <el-input @input="handleSelectChange" style="margin-right: 20px; width: 220px; margin-bottom: 20px" prefix-icon="el-icon-search" v-model="orderNumber" placeholder="请输入订单号" />
+
+        <el-input @input="handleSelectChange" style="width: 220px; margin-bottom: 20px" prefix-icon="el-icon-search" v-model="keyWord" placeholder="请输入姓名/手机号" />
+      </div>
+      <el-table :data="tableOrderData" style="width: 100%" border>
+        <el-table-column align="center" v-for="item in tableColums" :key="item.key" :prop="item.key" :label="item.label" :width="item.widthsty">
+          <template slot-scope="{ row }">
+            <span @click="handleRowClick(row, item.key)" :style="handleRowStyle(row, item.key)">{{ handleRowContent(row, item.key) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="80">
+          <template slot-scope="{ row }">
+            <span v-if="row.OrderStatus == 2" class="editsty" @click="refundHandler(row)">退款</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 页数选择器 -->
+      <m-page :page_no="page_no" :pageSize="page_size" :total="total" style="margin: 20px 0" @handleCurrentChange="pageChange" />
+    </el-card>
+
+    <el-dialog center v-dialogDrag title="退款" :visible.sync="dialogVisible" append-to-body width="30%" :before-close="handleClose">
+      <div>
+        <el-input type="textarea" :autosize="{ minRows: 6, maxRows: 8 }" placeholder="请输入退款原因" v-model="refundTextarea"> </el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleClose">取 消</el-button>
+        <el-button type="primary" @click="refundDialogHandlerVisible">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { contractInterface, customInterence } from "@/api/api.js";
+import { tableColums } from "./components/tableColums.js";
+import mPage from "@/components/mPage.vue";
+
+export default {
+  name: "",
+  components: {
+    mPage,
+  },
+  props: {},
+  data() {
+    return {
+      tabsList: [
+        { lable: "畅读卡订单", key: 1 },
+        { lable: "单场付费订单", key: 2 },
+      ],
+      paymentProjectList: ["上市公司小范围", "专家调研", "买方交流"],
+      payStatusList: [
+        { lable: "已取消", key: 0 },
+        { lable: "待支付", key: 1 },
+        { lable: "已支付", key: 2 },
+        { lable: "转入退款", key: 3 },
+      ],
+      paymentType: "",
+      paymentTypeList: [
+        { lable: "小程序", key: 1 },
+        { lable: "PC", key: 2 },
+        { lable: "H5", key: 3 },
+      ],
+      tabs_index: 1,
+      timeRange: [], // 时间筛选
+      sales: [],
+      salesArr: [], //销售
+      salesRai: [],
+      salesArrRai: [], //销售
+
+      defaultSalesProps: {
+        multiple: true,
+        label: "RealName",
+        children: "ChildrenList",
+        value: "AdminId",
+      }, //销售级联配置
+      payStatus: "", //支付状态
+      payInfo: "", //付款项目
+      orderNumber: "", //订单号
+      keyWord: "",
+      tableColums: [],
+      tableOrderData: [],
+      total: 0,
+      page_no: 1,
+      page_size: 10,
+      dialogVisible: false, // 退款的弹框
+      refundTextarea: "", // 退款原因
+      orderRefundCode: "",
+      vipType: "",
+      vipTypeList: [
+        { lable: "日卡", key: "日卡" },
+        { lable: "月卡", key: "月卡" },
+      ],
+    };
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {
+    this.getSale();
+    this.getSaleRai();
+    this.getOrderList();
+    this.tableColums = tableColums(1);
+  },
+  methods: {
+    /* 获取权益销售 */
+    getSaleRai() {
+      customInterence.getSalesRaiData().then((res) => {
+        if (res.Ret === 200) {
+          this.salesArrRai = res.Data.List;
+        }
+      });
+    },
+    // 修改页码
+    pageChange(page_no) {
+      this.page_no = page_no;
+      this.getOrderList();
+    },
+    /* 获取销售 */
+    getSale() {
+      customInterence.getSale().then((res) => {
+        if (res.Ret === 200) {
+          this.salesArr = res.Data.List;
+        }
+      });
+    },
+    // 获取数据
+    async getOrderList() {
+      let salesArr = [];
+      if (this.sales.length) {
+        salesArr = this.sales.map((item) => {
+          return item[item.length - 1];
+        });
+      }
+      let salesArrRai = [];
+      if (this.salesRai.length) {
+        salesArrRai = this.salesRai.map((item) => {
+          return item[item.length - 1];
+        });
+      }
+      const res = await contractInterface.getOrderList({
+        PageSize: this.page_size,
+        CurrentIndex: this.page_no,
+        AdminId: salesArr.join(","),
+        StartDate: this.timeRange && this.timeRange.length ? this.timeRange[0] : "",
+        EndDate: this.timeRange && this.timeRange.length ? this.timeRange[1] : "",
+        OrderType: this.tabs_index,
+        PaymentProject: this.payInfo,
+        OrderCode: this.orderNumber,
+        KeyWord: this.keyWord,
+        OrderStatus: this.payStatus,
+        ShareId: salesArrRai.join(","),
+        PaymentType: this.paymentType,
+        UserCardType: this.vipType,
+      });
+      if (res.Ret === 200) {
+        this.tableOrderData = res.Data.List;
+        this.total = res.Data.Paging.Totals || 0;
+      }
+    },
+    tabActive(item) {
+      if (this.tabs_index == item.key) return;
+      this.vipType = "";
+      this.tableColums = tableColums(item.key);
+      this.tabs_index = item.key;
+      this.handleSelectChange();
+    },
+    // 所有筛选的改变
+    handleSelectChange() {
+      this.page_no = 1;
+      this.getOrderList();
+    },
+
+    // 表格三件套
+    // 表格点击了
+    handleRowClick(row, key) {
+      if (key == "CompanyName" && row.CompanyId != 1) {
+        this.$router.replace({
+          path: "/customDetail",
+          query: {
+            id: row.CompanyId,
+          },
+        });
+      } else if (key == "SourceTitle") {
+        window.open(row.HttpUrl, "_blank");
+      }
+    },
+    // 表格样式
+    handleRowStyle(row, key) {
+      let styleColor = {
+        Title: "color: #409eff; cursor: pointer",
+        CompanyName: row.CompanyId == 1 ? "" : "color: #409eff; cursor: pointer",
+        SourceTitle: "color: #409eff; cursor: pointer",
+      };
+      return styleColor[key] ? styleColor[key] : "";
+    },
+    // 文本是否需要处理
+    handleRowContent(row, key) {
+      if (key == "StartDate") return `${row["StartDate"]} ~ ${row["EndDate"]}`;
+      if (key == "OrderStatus") return row[key] == 0 ? "已取消" : row[key] == 1 ? "待支付" : row[key] == 2 ? "已支付" : row[key] == 3 ? "转入退款" : "";
+      return row[key];
+    },
+    // 点击了退款按钮
+    refundHandler(row) {
+      this.orderRefundCode = row.OrderCode;
+      this.dialogVisible = true;
+    },
+    // 关闭了退款弹框
+    handleClose() {
+      this.refundTextarea = "";
+      this.dialogVisible = false;
+    },
+    // 退款的确认弹框
+    async refundDialogHandlerVisible() {
+      if (!this.refundTextarea) return this.$message.warning("退款原因不能为空");
+      const res = await contractInterface.orderRefund({
+        OrderCode: this.orderRefundCode,
+        Remark: this.refundTextarea,
+      });
+      if (res.Ret === 200) {
+        this.$message.success("已提交退款");
+        this.handleClose();
+        this.getOrderList();
+      }
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.payment-records-container {
+  .dataReport-top {
+    display: flex;
+    align-items: center;
+    border: 1px solid #ececec;
+    padding: 20px 30px;
+    background: #fff;
+    border-radius: 4px;
+    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
+    margin-bottom: 20px;
+    .tab_active {
+      background-color: #409eff;
+      color: #fff;
+    }
+    span {
+      display: inline-block;
+      box-sizing: border-box;
+      padding: 0 24px;
+      line-height: 38px;
+      height: 40px;
+      background: #ecf5ff;
+      border: 1px solid #b3d8ff;
+      opacity: 1;
+      font-weight: 500;
+      font-size: 16px;
+      color: #409eff;
+      border-radius: 4px;
+      margin-right: 30px;
+      cursor: pointer;
+    }
+  }
+
+  .select-box {
+    /deep/ .el-input {
+      margin-bottom: 20px !important;
+    }
+  }
+}
+</style>

+ 335 - 0
src/views/contract_manage/refundRecord.vue

@@ -0,0 +1,335 @@
+<template>
+  <div class="container payment-records-container">
+    <div class="dataReport-top">
+      <span v-for="item in tabsList" :key="item.key" :class="tabs_index == item.key ? 'tab_active' : ''" @click="tabActive(item)">{{ item.lable }}</span>
+    </div>
+    <el-card>
+      <div class="select-box">
+        <el-date-picker
+          style="margin-bottom: 20px; margin-right: 20px; width: 300px"
+          v-model="timeRange"
+          type="daterange"
+          @change="handleSelectChange"
+          value-format="yyyy-MM-dd"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        >
+        </el-date-picker>
+        <el-cascader
+          v-model="sales"
+          placeholder="所属销售"
+          style="width: 220px; margin: 0 20px 20px 0"
+          :options="salesArr"
+          :props="defaultSalesProps"
+          :show-all-levels="false"
+          collapse-tags
+          clearable
+          filterable
+          @change="handleSelectChange"
+        >
+        </el-cascader>
+
+        <el-select @change="handleSelectChange" style="margin-right: 20px; width: 220px" v-model="payInfo" placeholder="付款项目" clearable>
+          <el-option v-for="item in paymentProjectList" :key="item" :label="item" :value="item"> </el-option>
+        </el-select>
+
+        <el-select @change="handleSelectChange" style="margin-right: 20px; width: 220px" v-model="paymentType" placeholder="支付渠道" clearable>
+          <el-option v-for="item in paymentTypeList" :key="item.key" :label="item.lable" :value="item.key"> </el-option>
+        </el-select>
+
+        <el-cascader
+          v-model="salesRai"
+          placeholder="推荐人"
+          style="width: 220px; margin: 0 20px 20px 0"
+          :options="salesArrRai"
+          :props="defaultSalesProps"
+          :show-all-levels="false"
+          collapse-tags
+          clearable
+          filterable
+          @change="handleSelectChange"
+        >
+        </el-cascader>
+        <el-select @change="handleSelectChange" style="margin-right: 20px; width: 220px" v-model="payStatus" placeholder="退款状态" clearable>
+          <el-option v-for="item in payStatusList" :key="item.key" :label="item.lable" :value="item.key"> </el-option>
+        </el-select>
+        <el-input @input="handleSelectChange" style="margin-right: 20px; width: 220px; margin-bottom: 20px" prefix-icon="el-icon-search" v-model="orderNumber" placeholder="请输入退款单号" />
+
+        <el-input @input="handleSelectChange" style="width: 220px; margin-bottom: 20px" prefix-icon="el-icon-search" v-model="keyWord" placeholder="请输入姓名/手机号" />
+      </div>
+      <el-table :data="tableOrderData" style="width: 100%" border>
+        <el-table-column align="center" v-for="item in tableColums" :key="item.key" :prop="item.key" :label="item.label" :width="item.widthsty">
+          <template slot-scope="{ row }">
+            <span @click="handleRowClick(row, item.key)" :style="handleRowStyle(row, item.key)">{{ handleRowContent(row, item.key) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="80">
+          <template slot-scope="{ row }">
+            <span class="editsty" v-if="row.OrderStatus == 2" @click="closeRefundHandler(row)">关闭退款</span>
+            <span class="editsty" v-if="row.RefundRemark" @click="refundHandler(row)">退款原因</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 页数选择器 -->
+      <m-page :page_no="page_no" :pageSize="page_size" :total="total" style="margin: 20px 0" @handleCurrentChange="pageChange" />
+    </el-card>
+
+    <el-dialog center v-dialogDrag title="退款原因" :visible.sync="dialogVisible" append-to-body width="30%" :before-close="handleClose">
+      <div style="margin-bottom: 30px">
+        {{ refundTextarea }}
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { contractInterface, customInterence } from "@/api/api.js";
+import { tableColums } from "./components/tableColums.js";
+import mPage from "@/components/mPage.vue";
+
+export default {
+  name: "",
+  components: {
+    mPage,
+  },
+  props: {},
+  data() {
+    return {
+      tabsList: [
+        { lable: "畅读卡订单", key: 1 },
+        { lable: "单场付费订单", key: 2 },
+      ],
+      paymentProjectList: ["上市公司小范围", "专家调研", "买方交流"],
+      tabs_index: 1,
+      timeRange: [], // 时间筛选
+      sales: [],
+      payStatusList: [
+        { lable: "退款异常", key: 5 },
+        { lable: "退款成功", key: 3 },
+        { lable: "退款处理中", key: 4 },
+        { lable: "退款关闭", key: 6 },
+      ],
+      salesArr: [], //销售
+
+      salesRai: [],
+      salesArrRai: [], //销售
+      paymentType: "",
+      paymentTypeList: [
+        { lable: "小程序", key: 1 },
+        { lable: "PC", key: 2 },
+        { lable: "H5", key: 3 },
+      ],
+      defaultSalesProps: {
+        multiple: true,
+        label: "RealName",
+        children: "ChildrenList",
+        value: "AdminId",
+      }, //销售级联配置
+      payStatus: "", //支付状态
+      payInfo: "", //付款项目
+      orderNumber: "", //订单号
+      keyWord: "",
+      tableColums: [],
+      tableOrderData: [],
+      total: 0,
+      page_no: 1,
+      page_size: 10,
+      dialogVisible: false, // 退款的弹框
+      refundTextarea: "", // 退款原因
+      orderRefundCode: "",
+    };
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {
+    this.getSale();
+    this.getSaleRai();
+    this.getOrderRefundList();
+    this.tableColums = tableColums(1);
+  },
+  methods: {
+    /* 获取权益销售 */
+    getSaleRai() {
+      customInterence.getSalesRaiData().then((res) => {
+        if (res.Ret === 200) {
+          this.salesArrRai = res.Data.List;
+        }
+      });
+    },
+    // 修改页码
+    pageChange(page_no) {
+      this.page_no = page_no;
+      this.getOrderRefundList();
+    },
+    /* 获取销售 */
+    getSale() {
+      customInterence.getSale().then((res) => {
+        if (res.Ret === 200) {
+          this.salesArr = res.Data.List;
+        }
+      });
+    },
+    // 获取数据
+    async getOrderRefundList() {
+      let salesArr = [];
+      if (this.sales.length) {
+        salesArr = this.sales.map((item) => {
+          return item[item.length - 1];
+        });
+      }
+      let salesArrRai = [];
+      if (this.salesRai.length) {
+        salesArrRai = this.salesRai.map((item) => {
+          return item[item.length - 1];
+        });
+      }
+      const res = await contractInterface.orderRefundList({
+        PageSize: this.page_size,
+        CurrentIndex: this.page_no,
+        AdminId: salesArr.join(","),
+        StartDate: this.timeRange && this.timeRange.length ? this.timeRange[0] : "",
+        EndDate: this.timeRange && this.timeRange.length ? this.timeRange[1] : "",
+        OrderType: this.tabs_index,
+        PaymentProject: this.payInfo,
+        OrderCode: this.orderNumber,
+        KeyWord: this.keyWord,
+        OrderStatus: this.payStatus,
+        ShareId: salesArrRai.join(","),
+        PaymentType: this.paymentType,
+      });
+      if (res.Ret === 200) {
+        this.tableOrderData = res.Data.List;
+        this.total = res.Data.Paging.Totals || 0;
+      }
+    },
+    tabActive(item) {
+      if (this.tabs_index == item.key) return;
+      this.tableColums = tableColums(item.key);
+      this.tabs_index = item.key;
+      this.handleSelectChange();
+    },
+    // 所有筛选的改变
+    handleSelectChange() {
+      this.page_no = 1;
+      this.getOrderRefundList();
+    },
+
+    // 表格三件套
+    // 表格点击了
+    handleRowClick(row, key) {
+      if (key == "CompanyName" && row.CompanyId != 1) {
+        this.$router.replace({
+          path: "/customDetail",
+          query: {
+            id: row.CompanyId,
+          },
+        });
+      } else if (key == "SourceTitle") {
+        window.open(row.HttpUrl, "_blank");
+      }
+    },
+    // 表格样式
+    handleRowStyle(row, key) {
+      let styleColor = {
+        Title: "color: #409eff; cursor: pointer",
+        CompanyName: row.CompanyId == 1 ? "" : "color: #409eff; cursor: pointer",
+        SourceTitle: "color: #409eff; cursor: pointer",
+      };
+      return styleColor[key] ? styleColor[key] : "";
+    },
+    // 文本是否需要处理
+    handleRowContent(row, key) {
+      if (key == "StartDate") return `${row["StartDate"]} ~ ${row["EndDate"]}`;
+      if (key == "OrderStatus") return row[key] == 0 ? "已取消" : row[key] == 1 ? "待支付" : row[key] == 2 ? "已支付" : row[key] == 3 ? "已退款" : "";
+      return row[key];
+    },
+    // 点击了退款按钮
+    refundHandler(row) {
+      this.refundTextarea = row.RefundRemark;
+      this.dialogVisible = true;
+    },
+    // 关闭了退款弹框
+    handleClose() {
+      this.refundTextarea = "";
+      this.dialogVisible = false;
+    },
+    // 关闭退款
+    closeRefundHandler(row) {
+      this.$confirm("确定要关闭这笔退款吗?", "关闭退款", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          contractInterface
+            .refundRevokeOrder({
+              OrderCode: row.OrderCode,
+            })
+            .then(() => {
+              this.getOrderRefundList();
+              this.$message({
+                type: "success",
+                message: "操作成功!",
+              });
+            });
+        })
+        .catch(() => {});
+    },
+    // 退款的确认弹框
+    async refundDialogHandlerVisible() {
+      if (!this.refundTextarea) return this.$message.warning("退款原因不能为空");
+      // 等待接口
+      const res = await contractInterface.orderRefund({
+        OrderCode: this.orderRefundCode,
+        Remark: this.refundTextarea,
+      });
+      if (res.Ret === 200) {
+        this.$message.success("操作成功");
+        this.handleClose();
+      }
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.payment-records-container {
+  .dataReport-top {
+    display: flex;
+    align-items: center;
+    border: 1px solid #ececec;
+    padding: 20px 30px;
+    background: #fff;
+    border-radius: 4px;
+    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
+    margin-bottom: 20px;
+    .tab_active {
+      background-color: #409eff;
+      color: #fff;
+    }
+    span {
+      display: inline-block;
+      box-sizing: border-box;
+      padding: 0 24px;
+      line-height: 38px;
+      height: 40px;
+      background: #ecf5ff;
+      border: 1px solid #b3d8ff;
+      opacity: 1;
+      font-weight: 500;
+      font-size: 16px;
+      color: #409eff;
+      border-radius: 4px;
+      margin-right: 30px;
+      cursor: pointer;
+    }
+  }
+
+  .select-box {
+    /deep/ .el-input {
+      margin-bottom: 20px;
+    }
+  }
+}
+</style>

+ 9 - 1
src/views/custom_manage/approvalTurn.vue

@@ -14,7 +14,7 @@
 							<span>合同类型: {{contractInfo.ContractType}}</span>
 						</li>
 						<li>
-							<span style="min-width:450px;marginRight:260px;display:inline-block;">合同期限:{{contractInfo.StartDate}}-{{contractInfo.EndDate}}({{contractInfo.StartDate|formateYear(contractInfo.EndDate)}})</span>
+							<span style="min-width:450px;marginRight:260px;display:inline-block;">合同期限:{{ContractTermTxt}}</span>
 							<span>合同金额:{{contractInfo.Money}}元</span>
 						</li>
 						<li>
@@ -267,6 +267,14 @@ export default {
 		}
 		this.getCompanyInfo()
 	},
+	computed:{
+		ContractTermTxt(){
+			let date = `${this.contractInfo.StartDate}-${this.contractInfo.EndDate}`;
+			let calculation = CalculationDate(this.contractInfo.StartDate,this.contractInfo.EndDate);
+			let str = this.contractInfo.Quarter ? this.contractInfo.Quarter + `(${date})` : date + `(${calculation})`;
+			return str
+		}
+	},
 }
 </script>
 <style lang='scss'>

+ 1 - 1
src/views/custom_manage/approvalUpdate.vue

@@ -12,7 +12,7 @@
 						<span>合同类型:{{contractInfo.ContractType}}</span><span class="contract_type_hint">{{contractInfo.SourceTag}}</span>
 					</li>
 					<li>
-						<span style="min-width:320px;marginRight:260px;display:inline-block;">合同期限:{{contractInfo.StartDate}}-{{contractInfo.EndDate}}({{diff_time}}年期)</span>
+						<span style="min-width:320px;marginRight:260px;display:inline-block;">合同期限:{{contractInfo.Quarter}}{{contractInfo.StartDate}}-{{contractInfo.EndDate}}({{diff_time}}年期)</span>
 						<span>合同金额:{{contractInfo.Money}}元</span>
 					</li>
 					<li>

+ 74 - 189
src/views/custom_manage/compontents/CauthList.vue

@@ -14,109 +14,23 @@
 		<!-- 权益拆分 -->
 		<div v-if="autharr[0] && autharr[0].RaiMerge == 2" class="qy_menuList">
 			<el-table :data="autharr[0].dataList" :show-header="false" border :span-method="spanMethod">
-				<el-table-column align="center">
+				<el-table-column align="center" :width="autharr[0].dataList[0][key].width?autharr[0].dataList[0][key].width:''" 
+				v-for="key in Object.keys(autharr[0].dataList[0])" :key="key">
 					<template slot-scope="scope">
-						<span v-if="!scope.row.PermissionTypeName">
-							{{scope.row.PermissionTypeName}}
-						</span>
-						<el-checkbox :label="scope.row.PermissionTypeName.value" v-else @change="handleCheckQY(scope.row.PermissionTypeName)"
-						v-model="scope.row.PermissionTypeName.isCheckAll" :disabled="scope.row.PermissionTypeName.isDisabled"
-						:indeterminate="scope.row.PermissionTypeName.isIndeterminate"></el-checkbox>
-					</template>
-				</el-table-column>
-				<el-table-column align="center">
-					<template slot-scope="scope">
-						<el-checkbox v-if="scope.row.medicine.value === '医药'" :label="scope.row.medicine.value" :indeterminate="scope.row.medicine.isIndeterminate"
-						@change="handleCheckQY(scope.row.medicine)" v-model="scope.row.medicine.isCheckAll" :disabled="scope.row.medicine.isDisabled"></el-checkbox>
-						<el-checkbox-group v-model="qyCheckList" v-else >
-							<el-checkbox :label="scope.row.medicine.value" class="checkbox-flex"
-							:disabled="scope.row.medicine.isDisabled">{{''}}</el-checkbox>
-						</el-checkbox-group>
-					</template>
-				</el-table-column>
-				<el-table-column align="center">
-					<template slot-scope="scope">
-						<el-checkbox v-if="scope.row.consumption.value === '消费'" :label="scope.row.consumption.value" :indeterminate="scope.row.consumption.isIndeterminate"
-						@change="handleCheckQY(scope.row.consumption)" v-model="scope.row.consumption.isCheckAll" :disabled="scope.row.consumption.isDisabled"></el-checkbox>
-						<el-checkbox-group v-model="qyCheckList" v-else >
-							<el-checkbox :label="scope.row.consumption.value" class="checkbox-flex"
-							:disabled="scope.row.consumption.isDisabled">{{''}}</el-checkbox>
-						</el-checkbox-group>
-					</template>
-				</el-table-column>
-				<el-table-column align="center">
-					<template slot-scope="scope">
-						<el-checkbox v-if="scope.row.technology.value === '科技'" :label="scope.row.technology.value" :indeterminate="scope.row.technology.isIndeterminate"
-						@change="handleCheckQY(scope.row.technology)" v-model="scope.row.technology.isCheckAll" :disabled="scope.row.technology.isDisabled"></el-checkbox>
-						<el-checkbox-group v-model="qyCheckList" v-else >
-							<el-checkbox :label="scope.row.technology.value" class="checkbox-flex"
-							:disabled="scope.row.technology.isDisabled">{{''}}</el-checkbox>
-						</el-checkbox-group>
-					</template>
-				</el-table-column>
-				<el-table-column align="center">
-					<template slot-scope="scope">
-						<el-checkbox v-if="scope.row.smart.value === '智造'" :label="scope.row.smart.value" :indeterminate="scope.row.smart.isIndeterminate"
-						@change="handleCheckQY(scope.row.smart)" v-model="scope.row.smart.isCheckAll" :disabled="scope.row.smart.isDisabled"></el-checkbox>
-						<el-checkbox-group v-model="qyCheckList" v-else >
-							<el-checkbox :label="scope.row.smart.value" class="checkbox-flex"
-							:disabled="scope.row.smart.isDisabled">{{''}}</el-checkbox>
-						</el-checkbox-group>
-					</template>
-				</el-table-column>
-				<el-table-column align="center">
-					<template slot-scope="scope">
-						<span v-if="scope.row.strategy.value === '策略'">
-							{{scope.row.strategy.value}}
-						</span>
-						<el-checkbox-group v-model="qyCheckList" v-else >
-							<el-checkbox :label="scope.row.strategy.value" class="checkbox-flex"
-							:disabled="scope.row.strategy.isDisabled">{{''}}</el-checkbox>
-						</el-checkbox-group>
-					</template>
-				</el-table-column>
-				<el-table-column align="center">
-					<template slot-scope="scope">
-						<span v-if="scope.row.experts.value === '专家'">
-							{{scope.row.experts.value}}
-						</span>
-						<el-checkbox-group v-model="qyCheckList" v-else >
-							<el-checkbox :label="scope.row.experts.value" class="checkbox-flex"
-							:disabled="scope.row.experts.isDisabled">{{''}}</el-checkbox>
-						</el-checkbox-group>
-					</template>
-				</el-table-column>
-				<el-table-column align="center">
-					<template slot-scope="scope">
-						<span v-if="scope.row.roadshow.value === '路演服务'">
-							{{scope.row.roadshow.value}}
-						</span>
-						<el-checkbox-group v-model="qyCheckList" v-else >
-							<el-checkbox :label="scope.row.roadshow.value" class="checkbox-flex"
-							:disabled="scope.row.roadshow.isDisabled">{{''}}</el-checkbox>
-						</el-checkbox-group>
-					</template>
-				</el-table-column>
-				<el-table-column align="center">
-					<template slot-scope="scope">
-						<span v-if="scope.row.choose.value === '研选订阅'">
-							{{scope.row.choose.value}}
-						</span>
-						<el-checkbox-group v-model="qyCheckList" v-else >
-							<el-checkbox :label="scope.row.choose.value" class="checkbox-flex"
-							:disabled="scope.row.choose.isDisabled">{{''}}</el-checkbox>
-						</el-checkbox-group>
-					</template>
-				</el-table-column>
-				<el-table-column align="center" width="100px">
-					<template slot-scope="scope">
-						<span v-if="scope.row.points.value === '研选扣点包'">
-							{{scope.row.points.value}}
-						</span>
-						<el-checkbox-group v-model="qyCheckList" v-else >
-							<el-checkbox :label="scope.row.points.value" class="checkbox-flex"
-							:disabled="scope.row.points.isDisabled">{{''}}</el-checkbox>
+						<!-- 主客观 区分的品种+复选框-->
+						<el-checkbox :label="scope.row[key].value" @change="handleCheckQY(scope.row[key])"
+						v-model="scope.row[key].isCheckAll" :disabled="scope.row[key].isDisabled"
+						:indeterminate="scope.row[key].isIndeterminate"
+						v-if="(scope.row[key].ids && scope.row[key].ids.length) || (scope.row[key].bothIds&& scope.row[key].bothIds.length)"></el-checkbox>
+						<!-- 不区分 只有复选框-->
+						<el-checkbox-group v-model="qyCheckList" v-else-if="typeof(scope.row[key].value)=='number'">
+							<el-checkbox :label="scope.row[key].value" class="checkbox-flex"
+							:disabled="scope.row[key].isDisabled">{{''}}</el-checkbox>
 						</el-checkbox-group>
+						<!-- 只有品种名称 -->
+						<template v-else>
+							{{scope.row[key].value}}
+						</template>
 					</template>
 				</el-table-column>
 			</el-table>
@@ -130,6 +44,20 @@
 </template>
 
 <script>
+// 权益的ID:
+/**
+ * 科技-主观(20)-客观(37)
+ * 消费-主观(21)-客观(38)
+ * 医药-主观(22)-客观(39)
+ * 智造-主观(19)-客观(36)
+ * 策略(23)
+ * 专家(29)
+ * 固收(53)
+ * 调研(54)
+ * 路演服务(30)
+ * 研选订阅(31)
+ * 研选扣点包(52)
+ */
 import { customInterence } from '@/api/api.js'
 export default {
 	name:'',
@@ -144,43 +72,36 @@ export default {
 	},
 	watch: {
 		autharr(value){
+			// console.log(value,'valuevaluevaluevalue');
 			if(value[0] && value[0].customType=='权益') this.qyCheckList = value[0].CheckList
 		},
 		qyCheckList(value){
+			let checkedIds=value||[]
 			// 根据复选框选择的情况 改变医药、消费、科技、智造、主客观复选框的状态
-			let arr = ['medicine','consumption','technology','smart']
-			for (let i = 0; i < arr.length; i++) {
-				let element = arr[i];
-				let arrLength = value.filter(item => {
-					return item == this.autharr[0].dataList[1][element].value || item == this.autharr[0].dataList[2][element].value
-				}).length
-				if(arrLength == 2){
-					this.autharr[0].dataList[0][element].isCheckAll=true
-					this.autharr[0].dataList[0][element].isIndeterminate=false
-				}else if(arrLength == 1){
-					this.autharr[0].dataList[0][element].isCheckAll=false
-					this.autharr[0].dataList[0][element].isIndeterminate=true
-				}else{
-					this.autharr[0].dataList[0][element].isCheckAll=false
-					this.autharr[0].dataList[0][element].isIndeterminate=false
-				}
-			}
-			for (let i = 0; i < 2; i++) {
-				let arrLength = value.filter(item => {
-					return item == this.autharr[0].dataList[i+1].medicine.value || item == this.autharr[0].dataList[i+1].consumption.value ||
-						item == this.autharr[0].dataList[i+1].technology.value || item == this.autharr[0].dataList[i+1].smart.value
-				}).length
-				if(arrLength == 4){
-					this.autharr[0].dataList[i+1].PermissionTypeName.isCheckAll=true
-					this.autharr[0].dataList[i+1].PermissionTypeName.isIndeterminate=false
-				}else if(arrLength == 0){
-					this.autharr[0].dataList[i+1].PermissionTypeName.isCheckAll=false
-					this.autharr[0].dataList[i+1].PermissionTypeName.isIndeterminate=false
+			this.autharr[0].dataList.map(it =>{
+				if(it.PermissionTypeName&&it.PermissionTypeName.value){
+					let idArr = [...checkedIds,...it.PermissionTypeName.ids]
+					let idArrLen = idArr.length
+					// 去重后的
+					let idRemovalArrLen = [...new Set(idArr)].length
+					it.PermissionTypeName.isCheckAll = idArrLen-idRemovalArrLen == it.PermissionTypeName.ids.length
+					it.PermissionTypeName.isIndeterminate = idArrLen-idRemovalArrLen < it.PermissionTypeName.ids.length && 
+																									idArrLen-idRemovalArrLen > 0					
 				}else{
-					this.autharr[0].dataList[i+1].PermissionTypeName.isCheckAll=false
-					this.autharr[0].dataList[i+1].PermissionTypeName.isIndeterminate=true
+					Object.values(it).forEach(permission =>{
+						if(permission.bothIds && permission.bothIds.length>1){
+							// 有主客观的
+							let idArr = [...checkedIds,...permission.bothIds]
+							let idArrLen = idArr.length
+							// 去重后的
+							let idRemovalArrLen = [...new Set(idArr)].length
+							permission.isCheckAll = idArrLen-idRemovalArrLen == permission.bothIds.length
+							permission.isIndeterminate = idArrLen-idRemovalArrLen < permission.bothIds.length && 
+																											idArrLen-idRemovalArrLen > 0
+						}
+					})
 				}
-			}
+			})
 		}
 	},
 	data () {
@@ -203,7 +124,6 @@ export default {
 				// 权益拆分
 				checkArr = this.qyCheckList
 			}
-
 			customInterence.addTryout({
 				CompanyId:this.id,
 				ChartPermissionId:checkArr.join()
@@ -230,23 +150,27 @@ export default {
 				item.Items.map((it,i)=>{
 					if(item.CheckList.includes(it.ChartPermissionId) && it.PermissionType==1){
 						// 主观被选上,将客观的ID也push上
-						item.CheckList.push(item.Items[i+1].ChartPermissionId)
+						let ob=item.Items.find(pe => pe.PermissionName == it.PermissionName && pe.PermissionType==2)
+						item.CheckList.push(ob?ob.ChartPermissionId:0)
 					}else if(!item.CheckList.includes(it.ChartPermissionId) && it.PermissionType==1){
-						if(item.CheckList.indexOf(item.Items[i+1].ChartPermissionId)!=-1){
-							item.CheckList.splice(item.CheckList.indexOf(item.Items[i+1].ChartPermissionId),1)
+						// 主观被去除,将客观的ID也去除
+						let ob=item.Items.find(pe => pe.PermissionName == it.PermissionName && pe.PermissionType==2)
+						let obIndex = item.CheckList.indexOf(ob?ob.ChartPermissionId:0)
+						if(obIndex!=-1){
+							item.CheckList.splice(obIndex,1)
 						}
 					}
 				})
 			}
 			item.CheckList = [...new Set(item.CheckList)]
-			let len = item.CheckList.length;
+			let len = item.Items.filter(it => item.CheckList.includes(it.ChartPermissionId)).length
 			item.checkAll = len === item.Items.length;
 			item.isIndeterminate = len > 0 && len < item.Items.length;
 		},
 		// 权益选择套餐方法
 		// 合并单元格
 		spanMethod({ row, rowIndex, column,columnIndex  }){
-			if([5,6,7,8,9].includes(columnIndex)){
+			if(Object.values(row)[columnIndex].merge){
 				if(rowIndex == 1){
 					return [2,1]
 				}else if(rowIndex == 2){
@@ -255,65 +179,26 @@ export default {
 			}
 		},
 		handleCheckQY(item){
-			let arr = ['medicine','consumption','technology','smart']
-			let arrCh = ['医药','消费','科技','智造']
 			// 全选
 			if(item.isCheckAll){
-				if(item.value == '主观'){
-					for (let i = 0; i < arr.length; i++) {
-						const element = arr[i];
-						this.qyCheckList.push(this.autharr[0].dataList[1][element].value)
-						this.qyCheckList = [...new Set(this.qyCheckList)]
-					}
-				}else if(item.value == '客观'){
-					for (let i = 0; i < arr.length; i++) {
-						const element = arr[i];
-						this.qyCheckList.push(this.autharr[0].dataList[2][element].value)
-						this.qyCheckList = [...new Set(this.qyCheckList)]
-					}
+				if(["客观","主观"].includes(item.value)){
+					this.qyCheckList = [...new Set([...this.qyCheckList,...item.ids])]
 				}else{
-					for (let i = 0; i < arr.length; i++) {
-						const element = arr[i];
-						const elementCh = arrCh[i];
-						if(item.value == elementCh){
-							this.qyCheckList.push(this.autharr[0].dataList[1][element].value,this.autharr[0].dataList[2][element].value)
-							this.qyCheckList = [...new Set(this.qyCheckList)]
-							break
-						}
-					}
+					this.qyCheckList = [...new Set([...this.qyCheckList,...item.bothIds])]
 				}
 			}else{ //全部不选
-				if(item.value == '主观'){
-					for (let i = 0; i < arr.length; i++) {
-						const element = arr[i];
+				if(["客观","主观"].includes(item.value)){
+					item.ids.map(pId =>{
 						// 需要删除的索引
-						let deleteIndex = this.qyCheckList.findIndex(id=> {
-							return id == this.autharr[0].dataList[1][element].value && (!this.autharr[0].dataList[2][element].isDisabled)
-						});
+						let deleteIndex = this.qyCheckList.findIndex(id=> id==pId && !(this.autharr[0].defaultAuth.includes(id)));
 						if(deleteIndex!=-1) this.qyCheckList.splice(deleteIndex,1)
-					}
-				}else if(item.value == '客观'){
-					for (let i = 0; i < arr.length; i++) {
-						const element = arr[i];
-						let deleteIndex = this.qyCheckList.findIndex(id=> {
-							return id == this.autharr[0].dataList[2][element].value && (!this.autharr[0].dataList[2][element].isDisabled)
-						});
-						if(deleteIndex!=-1) this.qyCheckList.splice(deleteIndex,1)
-					}
+					})
 				}else{
-					for (let i = 0; i < arr.length; i++) {
-						const element = arr[i];
-						const elementCh = arrCh[i];
-						if(item.value == elementCh){
-							for (let i = 0; i < 2; i++) {
-								let deleteIndex = this.qyCheckList.findIndex(id=> {
-									return id == this.autharr[0].dataList[i+1][element].value && (!this.autharr[0].dataList[i+1][element].isDisabled)
-								});
-								if(deleteIndex!=-1) this.qyCheckList.splice(deleteIndex,1)
-							}
-							break
-						}
-					}
+					item.bothIds.map(pId =>{
+						// 需要删除的索引
+						let deleteIndex = this.qyCheckList.findIndex(id=> id==pId && !(this.autharr[0].defaultAuth.includes(id)));
+						if(deleteIndex!=-1) this.qyCheckList.splice(deleteIndex,1)
+					})
 				}
 			}
 		}

+ 28 - 7
src/views/custom_manage/compontents/CpessionTable.vue

@@ -132,21 +132,42 @@ export default {
 		},
 		// 是否可选择
 		canSelect(row) {
-			return row.ChartPermissionId === 1 ? false : true;
+			return row.IsPublic == 1 ? false : true;
 		}
 	},
 	created() {},
 	mounted() {
 		this.isRaiMerge = this.authList[0].RaiMerge
 		/* 处理表格数据格式 */
-		this.filterAuth = this.authList.map((item) => {
+		let tempArr=this.authList.map((item) => {
 			return item.Items;
 		});
-		this.filterAuth = this.filterAuth.flat(Infinity);
-		if(this.isRaiMerge==1){
+		tempArr = tempArr.flat(Infinity);
+		console.log(tempArr);
+		if(!this.isRaiMerge){
+			this.filterAuth = tempArr
+		}else if(this.isRaiMerge==1){
 			// 主客观合并 只取主观的
-			this.filterAuth = this.filterAuth.filter(it => {
-				return (['医药','消费','科技','智造'].includes(it.PermissionName) && it.PermissionType==1) || (!['医药','消费','科技','智造'].includes(it.PermissionName))
+			this.filterAuth = tempArr.filter(it => {
+				return it.PermissionType==1 || it.PermissionType==0
+			})
+		}else if(this.isRaiMerge==2){
+			// 主客观拆分 只取主观的
+			tempArr.map(item =>{
+				// 排下序 
+				if(item.PermissionType==1){
+					//主观 找客观
+					this.filterAuth.push(item)
+					let ob = tempArr.find(it => it.PermissionName == item.PermissionName && it.PermissionType!=1)
+					ob && this.filterAuth.push(ob)
+				}else if(item.PermissionType==0){
+					this.filterAuth.push(item)
+				}else{
+					// 客观
+					if(!this.filterAuth.find(t => t.ChartPermissionId == item.ChartPermissionId)){
+						this.filterAuth.push(item)
+					}
+				}
 			})
 		}
 		/* 选中的id数组 */
@@ -161,7 +182,7 @@ export default {
 		let check_Auth = this.filterAuth.filter((item) => {
 			return select.includes(item.ChartPermissionId);
 		});
-
+		console.log(check_Auth,'check_Auth');
 		if (this.fromType === 'edit') {
 			/* 展示表格选中的key */
 			let _this = this; 

+ 32 - 4
src/views/custom_manage/compontents/CpessionTableEquity.vue

@@ -36,6 +36,19 @@
 </template>
 
 <script>
+/**权益权限ID
+ * 科技-主观(20)-客观(37)
+ * 消费-主观(21)-客观(38)
+ * 医药-主观(22)-客观(39)
+ * 智造-主观(19)-客观(36)
+ * 策略(23)
+ * 专家(29)
+ * 固收(53)
+ * 调研(54)
+ * 路演服务(30)
+ * 研选订阅(31)
+ * 研选扣点包(52)
+ */
 export default {
 	props: {
 		authList: {
@@ -61,7 +74,7 @@ export default {
 	methods: {
 		/* 处理合并数组 */
 		getRowSpan() {
-            this.filterAuth.map((v, i, s) => {
+			this.filterAuth.map((v, i, s) => {
 				if (!v.PermissionTypeName) {
 				this.indexArrEquity.push(i);
 				}
@@ -200,9 +213,24 @@ export default {
 		}else {
 			/* 显示只有权限的数组 */
 			this.filterAuth = [];
-			this.filterAuth = check_Auth.filter((item) => {
-				return item.Status === '正式' || item.Status === '试用' || item.Status === '永续'||item.Status=='关闭'
-			});
+			check_Auth.map(item =>{
+				// 排序 以防合并问题
+				if(item.Status === '正式' || item.Status === '试用' || item.Status === '永续'||item.Status=='关闭'){
+					if(item.PermissionType==1){
+						//主观 找客观
+						this.filterAuth.push(item)
+						let ob = check_Auth.find(it => it.PermissionName == item.PermissionName && it.PermissionType!=1)
+						ob && this.filterAuth.push(ob)
+					}else if(item.PermissionType==0){
+						this.filterAuth.push(item)
+					}else{
+						// 客观
+						if(!this.filterAuth.find(t => t.ChartPermissionId == item.ChartPermissionId)){
+							this.filterAuth.push(item)
+						}
+					}
+				}
+			})
 			this.isMerge = this.filterAuth.some((item) => !item.IsMerge)
 		}
 		

+ 23 - 5
src/views/custom_manage/compontents/FreezAuthList.vue

@@ -4,9 +4,9 @@
 		<h3>请选择需要开通试用的品种:</h3>
 		<ul class="menu_lists">
 			<li v-for="item in autharr" :key="item.ClassifyName" class="menu_item">
-				<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="item.ClassifyName==='宏观经济'" style="marginRight:30px;fontWeight:bold;minWidth:90px;" @change="handleCheckAll(item)">{{item.ClassifyName+':'}}</el-checkbox>
+				<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="setSelectPerDisabled(item)" style="marginRight:30px;fontWeight:bold;minWidth:90px;" @change="handleCheckAll(item)">{{item.ClassifyName+':'}}</el-checkbox>
 				<el-checkbox-group v-model="item.CheckList"  @change="handleChecked(item)">
-					<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.ChartPermissionId===1" >{{list.PermissionName}}</el-checkbox>
+					<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.IsPublic===1" >{{list.PermissionName}}</el-checkbox>
 				</el-checkbox-group>
 			</li>
 		</ul>
@@ -29,12 +29,24 @@ export default {
 	methods: {
 		/* 选择全选或取消全选 */
 		handleCheckAll(item) {
-			// 取到所有的子菜单id
+			// // 取到所有的子菜单id
+			// let ids = item.Items.map(item =>{
+			// 	return item.ChartPermissionId
+			// })
+			// item.CheckList = item.checkAll ? ids : [];
+			// item.isIndeterminate = false;
+			//获取公有的id合集
+			let publicIds=[]
+
+			
 			let ids = item.Items.map(item =>{
+				if(item.IsPublic==1){
+					publicIds.push(item.ChartPermissionId)
+				}
 				return item.ChartPermissionId
 			})
-			item.CheckList = item.checkAll ? ids : [];
-			item.isIndeterminate = false;
+			item.CheckList = item.checkAll ? ids : publicIds;	
+        	item.isIndeterminate = publicIds.length>0&&!item.checkAll?true:false;
 		},
 		/* 复选框組选中时 */
 		handleChecked(item) {
@@ -42,6 +54,12 @@ export default {
 			item.checkAll = len === item.Items.length;
 			item.isIndeterminate = len > 0 && len < item.Items.length;
 		},
+		//控制权限设置是否禁用编辑
+		setSelectPerDisabled(data){
+			if(!data) return true
+			const arr=data.Items?data.Items.filter(_e=>_e.IsPublic==1):[]
+			return arr.length==data.Items.length
+		}
 	},
 	mounted() {},
 }

+ 27 - 7
src/views/custom_manage/customList/addCustom.vue

@@ -160,9 +160,9 @@
 				</label>
 				<ul class="menu_lists">
 					<li v-for="item in authList" :key="item.ClassifyName" class="menu_item">
-						<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="item.ClassifyName === '宏观经济'" @change="handleCheckAll(item)" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
+						<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="setSelectPerDisabled(item)" @change="handleCheckAll(item)" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
 						<el-checkbox-group  v-model="item.CheckList" @change="handleChecked(item)">
-							<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.ChartPermissionId==1">{{list.PermissionName}}</el-checkbox>
+							<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.IsPublic==1">{{list.PermissionName}}</el-checkbox>
 						</el-checkbox-group>
 					</li>
 				</ul>
@@ -487,14 +487,23 @@ export default {
 				if(res.Ret === 200) {
 					let newArr = [];
 					res.Data.List.length&&res.Data.List.forEach(item => {
+						item.Items=item.Items||[]
+						const temarr=item.Items?item.Items.filter(_e=>_e.IsPublic==1):[]
 						let obj = {
-							checkAll:false,
-							isIndeterminate:item.ClassifyName === '宏观经济'?true:false,
 							...item,
+
+							// checkAll:false,
+							// isIndeterminate:item.ClassifyName === '宏观经济'?true:false,
+							// 修改为通过公有私有判断
+							checkAll:item.Items.length>0?temarr.length==item.Items.length:false,
+							isIndeterminate:item.Items.length>0?temarr.length==item.Items.length?false:item.Items.some(_e=>_e.IsPublic==1):false,
+							CheckList:item.CheckList||[],
+							
 						}
 						newArr.push(obj)
 					})
 					this.authList = newArr;
+					console.log(this.authList);
 					// if(this.dataForm.custype == '权益') {
 					// 	this.citiesEquity = res.Data.ListType ? res.Data.ListType[0].Items : [];
         			// 	this.citiesListEquity  = res.Data.List ? res.Data.List[0].Items : [];
@@ -513,6 +522,11 @@ export default {
 				}
 			})
 		},
+		//控制权限设置是否禁用编辑
+		setSelectPerDisabled(data){
+			const arr=data.Items?data.Items.filter(_e=>_e.IsPublic==1):[]
+			return arr.length==data.Items.length
+		},
 		/* 获取销售 */
 		getSale() {
 			customInterence.saleslist().then(res => {
@@ -625,13 +639,19 @@ export default {
 		/* 选择全选或取消全选 */
 		handleCheckAll(item) {
 			// 取到所有的子菜单id
-		
+
+			//获取公有的id合集
+			let publicIds=[]
+
 			
 			let ids = item.Items.map(item =>{
+				if(item.IsPublic==1){
+					publicIds.push(item.ChartPermissionId)
+				}
 				return item.ChartPermissionId
 			})
-			item.CheckList = item.checkAll ? ids : [];	
-        	item.isIndeterminate = false;
+			item.CheckList = item.checkAll ? ids : publicIds;	
+        	item.isIndeterminate = publicIds.length>0&&!item.checkAll?true:false;
 		},
 		/* 复选框組选中时 */
 		handleChecked(item) {

+ 66 - 23
src/views/custom_manage/customList/applyTurn.vue

@@ -66,7 +66,7 @@
 									<i class="el-icon-info"></i>
 							</el-tooltip>
 						</el-form-item>
-						<el-form-item label="合同期限" prop="term" style="marginRight:60px;">
+						<el-form-item label="合同期限" prop="term" style="marginRight:60px;" :rules="{ required: true, message: '合同期限不能为空', trigger: 'blur' }" v-if="!isXClassCustom">
 							<i style="color:#f00;fontSize:20px;position:absolute;left:-90px;top:10%;">*</i>
 							<el-date-picker
 							v-model="formData.term"
@@ -79,6 +79,19 @@
 							style="width:400px;">
 							</el-date-picker>
 						</el-form-item>
+						<el-form-item label="合同期限" prop="term" :rules="{ required: true, message: '合同期限不能为空', trigger: 'change' }" style="marginRight:60px;" v-if="isXClassCustom">
+							<i style="color:#f00;fontSize:20px;position:absolute;left:-90px;top:10%;">*</i>
+							<div class="quarters-content">
+								<el-checkbox-group v-model="selectedQuarters" @input="checkboxInputHandler">
+									<el-checkbox v-for="quarter in quarters" :key="quarter.value" :label="quarter.label" :disabled="isDisabled(quarter)" >
+										{{ quarter.label }}
+									</el-checkbox>
+								</el-checkbox-group>
+								<div v-if="selectedQuarters.length > 0" class="quarters-text">
+										{{ selectedDateRange }}
+								</div>
+							</div>
+						</el-form-item>
 						<el-form-item label="合同金额" prop="amount" style="marginRight:60px;">
 							<i style="color:#f00;fontSize:20px;position:absolute;left:-90px;top:10%;">*</i>
 							<el-input 
@@ -119,15 +132,15 @@
 								<i style="color:#f00;fontSize:20px;position:absolute;left:-15px;top:10%;">*</i>
 								权限设置
 							</label>
-							<template  v-if="companyInfo.CompanyType=='权益' ||isRoleType== '权益'">
+							<template  v-if="(companyInfo.CompanyType=='权益' || isRoleType== '权益') && !isXClassCustom" >
 								<raiPermissionbox ref="raiPermissionboxRef" v-for="item in authList" :key="item.ClassifyName" :data="item" :formData="formData"
 								:hasNoChild="hasNoChild"></raiPermissionbox>
 							</template>
 							<ul class="menu_lists" style="width:100%" v-else>
 								<li v-for="item in authList" :key="item.ClassifyName" class="menu_item">
-									<el-checkbox v-if="item.ClassifyName !== '权益'" :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="item.ClassifyName === '宏观经济' || item.disabled" @change="handleCheckAll(item)" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
+									<el-checkbox  :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="setSelectVarietyDisabled(item)" @change="handleCheckAll(item)" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
 									<el-checkbox-group v-model="item.CheckList" @change="handleChecked(item)">
-										<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.ChartPermissionId==1  || list.disabled">{{list.PermissionName}}</el-checkbox>
+										<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.IsPublic==1  || list.disabled">{{list.PermissionName}}</el-checkbox>
 									</el-checkbox-group>
 								</li>
 							</ul>
@@ -179,10 +192,16 @@ import pdf from 'vue-pdf'
 import {CalculationDate} from '@/utils/CalculationDate'
 import JurisdictionCheck from '../compontents/jurisdictionCheck.vue';
 import raiPermissionbox from './components/raiPermissionbox'
-
+import quartersMixin from './mixins/quartersMixin'
 export default {
 	name:'',
+	mixins:[quartersMixin],
 	components: {imgPreview,pdf ,JurisdictionCheck,raiPermissionbox},
+	computed:{
+		isXClassCustom(){
+			return	this.companyInfo.Status.includes('永续') || this.companyInfo.Status.includes('X类试用')
+		}
+	},
 	data () {
 		return {
 			companyInfo:JSON.parse(sessionStorage.getItem('companyInfo')) || {},//客户基本信息
@@ -200,9 +219,6 @@ export default {
 			hasNoChild:false, // 医药、消费、科技、智造是否没有主客观
 			authList:[],//权限列表
 			formRule:{
-				term:[
-					{ required: true, message: '合同期限不能为空', trigger: 'blur' },
-				],
 				amount:[
 					{ required: true, message: '合同金额不能为空', trigger: 'blur' },
 					{ type: 'number', message: '合同金额必须为数字'}
@@ -229,6 +245,11 @@ export default {
 		};
 	},
 	methods: {
+		setSelectVarietyDisabled(item){
+			//return item.ClassifyName === '宏观经济' || item.disabled
+			return item.Items.some(_e=>_e.IsPublic==1)||item.disabled
+		},
+
 		/* 重新申请获取上次申请的合同信息并回显 */
 		getLastContract() {
 			customInterence.reapplyDetail({
@@ -249,9 +270,10 @@ export default {
 						setmeal:res.Data.Item.PackageType,
 						qyBigServeCheck:res.Data.Item.RaiPackageType
 					}
+					this.selectedQuarters = res.Data.Item.Quarter.split(',')
 					let newArr = [];
 					/* 处理权限列表 */
-					if(this.companyInfo.CompanyType == '权益' || this.isRoleType== '权益') {
+					if((this.companyInfo.CompanyType == '权益' || this.isRoleType== '权益') && !this.isXClassCustom ) {
 						res.Data.Item.PermissionList[0].Items.map(item => {
 							item.disabled=item.isIndeterminate=false								
 							if(item.ChartPermissionId==22 && (!item.Child)) this.hasNoChild=true
@@ -259,7 +281,7 @@ export default {
 						/* 处理数据把复选框 拆分成三个*/
 						res.Data.Item.PermissionList.length&&res.Data.Item.PermissionList.forEach(item => {
 						let arr = item.Items.filter(key=> [22,21,20,19,23,30].includes(key.ChartPermissionId))
-						let ItemsPrivate = item.Items.filter(key=> [29,31,20031,20032,52].includes(key.ChartPermissionId))
+						let ItemsPrivate = item.Items.filter(key=> [29,31,20031,20032,52,53,54,138,62].includes(key.ChartPermissionId))
 						let ItemsUp = item.Items.filter(key=> key.PermissionName.includes('升级'))
 						let ItemsBig = item.Items.filter(key=> key.ChartPermissionId==0)
 							let obj = {
@@ -273,6 +295,8 @@ export default {
 						})
 					} else {
 						res.Data.Item.PermissionList.forEach(item => {
+							item.CheckList=item.CheckList||[]
+							item.Items=item.Items||[]
 						let obj = {
 							checkAll:item.CheckList&&item.CheckList.length===item.Items.length?true:false,
 							isIndeterminate:item.CheckList&&item.CheckList.length>0 && item.CheckList.length<item.Items.length,
@@ -288,11 +312,12 @@ export default {
 		/* 获取基本权限信息 */
 		getAuthBasic() {
 			customInterence.authList({
-				IsShowYanXuanKouDian:true
+				IsShowYanXuanKouDian:true,
+				CompanyStatus:this.companyInfo.Status 
 			}).then(res => {
 				let newArr = [];
 				if(res.Ret === 200) {
-					if(this.companyInfo.CompanyType == '权益' || this.isRoleType== '权益') {
+					if((this.companyInfo.CompanyType == '权益' || this.isRoleType== '权益') && !this.isXClassCustom) {
 						res.Data.List[0].Items.map(item => {
 							item.disabled=item.isIndeterminate=false								
 							if(item.ChartPermissionId==22 && (!item.Child)) this.hasNoChild=true
@@ -300,7 +325,7 @@ export default {
 						/* 处理数据把复选框 拆分成三个*/
 						res.Data.List.length&&res.Data.List.forEach(item => {
 						let arr = item.Items.filter(key=> [22,21,20,19,23,30].includes(key.ChartPermissionId))
-						let ItemsPrivate = item.Items.filter(key=> [29,31,20031,20032,52].includes(key.ChartPermissionId))
+						let ItemsPrivate = item.Items.filter(key=> [29,31,20031,20032,52,53,54,138,62].includes(key.ChartPermissionId))
 						let ItemsUp = item.Items.filter(key=> key.PermissionName.includes('升级'))
 						let ItemsBig = item.Items.filter(key=> key.ChartPermissionId==0)
 							let obj = {
@@ -314,9 +339,11 @@ export default {
 						})
 					}else {
 						res.Data.List.length&&res.Data.List.forEach(item => {
+							item.CheckList=item.CheckList||[]
+							item.Items=item.Items||[]
 					    	let obj = {
-					    		checkAll:false,
-					    		isIndeterminate:item.ClassifyName === '宏观经济'?true:false,
+					    		checkAll:item.CheckList&&item.CheckList.length===item.Items.length?true:false,
+					    		isIndeterminate:item.CheckList&&item.CheckList.length>0 && item.CheckList.length<item.Items.length,
 					    		...item,
 					    	}
 					    	newArr.push(obj)
@@ -346,7 +373,7 @@ export default {
 					let checkArr = [];
 					let checkArrName = [];
 					let hasMinusSignVal = 0
-					if(this.companyInfo.CompanyType==='权益' || this.isRoleType== '权益'){
+					if((this.companyInfo.CompanyType==='权益' || this.isRoleType== '权益') && !this.isXClassCustom){
 					 	hasMinusSignVal = this.$refs.raiPermissionboxRef[0].minus_sign_val;		
 						this.authList.forEach(item => {
 								if(item.CheckList.length) {
@@ -546,16 +573,21 @@ export default {
 				})
 			} else {
 				  this.authList.forEach(item => {
-					 if(item.ClassifyName == '宏观经济') {
-						 item.CheckList = [1]
-						 item.isIndeterminate = true
-						 item.Items[1].disabled=false
+					if(item.Items.some(_e=>_e.IsPublic==1)){
+						item.CheckList = []
+						item.Items.forEach(_e=>{
+							if(_e.IsPublic==1){
+								item.CheckList.push(_e.ChartPermissionId)
+							}
+							_e.disabled=false
+						})
+						item.isIndeterminate = true
 					 }else {
 						 item.Items.forEach(key => {		
-							item.CheckList = []
 							key.Checked = false
 							key.disabled = false
 						})
+						item.CheckList = []
 						item.isIndeterminate = false
 						item.checkAll = false
 						item.disabled = false	
@@ -564,7 +596,10 @@ export default {
 				})
 				this.$message.warning('请勾选品种')
 			}
-		}
+		},
+	checkboxInputHandler(){
+		this.formData.term = this.selectedQuarters ? [this.selectedDateRange.split(" ~ ")[0],this.selectedDateRange.split(" ~ ")[1]]:[]
+	}
 	
 	},
 	created() {},
@@ -659,6 +694,14 @@ export default {
 			}
 		}
 	}
-
+	.quarters-content {
+		position: relative;
+		.quarters-text {
+			position: absolute;
+			left: 0;
+			top: 20px;
+			color: #f00;
+		}
+	}
 }
 </style>

+ 4 - 5
src/views/custom_manage/customList/components/raiPermissionbox.vue

@@ -42,7 +42,7 @@
         <el-checkbox-group v-model="data.CheckList" style="height: unset;">
           <div class="rai-checkbox-upS-box" >
             <el-checkbox :label="itP.ChartPermissionId" v-for="(itP,inP) in data.ItemsPrivate" 
-            :key="itP.ChartPermissionId" :disabled="itP.disabled" :style="{'height':hasNoChild?'48px':'95px','width':itemsPrivateWidth[inP]}"
+            :key="itP.ChartPermissionId" :disabled="itP.disabled" :style="{'height':hasNoChild?'48px':'95px','width':itP.ChartPermissionId == 52 && data.CheckList.includes(52)? '220px' : itP.PermissionName.includes('研选')?'130px':'84px'}"
             class="rai-checkbox-item upS-item" @change="e => handlePrivateChecked(e,itP,data)">
             {{ itP.PermissionName }}
             <p v-if="itP.ChartPermissionId == 31" class="checkbox-text">(30000元/年)</p>
@@ -51,7 +51,7 @@
             </el-checkbox>
           </div>
         </el-checkbox-group>
-        <div class="rai-checkbox-notice-box">
+        <div class="rai-checkbox-notice-box" v-if="data.ItemsUp.length>0">
           <span class="rai-checkbox-notice" v-if="formData.qyBigServeCheck">
             同时包含{{formData.qyBigServeCheck==2?"10":"16"}}次专项调研</span>
           <p class="rai-checkbox-notice" v-if="equityGroupDisabled(data.CheckList)">同时包含升级行业各5次专项调研</p>
@@ -65,7 +65,6 @@
   export default {
     name:'raiPermissionbox',
     data() {
-		  this.itemsPrivateWidth=['84px','146px','260px']
       return {
         minus_sign_val:''
       }
@@ -85,7 +84,6 @@
       }
     },
     created(){
-      console.log(this.data);
       // 回显
       if(this.data.CheckList && this.data.CheckList.length>0){
         this.data.Items.map(item =>{
@@ -271,10 +269,11 @@
 					display: flex;
 					align-items: center;
 					border: solid 1px #DCDFE6;
+          border-left: none;
 					height: 48px;
 					margin-right: -1px;
 					margin-left: -192px;
-					padding-left: 40px;
+					padding-left: 200px;
 					.rai-checkbox-notice {
 						color: #f00;
 					}

+ 17 - 2
src/views/custom_manage/customList/customAllList.vue

@@ -793,8 +793,23 @@
                         let authEquity = [] //权益
                         res.Data.ListRai ? res.Data.ListRai.forEach(item => { //权益
                             // 过滤没有权限的套餐
-                            authEquity.push(item.Items.filter(it => item.CheckList.includes(it
-                                .ChartPermissionId)))
+                            let check_Auth = item.Items.filter(it => item.CheckList.includes(it.ChartPermissionId))
+                            check_Auth.map(item =>{
+                                // 排序 以防合并问题
+                                if(item.PermissionType==1){
+                                    //主观 找客观
+                                    authEquity.push(item)
+                                    let ob = check_Auth.find(it => it.PermissionName == item.PermissionName && it.PermissionType!=1)
+                                    ob && authEquity.push(ob)
+                                }else if(item.PermissionType==0){
+                                    authEquity.push(item)
+                                }else{
+                                    // 客观
+                                    if(!authEquity.find(t => t.ChartPermissionId == item.ChartPermissionId)){
+                                        authEquity.push(item)
+                                    }
+                                }
+                            })
                         }) : ''
                         this.lookAuthListEquity = authEquity.flat(Infinity) //权益
                     }

+ 3 - 0
src/views/custom_manage/customList/customDetail.vue

@@ -235,6 +235,7 @@
 							<span :class="{'isShared':scope.row.IsShared}">{{scope.row.RealName}}</span>
 						</template>
 					</el-table-column>
+					<el-table-column prop="Position" label="职位" align="center" min-width="80px"></el-table-column>
 					<el-table-column
 					prop="Mobile"
 					label="手机号"
@@ -1072,6 +1073,8 @@ export default {
 					if(res.Data.FiccItem){
 						let auth = [];
 						res.Data.FiccItem.PermissionList.forEach(item=> {
+							item.Items=item.Items||[]
+							item.CheckList=item.CheckList||[]
 							let obj = {
 								checkAll:item.CheckList&&item.CheckList.length===item.Items.length?true:false,
 								isIndeterminate:item.CheckList&&item.CheckList.length>0 && item.CheckList.length<item.Items.length,

+ 95 - 139
src/views/custom_manage/customList/customList.vue

@@ -1736,8 +1736,25 @@ ShareListDialog},
 					let authEquity =[] //权益
 					res.Data.ListRai ?	res.Data.ListRai.forEach(item=> {//权益
 						// 过滤没有权限的套餐
-						authEquity.push(item.Items.filter(it => item.CheckList.includes(it.ChartPermissionId)))
+						let check_Auth = item.Items.filter(it => item.CheckList.includes(it.ChartPermissionId))
+						check_Auth.map(item =>{
+						// 排序 以防合并问题
+							if(item.PermissionType==1){
+								//主观 找客观
+								authEquity.push(item)
+								let ob = check_Auth.find(it => it.PermissionName == item.PermissionName && it.PermissionType!=1)
+								ob && authEquity.push(ob)
+							}else if(item.PermissionType==0){
+								authEquity.push(item)
+							}else{
+								// 客观
+								if(!authEquity.find(t => t.ChartPermissionId == item.ChartPermissionId)){
+									authEquity.push(item)
+								}
+							}
+						})
 					}):''
+
 					this.lookAuthListEquity = authEquity.flat(Infinity) //权益
 				}
 			})
@@ -1868,6 +1885,8 @@ ShareListDialog},
 					// res.Data.List 有值为 ficc
 					// res.Data.ListRai 有值为 权益
 					res.Data.List ? res.Data.List.forEach(item=> {
+						item.Items=item.Items||[]
+						item.CheckList=item.CheckList||[]
 						let obj = {
 							checkAll:item.CheckList&&item.CheckList.length===item.Items.length?true:false,
 							isIndeterminate:item.CheckList&&item.CheckList.length>0 && item.CheckList.length<item.Items.length,
@@ -1878,10 +1897,24 @@ ShareListDialog},
 						auth.push(obj)
 					}):
 					// 权益 RaiMerge 0不管 1合并 2拆分 所传入的数据结构不一样
+					/**权益权限ID
+					 * 科技-主观(20)-客观(37)
+					 * 消费-主观(21)-客观(38)
+					 * 医药-主观(22)-客观(39)
+					 * 智造-主观(19)-客观(36)
+					 * 策略(23)
+					 * 专家(29)
+					 * 固收(53)
+					 * 调研(54)
+					 * 路演服务(30)
+					 * 研选订阅(31)
+					 * 研选扣点包(52)
+					 */
 					res.Data.ListRai[0].RaiMerge==1?res.Data.ListRai.forEach(item=> { // 合并
+						let checkedLen = item.Items.filter(it => item.CheckList && item.CheckList.includes(it.ChartPermissionId)).length
 						let obj = {
-							checkAll:item.CheckList&&item.CheckList.length===item.Items.length?true:false,
-							isIndeterminate:item.CheckList&&item.CheckList.length>0 && item.CheckList.length<item.Items.length,
+							checkAll:checkedLen === item.Items.length,
+							isIndeterminate:checkedLen > 0 && checkedLen < item.Items.length,
 							defaultAuth:item.CheckList,
 							...item,
 						}
@@ -1893,145 +1926,68 @@ ShareListDialog},
 							...item,
 						}	
 						// 组合所需的数据格式
-						obj.dataList=[
-							{
-								PermissionTypeName:'',
-								medicine:{
-									value:'医药',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[1].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[1].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[1].ChartPermissionId].includes(id)).length ==2
-								},
-								consumption:{
-									value:'消费',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[2].ChartPermissionId,obj.Items[3].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[2].ChartPermissionId,obj.Items[3].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[2].ChartPermissionId,obj.Items[3].ChartPermissionId].includes(id)).length ==2
-								},
-								technology:{
-									value:'科技',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[4].ChartPermissionId,obj.Items[5].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[4].ChartPermissionId,obj.Items[5].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[4].ChartPermissionId,obj.Items[5].ChartPermissionId].includes(id)).length ==2
-								},
-								smart:{
-									value:'智造',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[6].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[6].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[6].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length ==2
-								},
-								strategy:{
-									value:'策略'
-								},
-								experts:{
-									value:'专家'
-								},
-								roadshow:{
-									value:'路演服务'
-								},
-								choose:{
-									value:'研选订阅'
-								},
-								points:{
-									value:'研选扣点包'
-								},
-							},
-							{
-								PermissionTypeName:{
-									value:'主观',
-									isIndeterminate:[1,2,3].includes(item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[2].ChartPermissionId,
-										obj.Items[4].ChartPermissionId,obj.Items[6].ChartPermissionId].includes(id)).length),
-									isCheckAll:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[2].ChartPermissionId,
-										obj.Items[4].ChartPermissionId,obj.Items[6].ChartPermissionId].includes(id)).length == 4,
-									isDisabled:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[2].ChartPermissionId,
-										obj.Items[4].ChartPermissionId,obj.Items[6].ChartPermissionId].includes(id)).length ==4
-								},
-								medicine:{
-									value:obj.Items[0].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[0].ChartPermissionId)
-								},
-								consumption:{
-									value:obj.Items[2].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[2].ChartPermissionId)
-								},
-								technology:{
-									value:obj.Items[4].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[4].ChartPermissionId)
-								},
-								smart:{
-									value:obj.Items[6].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[6].ChartPermissionId)
-								},
-								strategy:{
-									value:obj.Items[8].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[8].ChartPermissionId)
-								},
-								experts:{
-									value:obj.Items[9].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[9].ChartPermissionId)
-								},
-								roadshow:{
-									value:obj.Items[10].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[10].ChartPermissionId)
-								},
-								choose:{
-									value:obj.Items[11].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[11].ChartPermissionId)
-								},
-								points:{
-									value:obj.Items[12].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[12].ChartPermissionId)
+						let subjectivityIds=item.Items.filter(it => it.PermissionType==1).map(it => it.ChartPermissionId)//主观的ids
+						let subjectivityLength=subjectivityIds.length//有几个主观的id
+						let subjectivityCheckedLen = item.CheckList.filter(id => subjectivityIds.includes(id)).length//选中的有几个主观的id
+						let objectivityIds=item.Items.filter(it => it.PermissionType==2).map(it => it.ChartPermissionId)//客观的ids
+						let objectivityCheckedLen = item.CheckList.filter(id => objectivityIds.includes(id)).length//有几个客观的id
+						let objectivityLength=objectivityIds.length//选中的有几个客观的id
+						let arr = [{PermissionTypeName:''},
+											{PermissionTypeName:{
+												value:'主观',
+												isIndeterminate:subjectivityCheckedLen>0 && subjectivityCheckedLen<subjectivityLength,
+												isCheckAll:subjectivityCheckedLen == subjectivityLength,
+												isDisabled:subjectivityCheckedLen == subjectivityLength,
+												ids:subjectivityIds
+											}},
+											{PermissionTypeName:{
+												value:'客观',
+												isIndeterminate:objectivityCheckedLen > 0 && objectivityCheckedLen < objectivityLength,
+												isCheckAll:objectivityCheckedLen == objectivityLength,
+												isDisabled:objectivityCheckedLen == objectivityLength,
+												ids:objectivityIds
+											}}]
+						item.Items.map(cp =>{
+							if(cp.PermissionType==0){
+								// 没有主客观的权限
+								arr[0][cp.PermissionName]={
+									value:cp.PermissionName,
+									width:cp.PermissionName=='研选扣点包'?'100px':'',
+									merge:true
 								}
-							},
-							{
-								PermissionTypeName:{
-									value:'客观',
-									isIndeterminate:[1,2,3].includes(item.CheckList.filter(id => [obj.Items[1].ChartPermissionId,obj.Items[3].ChartPermissionId,
-										obj.Items[5].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length),
-									isCheckAll:item.CheckList.filter(id => [obj.Items[1].ChartPermissionId,obj.Items[3].ChartPermissionId,
-										obj.Items[5].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length == 4,
-									isDisabled:item.CheckList.filter(id => [obj.Items[1].ChartPermissionId,obj.Items[3].ChartPermissionId,
-										obj.Items[5].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length ==4
-								},
-								medicine:{
-									value:obj.Items[1].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[1].ChartPermissionId)
-								},
-								consumption:{
-									value:obj.Items[3].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[3].ChartPermissionId)
-								},
-								technology:{
-									value:obj.Items[5].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[5].ChartPermissionId)
-								},
-								smart:{
-									value:obj.Items[7].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[7].ChartPermissionId)
-								},
-								strategy:{
-									value:obj.Items[8].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[8].ChartPermissionId)
-								},
-								experts:{
-									value:obj.Items[9].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[9].ChartPermissionId)
-								},
-								roadshow:{
-									value:obj.Items[10].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[10].ChartPermissionId)
-								},
-								choose:{
-									value:obj.Items[11].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[11].ChartPermissionId)
-								},
-								points:{
-									value:obj.Items[12].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[12].ChartPermissionId)
+								arr[1][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId),
+									merge:true
+								}
+								arr[2][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId),
+									merge:true
+								}
+							}else if(cp.PermissionType==1){
+								// 找出对应的客观Id
+								let objectivity = item.Items.find(it => it.PermissionName == cp.PermissionName && it.PermissionType==2)
+								arr[0][cp.PermissionName]={
+									value:cp.PermissionName,
+									isIndeterminate:item.CheckList.filter(id => [cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0].includes(id)).length ==1,
+									isCheckAll:item.CheckList.filter(id => [cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0].includes(id)).length == 2,
+									isDisabled:item.CheckList.filter(id => [cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0].includes(id)).length ==2,
+									bothIds:[cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0]
+								}
+								arr[1][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId)
+								}
+							}else{
+								// 分主客观的客观
+								arr[2][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId)
 								}
 							}
-						]
-
+						})
+						obj.dataList=arr
 						auth.push(obj)
 					})
 					this.authList = auth;

+ 167 - 151
src/views/custom_manage/customList/customShareList.vue

@@ -20,10 +20,24 @@
 			@change="getTableData"
 			v-if="roleType!=='ficc_seller'"
 		  />
-          <el-select v-model="sales" placeholder="请选择分配销售" style="width: 214px; margin-right: 20px;" 
+          <!-- <el-select v-model="sales" placeholder="请选择分配销售" style="width: 214px; margin-right: 20px;" 
           clearable filterable multiple collapse-tags @change="getTableData">
             <el-option :label="item.RealName" :value="item.AdminId" v-for="item in salesArr" :key="item.AdminId" ></el-option>
-          </el-select>
+          </el-select> -->
+          <el-cascader
+            v-model="sales"
+            :options="salesArr"
+            :show-all-levels="false"
+            placeholder="请选择分配销售"
+            :props="{
+                multiple:true,
+                emitPath:false,
+                value:'AdminId',
+                label:'RealName',
+                children:'ChildrenList'
+            }"
+            @change="getTableData">
+          </el-cascader>
         </div>
         <div v-else>
             <el-button type="primary" @click="$router.push('/customCityList')">查看同城客户</el-button>
@@ -44,7 +58,7 @@
           placeholder="客户名称/社会信用码/手机号码/邮箱"
           v-model="search_txt"
           style="max-width:531px;margin-bottom: 8px;"
-          @input="getTableData"
+          @input="handleCurrentChange(1)"
           clearable>
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
           </el-input>
@@ -316,7 +330,8 @@
 								</span> -->
 								<div class="font-tool" style="display:flex;flex-direction:column;">
 									<span class="editsty" v-for="item in getToolBtnList(scope.row).slice(0,3)" :key="item.type" @click="itemclickHandle({type:item.type,data:scope.row})">
-										{{item.type==='分配销售'?scope.row.ShareSellerId?'修改销售':'分配销售':item.type}}
+										<!-- {{item.type==='分配销售'?scope.row.ShareSellerId?'修改销售':'分配销售':item.type}} -->
+										{{btnName(item,scope.row)}}
 									</span>
 								</div>
 								<el-dropdown size="medium" placement="bottom-start" @command="itemclickHandle" style="height: 16px;margin-left: 5px;" v-if="getToolBtnList(scope.row).length>3">
@@ -325,7 +340,7 @@
 										<el-dropdown-menu slot="dropdown">
 											<el-dropdown-item :command="{type:item.type,data:scope.row}" 
 											v-for="item in getToolBtnList(scope.row).slice(3)" :key="item.type">
-												<span>{{item.type=='设置共享'&&scope.row.IsShare==1?'取消共享':item.type}}</span>
+												<span>{{btnName(item,scope.row)}}</span>
 											</el-dropdown-item>
 										</el-dropdown-menu>
 									</span>
@@ -360,6 +375,7 @@
 		:close-on-click-modal="false"
 		:modal-append-to-body='false'
 		:title="assignedSellerTitle"
+		class="changeSaleDia"
 		@close="cancelAssign"
 		center
 		width="444px">
@@ -368,13 +384,27 @@
 					<span style="fontSize:16px;">{{assignform.CompanyName}}</span>
 				</el-form-item>
 				<el-form-item label="分配销售" prop="SellsId">
-					<el-select
+					<!-- <el-select
 						v-model="assignform.SellsId"
 						placeholder="请选择修改的销售"
 						style="width: 240px"
 						filterable>
 						<el-option :label="item.RealName" :value="item.AdminId" v-for="item in salesArr" :key="item.AdminId"></el-option>
-					</el-select>
+					</el-select> -->
+					<el-cascader
+						v-model="assignform.SellsId"
+						:options="salesArr"
+						:show-all-levels="false"
+						placeholder="请选择分配销售"
+						style="width: 240px"
+						:props="{
+							multiple:false,
+							emitPath:false,
+							value:'AdminId',
+							label:'RealName',
+							children:'ChildrenList'
+						}">
+					</el-cascader>
 				</el-form-item>
 			</el-form>	
 			<div style="display:flex;justify-content:center;margin:60px 0 35px;">
@@ -566,6 +596,12 @@ export default {
 		};
 	},
 	methods: {
+		// 用于返回按钮名称
+		btnName(btnItem,row){
+			if(btnItem.code=='BtnShare') return row.IsShare===1?'取消共享':'设置共享'
+			if(btnItem.code=='BtnModifySeller') return row.ShareSellerId?'修改销售':'分配销售'
+			return btnItem.type
+		},
 		/* 获取表格 */
 		getTableData() {
 			this.isShowloadding = true;
@@ -597,12 +633,22 @@ export default {
 				}
 			})
 		},
-		/* 获取销售 */
+		/* 获取可分配销售 */
 		getSale() {
-			customInterence.salesShareList().then(res => {
-				console.log(res);
+			customInterence.getShareSaleList().then(res => {
 				if(res.Ret === 200) {
 					this.salesArr = res.Data|| []
+					//无子级的组无法选择
+					const filterNodes = (arr)=>{
+						arr.length &&arr.forEach((item) => {
+							item.ChildrenList && filterNodes(item.ChildrenList);
+							if (!Number(item.AdminId)&&!item.ChildrenList) {
+								item.disabled = true
+							}
+						})
+					}
+					filterNodes(this.salesArr)
+					console.log('salesArr',this.salesArr)
 				}
 			})
 		},
@@ -620,7 +666,7 @@ export default {
 			const {BtnItem} = data
 			for(const i in this.btnCommandList){
 				if(BtnItem[i]){
-					toolList.push({type:this.btnCommandList[i]})
+					toolList.push({type:this.btnCommandList[i],code:i+''})
 				}
 			}
 			return toolList
@@ -670,7 +716,23 @@ export default {
 					let authEquity =[] //权益
 					res.Data.ListRai ?	res.Data.ListRai.forEach(item=> {//权益
 						// 过滤没有权限的套餐
-						authEquity.push(item.Items.filter(it => item.CheckList.includes(it.ChartPermissionId)))
+						let check_Auth = item.Items.filter(it => item.CheckList.includes(it.ChartPermissionId))
+						check_Auth.map(item =>{
+						// 排序 以防合并问题
+							if(item.PermissionType==1){
+								//主观 找客观
+								authEquity.push(item)
+								let ob = check_Auth.find(it => it.PermissionName == item.PermissionName && it.PermissionType!=1)
+								ob && authEquity.push(ob)
+							}else if(item.PermissionType==0){
+								authEquity.push(item)
+							}else{
+								// 客观
+								if(!authEquity.find(t => t.ChartPermissionId == item.ChartPermissionId)){
+									authEquity.push(item)
+								}
+							}
+						})
 					}):''
 					this.lookAuthListEquity = authEquity.flat(Infinity) //权益
 				}
@@ -682,6 +744,9 @@ export default {
 				CompanyId:row.CompanyId,
 				SellsId:row.ShareSellerId==0?'':row.ShareSellerId+'',
 			}
+			//根据当前角色 获取salesArr
+			//若是ficc角色 取咨询组销售(一级)
+			//若是rai角色 去权益销售组(多级)
 			this.assignedSellerShow = true;
 		},
 		/* 页码改变 */
@@ -700,6 +765,10 @@ export default {
 		saveAssign() {
 			this.$refs.assignform.validate((valid) => {
 				if (valid) {
+					if(!Number(this.assignform.SellsId)){
+						this.$message.warning("请选择销售而不是分组!")
+						return
+					}
 					let param={
 						CompanyId:this.assignform.CompanyId,
 						SellsId:+this.assignform.SellsId
@@ -855,10 +924,24 @@ export default {
 						auth.push(obj)
 					}):
 					// 权益 RaiMerge 0不管 1合并 2拆分 所传入的数据结构不一样
+					/**权益权限ID
+					 * 科技-主观(20)-客观(37)
+					 * 消费-主观(21)-客观(38)
+					 * 医药-主观(22)-客观(39)
+					 * 智造-主观(19)-客观(36)
+					 * 策略(23)
+					 * 专家(29)
+					 * 固收(53)
+					 * 调研(54)
+					 * 路演服务(30)
+					 * 研选订阅(31)
+					 * 研选扣点包(52)
+					 */
 					res.Data.ListRai[0].RaiMerge==1?res.Data.ListRai.forEach(item=> { // 合并
+						let checkedLen = item.Items.filter(it => item.CheckList && item.CheckList.includes(it.ChartPermissionId)).length
 						let obj = {
-							checkAll:item.CheckList&&item.CheckList.length===item.Items.length?true:false,
-							isIndeterminate:item.CheckList&&item.CheckList.length>0 && item.CheckList.length<item.Items.length,
+							checkAll:checkedLen === item.Items.length,
+							isIndeterminate:checkedLen > 0 && checkedLen < item.Items.length,
 							defaultAuth:item.CheckList,
 							...item,
 						}
@@ -870,145 +953,68 @@ export default {
 							...item,
 						}	
 						// 组合所需的数据格式
-						obj.dataList=[
-							{
-								PermissionTypeName:'',
-								medicine:{
-									value:'医药',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[1].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[1].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[1].ChartPermissionId].includes(id)).length ==2
-								},
-								consumption:{
-									value:'消费',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[2].ChartPermissionId,obj.Items[3].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[2].ChartPermissionId,obj.Items[3].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[2].ChartPermissionId,obj.Items[3].ChartPermissionId].includes(id)).length ==2
-								},
-								technology:{
-									value:'科技',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[4].ChartPermissionId,obj.Items[5].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[4].ChartPermissionId,obj.Items[5].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[4].ChartPermissionId,obj.Items[5].ChartPermissionId].includes(id)).length ==2
-								},
-								smart:{
-									value:'智造',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[6].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[6].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[6].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length ==2
-								},
-								strategy:{
-									value:'策略'
-								},
-								experts:{
-									value:'专家'
-								},
-								roadshow:{
-									value:'路演服务'
-								},
-								choose:{
-									value:'研选订阅'
-								},
-								points:{
-									value:'研选扣点包'
-								},
-							},
-							{
-								PermissionTypeName:{
-									value:'主观',
-									isIndeterminate:[1,2,3].includes(item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[2].ChartPermissionId,
-										obj.Items[4].ChartPermissionId,obj.Items[6].ChartPermissionId].includes(id)).length),
-									isCheckAll:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[2].ChartPermissionId,
-										obj.Items[4].ChartPermissionId,obj.Items[6].ChartPermissionId].includes(id)).length == 4,
-									isDisabled:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[2].ChartPermissionId,
-										obj.Items[4].ChartPermissionId,obj.Items[6].ChartPermissionId].includes(id)).length ==4
-								},
-								medicine:{
-									value:obj.Items[0].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[0].ChartPermissionId)
-								},
-								consumption:{
-									value:obj.Items[2].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[2].ChartPermissionId)
-								},
-								technology:{
-									value:obj.Items[4].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[4].ChartPermissionId)
-								},
-								smart:{
-									value:obj.Items[6].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[6].ChartPermissionId)
-								},
-								strategy:{
-									value:obj.Items[8].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[8].ChartPermissionId)
-								},
-								experts:{
-									value:obj.Items[9].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[9].ChartPermissionId)
-								},
-								roadshow:{
-									value:obj.Items[10].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[10].ChartPermissionId)
-								},
-								choose:{
-									value:obj.Items[11].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[11].ChartPermissionId)
-								},
-								points:{
-									value:obj.Items[12].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[12].ChartPermissionId)
+						let subjectivityIds=item.Items.filter(it => it.PermissionType==1).map(it => it.ChartPermissionId)//主观的ids
+						let subjectivityLength=subjectivityIds.length//有几个主观的id
+						let subjectivityCheckedLen = item.CheckList.filter(id => subjectivityIds.includes(id)).length//选中的有几个主观的id
+						let objectivityIds=item.Items.filter(it => it.PermissionType==2).map(it => it.ChartPermissionId)//客观的ids
+						let objectivityCheckedLen = item.CheckList.filter(id => objectivityIds.includes(id)).length//有几个客观的id
+						let objectivityLength=objectivityIds.length//选中的有几个客观的id
+						let arr = [{PermissionTypeName:''},
+											{PermissionTypeName:{
+												value:'主观',
+												isIndeterminate:subjectivityCheckedLen>0 && subjectivityCheckedLen<subjectivityLength,
+												isCheckAll:subjectivityCheckedLen == subjectivityLength,
+												isDisabled:subjectivityCheckedLen == subjectivityLength,
+												ids:subjectivityIds
+											}},
+											{PermissionTypeName:{
+												value:'客观',
+												isIndeterminate:objectivityCheckedLen > 0 && objectivityCheckedLen < objectivityLength,
+												isCheckAll:objectivityCheckedLen == objectivityLength,
+												isDisabled:objectivityCheckedLen == objectivityLength,
+												ids:objectivityIds
+											}}]
+						item.Items.map(cp =>{
+							if(cp.PermissionType==0){
+								// 没有主客观的权限
+								arr[0][cp.PermissionName]={
+									value:cp.PermissionName,
+									width:cp.PermissionName=='研选扣点包'?'100px':'',
+									merge:true
+								}
+								arr[1][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId),
+									merge:true
+								}
+								arr[2][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId),
+									merge:true
+								}
+							}else if(cp.PermissionType==1){
+								// 找出对应的客观Id
+								let objectivity = item.Items.find(it => it.PermissionName == cp.PermissionName && it.PermissionType==2)
+								arr[0][cp.PermissionName]={
+									value:cp.PermissionName,
+									isIndeterminate:item.CheckList.filter(id => [cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0].includes(id)).length ==1,
+									isCheckAll:item.CheckList.filter(id => [cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0].includes(id)).length == 2,
+									isDisabled:item.CheckList.filter(id => [cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0].includes(id)).length ==2,
+									bothIds:[cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0]
 								}
-							},
-							{
-								PermissionTypeName:{
-									value:'客观',
-									isIndeterminate:[1,2,3].includes(item.CheckList.filter(id => [obj.Items[1].ChartPermissionId,obj.Items[3].ChartPermissionId,
-										obj.Items[5].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length),
-									isCheckAll:item.CheckList.filter(id => [obj.Items[1].ChartPermissionId,obj.Items[3].ChartPermissionId,
-										obj.Items[5].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length == 4,
-									isDisabled:item.CheckList.filter(id => [obj.Items[1].ChartPermissionId,obj.Items[3].ChartPermissionId,
-										obj.Items[5].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length ==4
-								},
-								medicine:{
-									value:obj.Items[1].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[1].ChartPermissionId)
-								},
-								consumption:{
-									value:obj.Items[3].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[3].ChartPermissionId)
-								},
-								technology:{
-									value:obj.Items[5].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[5].ChartPermissionId)
-								},
-								smart:{
-									value:obj.Items[7].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[7].ChartPermissionId)
-								},
-								strategy:{
-									value:obj.Items[8].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[8].ChartPermissionId)
-								},
-								experts:{
-									value:obj.Items[9].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[9].ChartPermissionId)
-								},
-								roadshow:{
-									value:obj.Items[10].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[10].ChartPermissionId)
-								},
-								choose:{
-									value:obj.Items[11].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[11].ChartPermissionId)
-								},
-								points:{
-									value:obj.Items[12].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[12].ChartPermissionId)
+								arr[1][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId)
+								}
+							}else{
+								// 分主客观的客观
+								arr[2][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId)
 								}
 							}
-						]
-
+						})
+						obj.dataList=arr
 						auth.push(obj)
 					})
 					this.authList = auth;
@@ -1020,11 +1026,16 @@ export default {
 
 		/* 获取销售 */
 		getoriginalSale() {
-			let status=0;
+			/* let status=0;
 			customInterence.getSale({"Status":status}).then(res => {
 				if(res.Ret === 200) {
 					this.originalSalesArr = res.Data.List||[];
 				}
+			}) */
+			customInterence.getShareSale().then(res=>{
+				if(res.Ret === 200){
+					this.originalSalesArr = res.Data.List||[]
+				}
 			})
 		},
 	},
@@ -1045,6 +1056,11 @@ export default {
 			}
 		}
 	}
+	.changeSaleDia{
+		.el-cascader .el-input{
+			width: 100%;
+		}
+	}
 </style>
 <style lang='scss' scoped>
 	.ficc-package {

+ 5 - 5
src/views/custom_manage/customList/editCustom.vue

@@ -257,6 +257,7 @@
 							<span>{{scope.row.RealName}}</span>
 						</template>
 					</el-table-column>
+					<el-table-column prop="Position" label="职位" align="center" min-width="80px"></el-table-column>
 					<el-table-column
 					prop="Mobile"
 					label="手机号"
@@ -741,6 +742,8 @@ export default {
 					if(res.Data.FiccItem){
 						let auth = [];
 						res.Data.FiccItem.PermissionList.forEach(item=> {
+							item.Items=item.Items||[]
+							item.CheckList=item.CheckList||[]
 							let obj = {
 								checkAll:item.CheckList&&item.CheckList.length===item.Items.length?true:false,
 								isIndeterminate:item.CheckList&&item.CheckList.length>0 && item.CheckList.length<item.Items.length,
@@ -748,6 +751,7 @@ export default {
 							}
 							auth.push(obj)
 						})
+						console.log(auth);
 						this.ficcform={...this.ficcform,authList:auth}
 					}
 					// 处理权益权限列表格式
@@ -1227,10 +1231,6 @@ export default {
 		},
 		/* 导入联系人打开弹窗 */
 		async importHandle() {
-			// this.isShowImportDia = true;
-			// let have_card = this.userTable.some(item => {
-			// 	return item.BusinessCardUrl;
-			// })
 			let totalRes=await customInterence.companyUserTotal({CompanyId:this.companyId})
 			if(totalRes.Ret===200){
 				if(totalRes.Data.Total>=1) {
@@ -1351,11 +1351,11 @@ export default {
 	mounted() {
 		this.getDetail();
 		this.getSale();
-		this.getuserTable();
 		this.getCustomerSourceList()
 		this.getIndustry('ficc')
 		this.getIndustry('权益')
 		this.roleDepart = localStorage.getItem('RoleType') || '';
+		this.getuserTable();
 	},
 }
 </script>

+ 98 - 0
src/views/custom_manage/customList/mixins/quartersMixin.js

@@ -0,0 +1,98 @@
+export default {
+  data() {
+    return {
+      selectedQuarters: [],
+      quarters: this.generateQuarters(),
+      showAlert: true,
+    };
+  },
+  computed: {
+    selectedDateRange() {
+      if (this.selectedQuarters.length) {
+        const sortedQuarters = [...this.selectedQuarters].sort();
+        const startDate = this.quarterToDateRange(sortedQuarters[0]).split(" ~ ")[0];
+        const endDate = this.quarterToDateRange(sortedQuarters[this.selectedQuarters.length - 1]).split(" ~ ")[1];
+        return `${startDate} ~ ${endDate}`;
+      }
+      return "";
+    },
+  },
+  methods: {
+    generateQuarters() {
+      const currentDate = new Date();
+      const currentYear = currentDate.getFullYear();
+      let currentQuarter = Math.floor(currentDate.getMonth() / 3) + 1;
+
+      let quarters = [];
+
+      for (let i = 3; i >= 0; i--) {
+        // 包括当前季度和前三个季度
+        let year = currentYear;
+        let quarter = currentQuarter - i;
+
+        while (quarter <= 0) {
+          year--; // 上一年
+          quarter += 4; // 季度数增加
+        }
+
+        quarters.push({
+          label: `${year}Q${quarter}`,
+          value: `${year}Q${quarter}`,
+        });
+      }
+
+      return quarters;
+    },
+
+    isDisabled(quarter) {
+      if (this.selectedQuarters.length === 0) return false;
+      const sortedSelected = [...this.selectedQuarters].sort();
+      const firstIndex = this.quarters.findIndex((q) => q.value === sortedSelected[0]);
+      const lastIndex = this.quarters.findIndex((q) => q.value === sortedSelected[sortedSelected.length - 1]);
+
+      const currentIndex = this.quarters.findIndex((q) => q.value === quarter.value);
+
+      return currentIndex < firstIndex - 1 || currentIndex > lastIndex + 1;
+    },
+
+    quarterToDateRange(quarterLabel) {
+      const [year, q] = quarterLabel.split("Q");
+
+      switch (parseInt(q)) {
+        case 1:
+          return `${year}-01-01 ~ ${year}-03-31`;
+        case 2:
+          return `${year}-04-01 ~ ${year}-06-30`;
+        case 3:
+          return `${year}-07-01 ~ ${year}-09-30`;
+        case 4:
+          return `${year}-10-01 ~ ${year}-12-31`;
+      }
+    },
+    isConsecutiveSelection() {
+      const sortedSelectedIndexes = this.selectedQuarters.map((sq) => this.quarters.findIndex((aq) => aq.value === sq)).sort((a, b) => a - b);
+      for (let i = 0; i < sortedSelectedIndexes.length - 1; i++) {
+        if (sortedSelectedIndexes[i + 1] - sortedSelectedIndexes[i] !== 1) {
+          return false;
+        }
+      }
+
+      return true;
+    },
+  },
+
+  watch: {
+    selectedQuarters(newValue, oldValue) {
+      if (!newValue.length) return;
+      if (!this.isConsecutiveSelection() && this.showAlert && this.isXClassCustom) {
+        this.showAlert = false;
+        this.selectedQuarters.pop();
+        this.$message.error("只能选择相邻的季度");
+        this.$nextTick(() => {
+          this.selectedQuarters.pop();
+          this.showAlert = true;
+        });
+      }
+    },
+  },
+};

+ 29 - 7
src/views/custom_manage/customList/updateServe.vue

@@ -116,9 +116,9 @@
 							</template>
 							<ul v-else class="menu_lists" style="width:100%">
 								<li v-for="item in authList" :key="item.ClassifyName" class="menu_item">
-									<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="($route.path=='/updateCustom'&&item.ClassifyName === '宏观经济') || item.disabled" @change="handleCheckAll(item)" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
+									<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="setSelectPerDisabled(item)" @change="handleCheckAll(item,'auth')" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
 									<el-checkbox-group v-model="item.CheckList" @change="handleChecked(item)">
-										<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.disabled||($route.path=='/updateCustom'&&list.ChartPermissionId==1)">{{list.PermissionName}}</el-checkbox>
+										<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.disabled||($route.path=='/updateCustom'&&list.IsPublic==1)">{{list.PermissionName}}</el-checkbox>
 									</el-checkbox-group>
 								</li>
 							</ul>
@@ -433,7 +433,7 @@ export default {
 						/* 处理数据把复选框 拆分成三个*/
 						res.Data.Item.PermissionList.length&&res.Data.Item.PermissionList.forEach(item => {
 						let arr = item.Items.filter(key=> [22,21,20,19,23,30].includes(key.ChartPermissionId))
-						let ItemsPrivate = item.Items.filter(key=> [29,31,52,20031,20032].includes(key.ChartPermissionId))
+						let ItemsPrivate = item.Items.filter(key=> [29,31,52,20031,20032,53,54,138,62].includes(key.ChartPermissionId))
 						let ItemsUp = item.Items.filter(key=> key.PermissionName.includes('升级'))
 						let ItemsBig = item.Items.filter(key=> key.ChartPermissionId==0)
 							let obj = {
@@ -509,7 +509,7 @@ export default {
 						/* 处理数据把复选框 拆分成三个*/
 						res.Data.List.length&&res.Data.List.forEach(item => {
 						let arr = item.Items.filter(key=> [22,21,20,19,23,30].includes(key.ChartPermissionId))
-						let ItemsPrivate = item.Items.filter(key=> [29,31,52,20031,20032].includes(key.ChartPermissionId))
+						let ItemsPrivate = item.Items.filter(key=> [29,31,52,20031,20032,53,54,138,62].includes(key.ChartPermissionId))
 						let ItemsUp = item.Items.filter(key=> key.PermissionName.includes('升级'))
 						let ItemsBig = item.Items.filter(key=> key.ChartPermissionId==0)
 							let obj = {
@@ -523,6 +523,8 @@ export default {
 						})
 					}else {
 					res.Data.List.length&&res.Data.List.forEach(item => {
+						item.Items=item.Items||[]
+						const temarr=item.Items?item.Items.filter(_e=>_e.IsPublic==1):[]
 						item.Items=item.Items.map(item2=>{
 							return{
 								...item2,
@@ -530,8 +532,8 @@ export default {
 							}
 						})
 						let obj = {
-							checkAll:false,
-							isIndeterminate:item.ClassifyName === '宏观经济'?true:false,
+							checkAll:item.Items.length>0?temarr.length==item.Items.length:false,
+							isIndeterminate:item.Items.length>0?temarr.length==item.Items.length?false:item.Items.some(_e=>_e.IsPublic==1):false,
 							...item,
 						}
 						newArr.push(obj)
@@ -541,6 +543,11 @@ export default {
 				}
 			})
 		},
+		setSelectPerDisabled(data){
+			const arr=data.Items?data.Items.filter(_e=>_e.IsPublic==1):[]
+			return (this.$route.path=='/updateCustom'&&arr.length==data.Items.length) || data.disabled
+			//($route.path=='/updateCustom'&&item.IsPublic==1) || item.disabled
+		},
 		/* 获取历史签约 */
 		getDealList() {
 			customInterence.historydeal({
@@ -757,7 +764,22 @@ export default {
 			this.$router.push({path:`/${this.$route.meta.pathFrom}`})
 		},
 		/* 选择全选或取消全选 */
-		handleCheckAll(item) {
+		handleCheckAll(item,type) {
+			if(type=='auth'){
+				//获取公有的id合集
+				let publicIds=[]
+
+				
+				let ids = item.Items.map(item =>{
+					if(item.IsPublic==1){
+						publicIds.push(item.ChartPermissionId)
+					}
+					return item.ChartPermissionId
+				})
+				item.CheckList = item.checkAll ? ids : publicIds;	
+				item.isIndeterminate = publicIds.length>0&&!item.checkAll?true:false;
+				return
+			}
 			// 取到所有的子菜单id
 			let ids = item.Items.map(item =>{
 				return item.ChartPermissionId

+ 95 - 142
src/views/custom_manage/customSearch.vue

@@ -861,7 +861,23 @@ export default {
 					let authEquity =[] //权益
 					res.Data.ListRai ?	res.Data.ListRai.forEach(item=> {//权益
 						// 过滤没有权限的套餐
-						authEquity.push(item.Items.filter(it => item.CheckList.includes(it.ChartPermissionId)))
+						let check_Auth = item.Items.filter(it => item.CheckList.includes(it.ChartPermissionId))
+						check_Auth.map(item =>{
+						// 排序 以防合并问题
+							if(item.PermissionType==1){
+								//主观 找客观
+								authEquity.push(item)
+								let ob = check_Auth.find(it => it.PermissionName == item.PermissionName && it.PermissionType!=1)
+								ob && authEquity.push(ob)
+							}else if(item.PermissionType==0){
+								authEquity.push(item)
+							}else{
+								// 客观
+								if(!authEquity.find(t => t.ChartPermissionId == item.ChartPermissionId)){
+									authEquity.push(item)
+								}
+							}
+						})
 					}):''
 					this.lookAuthListEquity = authEquity.flat(Infinity) //权益
 					this.isPermissionTypeShow = this.lookAuthListEquity.some(item => !item.IsMerge)
@@ -1341,10 +1357,24 @@ export default {
 						auth.push(obj)
 					}):
 					// 权益 RaiMerge 0不管 1合并 2拆分 所传入的数据结构不一样
-					res.Data.ListRai[0].RaiMerge==1?res.Data.ListRai.forEach(item=> { // 合并
+						/**权益权限ID
+						 * 科技-主观(20)-客观(37)
+						 * 消费-主观(21)-客观(38)
+						 * 医药-主观(22)-客观(39)
+						 * 智造-主观(19)-客观(36)
+						 * 策略(23)
+						 * 专家(29)
+						 * 固收(53)
+						 * 调研(54)
+						 * 路演服务(30)
+						 * 研选订阅(31)
+						 * 研选扣点包(52)
+						*/
+					 	res.Data.ListRai[0].RaiMerge==1?res.Data.ListRai.forEach(item=> { // 合并
+						let checkedLen = item.Items.filter(it => item.CheckList && item.CheckList.includes(it.ChartPermissionId)).length
 						let obj = {
-							checkAll:item.CheckList&&item.CheckList.length===item.Items.length?true:false,
-							isIndeterminate:item.CheckList&&item.CheckList.length>0 && item.CheckList.length<item.Items.length,
+							checkAll:checkedLen === item.Items.length,
+							isIndeterminate:checkedLen > 0 && checkedLen < item.Items.length,
 							defaultAuth:item.CheckList,
 							...item,
 						}
@@ -1352,149 +1382,72 @@ export default {
 					}): res.Data.ListRai.forEach(item=> { // 拆分
 						let obj = {
 							defaultAuth:item.CheckList,
-							customType:'权益',
+							customType:item.ClassifyName,
 							...item,
 						}	
 						// 组合所需的数据格式
-						obj.dataList=[
-							{
-								PermissionTypeName:'',
-								medicine:{
-									value:'医药',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[1].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[1].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[1].ChartPermissionId].includes(id)).length ==2
-								},
-								consumption:{
-									value:'消费',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[2].ChartPermissionId,obj.Items[3].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[2].ChartPermissionId,obj.Items[3].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[2].ChartPermissionId,obj.Items[3].ChartPermissionId].includes(id)).length ==2
-								},
-								technology:{
-									value:'科技',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[4].ChartPermissionId,obj.Items[5].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[4].ChartPermissionId,obj.Items[5].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[4].ChartPermissionId,obj.Items[5].ChartPermissionId].includes(id)).length ==2
-								},
-								smart:{
-									value:'智造',
-									isIndeterminate:item.CheckList.filter(id => [obj.Items[6].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length ==1,
-									isCheckAll:item.CheckList.filter(id => [obj.Items[6].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length == 2,
-									isDisabled:item.CheckList.filter(id => [obj.Items[6].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length ==2
-								},
-								strategy:{
-									value:'策略'
-								},
-								experts:{
-									value:'专家'
-								},
-								roadshow:{
-									value:'路演服务'
-								},
-								choose:{
-									value:'研选订阅'
-								},
-								points:{
-									value:'研选扣点包'
-								},
-							},
-							{
-								PermissionTypeName:{
-									value:'主观',
-									isIndeterminate:[1,2,3].includes(item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[2].ChartPermissionId,
-										obj.Items[4].ChartPermissionId,obj.Items[6].ChartPermissionId].includes(id)).length),
-									isCheckAll:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[2].ChartPermissionId,
-										obj.Items[4].ChartPermissionId,obj.Items[6].ChartPermissionId].includes(id)).length == 4,
-									isDisabled:item.CheckList.filter(id => [obj.Items[0].ChartPermissionId,obj.Items[2].ChartPermissionId,
-										obj.Items[4].ChartPermissionId,obj.Items[6].ChartPermissionId].includes(id)).length ==4
-								},
-								medicine:{
-									value:obj.Items[0].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[0].ChartPermissionId)
-								},
-								consumption:{
-									value:obj.Items[2].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[2].ChartPermissionId)
-								},
-								technology:{
-									value:obj.Items[4].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[4].ChartPermissionId)
-								},
-								smart:{
-									value:obj.Items[6].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[6].ChartPermissionId)
-								},
-								strategy:{
-									value:obj.Items[8].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[8].ChartPermissionId)
-								},
-								experts:{
-									value:obj.Items[9].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[9].ChartPermissionId)
-								},
-								roadshow:{
-									value:obj.Items[10].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[10].ChartPermissionId)
-								},
-								choose:{
-									value:obj.Items[11].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[11].ChartPermissionId)
-								},
-								points:{
-									value:obj.Items[12].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[12].ChartPermissionId)
+						let subjectivityIds=item.Items.filter(it => it.PermissionType==1).map(it => it.ChartPermissionId)//主观的ids
+						let subjectivityLength=subjectivityIds.length//有几个主观的id
+						let subjectivityCheckedLen = item.CheckList.filter(id => subjectivityIds.includes(id)).length//选中的有几个主观的id
+						let objectivityIds=item.Items.filter(it => it.PermissionType==2).map(it => it.ChartPermissionId)//客观的ids
+						let objectivityCheckedLen = item.CheckList.filter(id => objectivityIds.includes(id)).length//有几个客观的id
+						let objectivityLength=objectivityIds.length//选中的有几个客观的id
+						let arr = [{PermissionTypeName:''},
+											{PermissionTypeName:{
+												value:'主观',
+												isIndeterminate:subjectivityCheckedLen>0 && subjectivityCheckedLen<subjectivityLength,
+												isCheckAll:subjectivityCheckedLen == subjectivityLength,
+												isDisabled:subjectivityCheckedLen == subjectivityLength,
+												ids:subjectivityIds
+											}},
+											{PermissionTypeName:{
+												value:'客观',
+												isIndeterminate:objectivityCheckedLen > 0 && objectivityCheckedLen < objectivityLength,
+												isCheckAll:objectivityCheckedLen == objectivityLength,
+												isDisabled:objectivityCheckedLen == objectivityLength,
+												ids:objectivityIds
+											}}]
+						item.Items.map(cp =>{
+							if(cp.PermissionType==0){
+								// 没有主客观的权限
+								arr[0][cp.PermissionName]={
+									value:cp.PermissionName,
+									width:cp.PermissionName=='研选扣点包'?'100px':'',
+									merge:true
+								}
+								arr[1][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId),
+									merge:true
 								}
-							},
-							{
-								PermissionTypeName:{
-									value:'客观',
-									isIndeterminate:[1,2,3].includes(item.CheckList.filter(id => [obj.Items[1].ChartPermissionId,obj.Items[3].ChartPermissionId,
-										obj.Items[5].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length),
-									isCheckAll:item.CheckList.filter(id => [obj.Items[1].ChartPermissionId,obj.Items[3].ChartPermissionId,
-										obj.Items[5].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length == 4,
-									isDisabled:item.CheckList.filter(id => [obj.Items[1].ChartPermissionId,obj.Items[3].ChartPermissionId,
-										obj.Items[5].ChartPermissionId,obj.Items[7].ChartPermissionId].includes(id)).length ==4
-								},
-								medicine:{
-									value:obj.Items[1].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[1].ChartPermissionId)
-								},
-								consumption:{
-									value:obj.Items[3].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[3].ChartPermissionId)
-								},
-								technology:{
-									value:obj.Items[5].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[5].ChartPermissionId)
-								},
-								smart:{
-									value:obj.Items[7].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[7].ChartPermissionId)
-								},
-								strategy:{
-									value:obj.Items[8].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[8].ChartPermissionId)
-								},
-								experts:{
-									value:obj.Items[9].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[9].ChartPermissionId)
-								},
-								roadshow:{
-									value:obj.Items[10].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[10].ChartPermissionId)
-								},
-								choose:{
-									value:obj.Items[11].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[11].ChartPermissionId)
-								},
-								points:{
-									value:obj.Items[12].ChartPermissionId,
-									isDisabled:item.CheckList.includes(obj.Items[12].ChartPermissionId)
+								arr[2][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId),
+									merge:true
+								}
+							}else if(cp.PermissionType==1){
+								// 找出对应的客观Id
+								let objectivity = item.Items.find(it => it.PermissionName == cp.PermissionName && it.PermissionType==2)
+								arr[0][cp.PermissionName]={
+									value:cp.PermissionName,
+									isIndeterminate:item.CheckList.filter(id => [cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0].includes(id)).length ==1,
+									isCheckAll:item.CheckList.filter(id => [cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0].includes(id)).length == 2,
+									isDisabled:item.CheckList.filter(id => [cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0].includes(id)).length ==2,
+									bothIds:[cp.ChartPermissionId,objectivity?objectivity.ChartPermissionId:0]
+								}
+								arr[1][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId)
+								}
+							}else{
+								// 分主客观的客观
+								arr[2][cp.PermissionName]={
+									value:cp.ChartPermissionId,
+									isDisabled:item.CheckList.includes(cp.ChartPermissionId)
 								}
 							}
-						]
-
+						})
+						obj.dataList=arr
 						auth.push(obj)
 					})
 					this.authList = auth;
@@ -1564,7 +1517,7 @@ export default {
 		btnList(btnItem,part){
 			const allBtnList=[]
 			for (const key in btnItem) {
-				btnItem[key]&&key!=='BtnClose' && allBtnList.push(key)
+				btnItem[key]&&key!=='BtnClose'&&key!=='BtnShare' && allBtnList.push(key)
 			}
 			if(part==='front'){
 				// 返回前三个按钮

+ 0 - 1
src/views/custom_manage/overseasList/overseasCustomList.vue

@@ -190,7 +190,6 @@
 
 <script>
 import { overseasCustomInterence} from '@/api/modules/overseasCustom.js'
-import {customInterence } from '@/api/api.js'
 import SelectSaleDialog from './components/selectSaleDialog';
 import TotalClicksDialog from './components/totalClicksDialog';
 import RoadShowsDialog from './components/roadShowsDialog';

+ 680 - 0
src/views/custom_manage/overseasList/overseasCustomRoadshow.vue

@@ -0,0 +1,680 @@
+<template>
+  <div class="overseas-custom-roadshow-box">
+    <div class="tab-box">
+      <el-button type="primary" :plain="roadshowTab==1?false:true" class="tab-item" @click="tabChange(1)">客户维度</el-button>
+      <el-button type="primary" :plain="roadshowTab==2?false:true" class="tab-item" @click="tabChange(2)">销售维度</el-button>
+      <el-button type="primary" :plain="roadshowTab==3?false:true" class="tab-item" @click="tabChange(3)">研究员维度</el-button>
+    </div>
+    <template v-if="roadshowTab==1">
+      <div class="top-wrapper">
+        <div class="left-select">
+        <el-cascader
+            v-model="sales"
+            :options="salesOptions"
+            :show-all-levels="false"
+            :props="{
+                expandTrigger: 'hover',
+                children: 'ChildrenList',
+                emitPath: false,
+                label:'RealName',
+                value:'AdminId',
+                multiple:true
+            }"
+            collapse-tags
+            filterable
+            clearable
+            placeholder="请选择销售"
+            @change="pageChange(1)"
+        />
+        <el-cascader
+            v-model="researchers"
+            :options="researchersOptions"
+            :show-all-levels="false"
+            :props="{
+                expandTrigger: 'hover',
+                children: 'ResearcherList',
+                emitPath: false,
+                label:'RealName',
+                value:'AdminId',
+                multiple:true
+            }"
+            collapse-tags
+            filterable
+            clearable
+            placeholder="请选择研究员"
+            @change="pageChange(1)"
+        />
+
+        <el-select 
+          v-model="status" 
+          placeholder="请选择客户状态"
+          @change="pageChange(1)"
+          multiple 
+          collapse-tags 
+          clearable
+        >
+            <el-option
+                v-for="item in statusOptions"
+                :key="item.val"
+                :label="item.label"
+                :value="item.val"
+            />
+        </el-select>
+
+        <date-picker 
+						v-model="date" 
+						type="date" 
+						range
+						value-type="format"
+						placeholder="请选择路演日期" 
+						@change="pageChange(1)" 
+						style="width:200px;margin-right:10px;margin-bottom:8px;"
+        />
+
+        </div>
+        <el-input 
+            prefix-icon="el-icon-search" 
+            placeholder="客户名称" 
+            style="width:317px;" clearable
+            v-model="searchWord"
+            @input="pageChange(1)"
+        />
+      </div>
+      <div class="cont-wrapper">
+        <el-table
+          ref="tableRef"
+          :data="tableData"
+          :loading="tabeLoading"
+          border
+          @sort-change="handleSortChange"
+        >
+          <el-table-column 
+              align="center"
+              v-for="item in columns" :key="item.key"
+              :prop="item.key" :label="item.label"
+              :min-width="item.minWidth"
+              :sortable="item.sortable?'custom':false"
+          >
+            <template slot-scope="{row}">
+                <!-- 客户名称 -->
+                <div v-if="item.key==='CompanyName'" class="editor" @click="toCustomDetail(row)">{{row[item.key]}}</div>
+
+                <span v-else>{{row[item.key]}}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <!-- 页数选择器 -->
+        <m-page
+          :page_no="currentIndex"
+          :pageSize="pageSize"
+          :total="total"
+          style="position: absolute;right: 50px;bottom: 50px;"
+          @handleCurrentChange="pageChange"
+        />
+      </div>
+    </template>
+    <template v-else-if="roadshowTab==2">
+      <ul class="date-tab-box">
+				<li :class="['date-tab-item',{'act':tab === salesDimension.dateTab}]" v-for="tab in staticTabs" :key="tab" @click="changeTabHandle(tab)">
+					{{tab}}
+				</li>
+        <date-picker
+          v-model="salesDimension.selectDate"
+          type="date" 
+          range
+          value-type="format"
+          :clearable="false"
+          @change="dateChange"
+          placeholder="请选择统计时间"/>
+			</ul>
+      <div class="table-body-wrapper" v-show="dataLoading">
+				<table>
+					<thead>
+						<tr>
+							<td rowspan="2" class="thead-rs" style="width: 100px;">销售</td>
+							<td
+								:colspan="['周度统计表','月度统计表'].includes(salesDimension.dateTab) ? 3 : 1"
+								v-for="item in salesDimension.tableTheadColumns" 
+								:key="item" 
+								class="head-column"
+							>
+								{{item}}
+							</td>	
+						</tr>
+						<tr v-if="['月度统计表','周度统计表'].includes(salesDimension.dateTab)">
+							<template v-for="(item,index) in new Array(6)">
+								<td :key="index+'_0'">试用</td>
+								<td :key="index+'_1'">正式</td>
+								<td :key="index+'_2'">关闭</td>
+							</template>
+						</tr>
+					</thead>
+					<tbody>
+            <tr v-for="item in salesDimension.datalist" :key="item.AdminId">
+              <td class="thead-rs">{{item.Name}}</td>
+              <td class="data-cell" v-for="(data,data_key) in item.dataArr" :key="data_key" @click="openDiaHandle(data)">
+                {{ data.value !== 0 ? data.value : '' }}
+              </td>
+            </tr>
+					</tbody>
+					<tfoot>
+						<tr>
+							<td>合计</td>
+							<td v-for="(total_data,total_data_key) in salesDimension.totalGroupArr" :key="total_data_key" 
+              class="data-cell" @click="openDiaHandle(total_data)">
+								{{ total_data.value !== 0 ? total_data.value : '' }}
+							</td>
+						</tr>
+					</tfoot>
+				</table>
+			</div>	
+    </template>
+    <template v-if="roadshowTab==3">
+      <ul class="date-tab-box">
+				<li :class="['date-tab-item',{'act':tab === researchersDimension.dateTab}]" v-for="tab in staticTabs" :key="tab" @click="changeTabHandle(tab)">
+					{{tab}}
+				</li>
+        <date-picker
+          v-model="researchersDimension.selectDate"
+          type="date" 
+          range
+          value-type="format"
+          :clearable="false"
+          @change="dateChange"
+          placeholder="请选择统计时间"/>
+			</ul>
+      <div class="table-body-wrapper" v-show="dataLoading">
+				<table>
+					<thead>
+						<tr>
+							<td rowspan="2" class="thead-rs" style="width: 100px;">研究员</td>
+							<td
+								:colspan="['周度统计表','月度统计表'].includes(researchersDimension.dateTab) ? 3 : 1"
+								v-for="item in researchersDimension.tableTheadColumns" 
+								:key="item" 
+								class="head-column"
+							>
+								{{item}}
+							</td>	
+						</tr>
+            <tr v-if="['月度统计表'].includes(researchersDimension.dateTab)">
+              <template v-for="(item,index) in new Array(4)">
+								<td :key="index+'_0'">试用</td>
+								<td :key="index+'_1'">正式</td>
+								<td :key="index+'_2'">关闭</td>
+              </template>
+            </tr>
+            <tr v-if="['周度统计表'].includes(researchersDimension.dateTab)">
+              <template v-for="(item,index) in new Array(3)">
+								<td :key="index+'_0'">试用</td>
+								<td :key="index+'_1'">正式</td>
+								<td :key="index+'_2'">关闭</td>
+              </template>
+            </tr>
+					</thead>
+					<tbody>
+            <tr v-for="item in researchersDimension.datalist" :key="item.AdminId">
+              <td class="thead-rs">{{item.Name}}</td>
+              <td class="data-cell" v-for="(data,data_key) in item.dataArr" :key="data_key" @click="openDiaHandle(data)">
+                {{ data.value !== 0 ? data.value : '' }}
+              </td>
+            </tr>
+					</tbody>
+					<tfoot>
+						<tr>
+							<td>合计</td>
+							<td v-for="(total_data,total_data_key) in researchersDimension.totalGroupArr" :key="total_data_key" 
+              class="data-cell" @click="openDiaHandle(total_data)">
+								{{ total_data.value !== 0 ? total_data.value : '' }}
+							</td>
+						</tr>
+					</tfoot>
+				</table>
+			</div>	
+    </template>
+
+    <!-- 详情弹窗 -->
+		<actiyityDetailDia
+			:isShow.sync="isShowDia"
+			:title="diaTitle"
+			:form="dialogForm"
+			:fromType="roadshowTab==2?'seller':'researcher'"
+      region="oversea"
+		/>
+  </div>
+</template>
+<script>
+import { overseasCustomInterence } from '@/api/modules/overseasCustom.js'
+import mPage from '@/components/mPage.vue'
+import actiyityDetailDia from '@/views/roadshow_manage/compononts/activityDetailDia';
+export default {
+  components: { mPage,actiyityDetailDia },
+  data() {
+    return {
+      tabeLoading: false,
+      tableData: [],
+      total: 0,
+      currentIndex: 1,
+      pageSize: 10,
+      columns: [
+        {  label: "客户名称",key: 'CompanyName',minWidth:200 },
+        {  label: "状态",key: 'CompanyStatus' },
+        {  label: "路演日期",key: 'StartDate',sortable:true },
+        {  label: "路演形式",key: 'RoadshowType' },
+        {  label: "路演平台/路演城市",key: 'RoadshowPlatform' },
+        {  label: "研究员",key: 'ResearcherName' },
+        {  label: "对接销售",key: 'SellerName' },
+      ],
+
+      sales: [],
+      researchers: [],
+      date:[],
+      searchWord: '',
+      status:[],
+      sortParams: {
+        SortField: '',
+        SortDesc: 1,
+      },
+
+      salesOptions: [],
+      researchersOptions: [],
+      statusOptions: [
+        { label: '正式', val: '正式' },
+        { label: '试用', val: '试用' },
+        { label: '关闭', val: '关闭' },
+      ],
+      roadshowTab:1,
+      staticTabs: [ '周度统计表','月度统计表','近1个月','近3个月','近6个月' ],
+      dataLoading:false,
+      // 销售维度
+      salesDimension:{
+        dateTab:"周度统计表",
+        selectDate:"",
+        tableTheadColumns:[],
+        datalist:[],//表格数据
+        totalGroupArr:[] //合计数据
+      },
+      // 研究员维度
+      researchersDimension:{
+        dateTab:"周度统计表",
+        selectDate:"",
+        tableTheadColumns:[],
+        datalist:[],//表格数据
+        totalGroupArr:[] //合计数据
+      },
+      // 详情弹窗
+      isShowDia:false,
+      diaTitle:'路演详情',
+      dialogForm:{}
+    }
+  },
+  mounted(){
+    this.getSellerList()
+    this.getResearchersList()
+    this.getTableData()
+  },
+  methods:{
+    //获取销售列表
+    async getSellerList() {
+      const res = await overseasCustomInterence.getOverseasRoadShowUsers({AdminType:'seller'})
+
+      if (res.Ret === 200) {
+        this.salesOptions = res.Data || [];
+      }
+    },
+
+    //获取研究员列表
+    async getResearchersList() {
+      // 发送请求
+      const res = await overseasCustomInterence.getOverseasRoadShowUsers({AdminType:'researcher'});
+      if (res.Ret === 200) {
+        this.researchersOptions = res.Data || [];
+      }
+    },
+
+    async getTableData() {
+      this.tabeLoading = true;
+      let params = {
+        ResearcherId: this.researchers.join(','),
+        SellerId: this.sales.join(','),
+        StartDate: this.date[0]||'',
+        EndDate: this.date[1]||'',
+        CompanyStatus: this.status.join(','),
+        CurrentIndex: this.currentIndex,
+        PageSize: this.pageSize,
+        Keyword: this.searchWord,
+        ...this.sortParams
+      }
+      const res = await overseasCustomInterence.getOverseasRoadShowList(params)
+
+      this.tabeLoading = false;
+
+      if(res.Ret!==200) return
+
+      this.tableData = res.Data.List || [];
+
+      this.total = res.Data.Paging.Totals;
+    },
+
+    handleSortChange({prop,order}) {
+      console.log(prop,order)
+      this.sortParams = {
+        SortField: order?prop:'',
+        SortDesc: order==='ascending'?2:1
+      }
+
+      this.pageChange(1)
+    },
+
+    pageChange(page) {
+      this.currentIndex = page;
+      this.getTableData()
+    },
+
+    toCustomDetail(data) {
+      const path = data.Source===1?'/detailCustomEn':'/customDetail'
+      const query = {
+          ...data.Source===1?{
+            companyId:data.CompanyId - 10000000
+          }:{
+              id:data.CompanyId
+          },
+          from:'overseas'
+      }
+      const href = this.$router.resolve({path,query}).href
+      window.open(href,"_blank")
+    },
+    /* 切换筛选 */
+    changeSelectOpts() {
+      
+    },
+    tabChange(tab){
+      if(this.roadshowTab==tab) return 
+      this.roadshowTab=tab
+      this.changeTabHandle('周度统计表')
+    },
+    /* 	获取几周前 周一周日日期 或前几月月份*/
+		getWeekOrMonthDate(weeknum,type='week') {
+			if(type === 'week') {
+				const weekStart = this.$moment().subtract(weeknum, 'week').startOf('isoWeek').format('YYYY.MM.DD'); //周一
+				const weekEnd = this.$moment().subtract(weeknum, 'week').endOf('isoWeek').format('YYYY.MM.DD'); //周日
+	
+				// console.log(weekStart,weekEnd)
+				return `${weekStart}~${weekEnd}`;
+			} else {
+				const month = this.$moment().subtract(weeknum,'M').format('YYYY.MM');
+				return month;
+			}
+		},
+    changeTabHandle(tab){
+      if(this.roadshowTab == 1){
+        return
+      }else if(this.roadshowTab == 2){
+        this.salesDimension.dateTab = tab;
+        switch(tab) {
+          case '周度统计表':
+            this.salesDimension.tableTheadColumns = [
+                `本周(${this.getWeekOrMonthDate(0)})`,
+                `上一周(${this.getWeekOrMonthDate(1)})`,
+                `上两周(${this.getWeekOrMonthDate(2)})`,
+                `上三周(${this.getWeekOrMonthDate(3)})`,
+                `上四周(${this.getWeekOrMonthDate(4)})`,
+                `上五周(${this.getWeekOrMonthDate(5)})`]
+            break;
+          case '月度统计表':
+            this.salesDimension.tableTheadColumns = [
+                this.getWeekOrMonthDate(0,'month'),
+                this.getWeekOrMonthDate(1,'month'),
+                this.getWeekOrMonthDate(2,'month'),
+                this.getWeekOrMonthDate(3,'month'),
+                this.getWeekOrMonthDate(4,'month'),
+                this.getWeekOrMonthDate(5,'month')]
+            break;
+          default:
+          this.salesDimension.tableTheadColumns = ['试用','正式','关闭']
+
+          break;
+        }
+      }else{
+        this.researchersDimension.dateTab = tab;
+        switch(tab) {
+          case '周度统计表':
+            this.researchersDimension.tableTheadColumns =  ['上一周','本周','下一周']
+            break;
+          case '月度统计表':
+            this.researchersDimension.tableTheadColumns = [
+              this.getWeekOrMonthDate(0,'month'),
+              this.getWeekOrMonthDate(1,'month'),
+              this.getWeekOrMonthDate(2,'month'),
+              this.getWeekOrMonthDate(3,'month'),
+            ]
+            break;
+          default:
+          this.researchersDimension.tableTheadColumns = ['试用','正式','关闭']
+          break;
+        }
+      }
+      this.$nextTick(()=>{
+        $('.table-body-wrapper')[0].scrollTop = 0;
+      })
+      let typeObj = {
+        '近1个月': 1,
+        '近3个月': 3,
+        '近6个月': 6,
+      };
+      typeObj[tab] ? this.filterDate(typeObj[tab]) : this.filterDate(0);
+
+      this.getData();
+    },
+    dateChange(){
+      if(this.roadshowTab==2){
+        this.salesDimension.dateTab = '';
+        this.salesDimension.tableTheadColumns = ['试用','正式','关闭'];
+      }else{
+        this.researchersDimension.dateTab = '';
+			  this.researchersDimension.tableTheadColumns = ['试用','正式','关闭'];
+      }
+
+			this.getData();
+    },
+    filterDate(month){
+      if(month) {
+				let date_before = this.$moment().subtract(month,'M').format("YYYY-MM-DD");
+				let date_now = this.$moment().format("YYYY-MM-DD");
+				let date = [date_before,date_now]
+				this.roadshowTab==2?(this.salesDimension.selectDate = date):(this.researchersDimension.selectDate = date);
+			}else {
+        this.roadshowTab==2?(this.salesDimension.selectDate = ''):(this.researchersDimension.selectDate = '');
+			}
+    },
+    // 销售维度、研究员维度
+    getData(){
+      let apiName=this.roadshowTab==2?"getOverseasSellerRoadShowList":"getOverseasResearcherRoadShowList"
+      let params=this.roadshowTab==2?{
+        DataType: this.salesDimension.dateTab === '周度统计表' ? 'week' : this.salesDimension.dateTab === '月度统计表' ? 'month' : 'time_interval',
+        StartDate: this.salesDimension.selectDate ? this.salesDimension.selectDate[0] : '',
+        EndDate: this.salesDimension.selectDate ? this.salesDimension.selectDate[1] : '',
+      }:{
+        DataType: this.researchersDimension.dateTab === '周度统计表' ? 'week' : this.researchersDimension.dateTab === '月度统计表' ? 'month' : 'time_interval',
+        StartDate: this.researchersDimension.selectDate ? this.researchersDimension.selectDate[0] : '',
+        EndDate: this.researchersDimension.selectDate ? this.researchersDimension.selectDate[1] : '',
+      }
+      this.dataLoading=false
+      overseasCustomInterence[apiName](params).then(res=>{
+        if(res.Ret == 200){
+          // console.log(res,'res');
+          const dataList=res.Data.List||[]
+          const totalGroupArr=res.Data.RsReportRecordNumList || []
+          dataList.forEach((da)=>{
+            da.dataArr = this.filterTableData(da.RsReportRecordNumList,[da.AdminId])
+          })
+          if(this.roadshowTab==2){
+            this.salesDimension.datalist=dataList
+            this.salesDimension.totalGroupArr=this.filterTableData(totalGroupArr,dataList.map(it => it.AdminId))
+          }else{
+            this.researchersDimension.datalist=dataList
+            this.researchersDimension.totalGroupArr=this.filterTableData(totalGroupArr,dataList.map(it => it.AdminId))
+          }
+          this.dataLoading=true
+        }
+      })
+
+    },
+    /* 处理数据结构 便于页面渲染 userid 时间用于弹窗获取列表*/
+		filterTableData(data,userid=[]) {
+			let list = data.map(item => ([
+        {
+					key: '试用',
+					value: item.TryOutNum,
+					startDate: item.StartDate,
+					endDate: item.EndDate,
+					userid
+				},
+        {
+					key: '正式',
+					value: item.FormalNum,
+					startDate: item.StartDate,
+					endDate: item.EndDate,
+					userid
+				},
+				{
+					key: '关闭',
+					value: item.CloseNum,
+					startDate: item.StartDate,
+					endDate: item.EndDate,
+					userid
+				}
+			]))
+			
+			return list.flat(Infinity);
+		},
+    openDiaHandle({ startDate,endDate,userid,value,key }){
+      if(value === 0) return;
+
+      this.dialogForm = {
+        startDate,
+        endDate,
+        userid,
+        key
+      }
+      this.isShowDia = true;
+    }
+  },
+}
+</script>
+<style scoped lang="scss">
+.overseas-custom-roadshow-box {
+    min-height: calc(100vh - 110px);
+    background-color: white;
+    border: 1px solid #ECECEC;
+    border-radius: 2px;
+    box-sizing: border-box;
+    padding: 20px 30px 30px 30px;
+    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
+    .tab-box{
+      margin-bottom: 20px;
+      display: flex;
+      align-items: center;
+      gap: 15px;
+      .tab-item{
+        min-width: 120px;
+        margin: 0;
+      }
+    }
+    .top-wrapper {
+      display: flex;
+      flex-wrap: wrap;
+      justify-content: space-between;
+    }
+    .cont-wrapper {
+      margin-top: 10px;
+      padding-bottom: 40px;
+    }
+    .editor{
+        color:#409EFF;
+        cursor: pointer;
+        &:hover{
+            text-decoration: underline;
+        }
+    }
+    .date-tab-box{
+      display: flex;
+			align-items: center;
+			color: #333;
+			margin-bottom: 30px;
+      gap: 20px;
+      .date-tab-item{
+        cursor: pointer;
+        &:hover {
+					color: #409EFF;
+				}
+				&.act {
+					color: #409EFF;
+					position: relative;
+					&::after {
+						content: "";
+						width: 100%;
+						height: 2px;
+						position: absolute;
+						bottom: -10px;
+						left: 50%;
+						transform: translateX(-50%);
+						background: #409EFF;
+					}
+				}
+      }
+    }
+    .table-body-wrapper {
+			max-height: calc(100vh - 300px);
+			margin-right: -6px;
+			overflow-y: scroll;
+			overflow-x: auto;
+			border-bottom: 1px solid #dcdfe6;
+			border-top: 1px solid #dcdfe6;
+		}
+
+		table {
+			width: 100%;
+			font-size: 14px;
+			color: #666;
+			thead{
+				position: sticky;
+				top: 0;
+				left: 0;
+				border-left: 1px solid #dcdfe6;
+				border-right: 1px solid #dcdfe6;
+				td{
+					border: none;
+					outline-color: #dcdfe6;
+					outline-style: solid;
+					outline-width: 0.5px;
+				}
+			}
+			td,
+			th {
+				min-width: 35px;
+				// word-break: break-all;
+				border: 1px solid #dcdfe6;
+				height: 45px;
+				text-align: center;
+				background-color: #fff;
+			}
+	
+			.head-column {
+				background-color: #F0F2F5;
+			}
+	
+			.data-cell{
+				color: #409EFF;
+				cursor: pointer;
+			}
+
+			.thead-sticky {
+				position: sticky;
+				top: 0;
+			}
+		}
+}
+</style>
+

+ 437 - 0
src/views/custom_manage/points/AddNewEntries.vue

@@ -0,0 +1,437 @@
+<template>
+  <div class="container add-new-entries">
+    <div class="container-top">
+      <span>客户名称</span>
+      <el-autocomplete v-model="companyName" :fetch-suggestions="querySearchAsync" style="width: 220px; margin: 0 20px" @select="selectCompanyChange" placeholder="请输入客户名称"></el-autocomplete>
+
+      <div class="quarters-content">
+        <el-checkbox-group v-model="selectedQuarters">
+          <el-checkbox v-for="quarter in quarters" :key="quarter.value" :label="quarter.label" :disabled="isDisabled(quarter)">
+            {{ quarter.label }}
+          </el-checkbox>
+        </el-checkbox-group>
+      </div>
+    </div>
+    <div v-if="Object.keys(EnterScoreObj).length > 0">
+      <div class="tabs-box">
+        <span v-for="item in listTitle" :key="item.value" @click="tabsBoxBtn(item)" :class="item.value == tabsPitchon ? 'pitch' : ''">{{ item.lable }}</span>
+      </div>
+      <template>
+        <p class="class-text">
+          权益研究员 <span style="font-weight: 600">{{ allPerCentNumble(raiDataHandler(), "rai") }}</span>
+          <span v-if="tabsPitchon == 2 && allPerCentNumble(raiDataHandler(), 'rai')">%</span>
+        </p>
+        <div class="content-box">
+          <div v-for="item in raiDataHandler()" :key="item.EnterScoreId">
+            <div :class="['industry-ul']">
+              <span :class="['industry-name']">{{ item.ChartPermissionName }}</span>
+              <span style="margin: 0 5px 0 8px; font-weight: 600">{{ allPerCentHandlerRai(item) }}</span>
+              <span v-if="tabsPitchon == 2 && item.Proportion">%</span>
+            </div>
+            <div v-for="study in item.List" :key="study.RealName" :class="['industry-ul']">
+              <span :class="['study-name']">{{ study.RealName }}</span>
+              <template>
+                <el-input :min="-100" :max="100" type="number" v-model="study.Proportion" size="small" @input="formatDecimal(study)" style="width: 76px; margin: 0 5px 0 8px"> </el-input>
+              </template>
+              <span v-if="tabsPitchon == 2">%</span>
+            </div>
+          </div>
+        </div>
+      </template>
+      <template>
+        <p class="class-text">
+          FICC研究员 <span style="font-weight: 600">{{ allPerCentNumble(FICCDataHandler(), "ficc") }}</span>
+          <span v-if="tabsPitchon == 2 && allPerCentNumble(FICCDataHandler(), 'ficc')">%</span>
+        </p>
+        <div class="content-box">
+          <div v-for="item in FICCDataHandler()" :key="item.EnterScoreId">
+            <div :class="['industry-ul']">
+              <span :class="['industry-name']">{{ item.ChartPermissionName }}</span>
+              <span style="margin: 0 5px 0 8px; font-weight: 600">{{ allPerCentHandlerFICC(item) }}</span>
+              <span v-if="tabsPitchon == 2 && item.Proportion">%</span>
+            </div>
+            <div v-for="study in item.List" :key="study.RealName" :class="['industry-ul']">
+              <span :class="['study-name']">{{ study.RealName }}</span>
+              <template>
+                <el-input :min="-100" :max="100" type="number" v-model="study.Proportion" size="small" @input="formatDecimal(study)" style="width: 76px; margin: 0 5px 0 8px"> </el-input>
+              </template>
+              <span v-if="tabsPitchon == 2">%</span>
+            </div>
+          </div>
+        </div>
+      </template>
+      <div class="division-line"></div>
+      <div class="content-box">
+        <div v-for="item in ProuDataHandler()" :key="item.GroupName">
+          <div :class="['industry-ul']">
+            <span :class="['industry-name']">{{ item.GroupName }}</span>
+            <el-input :min="-100" :max="100" type="number" v-model="item.Proportion" @input="formatDecimal(item)" size="small" style="width: 76px; margin: 0 5px 0 8px"> </el-input>
+            <span v-if="tabsPitchon == 2">%</span>
+          </div>
+        </div>
+      </div>
+      <div class="division-line"></div>
+      <div class="bottom-box">
+        排名
+        <el-input type="text" v-model="rankingValue" style="width: 110px; margin: 0 50px 0 8px" placeholder="请输入排名"> </el-input>
+        合并打分
+        <el-radio-group v-model="radioScoring" style="margin: 0 60px 0 8px">
+          <el-radio :label="0">否</el-radio>
+          <el-radio :label="1">是</el-radio>
+        </el-radio-group>
+        <template v-if="radioScoring == 1">
+          券商名称
+          <el-input type="text" v-model="brokerName" placeholder="请输入合并打分的券商名称" style="width: 230px; margin: 0 50px 0 8px"> </el-input>
+          合并占比
+          <el-input type="text" v-model="mergeProportion" placeholder="占比值" style="width: 76px; margin: 0 5px 0 8px"> </el-input>%
+        </template>
+      </div>
+      <p class="total-num" v-if="Object.keys(EnterScoreObj).length > 0">
+        当前合计总分:{{ TotalScoreHandler(ProuDataHandler()) }}
+        <span v-if="tabsPitchon == 2">%</span>
+      </p>
+      <div style="display: flex; justify-content: center">
+        <el-button type="primary" style="margin-right: 20px" @click="preserveHandler">{{ $route.query.id ? "修改并保存" : "保存" }}</el-button>
+        <el-button type="primary" plain @click="goBackHandler">取消</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import quartersMixin from "../customList/mixins/quartersMixin";
+import { xClassCustomApi, raiInterface } from "@/api/api.js";
+
+export default {
+  name: "",
+  components: {},
+  mixins: [quartersMixin],
+  props: {},
+  data() {
+    return {
+      listTitle: [
+        {
+          lable: "按评分录入",
+          value: 1,
+        },
+        {
+          lable: "按比例录入",
+          value: 2,
+        },
+      ],
+      tabsPitchon: 1, //tabs 默认选中
+      tmeplateObj: {},
+      EnterScoreObj: {},
+      PercentageObj: {},
+      rankingValue: "", // 排名
+      radioScoring: 0, // 合并打分
+      brokerName: "", //券商名称
+      mergeProportion: "",
+      querySearchList: [],
+      companyName: "",
+      companyId: 0,
+      totalScoreNumber: 0,
+    };
+  },
+  computed: {},
+  watch: {
+    companyName: {
+      handler(newVal) {
+        if (!this.companyName) {
+          this.companyId = 0;
+        }
+      },
+    },
+  },
+  created() {},
+  mounted() {
+    this.$route.query.id ? this.getCompanyDetail() : this.getDataTemplate();
+  },
+  methods: {
+    // 头部的点击事件
+    tabsBoxBtn(item) {
+      if (this.tabsPitchon == item.value) return;
+      this.tabsPitchon = item.value;
+      this.raiDataHandler();
+      this.FICCDataHandler();
+      this.ProuDataHandler();
+    },
+
+    /** */
+    /** */
+    allPerCentHandlerRai(item) {
+      return this.allPerCentHandler(item);
+    },
+    allPerCentHandlerFICC(item) {
+      return this.allPerCentHandler(item);
+    },
+    //数量的总和
+    allPerCentHandler(item) {
+      let num = 0;
+      item && item.List.forEach((key) => (num = num + +key.Proportion));
+      item.Proportion = Number(num.toFixed(2));
+      return num == 0 ? "" : num.toFixed(2);
+    },
+    /** */
+    /** */
+
+    // 处理小数点
+    formatDecimal(key) {
+      let value = key.Proportion;
+      if (value === "") return; // 如果为空则不处理
+      // 先清除非数字和多余的小数点
+      value = value
+        .replace(/[^\d.]/g, "")
+        .replace(/\.{2,}/g, ".")
+        .replace(".", "$#$")
+        .replace(/\./g, "")
+        .replace("$#$", ".");
+
+      // 限制只能输入两位小数
+      const decimalRegex = /^(\d+\.?\d{0,2})/;
+      const match = value.match(decimalRegex);
+
+      if (match) {
+        key.Proportion = match[1];
+        this.restrictInput(key);
+      } else {
+        key.Proportion = 0; // 如果不匹配正则,则清空输入框
+      }
+    },
+    // 输入框的限制
+    restrictInput(item) {
+      if (item.Proportion) if (item.Proportion > 100) return (item.Proportion = 100);
+      if (item.Proportion < -100) return (item.Proportion = -100);
+    },
+    // 切换了录入 权益
+    raiDataHandler() {
+      return this.tabsPitchon == 1 ? this.EnterScoreObj.ListRai : this.PercentageObj.ListRai;
+    },
+    // 切换了录入 FICC
+    FICCDataHandler() {
+      return this.tabsPitchon == 1 ? this.EnterScoreObj.ListFicc : this.PercentageObj.ListFicc;
+    },
+    // 切换了录入 分组
+    ProuDataHandler() {
+      return this.tabsPitchon == 1 ? this.EnterScoreObj.ListGroup : this.PercentageObj.ListGroup;
+    },
+
+    /** */
+    /** */
+    // 总和
+    allPerCentNumble(item, type) {
+      let num = 0;
+      item.forEach((item) => (num += item.Proportion));
+      type === "rai" ? (this.tmeplateObj.RaiProportionTotal = Number(num.toFixed(2))) : (this.tmeplateObj.FiccProportionTotal = Number(num.toFixed(2)));
+      return num == 0 ? "" : num.toFixed(2);
+    },
+    TotalScoreHandler(item) {
+      let num = 0;
+      item && item.forEach((item) => (num += Number(item.Proportion)));
+      this.totalScoreNumber = Number((num + this.tmeplateObj.RaiProportionTotal + this.tmeplateObj.FiccProportionTotal).toFixed(2));
+      return this.totalScoreNumber;
+    },
+    /** */
+    /** */
+
+    // 获取模板
+    async getDataTemplate() {
+      const res = await xClassCustomApi.enterScoreDetail();
+      if (res.Ret === 200) {
+        this.tmeplateObj = res.Data;
+        this.EnterScoreObj = res.Data.EnterScoreObj;
+        this.PercentageObj = res.Data.PercentageObj;
+      }
+    },
+
+    // 保存
+    async preserveHandler() {
+      let StartDate = this.selectedDateRange ? this.selectedDateRange.split(" ~ ")[0] : "";
+      let EndDate = this.selectedDateRange ? this.selectedDateRange.split(" ~ ")[1] : "";
+      let ListGroup = this.ProuDataHandler().map((item) => {
+        return {
+          ...item,
+          Proportion: Number(item.Proportion),
+        };
+      });
+      let ListRai = this.raiDataHandler().map((item) => ({
+        ...item,
+        List: item.List.map((subItem) => ({
+          ...subItem,
+          Proportion: Number(subItem.Proportion),
+        })),
+      }));
+      let ListFicc = this.FICCDataHandler().map((item) => ({
+        ...item,
+        List: item.List.map((subItem) => ({
+          ...subItem,
+          Proportion: Number(subItem.Proportion),
+        })),
+      }));
+      let params = {
+        EnterScoreId: this.$route.query.id ? +this.$route.query.id : 0, //录分ID,等于0新增,大于0 修改
+        CompanyId: this.companyId,
+        CompanyName: this.companyName,
+        Quarter: this.selectedQuarters,
+        StartDate,
+        EndDate,
+        EnterScoreType: this.tabsPitchon,
+        RaiProportionTotal: this.tmeplateObj.RaiProportionTotal,
+        FiccProportionTotal: this.tmeplateObj.FiccProportionTotal,
+        ListRai,
+        ListFicc,
+        ListGroup,
+        Ranking: this.rankingValue,
+        IsMergeScoring: this.radioScoring,
+        SecuritiesFirmsName: this.brokerName,
+        MergeProportion: this.mergeProportion ? +this.mergeProportion : 0,
+        ProportionTotal: this.totalScoreNumber,
+      };
+      if (!params.CompanyName || !params.CompanyId) return this.$message.error("请输入客户名称");
+      if (!params.Quarter.length) return this.$message.error("请选择季度");
+      const res = await xClassCustomApi.enterScoreUpdate(params);
+      if (res.Ret === 200) {
+        this.$message.success(res.Msg);
+        this.$router.back();
+      }
+    },
+    //  获取详情
+    async getCompanyDetail() {
+      const res = await xClassCustomApi.enterScoreDetail({
+        EnterScoreId: +this.$route.query.id,
+      });
+      if (res.Ret === 200) {
+        this.tmeplateObj = res.Data;
+        this.EnterScoreObj = res.Data.EnterScoreObj;
+        this.PercentageObj = res.Data.PercentageObj;
+        this.rankingValue = res.Data.Ranking;
+        this.radioScoring = res.Data.IsMergeScoring;
+        this.brokerName = res.Data.SecuritiesFirmsName;
+        this.mergeProportion = res.Data.MergeProportion;
+        this.selectedQuarters = res.Data.Quarter;
+        this.companyId = res.Data.CompanyId;
+        this.companyName = res.Data.CompanyName;
+        this.tabsPitchon = res.Data.EnterScoreType;
+      }
+    },
+    //
+    async querySearchAsync(query, cb) {
+      cb([]);
+      if (query) {
+        const res = await xClassCustomApi.enterScoreSearchlist({ KeyWord: query });
+        if (res.Ret === 200) {
+          this.querySearchList = res.Data.List.map((_) => {
+            return {
+              ..._,
+              value: _.CompanyName,
+            };
+          });
+          cb(this.querySearchList);
+        }
+      }
+    },
+    // 选择后客户名称的id
+    selectCompanyChange(value) {
+      this.companyId = value.CompanyId;
+    },
+    // 返回事件
+    goBackHandler() {
+      this.$router.back();
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.add-new-entries {
+  .container-top {
+    display: flex;
+    align-items: center;
+  }
+  .class-text {
+    margin-top: 20px;
+    width: 100%;
+    height: 38px;
+    line-height: 32px;
+    padding-left: 20px;
+    background-color: #ebeef5;
+  }
+  .tabs-box {
+    margin-top: 20px;
+    span {
+      display: inline-block;
+      padding: 9px 24px;
+      background-color: #e9f4ff;
+      border: 1px solid #b3d8ff;
+      border-radius: 4px;
+      margin-right: 30px;
+      color: #409eff;
+      cursor: pointer;
+    }
+    .pitch {
+      background-color: #409eff;
+      border: none;
+      color: #fff;
+    }
+  }
+  .content-box {
+    width: 100%;
+    overflow: hidden;
+    overflow-x: auto;
+    display: flex;
+    .industry-ul {
+      display: flex;
+      align-items: center;
+      margin: 10px 0;
+      width: 188px;
+      color: #333;
+      margin-right: 25px;
+      .per_cent_ {
+        line-height: 32px;
+      }
+      .industry-name {
+        flex-shrink: 0;
+        font-weight: 800;
+        font-size: 16px;
+        line-height: 22px;
+      }
+      .study-name {
+        width: 58px;
+        flex-shrink: 0;
+        font-size: 14px;
+        line-height: 22px;
+      }
+      p {
+        color: #9999;
+        font-size: 14px;
+      }
+    }
+  }
+  .division-line {
+    width: 100%;
+    border: 1px dashed #dcdfe6;
+    margin: 30px 0 20px;
+  }
+  .bottom-box {
+    display: flex;
+    align-items: center;
+  }
+
+  .total-num {
+    margin: 30px 0 20px 0;
+    padding-left: 460px;
+  }
+}
+</style>
+<style>
+/* 针对于 Chrome、Safari 等 Webkit 内核浏览器 */
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+  -webkit-appearance: none;
+  margin: 0;
+}
+
+/* 针对 Firefox 浏览器 */
+input[type="number"] {
+  -moz-appearance: textfield;
+}
+</style>

+ 231 - 0
src/views/custom_manage/points/EntryRecords.vue

@@ -0,0 +1,231 @@
+<template>
+  <div class="container entry-records-points">
+    <div>
+      <el-autocomplete
+        v-model="companyName"
+        :fetch-suggestions="querySearchAsync"
+        style="width: 220px; margin-right: 20px"
+        @select="selectCompanyChange"
+        clearable
+        placeholder="请输入公司名称"
+        @clear="clearCompanyHandleSearch"
+      >
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
+      </el-autocomplete>
+      <el-cascader
+        v-model="sales"
+        placeholder="请选择销售"
+        style="width: 200px; margin-right: 20px"
+        :options="salesArr"
+        :props="defaultSalesProps"
+        :show-all-levels="false"
+        collapse-tags
+        clearable
+        filterable
+        @change="companyHandleSearch"
+      >
+      </el-cascader>
+      <el-button type="primary" @click="$router.push('AddNewEntries')"> 新增</el-button>
+      <a :href="exportUser" download>
+        <el-button type="primary" style="width: 80px;margin-left:15px">导出</el-button>
+      </a>
+    </div>
+
+    <div style="margin-top: 20px">
+      <el-table :data="tableData" style="width: 100%" border>
+        <el-table-column align="center" prop="CompanyName" label="客户名称"> </el-table-column>
+        <el-table-column align="center" prop="SellerName" label="销售" width="100"> </el-table-column>
+        <el-table-column align="center" prop="Quarter" label="季度" width="180">
+          <template slot-scope="{ row }">
+            <span>{{ row.Quarter.join(",") }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="ProportionTotal" label="总分" width="100">
+          <template slot-scope="{ row }">
+            <span>{{ row.ProportionTotal }}{{ row.EnterScoreType == 2 ? "%" : "" }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="Ranking" label="排名" width="100"> </el-table-column>
+        <el-table-column align="center" prop="IsMergeScoring" label="合并打分" width="80">
+          <template slot-scope="{ row }">
+            <span>{{ row.IsMergeScoring == 1 ? "是" : "否" }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="SecuritiesFirmsName" label="券商名称"> </el-table-column>
+        <el-table-column align="center" prop="CreateTime" label="首次录入时间" width="180"> </el-table-column>
+        <el-table-column align="center" prop="ModifyTime" label="最近更新时间" width="180"> </el-table-column>
+        <el-table-column align="center" prop="name" label="操作" width="180">
+          <template slot-scope="{ row }">
+            <span class="editsty" @click="lookHandler(row)">查看明细</span>
+            <span class="deletesty" @click="deleteHandle(row)">删除</span>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import { customInterence, xClassCustomApi } from "@/api/api.js";
+export default {
+  name: "EntryRecords",
+  props: {
+    searchVal: {
+      type: String,
+      default: "",
+    },
+  },
+  computed: {
+    exportUser() {
+      let baseUrl = process.env.API_ROOT + "/cygx/enterScore/list";
+      let token = localStorage.getItem("auth") || "";
+      let salesArr = [];
+      if (this.sales.length) {
+        salesArr = this.sales.map((item) => {
+          return item[item.length - 1];
+        });
+      }
+      let paramStr = "";
+      let params = {
+        PageSize: this.pageSize,
+        CurrentIndex: this.page_no,
+        KeyWord: this.companyName,
+        AdminId: salesArr.join(","),
+        IsExport: true,
+      };
+      for (let key in params) {
+        paramStr = `${paramStr}&${key}=${params[key]}`;
+      }
+      return `${baseUrl}?${token}${paramStr}`;
+    },
+  },
+  data() {
+    return {
+      page_no: 1,
+      pageSize: 10,
+      total: 1,
+      tableData: [],
+      companyName: "",
+      sales: "",
+      salesArr: [], //销售
+      defaultSalesProps: {
+        multiple: true,
+        label: "RealName",
+        children: "ChildrenList",
+        value: "AdminId",
+      }, //销售级联配置
+    };
+  },
+  watch: {
+    searchVal() {
+      this.getDataList();
+    },
+  },
+  mounted() {
+    this.getSale();
+    this.getDataList();
+  },
+  methods: {
+    // 公司名称
+    companyHandleSearch(value) {
+      this.page_no = 1;
+      this.getDataList();
+    },
+    /* 获取销售 */
+    getSale() {
+      let status = 0;
+      if (this.act_status == "流失") {
+        status = 1;
+      }
+      customInterence.getSale({ Status: status }).then((res) => {
+        if (res.Ret === 200) {
+          this.salesArr = res.Data.List;
+        }
+      });
+    },
+    // 获取列表信息
+    async getDataList() {
+      let salesArr = [];
+      if (this.sales.length) {
+        salesArr = this.sales.map((item) => {
+          return item[item.length - 1];
+        });
+      }
+      const res = await xClassCustomApi.enterScoreList({
+        PageSize: this.pageSize,
+        CurrentIndex: this.page_no,
+        KeyWord: this.companyName,
+        AdminId: salesArr.join(","),
+      });
+      if (res.Ret === 200) {
+        this.total = res.Data.Paging.Totals;
+        this.tableData = res.Data.List;
+      }
+    },
+    // 删除
+    deleteHandle(item) {
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const res = await xClassCustomApi.enterScoreDelete({
+            EnterScoreId: item.EnterScoreId,
+          });
+          if (res.Ret === 200) {
+            this.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+            this.getDataList();
+          }
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    // 查看
+    lookHandler(item) {
+      this.$router.push({
+        path: "/EditNewEntries",
+        query: { id: item.EnterScoreId },
+      });
+    },
+    //
+    async querySearchAsync(query, cb) {
+      cb([]);
+      if (query) {
+        const res = await xClassCustomApi.enterScoreSearchlist({ KeyWord: query });
+        if (res.Ret === 200) {
+          this.querySearchList = res.Data.List.map((_) => {
+            return {
+              ..._,
+              value: _.CompanyName,
+            };
+          });
+          cb(this.querySearchList);
+        }
+      }
+    },
+    // 选择后客户名称的id
+    selectCompanyChange(value) {
+      this.companyId = value.CompanyId;
+      this.page_no = 1;
+      this.getDataList();
+    },
+    clearCompanyHandleSearch() {
+      this.companyId = "";
+      this.page_no = 1;
+      this.getDataList();
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+// .entry-records-points {
+// }
+</style>

+ 211 - 0
src/views/custom_manage/points/RankingOverview.vue

@@ -0,0 +1,211 @@
+<template>
+  <div class="container ranking-overview-content">
+    <div class="select-box">
+      <el-cascader
+        v-model="sales"
+        placeholder="请选择销售"
+        style="width: 220px"
+        :options="salesArr"
+        :props="defaultSalesProps"
+        :show-all-levels="false"
+        collapse-tags
+        clearable
+        filterable
+        @change="changeHandle"
+      >
+      </el-cascader>
+      <el-select style="width: 220px; margin: 0 20px" v-model="valueLocation" multiple placeholder="请选择城市" @change="changeHandle">
+        <el-option v-for="item in locationOptions" :key="item.name" :label="item.name" :value="item.name"> </el-option>
+      </el-select>
+      <a :href="exportUser" download>
+        <el-button type="primary" style="width: 80px">导出</el-button>
+      </a>
+    </div>
+    <div class="table-cont">
+      <template v-if="tableTheadColumns.length">
+        <table class="thead-sticky thead-box">
+          <thead>
+            <tr>
+              <td class="'head-column'"></td>
+              <td v-for="item in tableTheadColumns" :key="item" :class="['head-column']">
+                {{ item.CompanyName }}
+              </td>
+            </tr>
+          </thead>
+          <tbody v-for="(item, index) in datalist" :key="index">
+            <tr>
+              <td class="thead-rs">{{ item.Quarter }}</td>
+              <td v-for="key in item.ProportionListText" :key="key">{{ key }}</td>
+            </tr>
+          </tbody>
+        </table>
+        <template v-if="!datalist.length"> <div class="not-text">暂无数据</div> </template>
+      </template>
+      <template v-else> <div class="not-text">暂无数据</div> </template>
+    </div>
+  </div>
+</template>
+
+<script>
+import { customInterence, xClassCustomApi } from "@/api/api.js";
+
+export default {
+  name: "",
+  components: {},
+  props: {},
+  data() {
+    return {
+      sales: "",
+      salesArr: [], //销售
+      defaultSalesProps: {
+        multiple: true,
+        label: "RealName",
+        children: "ChildrenList",
+        value: "AdminId",
+      }, //销售级联配置
+      valueLocation: [], //地址
+      tableTheadColumns: [],
+      datalist: [],
+      listGroup: [],
+      locationOptions: [{ name: "北京市" }, { name: "上海市" }, { name: "深圳市" }],
+    };
+  },
+  computed: {
+    exportUser() {
+      let baseUrl = process.env.API_ROOT + "/cygx/enterScore/rankingOverview";
+      let token = localStorage.getItem("auth") || "";
+      let paramStr = "";
+      let params = this.paramsHandler();
+      params.IsExport = true;
+      for (let key in params) {
+        paramStr = `${paramStr}&${key}=${params[key]}`;
+      }
+      return `${baseUrl}?${token}${paramStr}`;
+    },
+  },
+  watch: {},
+  created() {},
+  mounted() {
+    this.getSale();
+    this.getDataList();
+  },
+  methods: {
+    /* 获取销售 */
+    getSale() {
+      let status = 0;
+      if (this.act_status == "流失") {
+        status = 1;
+      }
+      customInterence.getSale({ Status: status }).then((res) => {
+        if (res.Ret === 200) {
+          this.salesArr = res.Data.List;
+        }
+      });
+    },
+    async getDataList() {
+      let params = this.paramsHandler();
+      const res = await xClassCustomApi.enterScoreRankingOverview(params);
+      if (res.Ret === 200) {
+        this.tableTheadColumns = res.Data.ListCompany || [];
+        this.datalist = res.Data.ListQuarterDate || [];
+      }
+    },
+    // 处理数据, 获取数据
+    paramsHandler() {
+      let salesArr = [];
+      if (this.sales.length) {
+        salesArr = this.sales.map((item) => {
+          return item[item.length - 1];
+        });
+      }
+      let params = {
+        City: this.valueLocation.join(","),
+        AdminId: salesArr.join(","),
+      };
+      return params;
+    },
+    changeHandle() {
+      this.getDataList();
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.ranking-overview-content {
+  .select-box {
+    display: flex;
+  }
+
+  .top-select {
+    display: flex;
+    justify-content: space-between;
+  }
+  .select-box {
+    display: flex;
+    margin-bottom: 30px;
+  }
+  .table-cont {
+    overflow: auto;
+    max-height: calc(100vh - 400px);
+    table {
+      font-size: 14px;
+      color: #666;
+      thead {
+        position: sticky;
+        top: 0;
+        left: 0;
+        border-left: 1px solid #dcdfe6;
+        border-right: 1px solid #dcdfe6;
+        td,
+        th {
+          min-width: 100px;
+          word-break: break-all;
+          border: 1px solid #dcdfe6;
+          outline-color: #dcdfe6;
+          outline-style: solid;
+          outline-width: 0.5px;
+        }
+      }
+      td,
+      th {
+        min-width: 100px;
+        word-break: break-all;
+        border: 1px solid #dcdfe6;
+        height: 45px;
+        text-align: center;
+        background-color: #fff;
+      }
+
+      .head-column {
+        background-color: #f0f2f5;
+      }
+
+      .data-cell {
+        color: #409eff;
+        cursor: pointer;
+      }
+
+      .thead-sticky {
+        position: sticky;
+        top: 0;
+      }
+    }
+    .content-ul {
+      .association {
+        color: #409eff;
+        cursor: pointer;
+      }
+    }
+  }
+  .not-text {
+    height: 300px;
+    line-height: 300px;
+    text-align: center;
+  }
+  .thead-box {
+    position: sticky;
+    top: 0;
+    z-index: 9;
+  }
+}
+</style>

+ 258 - 0
src/views/custom_manage/points/RatingOverview.vue

@@ -0,0 +1,258 @@
+<template>
+  <div class="container rating-overview-content">
+    <div class="top-select">
+      <div class="select-box">
+        <el-date-picker style="width: 220px" v-model="yearValue" value-format="yyyy" type="year" placeholder="请选择年份" :clearable="false" @change="changeHandle"> </el-date-picker>
+        <el-select style="width: 220px; margin: 0 20px" v-model="selectedQuarter" placeholder="请选择季度" @change="changeHandle">
+          <el-option v-for="item in quarterOptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
+        </el-select>
+        <el-input style="width: 220px" placeholder="请输入券商名称" prefix-icon="el-icon-search" v-model="brokerName" @input="inputHandle"> </el-input>
+        <el-select style="width: 220px; margin: 0 20px" v-model="valueLocation" multiple placeholder="请选择城市" @change="changeHandle">
+          <el-option v-for="item in locationOptions" :key="item.name" :label="item.name" :value="item.name"> </el-option>
+        </el-select>
+        <a :href="exportUser" download>
+          <el-button type="primary" style="width: 80px">导出</el-button>
+        </a>
+      </div>
+      <div>
+        <el-button @click="enterScoreType = !enterScoreType" type="primary">{{ enterScoreType ? "原始值显示" : "百分比显示" }} </el-button>
+      </div>
+    </div>
+
+    <div class="table-cont">
+      <template v-if="tableTheadColumns.length">
+        <table class="thead-sticky thead-box">
+          <thead>
+            <tr>
+              <td class="'head-column'"></td>
+              <td v-for="item in tableTheadColumns" :key="item" :class="['head-column']">
+                {{ item.CompanyName }}
+              </td>
+            </tr>
+          </thead>
+          <tbody v-for="(item, index) in datalist" :key="index">
+            <tr>
+              <td class="thead-rs">{{ item.ChartPermissionName }}</td>
+              <td v-for="key in item.ProportionListText" :key="key">{{ key }}</td>
+            </tr>
+            <tr v-for="rs in item.List" :key="rs.RealName" class="content-ul">
+              <td>{{ rs.RealName }}</td>
+              <td v-for="pr in rs.ProportionListText" :key="pr">{{ pr }}</td>
+            </tr>
+          </tbody>
+          <tbody v-for="(item, index) in listGroup" :key="index">
+            <tr>
+              <td class="thead-rs">{{ item.GroupName }}</td>
+              <td v-for="key in item.ProportionListText" :key="key">{{ key }}</td>
+            </tr>
+          </tbody>
+        </table>
+        <template v-if="!datalist.length && !listGroup.length"> <div class="not-text">暂无数据</div> </template>
+      </template>
+      <template v-else> <div class="not-text">暂无数据</div> </template>
+    </div>
+  </div>
+</template>
+
+<script>
+import { customInterence, xClassCustomApi } from "@/api/api.js";
+
+export default {
+  name: "",
+  components: {},
+  props: {},
+  data() {
+    return {
+      yearValue: new Date().getFullYear().toString(), // 年份
+      selectedQuarter: [], // 季度
+      quarterOptions: [
+        {
+          label: "Q1",
+          value: ["01-01", "03-31"],
+        },
+        {
+          label: "Q2",
+          value: ["04-01", "06-30"],
+        },
+        {
+          label: "Q3",
+          value: ["07-01", "09-30"],
+        },
+        {
+          label: "Q4",
+          value: ["10-01", "12-31"],
+        },
+      ],
+      brokerName: "", // 券商名
+      valueLocation: [], //地址
+      tableTheadColumns: [],
+      datalist: [],
+      listGroup: [],
+      enterScoreType: false,
+      locationOptions: [{ name: "北京市" }, { name: "上海市" }, { name: "深圳市" }],
+    };
+  },
+  computed: {
+    exportUser() {
+      let baseUrl = process.env.API_ROOT + "/cygx/enterScore/scoreOverview";
+      let token = localStorage.getItem("auth") || "";
+      const cityArr = [];
+      let paramStr = "";
+      let params = this.paramsHandler();
+      params.IsExport = true;
+      for (let key in params) {
+        paramStr = `${paramStr}&${key}=${params[key]}`;
+      }
+      return `${baseUrl}?${token}${paramStr}`;
+    },
+  },
+  watch: {
+    enterScoreType: {
+      handler() {
+        this.getDataList();
+      },
+    },
+  },
+  mounted() {
+    this.setDefaultQuarter();
+
+    this.getDataList();
+  },
+  methods: {
+    setDefaultQuarter() {
+      const currentDate = new Date();
+      const month = currentDate.getMonth() + 1; // 获取当前月份(0-11,所以加1)
+
+      let currentQuarterIndex;
+      if (month >= 1 && month <= 3) {
+        // Q1
+        currentQuarterIndex = 0;
+      } else if (month >= 4 && month <= 6) {
+        // Q2
+        currentQuarterIndex = 1;
+      } else if (month >= 7 && month <= 9) {
+        // Q3
+        currentQuarterIndex = 2;
+      } else if (month >= 10 && month <= 12) {
+        // Q4
+        currentQuarterIndex = 3;
+      }
+
+      // 获取上一个季度索引
+      const previousQuarterIndex = currentQuarterIndex === 0 ? this.quarterOptions.length - 1 : currentQuarterIndex - 1;
+
+      // 设置v-model绑定的值为上一个季度的value数组
+      this.selectedQuarter = this.quarterOptions[previousQuarterIndex].value;
+    },
+
+    getPreviousYear(currentYear, currentQuarter) {
+      // 如果当前季度是第一个季度,则上个季度应该是去年的最后一个季度
+      return currentQuarter === "Q1" ? currentYear - 1 : currentYear;
+    },
+    changeHandle() {
+      this.getDataList();
+    },
+    inputHandle: _.debounce(async function () {
+      this.getDataList();
+    }, 500),
+    async getDataList() {
+      this.tableTheadColumns = [];
+      this.datalist = [];
+      this.listGroup = [];
+      let params = this.paramsHandler();
+      const res = await xClassCustomApi.enterScoreScoreOverview(params);
+      if (res.Ret === 200) {
+        this.tableTheadColumns = res.Data.ListCompany || [];
+        this.datalist = res.Data.ListPermission || [];
+        this.listGroup = res.Data.ListGroup || [];
+      }
+    },
+    // 处理数据, 获取数据
+    paramsHandler() {
+      let params = {
+        StartDate: this.yearValue + "-" + this.selectedQuarter[0],
+        EndDate: this.yearValue + "-" + this.selectedQuarter[1],
+        KeyWord: this.brokerName,
+        City: this.valueLocation.join(","),
+        EnterScoreType: this.enterScoreType ? 2 : 1,
+      };
+      return params;
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.rating-overview-content {
+  .top-select {
+    display: flex;
+    justify-content: space-between;
+  }
+  .select-box {
+    display: flex;
+    margin-bottom: 30px;
+  }
+  .table-cont {
+    max-height: calc(100vh - 400px);
+    overflow: auto;
+    table {
+      font-size: 14px;
+      color: #666;
+      thead {
+        position: sticky;
+        top: 0;
+        left: 0;
+        border-left: 1px solid #dcdfe6;
+        border-right: 1px solid #dcdfe6;
+        td,
+        th {
+          min-width: 100px;
+          word-break: break-all;
+          border: 1px solid #dcdfe6;
+          outline-color: #dcdfe6;
+          outline-style: solid;
+          outline-width: 0.5px;
+        }
+      }
+      td,
+      th {
+        min-width: 100px;
+        word-break: break-all;
+        border: 1px solid #dcdfe6;
+        height: 45px;
+        text-align: center;
+        background-color: #fff;
+      }
+
+      .head-column {
+        background-color: #f0f2f5;
+      }
+
+      .data-cell {
+        color: #409eff;
+        cursor: pointer;
+      }
+
+      .thead-sticky {
+        position: sticky;
+        top: 0;
+      }
+    }
+    .content-ul {
+      .association {
+        color: #409eff;
+        cursor: pointer;
+      }
+    }
+  }
+  .not-text {
+    height: 300px;
+    line-height: 300px;
+    text-align: center;
+  }
+  .thead-box {
+    position: sticky;
+    top: 0;
+    z-index: 9;
+  }
+}
+</style>

+ 85 - 0
src/views/custom_manage/points/XClassCustom.vue

@@ -0,0 +1,85 @@
+<template>
+  <div class="container x-class-custom-content">
+    <el-card>
+      <div class="top-card-box">
+        <div class="tabs-box">
+          <span v-for="item in listTitle" :key="item.value" @click="tabsBoxBtn(item)" :class="item.value == tabsPitchon ? 'pitch' : ''">{{ item.lable }}</span>
+        </div>
+      </div>
+    </el-card>
+    <el-card style="margin-top: 20px">
+      <EntryRecords v-if="tabsPitchon == 1" />
+      <RatingOverview v-if="tabsPitchon == 2" />
+      <RankingOverview v-if="tabsPitchon == 3" />
+    </el-card>
+  </div>
+</template>
+
+<script>
+import EntryRecords from "./EntryRecords.vue"; // 录分
+import RatingOverview from "./RatingOverview.vue"; // 评分
+import RankingOverview from "./RankingOverview.vue"; // 排名
+export default {
+  name: "",
+  components: { EntryRecords, RatingOverview, RankingOverview },
+  props: {},
+  data() {
+    return {
+      listTitle: [
+        {
+          lable: "录分记录",
+          value: "1",
+        },
+        {
+          lable: "评分总览",
+          value: "2",
+        },
+        {
+          lable: "排名总览",
+          value: "3",
+        },
+      ],
+      tabsPitchon: 1, //tabs 默认选中
+    };
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {
+    // 头部的点击事件
+    tabsBoxBtn(item) {
+      this.tabsPitchon = item.value;
+    },
+    // 输入框搜索事件
+    handleSearch() {
+      // this.$refs.recordRefs
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.x-class-custom-content {
+  .top-card-box {
+    display: flex;
+    justify-content: space-between;
+    .tabs-box {
+      span {
+        display: inline-block;
+        padding: 9px 24px;
+        background-color: #e9f4ff;
+        border: 1px solid #b3d8ff;
+        border-radius: 4px;
+        margin-right: 30px;
+        color: #409eff;
+        cursor: pointer;
+      }
+      .pitch {
+        background-color: #409eff;
+        border: none;
+        color: #fff;
+      }
+    }
+  }
+}
+</style>

+ 38 - 3
src/views/dataReport_manage/statistic/newCustomlist.vue

@@ -15,7 +15,7 @@
 				:min-width="item.minwidthsty"
 				:prop="item.key"
 				align="center"
-				:sortable="['viewTotal','RoadShowTotal','LastViewTime','ExpireDay','createTime'].includes(item.key) ? 'custom' : false"
+				:sortable="sortableCheck(item.key)"
 			>
 				<template slot-scope="{row}">
 
@@ -80,6 +80,7 @@
 				sortable="custom"
 				align="center" 
 				min-width="120"
+				v-if="!isRenewalException"
 			>
 				<template slot-scope="scope">
 					<span>
@@ -92,9 +93,29 @@
 					</span> 
 				</template>
 			</el-table-column>
-			<el-table-column label="操作" align="center">
+			<el-table-column
+				prop="ServiceYears"
+				sortable="custom"
+				align="center" 
+				min-width="120"
+				v-else
+			>
+				<template slot="header" slot-scope="scope">
+					<el-tooltip content="客户年限=(当前年月日-首签合同开始年月日)/365,结果进行四舍五入,保存一位小数" placement="top">
+						<div style="display: inline-flex;align-items: center;">
+							<span style="margin-right: 4px;">客户年限</span>
+							<i class="el-icon-info" style="color: #333333;"/>
+						</div>
+					</el-tooltip>
+				</template>
+				<template slot-scope="scope">
+					<span>{{scope.row.ServiceYears}}</span> 
+				</template>
+			</el-table-column>
+			<el-table-column label="操作" align="center" prop="LatestServiceRecord" :sortable="isRenewalException?'custom':false">
 				<span slot-scope="scope">
 					<el-button type="text" @click="handleShowShareRecode(scope.row,'list')">沟通记录</el-button>
+					<span style="white-space: nowrap;" v-if="isRenewalException">{{ scope.row.LatestServiceRecord }}</span>
 				</span>
 			</el-table-column>
 			<div slot="empty" style="lineHeight:44px;margin:60px 0;color:#999;">
@@ -106,6 +127,7 @@
 			<m-page
 				:total="total"
 				:page_no="page_no"
+				:pageSize="pageSize"
 				@handleCurrentChange="handleCurrentChange"
 			/>
 		</div>
@@ -205,6 +227,10 @@ export default {
 		Role() {
 			return localStorage.getItem('Role');
 		},
+		// 是否是续约异常
+		isRenewalException(){
+			return this.$route.path=="/abnormalRenewalCustomlist"
+		},
 		tableColumnsComputed(){
 			// 分配销售 续约统计和续约异常统计需要显示
 			let hasDistributionSales = this.Role.indexOf('rai')==-1 && 
@@ -244,6 +270,10 @@ export default {
 			this.getTableData();
 		},
 
+		sortableCheck(key){
+			return ( ['viewTotal','RoadShowTotal','LastViewTime','ExpireDay','createTime'].includes(key) ||
+							(['ShareSeller','SellerName','Status'].includes(key) && this.isRenewalException) ) ? 'custom' : false
+		},
 		/* 排序变化时 */
 		sortChangeHandle({ prop,order }) {
 			console.log(prop,order)
@@ -253,6 +283,11 @@ export default {
 				'RoadShowTotal': 'roadShowTotal',
 				'LastViewTime': 'viewTime',
 				'ExpireDay': 'expireDay',
+				'ShareSeller':'shareSellerName',
+				'SellerName':'sellerName',
+				'Status':'status',
+				'ServiceYears':'serviceYears',
+				'LatestServiceRecord':'latestServiceRecord'
 			}
 
 			this.sort_obj = {
@@ -322,7 +357,7 @@ export default {
       		this.title = title;
 			this.sort_obj = sort_obj
     	}
-
+		this.pageSize=this.isRenewalException?50:10
 		this.ids && this.getTableData();
 	},
 }

+ 364 - 0
src/views/ficc_manage/chapterVariety.vue

@@ -0,0 +1,364 @@
+<template>
+  <div class="classify-page">
+    <div class="content-box">
+      <el-tree
+        :data="list"
+        node-key="ReportChapterTypeId"
+        :props="{
+          label: 'ReportChapterTypeName',
+          children: 'Child',
+        }"
+        check-strictly
+        empty-text="暂无数据"
+        draggable
+        :allow-drop="canDropHandle"
+        @node-drop="dropOverHandle"
+      >
+        <div class="classify-item-wrap" slot-scope="{ data }">
+          <div>
+            <span :class="['tag', data.Enabled == 1 ? 'open' : 'close']">{{
+              data.Enabled == 1 ? "启用" : "禁用"
+            }}</span>
+            <span>{{ data.ReportChapterTypeName }}</span>
+          </div>
+
+          <div class="opt-box">
+            <span
+              style="cursor: pointer; color: #409eff"
+              @click.stop="handleShowEdit(data)"
+              >小程序配置</span
+            >
+          </div>
+        </div>
+      </el-tree>
+    </div>
+
+    <!-- 分类弹窗 -->
+    <m-dialog title="小程序配置" :show.sync="aeForm.show" width="650px">
+      <div style="padding-left: 50px">
+        <el-form
+          :model="aeForm"
+          :rules="aerules"
+          ref="aeForm"
+          label-position="left"
+          hide-required-asterisk
+          label-width="100px"
+        >
+          <el-form-item
+            label="未选中icon"
+            prop="UnselectedIcon"
+          >
+            <input
+              type="file"
+              size="small"
+              name="file"
+              @change="fileSelected(1)"
+              id="file1"
+              class="true-file"
+              style="display: none"
+            />
+            <el-input
+              readonly
+              type="text"
+              v-model="aeForm.UnselectedIcon"
+              placeholder="上传icon"
+              size="medium"
+              style="width: 400px"
+            >
+              <el-button
+                slot="append"
+                type="primary"
+                size="mini"
+                @click.native="clickinput(1)"
+                >选择图片</el-button
+              >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="选中icon"
+            prop="selectedIcon"
+          >
+            <input
+              type="file"
+              size="small"
+              name="file"
+              @change="fileSelected(2)"
+              id="file2"
+              class="true-file"
+              style="display: none"
+            />
+            <el-input
+              readonly
+              type="text"
+              v-model="aeForm.selectedIcon"
+              placeholder="上传icon"
+              size="medium"
+              style="width: 400px"
+            >
+              <el-button
+                slot="append"
+                type="primary"
+                size="mini"
+                @click.native="clickinput(2)"
+                >选择图片</el-button
+              >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="带字icon"
+            prop="wordIcon"
+          >
+            <input
+              type="file"
+              size="small"
+              name="file3"
+              @change="fileSelected(3)"
+              id="file6"
+              class="true-file"
+              style="display: none"
+            />
+            <el-input
+              readonly
+              type="text"
+              v-model="aeForm.wordIcon"
+              placeholder="上传icon"
+              size="medium"
+              style="width: 400px"
+            >
+              <el-button
+                slot="append"
+                type="primary"
+                size="mini"
+                @click.native="clickinput(3)"
+                >选择图片</el-button
+              >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="章节配图"
+            prop="bgImg"
+          >
+            <input
+              type="file"
+              size="small"
+              name="file4"
+              @change="fileSelected(4)"
+              id="file6"
+              class="true-file"
+              style="display: none"
+            />
+            <el-input
+              readonly
+              type="text"
+              v-model="aeForm.bgImg"
+              placeholder="上传icon"
+              size="medium"
+              style="width: 400px"
+            >
+              <el-button
+                slot="append"
+                type="primary"
+                size="mini"
+                @click.native="clickinput(4)"
+                >选择图片</el-button
+              >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="小程序端隐藏"
+            prop="IsShow"
+          >
+            <el-switch
+              v-model="aeForm.IsShow"
+              inactive-color="#ededed"
+            ></el-switch>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div slot="footer" style="margin-top: 20px">
+        <el-button @click="aeForm.show=false" style="width: 132px; height: 40px"
+          >取消</el-button
+        >
+        <el-button
+          @click="setClassifyHandle"
+          type="primary"
+          style="width: 132px; height: 40px"
+          >保存</el-button
+        >
+      </div>
+    </m-dialog>
+  </div>
+</template>
+
+<script>
+import mDialog from '@/components/mDialog.vue';
+import { bannerupload, getchapterTypeList,editChapterType } from 'api/api.js';
+export default {
+    components: { mDialog },
+  beforeRouteEnter(to, from, next) {
+    if (to.query.reportType == 'day') {
+      to.matched[1].name = '晨报章节设置'
+    } else {
+      to.matched[1].name = '周报章节设置'
+    }
+    next()
+  },
+  data() {
+    return {
+      list: [],
+      aeForm: {
+        show: false,
+        id:0,
+        UnselectedIcon:'',
+        selectedIcon:'',
+        wordIcon:'',
+        bgImg:'',
+        IsShow:false
+      }
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    async getList() {
+      getchapterTypeList({ ReportType: this.$route.query.reportType == 'week' ? 'week' : 'day' }).then(res => {
+        if (res.Ret === 200) {
+          this.list = res.Data.List || []
+        }
+      })
+    },
+    handleShowEdit(data) {
+      this.aeForm = {
+        show: true,
+        id:data.ReportChapterTypeId,
+        UnselectedIcon:data.UnselectedImage,
+        selectedIcon:data.SelectedImage,
+        wordIcon:data.WordsImage,
+        bgImg:data.EditImgUrl,
+        IsShow:data.IsShow==0?true: false
+      }
+    },
+
+    setClassifyHandle(){
+        this.$refs.aeForm.validate((valid)=>{
+            if(valid){
+                let params={
+                    ReportChapterTypeId:this.aeForm.id,
+                    SelectedImage:this.aeForm.selectedIcon,
+                    UnselectedImage:this.aeForm.UnselectedIcon,
+                    WordsImage:this.aeForm.wordIcon,
+                    EditImgUrl:this.aeForm.bgImg,
+                    IsShow:this.aeForm.IsShow?0:1
+                }
+                editChapterType(params).then(res=>{
+                    if(res.Ret===200){
+                        this.$message.success( res.Msg );
+						this.getList();
+						this.aeForm.show=false;
+                    }
+                })
+            }
+        })
+    },
+
+    clickinput(type) {  //上传模拟点击
+      $(`#file${type}`).click();
+    },
+    fileSelected(type) {  //选择文件上传
+      const that = this;
+      if (document.getElementById('file' + type).files[0]) {
+        let hostfile = document.getElementById('file' + type).files[0];
+        let size = Math.floor(hostfile.size / 1024 / 1024);
+        if (size > 200) {
+          that.$message.error('上传文件大小不能大于200M!');
+          hostfile = {};
+          return false
+        }
+        if (hostfile.name.toLowerCase().includes('.png') || hostfile.name.toLowerCase().includes('.jpg') || hostfile.name.toLowerCase().includes('.jpeg')) {
+          let form = new FormData();
+          form.append('file', hostfile);  //hostfile.name
+          that.uploadloading = true;
+          bannerupload(form).then((res) => {
+            if (res.Ret === 200) {
+              if (type == 1) {
+                that.aeForm.UnselectedIcon = res.Data.ResourceUrl;
+              } else if (type == 2) {
+                that.aeForm.selectedIcon = res.Data.ResourceUrl;
+              } else if (type == 3) {
+                that.aeForm.wordIcon = res.Data.ResourceUrl
+              } else if (type == 4) {
+                that.aeForm.bgImg = res.Data.ResourceUrl
+              }
+            }
+            $("#file" + type).val('');
+            hostfile = {};
+          });
+        } else {
+          that.$message.error('上传文件格式不正确!');
+        }
+      }
+    },
+  },
+}
+</script>
+
+<style lang="scss">
+.el-cascader .el-input {
+  width: 100%;
+}
+.classify-page {
+  .content-box {
+    .el-tree-node__content {
+      padding-top: 10px;
+      padding-bottom: 10px;
+      border-bottom: 1px solid #c8cdd9;
+    }
+  }
+}
+</style>
+<style lang="scss" scoped>
+.top-wrap {
+  display: flex;
+  justify-content: space-between;
+  background: #ffffff;
+  border-radius: 4px;
+  padding: 20px;
+}
+.content-box {
+  padding: 20px;
+  margin-top: 20px;
+  height: calc(100vh - 260px);
+  overflow-y: auto;
+  background-color: #ffffff;
+  .classify-item-wrap {
+    flex: 1;
+    padding-right: 20px;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .tag {
+      display: inline-block;
+      min-width: 76px;
+      line-height: 30px;
+      text-align: center;
+      &.open {
+        background-color: #ecf2fe;
+        color: #0052d9;
+      }
+      &.close {
+        background-color: #0052d9;
+        color: #fff;
+      }
+    }
+    .opt-box {
+      .icon-drag,
+      .icon-set {
+        width: 16px;
+        height: 16px;
+        margin-left: 10px;
+      }
+    }
+  }
+}
+</style>

+ 807 - 0
src/views/ficc_manage/reportVariety.vue

@@ -0,0 +1,807 @@
+<template>
+  <div class="report-variety-page">
+    <div class="top-wrap">
+      <el-input
+        placeholder="分类名称"
+        v-model="searchVal"
+        style="max-width: 262px"
+        @change="getlist"
+        clearable
+      >
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
+      </el-input>
+    </div>
+    <div class="content-box">
+      <el-tree
+        :data="list"
+        node-key="Id"
+        :props="{
+          label: 'ClassifyName',
+          children: 'Child',
+        }"
+        check-strictly
+        empty-text="暂无数据"
+        indent="76"
+      >
+        <div class="classify-item-wrap" slot-scope="{ node, data }">
+          <div>
+            <span :class="['tag', data.Enabled==1?'open':'close']">{{data.Enabled==1?'启用':'禁用'}}</span>
+            <span>{{ data.ClassifyName }}</span>
+          </div>
+
+          <div class="opt-box">
+            <span class="editsty" v-if="['晨报','周报'].includes(data.ClassifyName)" @click="chapterSetting(data)">章节设置</span>
+            <span
+              style="cursor: pointer; color: #409eff"
+              @click.stop="handleShowEdit(data)"
+              >小程序配置</span
+            >
+          </div>
+        </div>
+      </el-tree>
+    </div>
+
+    <!-- 分类弹窗 -->
+    <m-dialog title="小程序配置" :show.sync="aeForm.show" width="650px">
+      <div style="padding-left: 50px">
+        <el-form
+          :model="aeForm"
+          :rules="aerules"
+          ref="aeForm"
+          label-position="left"
+          hide-required-asterisk
+          label-width="100px"
+        >
+          <el-form-item
+            prop="showType"
+            label="展示形式"
+            v-if="aeForm.parent_id == 0"
+          >
+            <el-select
+              v-model="aeForm.showType"
+              placeholder="请选择"
+              style="width: 400px"
+            >
+              <el-option label="列表" :value="1"></el-option>
+              <!-- <el-option label="专栏" :value="2"></el-option>  -->
+              <el-option label="品种" :value="3"></el-option>
+            </el-select>
+          </el-form-item>
+          <!-- 一级目录子目录 -->
+          <el-form-item
+            label="子目录"
+            v-if="aeForm.parent_id == 0 && aeForm.showType == 1"
+          >
+            <draggable v-model="ClassifyMenuList" animation="300">
+              <div
+                style="display: inline-block; margin-right: 5px"
+                v-for="(item, index) in ClassifyMenuList"
+                :key="item"
+              >
+                <el-input
+                  v-if="item.inputVisible"
+                  v-model="item.MenuName"
+                  ref="itemINput"
+                  size="small"
+                  style="width: 90px"
+                  :autofocus="true"
+                  @keyup.enter.native="item.inputVisible = false"
+                  @blur="item.inputVisible = false"
+                ></el-input>
+                <el-tag
+                  v-else
+                  closable
+                  :disable-transitions="false"
+                  @click="showInput(index)"
+                  @close="handleClose(index)"
+                >
+                  {{ item.MenuName }}
+                </el-tag>
+              </div>
+            </draggable>
+            <div>
+              <el-input
+                v-if="inputVisible"
+                v-model="inputValue"
+                ref="saveTagInput"
+                size="small"
+                @keyup.enter.native="handleInputConfirm"
+                @blur="handleInputConfirm"
+                style="width: 90px"
+              >
+              </el-input>
+              <el-button v-else size="small" @click="showInput(-1)"
+                >+ 点击新增</el-button
+              >
+            </div>
+          </el-form-item>
+          <!-- 二级目录子目录 -->
+          <el-form-item label="子目录" v-if="aeForm.parent_id != 0&&selectMenuOpt.length>0">
+            <el-select
+              v-model="aeForm.ClassifyMenuId"
+              clearable
+              placeholder="请选择"
+              style="width: 400px"
+            >
+              <el-option
+                :label="item.MenuName"
+                :value="item.MenuId"
+                v-for="item in selectMenuOpt"
+                :key="item.MenuId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item
+            label="FICC页icon"
+            v-if="aeForm.parent_id == 0"
+            prop="YbFiccIcon"
+          >
+            <input
+              type="file"
+              size="small"
+              name="file"
+              @change="fileSelected(6)"
+              id="file6"
+              class="true-file"
+              style="display: none"
+            />
+            <el-input
+              readonly
+              type="text"
+              v-model="aeForm.YbFiccIcon"
+              placeholder="上传FICC页icon"
+              size="medium"
+              style="width: 400px"
+            >
+              <el-button
+                slot="append"
+                type="primary"
+                size="mini"
+                @click.native="clickinput(6)"
+                >选择图片</el-button
+              >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="报告合集配图"
+            v-if="aeForm.parent_id == 0 && aeForm.showType !== 2"
+            prop="YbRightBanner"
+          >
+            <input
+              type="file"
+              size="small"
+              name="file"
+              @change="fileSelected(11)"
+              id="file11"
+              class="true-file"
+              style="display: none"
+            />
+            <el-input
+              readonly
+              type="text"
+              v-model="aeForm.YbRightBanner"
+              placeholder="上传报告合集配图"
+              size="medium"
+              style="width: 400px"
+            >
+              <el-button
+                slot="append"
+                type="primary"
+                size="mini"
+                @click.native="clickinput(11)"
+                >选择图片</el-button
+              >
+            </el-input>
+          </el-form-item>
+          <el-form-item
+            label="分享链接配图"
+            prop="YbShareBgImg"
+            v-if="aeForm.parent_id == 0"
+          >
+            <input
+              type="file"
+              size="small"
+              name="file"
+              @change="fileSelected(10)"
+              id="file10"
+              class="true-file"
+              style="display: none"
+            />
+            <el-input
+              readonly
+              type="text"
+              v-model="aeForm.YbShareBgImg"
+              placeholder="上传分享链接配图"
+              size="medium"
+              style="width: 400px"
+            >
+              <el-button
+                slot="append"
+                type="primary"
+                size="mini"
+                @click.native="clickinput(10)"
+                >选择图片</el-button
+              >
+            </el-input>
+          </el-form-item>
+          
+
+          <!-- 二级分类配置列表背景图 -->
+          <el-form-item
+            label="列表背景图"
+            v-if="aeForm.parent_id != 0 && (parentIsList || parentIsVariety)"
+            prop="YbListImg"
+          >
+            <input
+              type="file"
+              size="small"
+              name="file"
+              @change="fileSelected(9)"
+              id="file9"
+              class="true-file"
+              style="display: none"
+            />
+            <el-input
+              readonly
+              type="text"
+              v-model="aeForm.YbListImg"
+              placeholder="上传列表背景图"
+              size="medium"
+              style="width: 400px"
+            >
+              <el-button
+                slot="append"
+                type="primary"
+                size="mini"
+                @click.native="clickinput(9)"
+                >选择图片</el-button
+              >
+            </el-input>
+          </el-form-item>
+          <!-- 列表、品种的二级分类 展示分享链接配图 但是不是必填的 -->
+          <el-form-item
+            label="分享链接配图"
+            prop="YbShareBgImg_"
+            v-if="aeForm.parent_id != 0 && (parentIsList || parentIsVariety)"
+          >
+            <input
+              type="file"
+              size="small"
+              name="file"
+              @change="fileSelected(12)"
+              id="file12"
+              class="true-file"
+              style="display: none"
+            />
+            <el-input
+              readonly
+              type="text"
+              v-model="aeForm.YbShareBgImg_"
+              placeholder="上传分享链接配图"
+              size="medium"
+              style="width: 400px"
+            >
+              <el-button
+                slot="append"
+                type="primary"
+                size="mini"
+                @click.native="clickinput(12)"
+                >选择图片</el-button
+              >
+            </el-input>
+          </el-form-item>
+
+          <el-form-item
+            label="关联线上路演"
+            prop="RelateVideo"
+            v-if="aeForm.parent_id!=0"
+          >
+            <el-switch
+              v-model="aeForm.RelateVideo"
+              inactive-color="#ededed"
+            ></el-switch>
+          </el-form-item>
+
+          <el-form-item
+            label="小程序端隐藏"
+            prop="IsShow"
+          >
+            <el-switch
+              v-model="aeForm.IsShow"
+              inactive-color="#ededed"
+            ></el-switch>
+          </el-form-item>
+
+        </el-form>
+      </div>
+      <div slot="footer" style="margin-top: 20px">
+        <el-button @click="cancelClassify" style="width: 132px; height: 40px"
+          >取消</el-button
+        >
+        <el-button
+          @click="setClassifyHandle"
+          type="primary"
+          style="width: 132px; height: 40px"
+          >保存</el-button
+        >
+      </div>
+    </m-dialog>
+  </div>
+</template>
+
+<script>
+import mDialog from '@/components/mDialog.vue';
+import { bannerupload, classifylist,classifyedit } from 'api/api.js';
+export default {
+  components: { mDialog },
+  computed: {
+    parentIsList() {
+      //当前上级分类是否为列表
+      let flag = false
+      if (this.aeForm.show) {
+        this.list.forEach(item => {
+          if (item.Id == this.aeForm.parent_id) {
+            if (item.ShowType == 1) {
+              flag = true
+            }
+          }
+        })
+      }
+      return flag
+    },
+    parentIsVariety() {
+      //当前上级分类是否为品种
+      let flag = false
+      if (this.aeForm.show) {
+        this.list.forEach(item => {
+          if (item.Id == this.aeForm.parent_id) {
+            if (item.ShowType == 3) {
+              flag = true
+            }
+          }
+        })
+      }
+      return flag
+    },
+    selectMenuOpt() {
+      let arr = []
+      if (this.aeForm.show) {
+        this.list.forEach(item => {
+          if (item.Id == this.aeForm.parent_id) {
+            arr = item.ClassifyMenuList || []
+          }
+        })
+      }
+      return arr
+    },
+
+  },
+  data() {
+    return {
+      searchVal:'',
+      list: [],
+      inputVisible: false,
+      inputValue: '',
+      ClassifyMenuList: [],
+      YbFiccPcIconList: [
+        {
+          label: '蓝色',
+          val: 'https://hzstatic.hzinsights.com/static/yb_wx/ficc_classify_bg_blue.png'
+        },
+        {
+          label: '绿色',
+          val: 'https://hzstatic.hzinsights.com/static/yb_wx/ficc_classify_bg_green.png'
+        },
+        {
+          label: '红色',
+          val: 'https://hzstatic.hzinsights.com/static/yb_wx/ficc_classify_bg_orange.png'
+        },
+      ],
+      aeForm: {
+        show: false,
+        classify_name: '',
+        parent_id: 0,
+        abstract: '',
+        descript: '',
+        author: '',
+        authorDsec: '',
+        classifyDsec: '',
+        authorTag: '',
+        classifyImg: '',
+        reportImg: '',
+        columImg: '',
+        bannerImg: '',
+        avatar: '',
+        label: "",
+        hasTel: 0,//是否有电话会:0-否 1-是
+        showType: 1,//展示形式 1-列表 2-专栏 3-品种
+        Sort: '',
+        YbFiccSort: '',
+        YbFiccIcon: '',
+        YbIconUrl: '',
+        YbBgUrl: '',
+        YbFiccPcIcon: '',
+        IsShow: false,//是否在小程序端展示:0-隐藏 1-显示
+        YbListImg: '',//小程序研报列表封面图
+        YbShareBgImg: '',
+        ClassifyMenuId: '',
+        YbRightBanner: '',//报告合集配图
+        relate: [],
+        RelateVideo:false,//关联线上路演
+      },
+      aerules: {
+        abstract: [{
+          required: true,
+          message: '请输入分类简介',
+          trigger: 'blur'
+        }],
+        descript: [{
+          required: true,
+          message: '请输入分类描述',
+          trigger: 'blur'
+        }],
+        author: [{
+          required: true,
+          message: '请输入栏目作者',
+          trigger: 'blur'
+        }],
+        authorDsec: [{
+          required: true,
+          message: '请输入作者简介',
+          trigger: 'blur'
+        }],
+        classifyDsec: [{
+          required: true,
+          message: '请输入栏目简介',
+          trigger: 'blur'
+        }],
+        classifyImg: [{
+          required: true,
+          message: '请上传首页配图',
+          trigger: 'blur'
+        }],
+        reportImg: [{
+          required: true,
+          message: '请上传研报配图',
+          trigger: 'blur'
+        }],
+        bannerImg: [{
+          required: true,
+          message: '请上传头部banner',
+          trigger: 'blur'
+        }],
+        avatar: [{
+          required: true,
+          message: '请上传作者头像',
+          trigger: 'blur'
+        }],
+        columImg: [{
+          required: true,
+          message: '请上传专栏配图',
+          trigger: 'blur'
+        }],
+        label: [{
+          required: true,
+          message: '请输入分类标签',
+          trigger: 'blur'
+        }],
+        hasTel: [{
+          required: true,
+          message: '请选择',
+          trigger: 'change'
+        }],
+        showType: [{
+          required: true,
+          message: '请选择展示形式',
+          trigger: 'change'
+        }],
+        Sort: [{
+          required: true,
+          message: '请输入数字',
+          trigger: 'blur'
+        }],
+        YbFiccSort: [{
+          required: true,
+          message: '请输入数字',
+          trigger: 'blur'
+        }],
+        YbFiccIcon: [{
+          required: true,
+          message: '上传FICC页icon',
+          trigger: 'change'
+        }],
+        YbRightBanner: [{
+          required: true,
+          message: '上传报告合集配图',
+          trigger: 'change'
+        }],
+        YbFiccPcIcon: [{
+          required: true,
+          message: '选择背景颜色',
+          trigger: 'change'
+        }],
+        IsShow: [{
+          required: true,
+          message: '小程序端隐藏',
+          trigger: 'change'
+        }],
+        YbListImg: [{
+          required: true,
+          message: '上传列表背景图',
+          trigger: 'change'
+        }],
+        YbShareBgImg: [{
+          required: true,
+          message: '上传列表背景图',
+          trigger: 'change'
+        }],
+      },
+    }
+  },
+  created() {
+    this.getlist()
+  },
+  methods: {
+    chapterSetting(row){
+      let reportType;
+			if(row.ClassifyName=='周报'){
+				reportType='week'
+			}else{
+				reportType='day'
+			}
+			this.$router.push({path:'chapterVariety',query:{reportType}})
+    },
+    showInput(index){
+			if(index!=-1){
+				this.ClassifyMenuList[index].inputVisible=true
+				this.$nextTick(_ => {
+					this.$refs.itemINput[0].$refs.input.focus();
+				})
+				return
+			}
+			this.inputVisible = true;
+			this.$nextTick(_ => {
+				this.$refs.saveTagInput.$refs.input.focus();
+			});
+		},
+		handleInputConfirm() {
+			let inputValue = this.inputValue;
+			if (inputValue) {
+				this.ClassifyMenuList.push({MenuId:0,MenuName:inputValue,inputVisible:false});
+			}
+			this.inputVisible = false;
+			this.inputValue = '';
+		},
+		handleClose(index){
+			this.ClassifyMenuList.splice(index,1)
+		},
+    //保存
+    setClassifyHandle(){
+      this.$refs.aeForm.validate((valid)=>{
+        if(valid){
+          console.log(this.aeForm);
+          let params={
+            ClassifyId:this.aeForm.classify_id,
+            ClassifyLabel:this.aeForm.label,
+            ShowType:this.aeForm.showType,
+            IsShow:this.aeForm.IsShow?0:1,
+            YbFiccSort:this.aeForm.YbFiccSort?Number(this.aeForm.YbFiccSort):0,
+            YbFiccIcon:this.aeForm.YbFiccIcon,
+            YbFiccPcIcon:this.aeForm.YbFiccPcIcon,
+            YbIconUrl:this.aeForm.YbIconUrl,
+            YbBgUrl:this.aeForm.YbBgUrl,
+            YbListImg:this.aeForm.YbListImg,
+            YbShareBgImg:this.aeForm.parent_id!=0&&(this.parentIsList||this.parentIsVariety)?this.aeForm.YbShareBgImg_:this.aeForm.YbShareBgImg,
+            ClassifyMenuId:this.aeForm.ClassifyMenuId||0,
+            YbRightBanner:this.aeForm.YbRightBanner||'',
+            MenuList:[],
+            RelateTel:this.aeForm.relate.includes(1)?1:0,
+            RelateVideo:this.aeForm.RelateVideo?1:0,
+          }
+          params.MenuList=this.ClassifyMenuList.map(item=>{
+						return {
+							MenuId:item.MenuId,
+							MenuName:item.MenuName
+						}
+					})
+          classifyedit(params).then(res =>{
+							if( res.Ret==200 ){
+								this.$message.success( res.Msg );
+								this.getlist();
+								this.aeForm.show=false;
+							}
+					});
+
+        }
+      })
+    },
+    cancelClassify(){
+      this.aeForm.show=false
+    },
+    handleShowEdit(item) {
+      this.aeForm = {
+        show: true,
+        classify_id: parseInt(item.Id),
+        classify_name: item.ClassifyName,
+        parent_id: item.ParentId,
+        descript: item.Descript,
+        author: item.ReportAuthor,
+        authorDsec: item.AuthorDescript,
+        classifyDsec: item.Abstract,
+        authorTag: item.VipTitle,
+        classifyImg: item.ReportImgUrl,
+        reportImg: item.HomeImgUrl,
+        columImg: item.ColumnImgUrl,
+        bannerImg: item.HeadImgUrl,
+        avatar: item.AvatarImgUrl,
+        label: item.ClassifyLabel,
+        hasTel: item.HasTeleconference,
+        showType: item.ShowType,
+        Sort: item.Sort,
+        YbFiccSort: item.YbFiccSort,
+        YbFiccIcon: item.YbFiccIcon,
+        YbIconUrl: item.YbIconUrl,
+        YbBgUrl: item.YbBgUrl,
+        YbFiccPcIcon: item.YbFiccPcIcon,
+        IsShow: item.IsShow == 0 ? true : false,//是否在小程序端展示:0-隐藏 1-显示
+        YbListImg: item.YbListImg,
+        YbShareBgImg: item.YbShareBgImg,
+        ClassifyMenuId: item.ClassifyMenuId || '',
+        YbRightBanner: item.YbRightBanner || '',
+        relate: [item.RelateTel == 1 ? 1 : null, item.RelateVideo == 1 ? 2 : null],
+        RelateVideo:item.RelateVideo == 1?true:false
+      }
+      this.ClassifyMenuList = item.ClassifyMenuList ? item.ClassifyMenuList.map(item => {
+        return {
+          MenuId: item.MenuId,
+          MenuName: item.MenuName,
+          inputVisible: false
+        }
+      }) : []
+      //若编辑的为列表、品种下的二级分类 需要计算YbShareBgImg_
+      //已填写则获取已填写内容
+      if (item.YbShareBgImg) {
+        this.aeForm.YbShareBgImg_ = item.YbShareBgImg
+      } else {//若未填写则取一级分类的YbShareBgImg
+        this.aeForm.YbShareBgImg_ = this.getParentYbShareBgImg(item.ParentId)
+      }
+      this.$nextTick(() => {
+        this.$refs.aeForm.clearValidate();
+      })
+    },
+    //根据上级分类id获取YbShareBgImg
+    getParentYbShareBgImg(id) {
+      let YbShareBgImg = ''
+      let parent = this.list.find((item) => { return item.Id === id })
+      if (!parent) return
+      YbShareBgImg = parent.YbShareBgImg || ''
+      return YbShareBgImg
+    },
+    getlist() {  //获取列表
+      let params = { KeyWord: this.searchVal };
+      this.listLoading = true;
+      classifylist(params).then((res) => {
+        if (res.Ret == 200) {
+          this.list = res.Data.List || [];
+
+        }
+        this.listLoading = false;
+      });
+    },
+    clickinput(type) {  //上传模拟点击
+      $(`#file${type}`).click();
+    },
+    fileSelected(type) {  //选择文件上传
+      const that = this;
+      if (document.getElementById('file' + type).files[0]) {
+        let hostfile = document.getElementById('file' + type).files[0];
+        let size = Math.floor(hostfile.size / 1024 / 1024);
+        if (size > 200) {
+          that.$message.error('上传文件大小不能大于200M!');
+          hostfile = {};
+          return false
+        }
+        if (hostfile.name.toLowerCase().includes('.png') || hostfile.name.toLowerCase().includes('.jpg') || hostfile.name.toLowerCase().includes('.jpeg')) {
+          let form = new FormData();
+          form.append('file', hostfile);  //hostfile.name
+          that.uploadloading = true;
+          bannerupload(form).then((res) => {
+            if (res.Ret === 200) {
+              if (type == 1) {
+                that.aeForm.classifyImg = res.Data.ResourceUrl;
+              } else if (type == 2) {
+                that.aeForm.bannerImg = res.Data.ResourceUrl;
+              } else if (type == 3) {
+                that.aeForm.avatar = res.Data.ResourceUrl
+              } else if (type == 4) {
+                that.aeForm.columImg = res.Data.ResourceUrl
+              } else if (type == 5) {
+                that.aeForm.reportImg = res.Data.ResourceUrl
+              } else if (type == 6) {
+                that.aeForm.YbFiccIcon = res.Data.ResourceUrl
+              } else if (type == 7) {
+                that.aeForm.YbIconUrl = res.Data.ResourceUrl
+              } else if (type == 8) {
+                that.aeForm.YbBgUrl = res.Data.ResourceUrl
+              } else if (type == 9) {
+                this.aeForm.YbListImg = res.Data.ResourceUrl
+              } else if (type == 10) {
+                this.aeForm.YbShareBgImg = res.Data.ResourceUrl
+              } else if (type == 11) {
+                this.aeForm.YbRightBanner = res.Data.ResourceUrl
+              } else if (type == 12) {
+                this.aeForm.YbShareBgImg_ = res.Data.ResourceUrl
+              }
+            }
+            $("#file" + type).val('');
+            hostfile = {};
+          });
+        } else {
+          that.$message.error('上传文件格式不正确!');
+        }
+      }
+    },
+  },
+}
+</script>
+
+<style lang="scss">
+.el-cascader .el-input {
+  width: 100%;
+}
+.report-variety-page {
+  .content-box {
+    .el-tree-node__content {
+      padding-top: 10px;
+      padding-bottom: 10px;
+      border-bottom: 1px solid #c8cdd9;
+    }
+  }
+}
+</style>
+<style lang="scss" scoped>
+.top-wrap {
+  display: flex;
+  justify-content: flex-end;
+  background: #ffffff;
+  border-radius: 4px;
+  padding: 10px 20px;
+}
+.content-box {
+  padding: 20px;
+  margin-top: 20px;
+  height: calc(100vh - 230px);
+  overflow-y: auto;
+  background-color: #ffffff;
+  .classify-item-wrap {
+    flex: 1;
+    padding-right: 20px;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .tag {
+      display: inline-block;
+      min-width: 76px;
+      line-height: 30px;
+      text-align: center;
+      &.open {
+        background-color: #ecf2fe;
+        color: #0052d9;
+      }
+      &.close {
+        background-color: #0052d9;
+        color: #fff;
+      }
+    }
+    .opt-box {
+      .icon-drag,
+      .icon-set {
+        width: 16px;
+        height: 16px;
+        margin-left: 10px;
+      }
+    }
+  }
+}
+</style>

+ 4 - 0
src/views/ficc_manage/userTableColums.js

@@ -44,6 +44,10 @@ export const tableColums = (type) => {
           label: "来源",
           key: "SourceStr",
         },
+        {
+          label: "申请品种",
+          key: "Permission",
+        },
         {
           label: "申请类型",
           key: "ApplyStatus",

+ 0 - 1
src/views/interaction_manage/bannerStatistics.vue

@@ -12,7 +12,6 @@
         </thead>
         <tbody v-for="item in tableData" :key="item.ViewHistoryID">
           <tr v-for="(_item, index) in item.SourceList" :key="_item.LastUpdatedTime">
-            <!-- <td class="thead-rs" :rowspan="item.SourceList.length" v-if="index == 0"> <img :src="item.BannerUrl" class="table-img" alt="" /></td> -->
             <td class="thead-rs" :rowspan="item.SourceList.length" v-if="index == 0">{{ item.Remark }}</td>
             <td class="thead-rs" :rowspan="item.SourceList.length" v-if="index == 0">{{ item.StartDate }} -- {{ item.EndDate }}</td>
             <td class="thead-rs" :rowspan="item.SourceList.length" v-if="index == 0">{{ item.Pv }}</td>

+ 7 - 2
src/views/interaction_manage/components/connectiveReportDialog.vue

@@ -61,11 +61,15 @@ export default {
     isShow:{
       type:Boolean,
       default:false
+    },
+    reportId:{
+      type:Number,
+      default:0
     }
   },
   data() {
     return {
-      ReportId:'',
+      ReportId:0,
       searchTitle:'',
       searchType:'',
       reportTypeList:[],
@@ -75,7 +79,7 @@ export default {
   watch:{
     isShow(val){
       if(val){
-        this.ReportId=''
+        this.ReportId=this.reportId
         this.searchTitle=''
         this.searchType=''
         this.getTableData()
@@ -109,6 +113,7 @@ export default {
     saveHandle(){
       //检查该报告是否已关联视频
       const item = this.reportList.find(i=>i.ReportId==this.ReportId)
+      if(!item) return 
       if(item.BindVideo){
         this.$message.error(`该报告已关联${item.BindVideoTitle},请重新选择`)
         return 

+ 104 - 0
src/views/interaction_manage/components/moneyDetailsChart.vue

@@ -0,0 +1,104 @@
+<template>
+  <div class="bar-chart" ref="moneyChart" style="height: 400px"></div>
+</template>
+
+<script>
+export default {
+  name: "",
+  props: {
+    title: {
+      type: String,
+    },
+    chartData: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      dateList: "",
+    };
+  },
+  watch: {
+    chartData: {
+      handler(newChart) {
+        if (newChart.length == 2) {
+          this.drawChart();
+        }
+      },
+    },
+  },
+  methods: {
+    drawChart() {
+      const chart = this.$refs.moneyChart;
+      const transformedData = this.chartData.map((item) => ({
+        name: item.Name, // 将 Name 转换为 name
+        value: item.Percentage, // 将 Percentage 转换为 value
+        details: {
+          Count: item.Count,
+          Amount: item.Amount,
+        },
+      }));
+      if (chart) {
+        const myChart = echarts.init(chart);
+        const option = {
+          tooltip: {
+            show: true,
+            trigger: "item",
+            formatter: function (params) {
+              return `${params.name}${params.value}%`;
+            },
+          },
+          legend: {
+            // top: "0%",
+            left: "center",
+          },
+          color: ["#409EFF", "#BDD7F1"],
+          series: [
+            {
+              name: "",
+              type: "pie",
+              radius: "70%",
+              avoidLabelOverlap: false,
+              label: {
+                show: true,
+                position: "outside",
+                //position: "inner",
+                formatter(params) {
+                  const details = params.data.details;
+                  console.log(params);
+                  let str = details.Amount ? `付款金额:${details.Amount || ""}元` : "";
+                  return `人数:${details.Count}人\n${str}`;
+                },
+                rich: {
+                  title: {},
+                  value: {},
+                  detail: {},
+                },
+              },
+              labelLine: {},
+              data: transformedData,
+            },
+          ],
+        };
+        myChart.setOption(option);
+        window.addEventListener("resize", function () {
+          myChart.resize();
+        });
+      }
+      this.$on("hook:destroyed", () => {
+        window.removeEventListener("resize", function () {
+          myChart.resize();
+        });
+      });
+    },
+  },
+  created() {},
+  mounted() {
+    // this.$nextTick(() => {
+    //   this.drawChart();
+    // });
+  },
+};
+</script>
+<style lang="scss" scoped></style>

+ 155 - 0
src/views/interaction_manage/registrationDetails.vue

@@ -0,0 +1,155 @@
+<template>
+  <div class="container registration-details">
+    <div class="content">
+      <div>
+        <el-table :data="tableData" show-summary style="width: 538px" border>
+          <el-table-column align="center" prop="RealName" label="分享人">
+            <template slot-scope="{ row }">
+              <span>{{ row.RealName }}({{ row.CompanyName }})</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="Count" label="报名数量" width="196">
+            <template slot-scope="{ row }">
+              <span class="editsty" @click="numberHandler(row)">{{ row.Count }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div class="chart-content">
+        <moneyDetailsChart :chartData="chartData" />
+      </div>
+    </div>
+    <!-- 点击量详情 -->
+    <el-dialog :visible.sync="showDetails" :modal-append-to-body="false" v-dialogDrag width="65vw" @close="cancelHandle">
+      <div slot="title">{{ shareInfo.RealName }}-报名详情</div>
+      <div style="margin-bottom: 118px">
+        <el-table :data="detailsList" style="width: 100%; margin: 20px 0 30px" ref="clickNumberRef" border @sort-change="detailSortChange">
+          <el-table-column prop="CustomCompanyName" label="公司名称" align="center"> </el-table-column>
+          <el-table-column prop="CustomName" label="姓名" align="center"> </el-table-column>
+          <el-table-column prop="CustomMobile" label="手机号" align="center"> </el-table-column>
+          <el-table-column prop="CreateTime" label="报名时间" align="center" min-width="140"> </el-table-column>
+          <el-table-column prop="Amount" label="付款金额(元)" align="center" min-width="140">
+            <template slot-scope="scope">
+              <div v-if="scope.row.Enable == 1">
+                <!-- 如果数据不为空,则双击后显示输入框 -->
+                <div v-if="scope.row.isInput" @dblclick="handleDoubleClick(scope.$index, scope.row)">
+                  <span class="editsty" v-if="scope.row.isInput">
+                    {{ scope.row.Amount }}
+                  </span>
+                </div>
+                <!-- 如果数据为空,则默认显示输入框 -->
+                <div v-else>
+                  <el-input style="width: 90%" type="number" @input="handleInput(scope.row)" v-model.number="scope.row.Amount" @blur="handleBlur(scope.$index, scope.row)"></el-input>
+                </div>
+              </div>
+              <span v-else>{{ scope.row.Amount }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { departInterence } from "@/api/api.js";
+
+import moneyDetailsChart from "./components/moneyDetailsChart.vue";
+export default {
+  data() {
+    return {
+      tableData: [],
+      showDetails: false,
+      detailsList: [],
+      chartData: [],
+      shareInfo: {},
+    };
+  },
+  components: { moneyDetailsChart },
+  mounted() {
+    this.getDataList();
+  },
+  methods: {
+    // 点击了数量
+    numberHandler(row) {
+      this.showDetails = true;
+      this.shareInfo = row;
+      this.getdetailsDataList(row);
+    },
+    // 关闭了弹框
+    cancelHandle() {
+      this.detailsList = [];
+      this.showDetails = false;
+      this.shareInfo = {};
+    },
+    // 双击切换输入框
+    handleDoubleClick(index, row) {
+      row.isInput = false;
+    },
+    // 失去焦点后的请求
+    handleBlur(index, row) {
+      // 可能需要更新tableData来反映新输入的值
+      this.editAmount(row);
+      // 完成编辑,隐藏输入框
+      row.isInputBol = row.Amount && row.Amount > 0 ? true : false;
+    },
+    // 输入框的值
+    handleInput(row) {
+      row.Amount = row.Amount ? row.Amount : 0;
+    },
+    // 获取数据
+    async getDataList() {
+      const res = await departInterence.getResearchStatisticsItem({
+        BannerId: +this.$route.query.id,
+      });
+      if (res.Ret === 200) {
+        this.tableData = res.Data.List || [];
+        this.chartData = [res.Data.HasPayed, res.Data.NoPay];
+      }
+    },
+    // 获取数据
+    async getdetailsDataList(row) {
+      const res = await departInterence.getResearchStatisticsDetail({
+        Mobile: row.Mobile,
+        BannerId: row.BannerId,
+      });
+      if (res.Ret === 200) {
+        const arr = res.Data || [];
+        this.detailsList = arr.map((item) => {
+          return {
+            ...item,
+            isInput: item.Amount && item.Amount > 0 ? true : false,
+          };
+        });
+      }
+    },
+    // 修改金额
+    async editAmount(row) {
+      const res = await departInterence.getResearchStatisticsAmount({
+        YbResearchSignupStatisticsId: row.YbResearchSignupStatisticsId,
+        Amount: row.Amount,
+      });
+      if (res.Ret === 200) {
+        this.$message.success("修改成功");
+      }
+    },
+  },
+  beforeRouteEnter(to, from, next) {
+    if (to.query.name) {
+      to.matched[1].name = to.query.name + "报名详情";
+    }
+    next();
+  },
+};
+</script>
+<style scoped lang="scss">
+.registration-details {
+  .content {
+    display: flex;
+    .chart-content {
+      flex: 1;
+      flex-shrink: 0;
+    }
+  }
+}
+</style>

+ 98 - 0
src/views/interaction_manage/researchStatistics.vue

@@ -0,0 +1,98 @@
+<template>
+  <div class="container research-statistics-content">
+    <p class="lable-txt">进行中</p>
+    <div class="progress-box">
+      <div class="progress-item" v-for="item in ongoingList" :key="item.BannerId" @click="goDetailHandler(item)">
+        <p class="title">{{ item.Remark }}</p>
+        <p class="time">{{ item.StartDate }}~{{ item.EndDate }}</p>
+        <p class="num">报名人数:{{ item.Count }}</p>
+      </div>
+    </div>
+    <p class="lable-txt">已结束</p>
+    <div class="progress-box">
+      <div class="progress-item item-end" v-for="item in overList" :key="item.BannerId" @click="goDetailHandler(item)">
+        <p class="title">{{ item.Remark }}</p>
+        <p class="time">{{ item.StartDate }}~{{ item.EndDate }}</p>
+        <p class="num">报名人数:{{ item.Count }}</p>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { departInterence } from "@/api/api.js";
+
+export default {
+  name: "",
+  components: {},
+  props: {},
+  data() {
+    return {
+      ongoingList: [],
+      overList: [],
+    };
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {
+    this.getDataList();
+  },
+  methods: {
+    // 获取数据
+    async getDataList() {
+      const res = await departInterence.getResearchStatistics();
+      if (res.Ret === 200) {
+        this.ongoingList = res.Data.OngoingList || [];
+        this.overList = res.Data.OverList || [];
+      }
+    },
+    // 跳转详情
+    goDetailHandler(item) {
+      this.$router.push({
+        path: "registrationDetails",
+        query: {
+          id: item.BannerId,
+          name:item.Remark
+        },
+      });
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.research-statistics-content {
+  .lable-txt {
+    margin-bottom: 20px;
+  }
+  .progress-box {
+    display: flex;
+    flex-wrap: wrap;
+    .progress-item {
+      width: 292px;
+      height: 126px;
+      padding: 20px;
+      color: #409eff;
+      border-radius: 4px;
+      border: 1px solid #b3d8ff;
+      background-color: #ecf5ff;
+      margin: 0 20px 20px 0;
+      box-sizing: border-box;
+      cursor: pointer;
+      display: flex;
+      flex-direction: column;
+      justify-content: space-between;
+    }
+    .item-end {
+      color: #666666;
+      border: 1px solid #c0c4cc;
+      background-color: #f2f6fa;
+      &:hover {
+        color: #409eff;
+        border: 1px solid #b3d8ff;
+        background-color: #ecf5ff;
+      }
+    }
+  }
+}
+</style>

+ 30 - 6
src/views/interaction_manage/videoManage.vue

@@ -12,7 +12,7 @@
             <el-input
                 placeholder="关键词搜索"
                 v-model="keyword"
-                style="maxWidth:520px"
+                style="max-width:520px"
                 @input="searchHandle"
                 clearable
                 v-if="navType!==2"
@@ -212,6 +212,7 @@
                             v-model="popData.permission"
                             collapse-tags
                             placeholder="请选择品种"
+                            :disabled="!!reportId && isReportHasPermission"
                         ></el-cascader>
                     </el-form-item>
                     <el-form-item label="视频" prop="videoUrl">
@@ -234,7 +235,11 @@
                     </el-form-item>
                     <el-form-item label="关联报告" prop="reportUrl" v-if="navType==3">
                         <div style="display:flex">
-                        <el-input readonly v-model="popData.reportUrl" placeholder="请选择关联报告"></el-input>
+                        <el-input readonly v-model="popData.reportUrl" placeholder="请选择关联报告">
+                            <template slot='suffix' v-if="!!popData.reportUrl">
+                                <i class="el-icon-circle-close" style="cursor: pointer;margin-right: 5px;" @click="reportRemove"></i>
+                            </template>
+                        </el-input>
                         <el-button type="primary" style="margin-left:10px;" @click="showReportDialog">关联报告</el-button>
                         </div>
                     </el-form-item>
@@ -424,6 +429,7 @@
         <!-- 关联报告弹窗 -->
         <connective-report-dialog
           :isShow="isShowReportDialog"
+          :reportId="this.reportId"
           @reportChange="setReportUrl"
           @cancel="isShowReportDialog=false"
         />
@@ -534,7 +540,9 @@ export default {
             previewVideoUrl:"",
             
             isShowReportDialog:false,//关联报告弹窗
-            reportId:0
+            reportId:0,
+            // 报告是否关联品种
+            isReportHasPermission:false
         }
     },
     created() {
@@ -621,6 +629,10 @@ export default {
             if(res.Ret===200){
                 const arr=res.Data.List||[]
                 this.perList=arr.map(item => {
+                    if(!(item && item.List)){
+                        // 无(子)品种
+                        return null
+                    }
                     let obj={}
                     obj.value=item.ClassifyName
                     obj.label=item.ClassifyName
@@ -628,7 +640,7 @@ export default {
                         return {value:_item.ChartPermissionID,label:_item.ChartPermissionName}
                     })
                     return obj
-                })
+                }).filter(Boolean)
             }
         },
 
@@ -643,6 +655,7 @@ export default {
             this.popData.VideoId=0
             this.popData.permission=''
             this.popData.reportUrl=''
+            this.isReportHasPermission=false
             if(!item){
                 this.popData.type='添加视频'
             }else{
@@ -654,9 +667,12 @@ export default {
                 this.popData.VideoSeconds=item.VideoSeconds
                 this.popData.VideoId=item.CommunityVideoId
                 if(this.navType===3){
-                    this.popData.permission=item.ChartPermissionIds.split(',')
+                    this.$nextTick(()=>{
+                        this.popData.permission=item.ChartPermissionIds.split(',').map(it => +it)
+                    })
                     this.popData.VideoId=item.RoadVideoId
-                    item.ReportId&&this.setReportUrl({ReportId:item.ReportId,Title:item.ReportTitle})
+                    this.setReportUrl({ReportId:item.ReportId || 0,Title:item.ReportTitle || '',
+                                        PermissionIds:item.ChartPermissionIds?item.ChartPermissionIds.split(','):[]})
                 }
             }
             this.showPop=true
@@ -1072,6 +1088,12 @@ export default {
         endingPreview(){
             this.$refs.previewVideo && this.$refs.previewVideo.pause()
         },
+        // 删除关联的报告
+        reportRemove(){
+            this.popData.reportUrl=''
+            this.reportId = 0
+            this.popData.permission=''
+        },
         //打开关联报告弹窗
         showReportDialog(){
           this.isShowReportDialog = true
@@ -1080,6 +1102,8 @@ export default {
         setReportUrl(item){
           this.reportId = item.ReportId
           this.popData.reportUrl = item.Title
+          this.popData.permission=item.PermissionIds
+          this.isReportHasPermission = item.PermissionIds && item.PermissionIds.length>0
           this.isShowReportDialog = false
         }
     },

+ 2 - 1
src/views/login_manage/ForgetPassModel.vue

@@ -283,7 +283,8 @@ export default {
                 VerifyCode:code,
                 UserName:this.form.account,
                 Mobile:this.checkWay==='mobile'?this.userMobile:'',
-                Email:this.checkWay==='email'?this.userEmail:''
+                Email:this.checkWay==='email'?this.userEmail:'',
+                TelAreaCode:this.checkWay==='mobile'?this.TelAreaCode:''
             }).then(res=>{
                 if(res.Ret!==200) return
                 this.goSteps()

+ 11 - 8
src/views/rai_manage/activityManage/activityManage.vue

@@ -7,11 +7,11 @@
         <div class="tabs-box">
           <span v-for="(item, index) in listTitle" :key="item.ChartPermissionId" @click="tabsBoxBtn(item, index)" :class="index == tabsPitchon ? 'pitch' : ''">{{ item.PermissionName }}</span>
         </div>
-        <div style="display: flex;align-items: center">
-          <el-upload style="height:40px" ref="imgUpload" action="#" :http-request="handleUploadImg" :show-file-list="false" accept="image/*">
-            <el-button style="height:40px" type="primary">识图建会</el-button>
+        <div style="display: flex; align-items: center">
+          <el-upload v-if="isResearch" style="height: 40px" ref="imgUpload" action="#" :http-request="handleUploadImg" :show-file-list="false" accept="image/*">
+            <el-button style="height: 40px" type="primary">识图建会</el-button>
           </el-upload>
-          <el-button style="margin-left: 20px;height:40px" type="primary" @click="$router.push(!isResearch ? '/addActivity' : '/addPurchaserActivity')">添加活动</el-button>
+          <el-button style="margin-left: 20px; height: 40px" type="primary" @click="$router.push(!isResearch ? '/addActivity' : '/addPurchaserActivity')">添加活动</el-button>
         </div>
       </div>
     </el-card>
@@ -45,7 +45,7 @@
       <el-table :data="dataList" style="width: 100%" border>
         <el-table-column align="center" label="活动名称" min-width="285">
           <template slot-scope="{ row }">
-            <span class="editsty" @click="titleBtnClick(row.ActivityId)">{{ row.ActivityName }}</span>
+            <span :class="row.PublishStatus == 3 ? 'grey-color' : 'editsty'" @click="titleBtnClick(row.ActivityId)">{{ row.ActivityName }}</span>
           </template>
         </el-table-column>
         <el-table-column prop="ChartPermissionName" align="center" label="行业" min-width="90"></el-table-column>
@@ -65,10 +65,10 @@
           <template slot-scope="{ row }">
             <div class="operate-box">
               <p v-if="row.PublishStatus == 0 && tabsPitchon == 0" class="editsty" @click="operationBtn(row.ActivityId, '发布')">发布</p>
-              <p v-if="row.PublishStatus == 3" class="editsty" @click="operationBtn(row.ActivityId, '重新发布')">重新发布</p>
+              <p v-if="row.PublishStatus == 3" class="grey-color" @click="operationBtn(row.ActivityId, '重新发布')">重新发布</p>
               <p v-if="row.PublishStatus == 1" class="editsty" @click="operationBtn(row.ActivityId, '取消发布')">取消发布</p>
               &nbsp;&nbsp;
-              <p class="editsty" @click="editBtn(row.ActivityId, row.PublishStatus)">编辑</p>
+              <p :class="row.PublishStatus == 3 ? 'grey-color' : 'editsty'" @click="editBtn(row.ActivityId, row.PublishStatus)">编辑</p>
               &nbsp;&nbsp;
               <p class="deletesty" v-if="row.PublishStatus == 0 && tabsPitchon == 0" @click="operationBtn(row.ActivityId, '删除')">删除</p>
               <p class="editsty" v-if="row.IsShowSigninButton" @click="handleDownLoadImg(row)">下载签到码</p>
@@ -439,9 +439,12 @@ export default {
       flex-shrink: 0;
     }
   }
-  .el-upload  {
+  .el-upload {
     height: 40px !important;
     min-height: 40px !important;
   }
+  .grey-color {
+    cursor: pointer;
+  }
 }
 </style>

+ 16 - 20
src/views/rai_manage/activityManage/applyManage.vue

@@ -37,14 +37,8 @@
           <el-button type="primary" @click="sendMessage">发送模板消息</el-button>
         </div>
         <div>
-          <el-select placeholder="行业" clearable v-model="industry" @change="conditionChange" style="margin-bottom: 20px"
-          v-if="!isResearch">
-            <el-option
-              v-for="item in chartPermissionList"
-              :label="item.PermissionName"
-              :key="item.ChartPermissionId"
-              :value="item.ChartPermissionId"
-            ></el-option>
+          <el-select placeholder="行业" clearable v-model="industry" @change="conditionChange" style="margin-bottom: 20px" v-if="!isResearch">
+            <el-option v-for="item in chartPermissionList" :label="item.PermissionName" :key="item.ChartPermissionId" :value="item.ChartPermissionId"></el-option>
           </el-select>
           <el-select placeholder="活动类型" clearable @focus="activityType" v-model="cactivityTypeVal" @change="conditionChange" style="margin-bottom: 20px">
             <el-option v-for="item in cactivityTypeList" :label="item.ActivityTypeName" :key="item.ActivityTypeId" :value="item.ActivityTypeId"></el-option>
@@ -81,7 +75,7 @@
               <span v-if="row.SignupFailPeopleNum == 0">--</span>
               <span v-else class="editsty" @click="particularsBtn('报名失败详情', row.ActivityId)">{{ row.SignupFailPeopleNum }}</span>
             </div>
-            <span v-else @click="handleRowClick(row, item.key)" :style="handleRowStyle(item.key)">{{ handleRowContent(row, item.key) }}</span>
+            <span v-else @click="handleRowClick(row, item.key)" :style="handleRowStyle(item.key, row)">{{ handleRowContent(row, item.key) }}</span>
           </template>
         </el-table-column>
       </el-table>
@@ -118,7 +112,7 @@ import ParticularsDialog from "../components/apply/particularsDialog.vue";
 import AtcParticulars from "../components/atcParticulars.vue";
 import GenerationAsk from "../components/generationAsk.vue";
 import SummaryRemind from "../components/apply/summaryRemind.vue";
-import { ListTitle , purchaserListTitle , TableApplyColums, StatusSelect, PublishSelect } from "../components/apply/applyTableColums";
+import { ListTitle, purchaserListTitle, TableApplyColums, StatusSelect, PublishSelect } from "../components/apply/applyTableColums";
 import TemplateMessage from "../components/apply/templateMessage.vue";
 export default {
   name: "",
@@ -166,11 +160,11 @@ export default {
   },
   computed: {
     // 弘则 研选 是否是研选
-    isResearch(){
-      return this.$route.path.indexOf("purchaser")!=-1?true:false
+    isResearch() {
+      return this.$route.path.indexOf("purchaser") != -1 ? true : false;
     },
     listTitle() {
-      return !this.isResearch?ListTitle:purchaserListTitle;
+      return !this.isResearch ? ListTitle : purchaserListTitle;
     },
     statusSelect() {
       return StatusSelect;
@@ -187,7 +181,7 @@ export default {
       this.page_no = 1;
       this.init();
       this.getsDataList();
-    }
+    },
   },
   created() {},
   mounted() {
@@ -225,7 +219,7 @@ export default {
           ActivityTypeId: this.cactivityTypeVal,
           ActiveState: this.cactivityStatus,
           PublishStatus: this.publishStatus ? Number(this.publishStatus) : 2,
-          IsResearch:this.isResearch
+          IsResearch: this.isResearch,
         })
         .then((res) => {
           if (res.Ret !== 200) return;
@@ -315,7 +309,7 @@ export default {
     },
     //获取行业
     chartPermission() {
-      raiInterface.chartPermission({IsHideResearch:!this.isResearch}).then((res) => {
+      raiInterface.chartPermission({ IsHideResearch: !this.isResearch }).then((res) => {
         if (res.Ret === 200) {
           this.chartPermissionList = res.Data.List;
         }
@@ -372,9 +366,11 @@ export default {
       }
     },
     /* 表格行的样式 */
-    handleRowStyle(key) {
-      let isStyle = ["ActivityName", "SignupPeopleNum", "AppointmentPeopleNum", "AskNum"];
-      return isStyle.includes(key) ? "color: #409eff; cursor: pointer" : "";
+    handleRowStyle(key, row) {
+      if (["ActivityName", "SignupPeopleNum", "AppointmentPeopleNum", "AskNum"].includes(key)) {
+        return row.PublishStatus == 3 ? "cursor: pointer" : "color: #409eff; cursor: pointer";
+      }
+      return "";
     },
     /* 表格行的点击事件 */
     handleRowClick(row, key) {
@@ -403,7 +399,7 @@ export default {
         let status = row[key] == 1 ? "未开始" : row[key] == 2 ? "进行中" : "已结束";
         return status;
       } else if (key == "PublishStatus") {
-        let status = row["PublishStatus"] == 1 ? "已发布" : row["PublishStatus"] == 2 ?"未发布":"已取消";
+        let status = row["PublishStatus"] == 1 ? "已发布" : row["PublishStatus"] == 2 ? "未发布" : "已取消";
         return status;
       } else {
         return row[key];

+ 3 - 1
src/views/rai_manage/activityManage/roadShowList.vue

@@ -161,7 +161,9 @@ export default {
     },
     //获取行业
     async chartPermission() {
-      const res = await raiInterface.chartPermission();
+      const res = await raiInterface.chartPermission({
+        IsHideResearch: true,
+      });
       if (res.Ret === 200) {
         this.chartPermissionList = res.Data.List;
       }

+ 2 - 0
src/views/rai_manage/cygxManage/components/lableDlg.vue

@@ -57,6 +57,8 @@ export default {
           ? "所有路演回放音视频"
           : this.dataRegular.TagType == 4
           ? "所有问答系列音频"
+          : this.dataRegular.TagType == 5
+          ? "医药-趋势观察 ,科技-产业跟踪 ,智造-产业跟踪 ,消费-月度调研"
           : "";
       return str;
     },

+ 52 - 2
src/views/rai_manage/reportManage/components/specialDlg.vue

@@ -12,6 +12,8 @@
         :trigger-on-focus="false"
       ></el-autocomplete>
       <p v-show="!isShowKey" style="color: #f00">系统中无此人,请先将其添加到对应公司的联系人列表下</p>
+      <el-input v-model="referrer" placeholder="请输入引荐人" clearable style="display: inline-block; margin-bottom: 20px"> </el-input>
+      <el-input type="textarea" :rows="4" placeholder="请输入备注" v-model="remarksKeys"> </el-input>
       <span slot="footer" class="dialog-footer">
         <el-button @click="handleCloseAuthor">取 消</el-button>
         <el-button type="primary" @click="addAuthorHandler">确 定</el-button>
@@ -24,6 +26,15 @@
         <el-button type="primary" @click="submitRejectHandler">确 定</el-button>
       </span>
     </el-dialog>
+
+    <el-dialog title="编辑" :visible.sync="lookEditRemarkDlgShow" width="500px" v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center @close="handleCloseRemark">
+      <el-input v-model="lookRemarkInfo.InviteName" placeholder="请输入引荐人" clearable style="display: inline-block; margin-bottom: 20px"> </el-input>
+      <el-input type="textarea" :rows="4" placeholder="请输入备注" v-model="lookRemarkInfo.Remark"> </el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleCloseRemark">取 消</el-button>
+        <el-button type="primary" @click="submitRemarkHandler">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -45,6 +56,14 @@ export default {
       default: 0,
       type: Number,
     },
+    lookEditRemarkInfo: {
+      default: {},
+      type: Object,
+    },
+    lookEditRemarkDlgShow: {
+      default: false,
+      type: Boolean,
+    },
   },
   data() {
     return {
@@ -52,10 +71,20 @@ export default {
       companyList: [],
       textReject: "",
       isShowKey: true,
+      referrer: "",
+      remarksKeys: "",
+      lookRemarkInfo: {},
     };
   },
-  computed: {},
-  watch: {},
+  watch: {
+    lookEditRemarkInfo: {
+      handler(newValue) {
+        this.lookRemarkInfo = _.cloneDeep(newValue);
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
   created() {},
   mounted() {},
   methods: {
@@ -93,6 +122,8 @@ export default {
         UserId: params[0].UserId,
         RealName: params[0].RealName,
         Mobile: params[0].Mobile,
+        InviteName: this.referrer, //邀请人
+        Remark: this.remarksKeys, //备注
       });
       if (res.Ret === 200) {
         this.handleCloseAuthor();
@@ -128,6 +159,25 @@ export default {
     selectCompany() {
       this.isShowKey = this.companyList.some((item) => item.value === this.keyAuthor);
     },
+
+    // 关闭备注的弹框
+    handleCloseRemark() {
+      this.$emit("update:lookEditRemarkDlgShow", false);
+      this.$emit("update:lookEditRemarkInfo", {});
+    },
+    // q确定事件
+    async submitRemarkHandler() {
+      const res = await raiInterface.yanxuan_specialAuthorUpdate({
+        UserId: this.lookRemarkInfo.UserId,
+        InviteName: this.lookRemarkInfo.InviteName, //邀请人
+        Remark: this.lookRemarkInfo.Remark, //备注
+      });
+      if (res.Ret === 200) {
+        this.$emit("update:lookEditRemarkDlgShow", false);
+        this.$emit("update:lookEditRemarkInfo", {});
+        this.$parent.getyanxuanReportSpecial();
+      }
+    },
   },
 };
 </script>

+ 10 - 0
src/views/rai_manage/reportManage/components/yanXuanLable.js

@@ -150,6 +150,16 @@ export const AuthorTableColums = [
     key: "CompanyName",
     widthsty: 200,
   },
+  {
+    label: "引荐人",
+    key: "InviteName",
+    widthsty: 100,
+  },
+  {
+    label: "备注",
+    key: "Remark",
+    widthsty: 200,
+  },
   {
     label: "开通时间",
     key: "CreateTime",

+ 61 - 13
src/views/rai_manage/reportManage/yanXuanSpecial.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="container yanxuan-special_container">
-    <el-card style="margin-bottom: 20px">
+    <el-card style="margin-bottom: 20px" v-if="topLableList.length">
       <span @click="tlableClickHandler(item)" :class="['top-table-item', item.value == topLableActive && 'top-table-item-active']" v-for="item in topLableList" :key="item.value">{{ item.name }}</span>
     </el-card>
-    <el-card>
+    <el-card v-if="topLableList.length">
       <template v-if="topLableActive == 1">
         <div class="report-stuts-content">
           <span
@@ -27,9 +27,12 @@
             />
           </el-select>
           <date-picker style="margin: 0 20px; width: 240px" v-model="issueTime" type="date" range placeholder="发布时间" value-type="format" @change="conditionChange"> </date-picker>
-          <el-input @input="reportTitleHandle" v-model="reportTitle" placeholder="请输入文章标题" clearable style="display: inline-block; width: 240px">
+          <el-input @input="reportTitleHandle" v-model="reportTitle" placeholder="请输入文章标题" clearable style="display: inline-block; width: 240px; margin-right: 20px">
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
           </el-input>
+          <el-autocomplete v-model="authorName" :fetch-suggestions="querySearchAsync" placeholder="请输入作者昵称" @select="conditionChange">
+            <i slot="prefix" class="el-input__icon el-icon-search"></i>
+          </el-autocomplete>
         </div>
       </template>
       <div v-else style="margin-bottom: 20px; display: flex; justify-content: space-between">
@@ -45,9 +48,12 @@
               :value="item.value"
             />
           </el-select>
-          <el-input @input="authorColumnValueHandler" v-model="authorColumnValue" placeholder="请输入专栏名称" clearable style="display: inline-block; width: 240px">
+          <el-input @input="authorColumnValueHandler" v-model="authorColumnValue" placeholder="请输入专栏名称" clearable style="display: inline-block; width: 240px; margin-right: 20px">
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
           </el-input>
+          <el-autocomplete v-model="authorName" :fetch-suggestions="querySearchAsync" placeholder="请输入作者昵称" @select="conditionChange">
+            <i slot="prefix" class="el-input__icon el-icon-search"></i>
+          </el-autocomplete>
         </div>
         <div>
           <el-button type="primary" @click="addAuthorDlgVisible = true">新建作者</el-button>
@@ -69,7 +75,7 @@
                 <span v-if="item.label != 'PV/UV'" @click="handleRowClick(row, item.key)" :style="handleRowStyle(item.key)">{{ handleRowContent(row, item.key) }}</span>
                 <div class="pv-uv-download" v-else>
                   <span>{{ row.Pv }} / {{ row.Uv }}</span>
-                  <a :href="exportPvUv(row.Id)" download>
+                  <a :href="exportPvUv(row.Id)" download v-if="Role == 'rai_admin' || Role == 'admin'">
                     <img src="~@/assets/img/rai_m/pvuv_download.png" alt="" />
                   </a>
                 </div>
@@ -85,7 +91,11 @@
           <template v-else>
             <el-table-column v-for="item in authorTableColums" :width="item.widthsty" :key="item.key" :prop="item.key" :label="item.label" align="center" :sortable="isShowSortable(item)">
               <template slot-scope="{ row }">
-                <span v-if="item.label != '总PV/UV'" @click="handleRowClick(row, item.key)" :style="handleRowStyle(item.key)">{{ handleRowContent(row, item.key) }}</span>
+                <span v-if="item.label != '总PV/UV' && item.key != 'Remark'" @click="handleRowClick(row, item.key)" :style="handleRowStyle(item.key)">{{ handleRowContent(row, item.key) }}</span>
+                <div v-else-if="item.key == 'Remark'">
+                  {{ handleRowContent(row, item.key) }}
+                  <span @click="lookEditRemark(row)" class="editsty" style="font-size: 22px"> ... </span>
+                </div>
                 <span v-else>{{ row.Pv }} / {{ row.Uv }}</span>
               </template>
             </el-table-column>
@@ -112,7 +122,7 @@
       </div>
     </el-card>
     <collect-fans-dlg :iscollectFansDlgShow.sync="iscollectFansDlgShow" :collectFansDlgText.sync="collectFansDlgText" :collectFansDlgItem.sync="collectFansDlgItem" />
-    <special-dlg :addAuthorDlgVisible.sync="addAuthorDlgVisible" :submitRejectDlgVisible.sync="submitRejectDlgVisible" :submitRejectId="submitRejectId" />
+    <special-dlg :addAuthorDlgVisible.sync="addAuthorDlgVisible" :lookEditRemarkDlgShow.sync="lookEditRemarkDlgShow" :lookEditRemarkInfo.sync="lookEditRemarkInfo" />
   </div>
 </template>
 
@@ -144,14 +154,19 @@ export default {
       collectFansDlgText: "",
       collectFansDlgItem: {},
       addAuthorDlgVisible: false,
+      lookEditRemarkDlgShow: false, // 查看编辑备注
+      lookEditRemarkInfo: {},
       topLableList: [],
       sortType: "",
       sortParam: "",
+      authorName: "", // 作者名称
     };
   },
   computed: {
-    // 头部lable
-
+    Role() {
+      let role = localStorage.getItem("Role") || "";
+      return role;
+    },
     // 文章的状态
     reportStutsList() {
       return ReportStutsList;
@@ -171,6 +186,7 @@ export default {
     // 点击了头部的tlble
     tlableClickHandler(item) {
       this.topLableActive = item.value;
+      this.authorName = "";
       this.page_no = 1;
       this.getyanxuanReportSpecial();
     },
@@ -220,6 +236,8 @@ export default {
         return row[key] == 1 ? "线上" : `线下(${row["City"]})`;
       } else if (key == "RegisterPlatform") {
         return row[key] == 1 ? "小程序" : row[key] == 2 ? "网页版" : row[key] == 3 ? "策略平台" : "";
+      } else if (key == "Remark") {
+        return row[key] ? row[key].substring(0, 15) : "";
       } else {
         return row[key];
       }
@@ -252,6 +270,7 @@ export default {
         EndDate: this.issueTime[1],
         SortType: this.sortType,
         SortParam: this.sortParam,
+        NickName: this.authorName,
       };
       const res =
         this.topLableActive == 1 && (this.reportStatusActive == 1 || this.reportStatusActive == 2)
@@ -319,11 +338,40 @@ export default {
     async getYanxuanShowButton() {
       const res = await raiInterface.getYanxuanShowButton();
       if (res.Ret === 200) {
-        let { IsShowSpecialAuthor } = res.Data;
-        if (IsShowSpecialAuthor) {
-          this.topLableList = TopLableList;
-        } else {
+        let { IsShowSpecialAuthor, IsShowYanXuanSpecial } = res.Data;
+        if (IsShowSpecialAuthor && !IsShowYanXuanSpecial) {
+          this.topLableList = [TopLableList[1]];
+          this.topLableActive = 2;
+        } else if (!IsShowSpecialAuthor && IsShowYanXuanSpecial) {
           this.topLableList = [TopLableList[0]];
+        } else if (IsShowSpecialAuthor && IsShowYanXuanSpecial) {
+          this.topLableList = TopLableList;
+        }
+      }
+    },
+
+    //查看或修改
+    lookEditRemark(row) {
+      this.lookEditRemarkInfo = row;
+      this.lookEditRemarkDlgShow = true;
+    },
+
+    async querySearchAsync(queryString, cb) {
+      cb([]);
+      if (!queryString) {
+        this.conditionChange();
+      } else {
+        const res = await raiInterface.yanxuan_specialAuthorSearch({
+          KeyWord: queryString,
+        });
+        if (res.Ret === 200) {
+          let arr = res.Data.List.map((item) => {
+            return {
+              ...item,
+              value: item.KeyWord,
+            };
+          });
+          cb(arr);
         }
       }
     },

+ 3 - 3
src/views/report_manage/dayWeekUpdate.vue

@@ -19,7 +19,7 @@
     <div style="margin-top: 20px;">
 			<el-tabs v-model="default_tab" type="card" @tab-click="changeTab">
 				<el-tab-pane label="暂停更新" name="stop"></el-tab-pane>
-				<el-tab-pane label="永久停更" name="disable"></el-tab-pane>
+				<!-- <el-tab-pane label="永久停更" name="disable"></el-tab-pane> -->
 			</el-tabs>
 			<div class="section-wrap" v-loading="dataLoading">
 				<section class="section">
@@ -132,7 +132,7 @@ export default {
 			default_tab: 'stop',
       statisticList:[
         { label: '暂停更新',day: [],week: [] },
-        { label: '永久停更',day: [],week: [] },
+        // { label: '永久停更',day: [],week: [] },
       ],
       dataLoading: false,
       dayList: [],
@@ -161,7 +161,7 @@ export default {
       const { DisableDay,DisableWeek,StopDay,StopWeek } = res.Data;
       this.statisticList = [
         { label: '暂停更新',day: StopDay,week: StopWeek },
-        { label: '永久停更',day: DisableDay,week: DisableWeek },
+        // { label: '永久停更',day: DisableDay,week: DisableWeek },
       ]
     },
 

+ 40 - 41
src/views/report_manage/dayilyNews.vue

@@ -66,8 +66,13 @@
           label-width="80px">
           <el-form-item prop="classify" label="报告分类">
             <el-cascader
+              ref="cascaderRef"
               :options="classifyArr"
               v-model="configForm.classify"
+              :props="{
+                label:'ClassifyName',
+                children:'Child'
+              }"
               placeholder="类型筛选"
               size="medium"
               style="width: 70%"
@@ -236,30 +241,28 @@ export default {
     },
 
     getClassify() {
-      let params={CurrentIndex:0,PageSize:1000,KeyWord:''};
-			reportEnInterface.classifyList(params).then((res) => {
-				if( res.Ret==200&&Array.isArray(res.Data.List) ){
-					res.Data.List.forEach(item=>{
-						let newitem={label:item.ClassifyName,value: JSON.stringify({
-              name: item.ClassifyName,
-              id: item.Id
-            })};
-						if( item.Child ){
-							let childnode=[];
-							item.Child.forEach(itemchild=>{
-								childnode.push({label:itemchild.ClassifyName,value:JSON.stringify({
-                  name: itemchild.ClassifyName,
-                  id: itemchild.Id
-                })});
-							});
-							newitem.children=childnode;
-						}
-						this.classifyArr.push(newitem);
-					});
-
-          // this.configForm.classify =  [this.classifyArr[0].value,this.classifyArr[0].children[0].value]
-				}
-			});
+        reportEnInterface.classifyList().then((res) => {
+            if(res.Ret!==200) return 
+            this.classifyArr = res.Data.List||[]
+            this.formatClassifyArr({Child:this.classifyArr})
+        });
+    },
+    formatClassifyArr(tree){
+        function dfs(node,level){
+            node.value = JSON.stringify({id:node.Id,name:node.ClassifyName})
+            if(!node.Child&&level<3){
+                node.disabled = true
+            }
+            if(Array.isArray(node.Child)){
+                for(let n of node.Child){
+                    dfs(n,level+1)
+                }
+                if(!node.Child.length){
+                    node.disabled = true
+                }
+            }
+        }
+        dfs(tree,0)
     },
 
     /* 生成报告 */
@@ -267,18 +270,6 @@ export default {
       if(!this.newsList.length) return this.$message.warning('暂无内容')
       const { classify,title,abstract,author,frequency,overview } = this.configForm;
       if(!classify || !title || !abstract||!overview) this.$message.warning('请先设置默认值')
-      
-/*       const params = {
-        ClassifyIdFirst: Number(JSON.parse(classify[0]).id),
-        ClassifyNameFirst: JSON.parse(classify[0]).name,
-        ClassifyIdSecond: classify.length>1 ? Number(JSON.parse(classify[1]).id) : 0,
-        ClassifyNameSecond: classify.length>1 ? JSON.parse(classify[1]).name : '',
-        Title:title,
-        Abstract: abstract,
-        Author: author,
-        Frequency: frequency,
-        Overview:overview
-      } */
 
       dayApi.translateReport(/* params */).then(res => {
         if(res.Ret !== 200) return
@@ -309,15 +300,21 @@ export default {
           Title,
           ClassifyIdFirst,
           ClassifyIdSecond,
+          ClassifyIdThird,
           ClassifyNameFirst,
           ClassifyNameSecond,
+          ClassifyNameThird,
           Author,
           Frequency,
           Overview
         } = res.Data;
-        let val_first = ClassifyIdFirst ? JSON.stringify({name: ClassifyNameFirst,id: ClassifyIdFirst}) : '';
-        let val_second = ClassifyIdSecond ? JSON.stringify({name: ClassifyNameSecond,id: ClassifyIdSecond}) : '';
-        this.configForm.classify =  val_second ? [val_first,val_second] : val_first ? [val_first] : []
+
+        this.configForm.classify = [
+            JSON.stringify({id:ClassifyIdFirst||0,name:ClassifyNameFirst||''}),
+            JSON.stringify({id:ClassifyIdSecond||0,name:ClassifyNameSecond||''}),
+            JSON.stringify({id:ClassifyIdThird||0,name:ClassifyNameThird||''})
+        ]
+        
         this.configForm.title = Title;
         this.configForm.abstract = Abstract;
         this.configForm.author = Author;
@@ -344,8 +341,10 @@ export default {
       const params = {
         ClassifyIdFirst: Number(JSON.parse(classify[0]).id),
         ClassifyNameFirst: JSON.parse(classify[0]).name,
-        ClassifyIdSecond: classify.length>1 ? Number(JSON.parse(classify[1]).id) : 0,
-        ClassifyNameSecond: classify.length>1 ? JSON.parse(classify[1]).name : '',
+        ClassifyIdSecond: Number(JSON.parse(classify[1]).id),
+        ClassifyNameSecond: JSON.parse(classify[1]).name,
+        ClassifyIdThird:Number(JSON.parse(classify[2]).id),
+        ClassifyNameThird:JSON.parse(classify[2]).name,
         Title:title,
         Abstract: abstract,
         Author: author,

+ 170 - 0
src/views/research_manage/shareRecord.vue

@@ -0,0 +1,170 @@
+<template>
+  <div class="container share-record-container">
+    <el-card>
+      <div class="share-record-top">
+        <div>
+          <el-date-picker
+            v-model="selectTime"
+            style="width: 260px"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            @change="handleListChange"
+          >
+          </el-date-picker>
+          <el-cascader
+            v-model="sales"
+            placeholder="请选择分享人"
+            style="width: 200px; margin: 0 20px"
+            :options="salesArr"
+            :props="defaultSalesProps"
+            :show-all-levels="false"
+            collapse-tags
+            clearable
+            filterable
+            @change="handleListChange"
+          >
+          </el-cascader>
+          <el-select v-model="actionVal" placeholder="用户行为" @change="handleListChange" clearable>
+            <el-option v-for="item in actionOptions" :key="item" :label="item" :value="item"> </el-option>
+          </el-select>
+        </div>
+        <div>
+          <el-input placeholder="请输入姓名/手机号" v-model="keyword" style="width: 300px" @input="handleListChange" clearable>
+            <i slot="prefix" class="el-input__icon el-icon-search"></i>
+          </el-input>
+        </div>
+      </div>
+    </el-card>
+
+    <el-card style="margin-top: 20px">
+      <el-table ref="userTable" :data="tableData" border>
+        <el-table-column prop="Action" label="用户行为" align="center" width="150"> </el-table-column>
+        <el-table-column prop="CreateTime" label="行为时间" align="center" width="180"> </el-table-column>
+        <el-table-column prop="RegisterPlatformText" label="分享平台" align="center" width="150"> </el-table-column>
+        <el-table-column prop="RealName" label="姓名" align="center" width="130"> </el-table-column>
+        <el-table-column prop="Mobile" label="手机号" align="center" width="150"> </el-table-column>
+        <el-table-column prop="CompanyName" label="公司名称" align="center">
+          <template slot-scope="{ row }">
+            <span v-if="row.CompanyId == 1">{{ row.CompanyName }}</span>
+            <span class="editsty" @click="customDetail(row)" v-else>{{ row.CompanyName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="ShareName" label="分享人" align="center" width="100"> </el-table-column>
+        <el-table-column prop="SourceTitle" label="报告/活动标题" align="center">
+          <template slot-scope="{ row }">
+            <span class="editsty" @click="titleDetail(row)">{{ row.SourceTitle }}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-col :span="24" class="toolbar">
+        <m-page :total="total" :page_no="page_no" @handleCurrentChange="handleCurrentChange" />
+      </el-col>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import { customInterence, raiInterface } from "@/api/api.js";
+import mPage from "@/components/mPage.vue";
+
+export default {
+  name: "",
+  components: { mPage },
+  props: {},
+  data() {
+    return {
+      total: 0, //条数
+      pageSize: 10, //每页显示几条
+      page_no: 1,
+      keyword: "",
+      sales: [],
+      salesArr: [], //销售
+      defaultSalesProps: {
+        multiple: true,
+        label: "RealName",
+        children: "ChildrenList",
+        value: "AdminId",
+      }, //销售级联配置
+      selectTime: [],
+      tableData: [],
+      actionVal: "",
+      actionOptions: ["注册", "查看专栏", "查看报告", "查看活动"],
+    };
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {
+    this.getSale();
+    this.getDataList();
+  },
+  methods: {
+    /* 获取销售 */
+    getSale() {
+      customInterence.getSalesRaiData().then((res) => {
+        if (res.Ret === 200) {
+          this.salesArr = res.Data.List;
+        }
+      });
+    },
+    /* 筛选了重新变动 */
+    handleListChange() {
+      this.page_no = 1;
+      this.getDataList();
+    },
+    handleCurrentChange(page) {
+      this.page_no = page;
+      this.getDataList();
+    },
+    /* 查看客户详情 */
+    customDetail(row) {
+      if (row.CompanyId == 1) return;
+      const { href } = this.$router.resolve({
+        path: "/customDetail",
+        query: {
+          id: row.CompanyId,
+        },
+      });
+      window.open(href, "_blank");
+    },
+    /* 查看报告/活动标题详情 */
+    titleDetail(row) {
+      window.open(row.HttpUrl, "_blank");
+    },
+    /* 获取数据 */
+    async getDataList() {
+      let salesArr = [];
+      if (this.sales.length) {
+        salesArr = this.sales.map((item) => {
+          return item[item.length - 1];
+        });
+      }
+
+      const res = await raiInterface.getShareRecordList({
+        PageSize: this.pageSize,
+        CurrentIndex: this.page_no,
+        AdminId: salesArr.join(","),
+        KeyWord: this.keyword,
+        StartDate: this.selectTime && this.selectTime[0] ? this.selectTime[0] : "",
+        EndDate: this.selectTime && this.selectTime[1] ? this.selectTime[1] : "",
+        Action: this.actionVal,
+      });
+      if (res.Ret === 200) {
+        this.tableData = res.Data.List || [];
+        this.total = res.Data.Paging.Totals;
+      }
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.share-record-container {
+  .share-record-top {
+    display: flex;
+    justify-content: space-between;
+  }
+}
+</style>

+ 55 - 19
src/views/roadshow_manage/compononts/activityDetailDia.vue

@@ -13,6 +13,7 @@
 			class="table-cont"
 			max-height="300"
 			border
+			ref="tableRef"
 		>
 			<el-table-column
 				v-for="item in tableColumns"
@@ -20,7 +21,9 @@
 				:label="item.label"
 				:width="item.widthsty"
 				:min-width="item.minwidthsty"
+				:prop="item.key"
 				align="center"
+				:sortable="region=='oversea' && (item.key=='time')"
 			>
 				<template slot-scope="{row}">
 
@@ -74,14 +77,18 @@ export default {
 		fromType: {
 			type: String,
 			default: 'researcher'
+		},
+		// oversea 海外
+		region: {
+			type: String,
+			default: 'home'
 		}
 	},
 	watch: {
 		isShow(newval) {
 			if(newval) {
 				this.initState();
-				console.log(this.form)
-				this.getStatisticDetail();
+				this.getStatisticDetail();				
 			}
 		}
 	},
@@ -97,25 +104,49 @@ export default {
 		/* 获取列表 */
 		getStatisticDetail() {
 			const { startDate,endDate,userid,key } = this.form;
-			const typeMapObj = {
-				试用路演: 'try_out',
-				正式路演: 'formal',
-				公开会议: 'meeting',
-			}
-			roadshowInterence.statisticDetailList({
-				DataType: typeMapObj[key] && typeMapObj[key],
-				StartDate: startDate,
-				EndDate: endDate,
-				AdminId: userid,
-				AdminType: this.fromType
-			}).then(res => {
-				const { Ret,Data } = res;
+			if(this.region=='oversea'){
+				// 海外
+				const typeMapObj = {
+					试用: 'try_out',
+					正式: 'formal',
+					关闭: 'close',
+				}
+				roadshowInterence.overseaStatisticDetailList({
+					DataType: typeMapObj[key] && typeMapObj[key],
+					StartDate: startDate,
+					EndDate: endDate,
+					AdminIds: userid?userid.join(','):'',
+					AdminType: this.fromType
+				}).then(res => {
+					const { Ret,Data } = res;
 
-				if(Ret !== 200) return
+					if(Ret !== 200) return
 
-				this.tableData = Data || [];
+					this.tableData = Data || [];
+
+				})
+			}else {
+				const typeMapObj = {
+					试用路演: 'try_out',
+					正式路演: 'formal',
+					公开会议: 'meeting',
+				}
+				roadshowInterence.statisticDetailList({
+					DataType: typeMapObj[key] && typeMapObj[key],
+					StartDate: startDate,
+					EndDate: endDate,
+					AdminId: userid,
+					AdminType: this.fromType
+				}).then(res => {
+					const { Ret,Data } = res;
+
+					if(Ret !== 200) return
+
+					this.tableData = Data || [];
+
+				})
+			}
 
-			})
 		},
 
 		/* 取消 */
@@ -182,6 +213,11 @@ export default {
 						},
 						{ ...dynamic_column }
 				]	
+			this.$refs.tableRef && this.$refs.tableRef.clearSort()
+			this.$nextTick(()=>{
+				// 滚动条高度归零
+				this.$refs.tableRef && (this.$refs.tableRef.$el.querySelector('.el-table__body-wrapper').scrollTop=0)
+			})
 		}
 	},
 	created() {},
@@ -197,4 +233,4 @@ export default {
 .company-tip-poper {
 	max-width: 400px;
 }
-</style>e>
+</style>

+ 123 - 69
src/views/system_manage/assistance_center/assistanceDocAdd.vue

@@ -9,35 +9,41 @@
         v-model="addDocForm.Content"
       ></froala>
     </div>
-    <div class="edit-container-document-options">
-      <div class="document-options-button-box">
-        <el-button type="primary" class="document-options-button" @click="previewDocument" v-loading="isSubmiting">预览</el-button>
-        <el-button type="primary" class="document-options-button" @click="saveDocument('保存')" v-loading="isSubmiting">保存</el-button>
-        <el-button type="primary" class="document-options-button" @click="saveDocument('发布')" v-loading="isSubmiting">发布</el-button>
+    <div class="right-area">
+      <div class="save-time" v-if="modifyTime">
+        最近保存时间:{{ modifyTime }}
       </div>
-      <div class="document-options-form">
-        <el-form :model="addDocForm" ref="addDocForm" :rules="addDocRules">
-          <el-form-item label="文章标题" prop="Title">
-            <el-input v-model="addDocForm.Title" placeholder="请输入文章标题"></el-input>
-          </el-form-item>
-          <el-form-item label="所属分类" prop="ClassifyId">
-            <el-cascader style="width: 100%;"
-              v-model="addDocForm.ClassifyId" :options="classifyList"
-              :props="{value:'ClassifyId',label:'ClassifyName',children:'Children',emitPath:false,disabled:'Disabled'}" placeholder="所属分类"/>
-          </el-form-item>
-          <el-form-item label="文章作者" prop="Author">
-            <el-input v-model="addDocForm.Author" placeholder="请输入文章作者"></el-input>
-          </el-form-item>
-          <el-form-item label="相关推荐">
-            <div v-for="(item,index) in addDocForm.RecommendData" :key="index" class="form-item-recommendedLink">
-              <el-input v-model="item.Name" placeholder="请输入链接名称" style="width: 190px;"></el-input>
-              <div class="recommendedLink-line"></div>
-              <el-input v-model="item.Url" placeholder="请输入链接" style="width: 190px;"></el-input>
-            </div>
-          </el-form-item>
-        </el-form>
+      <div class="edit-container-document-options">
+        <div class="document-options-button-box">
+          <el-button type="primary" class="document-options-button" @click="previewDocument" v-loading="isSubmiting">预览</el-button>
+          <el-button type="primary" class="document-options-button" @click="saveDocument('保存')" v-loading="isSubmiting">保存</el-button>
+          <el-button type="primary" class="document-options-button" @click="saveDocument('发布')" v-loading="isSubmiting">发布</el-button>
+        </div>
+        <div class="document-options-form">
+          <el-form :model="addDocForm" ref="addDocForm" :rules="addDocRules">
+            <el-form-item label="文章标题" prop="Title">
+              <el-input v-model="addDocForm.Title" placeholder="请输入文章标题"></el-input>
+            </el-form-item>
+            <el-form-item label="所属分类" prop="ClassifyId">
+              <el-cascader style="width: 100%;"
+                v-model="addDocForm.ClassifyId" :options="classifyList"
+                :props="{value:'ClassifyId',label:'ClassifyName',children:'Children',emitPath:false,disabled:'Disabled'}" placeholder="所属分类"/>
+            </el-form-item>
+            <el-form-item label="文章作者" prop="Author">
+              <el-input v-model="addDocForm.Author" placeholder="请输入文章作者"></el-input>
+            </el-form-item>
+            <el-form-item label="相关推荐">
+              <div v-for="(item,index) in addDocForm.RecommendData" :key="index" class="form-item-recommendedLink">
+                <el-input v-model="item.Name" placeholder="请输入链接名称" style="width: 190px;"></el-input>
+                <div class="recommendedLink-line"></div>
+                <el-input v-model="item.Url" placeholder="请输入链接" style="width: 190px;"></el-input>
+              </div>
+            </el-form-item>
+          </el-form>
+        </div>
       </div>
     </div>
+
   </div>
 </template>
 
@@ -145,6 +151,18 @@ import {createBottomHref} from "./utils/common"
         },
         anchorData:[],
         isSubmiting:false,
+        autoSaveTimer:null,
+        modifyTime:'',
+        contentChange:false
+      }
+    },
+    watch:{
+      addDocForm:{
+        handler:function(){
+          console.log('内容改变');
+          this.contentChange=true
+        },
+        deep:true
       }
     },
     created() {
@@ -161,10 +179,19 @@ import {createBottomHref} from "./utils/common"
               Content:res.Data.Content,
               RecommendData:res.Data.Recommend || [{Name:"",Url:""},{Name:"",Url:""}]
             }
-            
+            this.modifyTime=res.Data.ModifyTime
+            if((!this.autoSaveTimer) && this.addDocForm.Id){
+              this.autoSaveTimer=setInterval(()=>{
+                this.saveDocument('保存',true)
+              },6000)
+            }
           }
         })
-      }      
+      }
+    },
+    destroyed(){
+      clearInterval(this.autoSaveTimer)
+      this.autoSaveTimer=null
     },
     mounted(){
       this.addDocForm.Content=""
@@ -256,7 +283,6 @@ import {createBottomHref} from "./utils/common"
         }
       },
       previewDocument(){
-        // this.addDocForm.Content=`<p>范德萨发的刚发的</p><p>刚发的g梵蒂冈</p><p>割发代首刚发的</p><hr><h1>1. 个刚发的施工方</h1><p>刚发的刚发的g规范的施工方都是割发代首规范</p><h2>1.1. 规范的三个富士达割发代首</h2><p>个梵蒂冈是梵蒂冈讽德诵功范德萨割发代首个割发代首</p><p>刚分手的割发代首割发代首高富帅d</p><p>刚分手的刚分手的</p><p>割发代首刚分手的</p><p>刚分手的公司发的</p><p>刚发的事故发生的</p><p><br></p><p>割发代首刚分手的刚分手的</p><h2>1.2. 噶规范十多个范德萨刚发的施工方多少公分</h2><p>个讽德诵功范德萨</p><p>割发代首割发代首刚发的s规范的三个</p><h1>2.讽德诵功是反的</h1><p>割发代首割发代首个人的施工方都是</p><p>范德萨个人东方闪电方式</p><p>割发代首割发代首</p><h2>2.1.个梵蒂冈</h2><p>讽德诵功范德萨规范的三个范德萨讽德诵功放大s</p><h2>2.2.刚发的广泛地个</h2><p>刚分手的割发代首</p><p>割发代首割发代首割发代首</p><p><br></p><p>范德萨割发代首</p><h2>2.3.辅导费是的</h2><p>范甘迪个放大割发代首个</p><p>刚发的刚发的</p><h1>3. 个梵蒂冈放大</h1>`
         if(this.isSubmiting) return 
         if(!this.addDocForm.Content){
           this.$message.error("文章内容不能为空")
@@ -268,7 +294,7 @@ import {createBottomHref} from "./utils/common"
         let { href } = this.$router.resolve({ path: "/assistanceDocDetail" });
         window.open(href, "_blank");
       },
-      saveDocument(type){
+      saveDocument(type,isAuto){
         if(this.isSubmiting) return 
         this.$refs.addDocForm.validate(valid=>{
           if(valid){
@@ -276,24 +302,41 @@ import {createBottomHref} from "./utils/common"
               this.$message.error("文章内容不能为空")
               return
             }
-            // console.log(this.addDocForm);
-            this.isSubmiting=true
+            if(!isAuto) this.isSubmiting=true
             if(type=="发布") this.addDocForm.Status=2
 
             this.generateAnchor()
             this.addDocForm.AnchorData = this.anchorData
             //保存
-            assistanceDocInterence.addAssistanceDoc(this.addDocForm).then(res=>{
+            assistanceDocInterence.addAssistanceDoc({...this.addDocForm,IsChange:this.contentChange}).then(res=>{
               if(res.Ret == 200){
-                this.$message({
+                this.contentChange=false
+
+                !isAuto && this.$message({
                   type:'success',
                   message:'操作成功',
-                  duration:2000
+                  duration:1000
                 })
-                setTimeout(()=>{
-                  this.$router.back()
+                if(type=="发布"){
+                  setTimeout(()=>{
+                    this.$router.back()
+                  },1000)
+                }else{
                   this.isSubmiting=false
-                },2000)
+                  this.modifyTime=res.Data.ModifyTime
+                  if(!this.addDocForm.Id){
+                    //新增
+                    setTimeout(()=>{
+                      this.$router.replace("/assistanceDocAdd?DocId="+res.Data.HelpDocId)
+                      this.addDocForm.Id = res.Data.HelpDocId
+                      if((!this.autoSaveTimer) && this.addDocForm.Id){
+                        this.autoSaveTimer=setInterval(()=>{
+                          this.saveDocument('保存',true)
+                        },6000)
+                      }
+                    },1000)
+                  }
+                }
               }
             }).catch(()=>{
               this.isSubmiting=false
@@ -316,41 +359,52 @@ import {createBottomHref} from "./utils/common"
       border:solid 1px #ECECEC;
       box-sizing: border-box;
     }
-    .edit-container-document-options{
-      background-color: white;
+    .right-area{
       margin-left: 20px;
-      min-height: calc(100vh - 110px);
-      border:solid 1px #ECECEC;
-      box-sizing: border-box;
-      width: 440px;
-      min-width: 440px;
-      .document-options-button-box{
-        width: 100%;
-        height: 80px;
-        box-sizing: border-box;
-        padding: 20px;
-        box-shadow: 0px 5px 10px #ECECEC;
-        border-bottom: solid 1px #ECECEC;
-        .document-options-button{
-          height: 40px;
-          width: 120px;
-        }
+      min-height: calc(100vh - 112px);
+      .save-time{
+        font-size: 16px;
+        line-height: 22px;
+        color: #000000;
+        font-weight: 400;
+        background-color: unset;
+        margin-bottom: 10px;
       }
-      .document-options-form{
-        padding: 30px 20px;
-        .form-item-recommendedLink{
-          display: flex;
-          align-items: center;
-          justify-content: flex-start;
+      .edit-container-document-options{
+        min-height: calc(100% - 32px);
+        background-color: white;
+        border:solid 1px #ECECEC;
+        box-sizing: border-box;
+        width: 440px;
+        min-width: 440px;
+        .document-options-button-box{
           width: 100%;
-          margin-bottom: 20px;
-          &:last-child{
-            margin-bottom: 0;
+          height: 80px;
+          box-sizing: border-box;
+          padding: 20px;
+          box-shadow: 0px 5px 10px #ECECEC;
+          border-bottom: solid 1px #ECECEC;
+          .document-options-button{
+            height: 40px;
+            width: 120px;
           }
-          .recommendedLink-line{
-            flex: 1;
-            height: 1px;
-            background-color:#DCDFE6 ;
+        }
+        .document-options-form{
+          padding: 30px 20px;
+          .form-item-recommendedLink{
+            display: flex;
+            align-items: center;
+            justify-content: flex-start;
+            width: 100%;
+            margin-bottom: 20px;
+            &:last-child{
+              margin-bottom: 0;
+            }
+            .recommendedLink-line{
+              flex: 1;
+              height: 1px;
+              background-color:#DCDFE6 ;
+            }
           }
         }
       }

+ 13 - 13
src/views/system_manage/components/addUserDialog.vue

@@ -147,19 +147,19 @@ import {patternEmail,isMobileNo,checkPassWord} from '@/utils/commonOptions'
                         }
                     }, trigger: 'blur'}],
                     depart:[{ required: true, message: '部门分组不能为空', trigger: 'change' }],
-                    employeeNumber:[{validator:(rule,value,callback)=>{
-                        if(!value){
-                            callback()
-                            return 
-                        }
-                        // 取消空格
-                        let tempValue = parseInt(value.replaceAll(' ',''))
-                        if(!tempValue || value.replaceAll(' ','').length!=4){
-                            callback(new Error('请输入四位数字'))
-                        }else{
-                            callback()
-                        }
-                    },trigger:'blur'}],
+                    // employeeNumber:[{validator:(rule,value,callback)=>{
+                    //     if(!value){
+                    //         callback()
+                    //         return 
+                    //     }
+                    //     // 取消空格
+                    //     let tempValue = parseInt(value.replaceAll(' ',''))
+                    //     if(!tempValue || value.replaceAll(' ','').length!=4){
+                    //         callback(new Error('请输入四位数字'))
+                    //     }else{
+                    //         callback()
+                    //     }
+                    // },trigger:'blur'}],
                     role:[{ required: true, message: '角色不能为空', trigger: 'change' }],
                 },
                 form_departProp:{