bding 1 жил өмнө
parent
commit
2339c33cb4

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

@@ -699,6 +699,10 @@ const customInterence = {
   getSalesData: (params) => {
     return http.get("/custom/receive/seller", params);
   },
+  //权益销售列表
+  getSalesRaiData: (params) => {
+    return http.get("/custom/seller/check/list_rai", params);
+  },
   //启用/禁用权限
   changeSaleAuth: (params) => {
     return http.post("/custom/receive/permission/change", params);

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

@@ -52,6 +52,23 @@ const dataMainInterface = {
 		return http.get('/statistic_report/incremental_company_list',params);
 	},
 	/**
+	 * 权益客户统计列表接口
+	 * @param {PageSize} params 
+	 * @param {CurrentIndex} params 
+	 * @param {EndDate} params 结束日期
+	 * @param {CompanyType} params 
+	 * @param {AdminId } params 销售id,多个用英文逗号隔开,空字符串为全部
+	 * @param {RegionType } params 
+	 * @param {StartDate} params 
+	 * @param {DataType} params 
+	 * @param {IsConfirm} params  是否确认续约: -1-默认全部; 0-待确认; 1-已确认
+	 * @param {CompanyAscribeId} params  归因Id
+	 * @returns  
+	 */
+	incrementalEquityList:params => {
+		return http.get('/statistic_report/merge_company_list',params);
+	},
+	/**
  * 获取未续约备注列表
  * @param {CompanyId} params 公司ID
  * @param {ProductId} params 产品ID 1:FICC ,2权益
@@ -149,6 +166,10 @@ const dataMainInterface = {
 	moreRenewReason:params => {
 		return http.get('/statistic_report/more_renew_reason',params);
 	},
+	// 客户数据未续约说明更多
+	mergeCompanyPreviousDetail:params => {
+		return http.get('/statistic_report/merge_company_previous/detail',params);
+	},
 	/**
 	 * 	// 获取图表阅读统计列表
 	 * @param {PageSize} params 

+ 1 - 1
src/views/custom_manage/contacts/contactsList.vue

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

+ 63 - 0
src/views/dataReport_manage/components/previousDetail.vue

@@ -0,0 +1,63 @@
+<template>
+  <el-dialog v-dialogDrag :visible.sync="previousDetailDlg" @close="handleClose" :modal-append-to-body="false" center title="未续约说明">
+    <el-table :data="dataList" border max-height="250" style="margin-bottom: 20px">
+      <el-table-column label="合同期限" prop="StartDate" align="center">
+        <template slot-scope="{ row }">
+          <span> {{ row.StartDate }} ~ {{ row.EndDate }} </span>
+        </template>
+      </el-table-column>
+      <el-table-column label="合同金额" prop="Money" align="center" />
+      <el-table-column label="签约套餐" prop="PermissionName" align="center">
+        <template slot-scope="{ row }">
+          <template v-if="row.PermissionName.length">
+            <el-tag size="mini" style="margin: 0 10px 10px 0" v-for="key in scope.row.PermissionName.split(',')" :key="key">{{ key }}</el-tag>
+          </template>
+        </template>
+      </el-table-column>
+    </el-table>
+  </el-dialog>
+</template>
+
+<script>
+import { dataMainInterface } from "@/api/api.js";
+export default {
+  props: {
+    rowInfo: {
+      type: Object,
+      default: null,
+    },
+    previousDetailDlg: {
+      type: Boolean,
+      require: true,
+    },
+  },
+  data() {
+    return {
+      dataList: [],
+    };
+  },
+  methods: {
+    handleClose() {
+      this.$emit("update:previousDetailDlg", false);
+    },
+    async getrenewalReasonList() {
+      console.log(this.rowInfo);
+      const res = await dataMainInterface.mergeCompanyPreviousDetail({
+        ComPanyId: this.rowInfo.CompanyId,
+      });
+      if (res.Ret == 200) this.dataList = [res.Data.Detail];
+    },
+  },
+  watch: {
+    isShow(val) {
+      if (val) {
+        this.getrenewalReasonList();
+      } else {
+        this.renewalList = [];
+      }
+    },
+  },
+};
+</script>
+
+<style></style>

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

@@ -317,7 +317,7 @@ export const equityTableColums = (type) => {
         {
           label: "合同期限",
           align: "center",
-          key: "",
+          key: "StartDate",
         },
         {
           label: "合同金额",
@@ -327,7 +327,7 @@ export const equityTableColums = (type) => {
         {
           label: "续约套餐",
           align: "center",
-          key: "",
+          key: "PermissionName",
         },
       ]
     : type === "未续约客户"

+ 47 - 9
src/views/dataReport_manage/equityCustomStatistics.vue

@@ -31,7 +31,7 @@
       </div>
       <div class="main-section">
         <el-row :gutter="36">
-          <el-col :span="6" v-for="item in data_typeArr" :key="item.label">
+          <el-col :span="8" v-for="item in data_typeArr" :key="item.label">
             <el-card :class="['base-card', { 'main-card': filterObj.data_type === item.label }]" shadow="hover" @click.native="toggleType(item.label)">
               <div slot="header" class="clearfix">
                 <span>
@@ -53,12 +53,29 @@
                 </span>
               </div>
               <div class="card-cont">
-                {{ item.label === "新签客户" ? NewCompanyTotal : item.label === "续约客户" ? RenewalCompanyTotal : item.label === "未续约客户" ? NotRenewalCompanyTotal : "" }}
+                {{
+                  item.label === "新签客户"
+                    ? NewCompanyTotal
+                    : item.label === "续约客户"
+                    ? RenewalCompanyTotal
+                    : item.label === "未续约客户"
+                    ? NotRenewalCompanyTotal + " / " + NotRenewalCompanyToBeConfirmTotal
+                    : ""
+                }}
               </div>
             </el-card>
           </el-col>
         </el-row>
       </div>
+      <div class="tabs-box" v-if="filterObj.data_type == '续约客户'">
+        <el-radio-group v-model="PackageDifference" class="tabs-box-confirm" @change="notRenewedConfirmChange">
+          <el-radio-button label="增加套餐">增加套餐</el-radio-button>
+          <div class="center-line"></div>
+          <el-radio-button label="减少套餐">减少套餐</el-radio-button>
+          <div class="center-line"></div>
+          <el-radio-button label="维持套餐">维持套餐</el-radio-button>
+        </el-radio-group>
+      </div>
       <div class="tabs-box" v-if="filterObj.data_type == '未续约客户'">
         <el-radio-group v-model="isNotRenewedConfirm" class="tabs-box-confirm" @change="notRenewedConfirmChange">
           <el-radio-button :label="1">已确认</el-radio-button>
@@ -78,7 +95,7 @@
         <template v-for="item in incrementTableColums">
           <el-table-column :key="item.label" :label="item.label" :width="item.widthsty" align="center">
             <template slot-scope="scope">
-              <span :style="item.textsty" @click="jumpHandle(scope.row, item)" v-if="item.key === 'CreateTime' || item.key === 'StartDate' || item.key === 'EndDate'">
+              <span :style="item.textsty" @click="jumpHandle(scope.row, item)" v-if="item.key === 'CreateTime'">
                 {{ scope.row[item.key] | formatTime }}
               </span>
               <span v-else-if="item.label == '未续约说明'">
@@ -90,7 +107,7 @@
                 <span :style="item.textsty" @click="jumpHandle(scope.row, item)">
                   {{ scope.row[item.key] }}
                 </span>
-                <div class="package-difference" v-if="scope.row.PackageDifference">
+                <div class="package-difference" v-if="scope.row.PackageDifference" @click="previousDetailHadler(scope.row)">
                   {{ scope.row.PackageDifference }}
                 </div>
               </div>
@@ -103,6 +120,14 @@
                   {{ scope.row[item.key] }}
                 </span>
               </div>
+              <div v-else-if="item.key == 'PermissionName'">
+                <template v-if="scope.row.PermissionName.length">
+                  <el-tag size="mini"  style="margin:0 10px 10px 0" v-for="key in scope.row.PermissionName.split(',')" :key="key">{{ key }}</el-tag>
+                </template>
+              </div>
+              <div v-else-if="item.key == 'StartDate'">
+                <span> {{ scope.row[item.key] }} ~ {{ scope.row.EndDate }} </span>
+              </div>
               <span v-else :style="item.textsty" @click="jumpHandle(scope.row, item)">
                 {{ scope.row[item.key] }}
               </span>
@@ -139,6 +164,7 @@
       @refreshReasonList="getNORenewalReasonList"
       @saveLabel="saveLabel"
     />
+    <previous-detail :previousDetailDlg.sync="previousDetailDlg" :rowInfo="rowInfo"/>
   </div>
 </template>
 
@@ -150,12 +176,13 @@ import renewalListDia from "./components/renewalListDia.vue";
 import addRemark from "./components/noRenewalReasonDia/addRemark.vue";
 import viewRemark from "./components/noRenewalReasonDia/viewRemark.vue";
 import confirmedNoRenewal from "./components/noRenewalReasonDia/confirmedNoRenewal.vue";
+import PreviousDetail from './components/previousDetail.vue';
 
 var moment = require("moment");
 moment().format();
 export default {
   name: "",
-  components: { mPage, renewalListDia, addRemark, viewRemark, confirmedNoRenewal },
+  components: { mPage, renewalListDia, addRemark, viewRemark, confirmedNoRenewal, PreviousDetail },
   computed: {
     exportExcel() {
       let baseUrl = process.env.API_ROOT + "/statistic_report/incremental_company_list";
@@ -245,6 +272,7 @@ export default {
       NewCompanyTotal: 0, //新签客户数
       NotRenewalCompanyTotal: 0, //未续约客户数
       RenewalCompanyTotal: 0, //续约客户数
+      NotRenewalCompanyToBeConfirmTotal: 0,
       isRenewalShow: false, //未续约说明列表弹框是否显示
       rowInfo: null, // 未续约说明更多行信息
       tabsList: [
@@ -270,6 +298,8 @@ export default {
         detailReason: "",
       },
       incrementTableColums: [],
+      PackageDifference: "增加套餐",
+      previousDetailDlg: false,
     };
   },
   /* 页面跳转前记录参数 */
@@ -355,14 +385,16 @@ export default {
         TryOutType: this.filterObj.data_type == "未续约客户" && this.isNotRenewedConfirm == 1 ? this.tabsActiveName : "",
         IsConfirm: this.filterObj.data_type == "未续约客户" ? this.isNotRenewedConfirm : -1,
         CompanyAscribeId: this.noRenewalReasonId,
+        PackageDifference: this.PackageDifference,
       };
-      dataMainInterface.incrementalList(params).then((res) => {
+      dataMainInterface.incrementalEquityList(params).then((res) => {
         if (res.Ret === 200) {
           this.tableData = res.Data.List || [];
           this.total = res.Data.Paging.Totals;
           this.NewCompanyTotal = res.Data.NewCompanyTotal;
           this.RenewalCompanyTotal = res.Data.RenewalCompanyTotal;
           this.NotRenewalCompanyTotal = res.Data.NotRenewalCompanyTotal;
+          this.NotRenewalCompanyToBeConfirmTotal = res.Data.NotRenewalCompanyToBeConfirmTotal;
           this.NotRenewalTryOut = res.Data.NotRenewalTryOut;
           this.NotRenewalNotTryOut = res.Data.NotRenewalNotTryOut;
           this.isShowloadding = false;
@@ -371,7 +403,7 @@ export default {
     },
     /* 获取销售 */
     getSale() {
-      customInterence.getSale().then((res) => {
+      customInterence.getSalesRaiData().then((res) => {
         if (res.Ret === 200) {
           this.salesArr = res.Data.List;
         }
@@ -523,11 +555,15 @@ export default {
         }
       });
     },
+    previousDetailHadler(row) {
+      console.log(123);
+      this.rowInfo = row;
+      this.previousDetailDlg = true;
+    },
   },
   created() {},
   mounted() {
     this.incrementTableColums = equityTableColums(this.filterObj.data_type);
-    console.log(this.incrementTableColums);
     this.getSale();
     if (sessionStorage.getItem("incrementBack")) {
       let backData = JSON.parse(sessionStorage.getItem("incrementBack"));
@@ -540,7 +576,6 @@ export default {
     /* 默认选中近1个月 */
     this.filterDate(this.filterObj.month === "近1个月" ? 1 : this.filterObj.month === "近2个月" ? 2 : this.filterObj.month === "近3个月" ? 3 : 0);
   },
-  
 };
 </script>
 <style lang="scss" scoped>
@@ -588,6 +623,9 @@ export default {
     }
   }
 }
+.package-difference {
+  cursor: pointer;
+}
 </style>
 <style lang="scss">
 #dataReport-container {