Bladeren bron

Merge branch 'debug' of http://8.136.199.33:3000/hongze/hz_crm_web into debug

ldong 1 maand geleden
bovenliggende
commit
8a7da09434

+ 9 - 1
src/api/modules/rai/raiApi.js

@@ -1005,7 +1005,15 @@ const raiInterface = {
   getReportSelectionArticle: (params) => {
     return http.get("/cygx/reportSelection/getArticle", params);
   },
-
+  /**
+   *  获取综述报告
+   * @param {ThirdName} params
+   * @param {ChartPermissionId} params
+   * @returns
+   */
+  getReportSelectionThird_name: (params) => {
+    return http.post("/cygx/reportSelection/add/third_name", params);
+  },
   /**
    * 上
    * 周

+ 4 - 0
src/api/modules/statisticApi.js

@@ -189,6 +189,10 @@ const dataMainInterface = {
 	mergeCompanyPreviousDetail:params => {
 		return http.get('/statistic_report/merge_company_previous/detail',params);
 	},
+	// 客户数据未续约说明更多上一年
+	mergeCompanyPreviousDetailYear:params => {
+		return http.get('/statistic_report/merge_company_previous/last_year',params);
+	},
 	/**
 	 * 	// 获取图表阅读统计列表
 	 * @param {PageSize} params 

+ 1 - 1
src/components/searchDistPicker.vue

@@ -106,7 +106,7 @@ export default {
                     }else{
                         this.city = {cityKey:'',cityName:this.cityInfo}
                     }
-                    if(this.city.cityKey){
+                    if(this.city.cityKey && this.showArea){
                         const areaResult = Object.entries(area_sorce[this.city.cityKey]).find(([key,val])=>val===this.areaInfo)||['',this.areaInfo]
                         this.area={areaKey:areaResult[0],areaName:areaResult[1]}
                     }else{

+ 6 - 4
src/views/dataReport_manage/components/previousDetail.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog v-dialogDrag :visible.sync="previousDetailDlg" @close="handleClose" :modal-append-to-body="false" center title="维持套餐">
-    <p>上一合同信息</p>
+    <p>上一合同信息</p>
     <el-table :data="dataList" border max-height="250" style="margin: 20px 0">
       <el-table-column label="合同期限" prop="StartDate" align="center" width="220">
         <template slot-scope="{ row }">
@@ -43,12 +43,14 @@ export default {
     },
     async getrenewalReasonList() {
       console.log(this.rowInfo);
-      const res = await dataMainInterface.mergeCompanyPreviousDetail({
+      const res = await dataMainInterface.mergeCompanyPreviousDetailYear({
         CompanyContractId: this.rowInfo.CompanyContractId,
       });
       if (res.Ret == 200) {
-        this.dataList = [res.Data.Detail];
-        console.log(this.dataList);
+
+        this.dataList = res.Data.List || []
+
+        // console.log(this.dataList);
       }
     },
   },

+ 2 - 2
src/views/dataReport_manage/configdata.js

@@ -231,7 +231,7 @@ export const RaiStockTableColums = [
   {
     label: "合同期限",
     dataType: "新签客户,续约客户",
-    key: "EndDate"
+    key: "StartDate"
   },
   {
     label: "合同金额",
@@ -429,7 +429,7 @@ export const equityTableColums = (type) => {
         },
         {
           label: "合同期限",
-          key: "EndDate",
+          key: "StartDate",
           dataType: "未续约客户",
           sort: true,
         },

+ 1 - 1
src/views/dataReport_manage/equityCustomStatistics.vue

@@ -38,7 +38,7 @@
                 <el-tooltip class="item" effect="dark" :content="item.label === '新签客户' ? '<br />' : item.label === '续约客户' ? '起始时间在所选时间段内的续约合同' : ''" placement="top">
                   <template slot="content">
                     <div v-if="item.label === '新增试用客户'">
-                      <p>新建试用客户的时间或跨部门领取的时间,包含在所选时间段内的客户数</p>
+                      <p>新建试用客户的时间,包含在所选时间段内的客户数(流失领取的不计入)</p>
                     </div>
                     <div v-else-if="item.label === '新签客户'">
                       <p>起始时间在所选时间段内的新签合同</p>

+ 1 - 1
src/views/dataReport_manage/raiStockCutomList.vue

@@ -347,7 +347,7 @@ export default {
     },
     /* 获取销售 */
     getSale() {
-      customInterence.getSale().then((res) => {
+      customInterence.getSalesRaiData().then((res) => {
         if (res.Ret === 200) {
           this.salesArr = res.Data.List;
         }

+ 1 - 1
src/views/rai_manage/activityManage/components/addActivity.vue

@@ -562,7 +562,7 @@ export default {
           RefPage.isCanAppointmentMinutes = Data.IsCanAppointmentMinutes == 1 ? true : false;
           RefPage.isYidongConduct = Data.IsYidongConduct == 1 ? true : false;
           RefPage.isExternalLabel = Data.IsExternalLabel == 1 ? true : false;
-          RefPage.isZoom = Data.IsExternalLabel == 1 ? true : false;
+          RefPage.isZoom = Data.IsZoom == 1 ? true : false;
           RefPage.isCanOutboundCall = Data.IsCanOutboundCall == 1 ? true : false;
           RefPage.isDeduct = Data.IsResearchPoints == 1 ? true : false;
           RefPage.provideEmail = Data.IsNeedEmail == 1 ? true : false;

+ 42 - 36
src/views/rai_manage/components/addChoiceness.vue

@@ -323,7 +323,7 @@ export default {
     editText(item, index) {
       this.dialogText = "编辑";
       this.chartPermissionId = item.ChartPermissionId;
-      this.stateValue = item.IndustrialSubjectName;
+      this.stateValue = item.IndustrialSubjectName || item.ShowName;
       this.addDialogVisible = true;
       this.editNum = index;
     },
@@ -370,34 +370,37 @@ export default {
     async confirmPerson() {
       if (this.stateValue) {
         const arr = this.subjectList.find((item) => item.ShowName === this.stateValue);
-        if (!arr) {
-          this.$message.error("输入正确的标的");
-          return;
-        }
         let overviewList = {};
-        const res = await raiInterface.getReportSelectionArticle({
-          IndustrialSubjectId: arr.IndustrialSubjectId,
-        });
+        const res = !arr
+          ? await raiInterface.getReportSelectionThird_name({
+              ThirdName: this.stateValue,
+              ChartPermissionId: this.chartPermissionId,
+            })
+          : await raiInterface.getReportSelectionArticle({
+              IndustrialSubjectId: arr.IndustrialSubjectId,
+            });
         if (res.Ret === 200) {
           overviewList = res.Data;
           this.industryList.forEach((item) => {
             if (item.ChartPermissionId == this.chartPermissionId) {
               if (item.List.length > 0) {
-                var isNext = item.List.some((item) => item.IndustrialSubjectName == arr.ShowName);
+                var isNext = item.List.some((item) => item.ShowName == (arr ? arr.ShowName : res.Data.ThirdName));
               }
               if (isNext) return this.$message.error("标的重复!");
               item.List.push({
                 Body: "",
                 ChartPermissionId: this.chartPermissionId,
-                IndustrialManagementId: arr.IndustrialManagementId + "",
-                IndustrialManagementName: arr.IndustryName,
-                IndustrialSubjectId: arr.IndustrialSubjectId + "",
-                IndustrialSubjectName: arr.SubjectName,
-                ShowName: arr.ShowName,
+                IndustrialManagementId: arr ? arr.IndustrialManagementId + "" : "",
+                IndustrialManagementName: arr ? arr.IndustryName : "",
+                IndustrialSubjectId: arr ? arr.IndustrialSubjectId + "" : "",
+                IndustrialSubjectName: arr ? arr.SubjectName : "",
+                ShowName: arr ? arr.ShowName || arr.IndustryName : res.Data.ThirdName,
+                ThirdId: res.Data.ThirdId || "",
+                ThirdName: res.Data.ThirdName || "",
                 CompanyLabel: [{ name: "", value: item.List.length + 1 }],
-                OverviewArticleId: overviewList && overviewList.ArticleId,
-                OverviewArticleTitle: overviewList && overviewList.Title,
-                IsShowOverviewArticle: overviewList && overviewList.IsShowOverviewArticle,
+                OverviewArticleId: overviewList.ArticleId || 0,
+                OverviewArticleTitle: overviewList.Title || "",
+                IsShowOverviewArticle: overviewList.IsShowOverviewArticle || 0,
               });
             }
           });
@@ -409,39 +412,42 @@ export default {
     async editconfirmPerson() {
       if (this.stateValue) {
         const arr = this.subjectList.find((item) => item.ShowName === this.stateValue);
-        if (!arr) {
-          this.$message.error("输入正确的标的");
-          return;
-        }
         let overviewList = {};
-        const res = await raiInterface.getReportSelectionArticle({
-          IndustrialSubjectId: arr.IndustrialSubjectId,
-        });
+        const res = !arr
+          ? await raiInterface.getReportSelectionThird_name({
+              ThirdName: this.stateValue,
+              ChartPermissionId: this.chartPermissionId,
+            })
+          : await raiInterface.getReportSelectionArticle({
+              IndustrialSubjectId: arr.IndustrialSubjectId,
+            });
         if (res.Ret === 200) {
           overviewList = res.Data;
           this.overviewList = overviewList;
           this.industryList.forEach((item) => {
             if (item.ChartPermissionId == this.chartPermissionId) {
               if (item.List.length > 0) {
-                var isNext = item.List.some((item) => item.IndustrialSubjectName == arr.SubjectName);
+                var isNext = item.List.some((item) => item.ShowName == (arr ? arr.ShowName : res.Data.ThirdName));
               }
               if (isNext) return this.$message.error("标的重复!");
               const obj = {
                 Body: (this.$refs.twoRich && this.$refs.twoRich.value) || "",
                 ChartPermissionId: this.chartPermissionId,
-                IndustrialManagementId: arr.IndustrialManagementId + "",
-                IndustrialManagementName: arr.IndustryName,
-                IndustrialSubjectId: arr.IndustrialSubjectId + "",
-                IndustrialSubjectName: arr.SubjectName,
-                ShowName: arr.ShowName,
+                IndustrialManagementId: arr ? arr.IndustrialManagementId + "" : "",
+                IndustrialManagementName: arr ? arr.IndustryName : "",
+                IndustrialSubjectId: arr ? arr.IndustrialSubjectId + "" : "",
+                IndustrialSubjectName: arr ? arr.SubjectName : "",
+                ShowName: arr ? arr.ShowName || arr.IndustryName : res.Data.ThirdName,
+                ThirdId: res.Data.ThirdId || "",
+                ThirdName: res.Data.ThirdName || "",
                 CompanyLabel:
                   item.List[this.editNum].CompanyLabel && item.List[this.editNum].CompanyLabel.length > 0 ? item.List[this.editNum].CompanyLabel : [{ name: "", value: item.List.length + 1 }],
-                OverviewArticleId: overviewList.ArticleId,
-                OverviewArticleTitle: overviewList.Title,
-                IsShowOverviewArticle: overviewList.IsShowOverviewArticle,
+                OverviewArticleId: overviewList.ArticleId || 0,
+                OverviewArticleTitle: overviewList.Title || "",
+                IsShowOverviewArticle: overviewList.IsShowOverviewArticle || 0,
               };
               item.List.splice(this.editNum, 1, obj);
-              this.industrialSubjectName = arr.IndustryName || "";
+              this.industrialSubjectName = arr ? arr.IndustryName : res.Data.ThirdName || "";
             }
           });
         }
@@ -490,8 +496,8 @@ export default {
               clearInterval(this.timeInterval);
               sessionStorage.removeItem("addChoicenessQY");
               this.$message.success("操作成功!");
-              this.init();
-              this.$router.back();
+              type != "保存" && this.$router.back();
+              type != "保存" && this.init();
             }
           }
         }

+ 4 - 4
src/views/rai_manage/components/report_preview/choicenessPre.vue

@@ -27,7 +27,7 @@
         <div class="industry-li" v-for="(item, index) in dataListSubject" :key="index">
           <div class="industry-name">{{ item.ChartPermissionName }}</div>
           <div class="industry-subject">
-            <div class="subject-item" @click="positionSubject(key)" v-for="key in item.ListSubject" :key="key.IndustrialSubjectId">
+            <div class="subject-item" v-for="key in item.ListSubject" :key="key.IndustrialSubjectId">
               <a :href="`#miao${key.IndustrialSubjectId}${key.SubjectName}`">{{ key.ShowName }}</a>
               <img v-if="key.IsNew" class="icon_subject" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_subject.png" />
             </div>
@@ -42,15 +42,15 @@
             {{ item.ChartPermissionText }}
           </div>
           <div class="report-content-report" v-for="it in item.contetList" :key="it.IndustrialSubjectId">
-            <div class="content-report-title">
-              {{ it.IndustrialSubjectName }}
+            <div class="content-report-title" :id="`miao${it.IndustrialSubjectId}${it.SubjectName}`">
+              {{ it.IndustrialSubjectName || it.ThirdName || it.ShowName }}
             </div>
             <div v-html="it.Body" class="content-report-body"></div>
             <div class="content-report-detail" v-if="it.OverviewArticleId > 0">
               公司综述报告请
               <span @click="goArticle(it.OverviewArticleId)"> 点击查看 </span>
             </div>
-            <div class="company-label" :id="`miao${it.IndustrialSubjectId}${it.SubjectName}`">
+            <div class="company-label">
               <span class="item">{{ it.ShowName }}</span>
               <img v-if="it.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png" />
               <span class="item item-subject-name" v-for="val in it.CompanyLabel" :key="val"># {{ val }}</span>