Browse Source

切换分支

bding 1 year ago
parent
commit
ec2625fcae

+ 17 - 1
src/api/modules/statisticApi.js

@@ -341,7 +341,23 @@ const dataMainInterface = {
    chartDetailList:params=>{
     return http.post('/statistic_report/report/seller_chart_collect_log/detail',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  
+  */
+ incrementalCompanyContractPermissionList:params => {
+ 	return http.get('/statistic_report/merge_company/company_contract_permission/list',params);
+ },
 }
 
 export {

+ 57 - 15
src/views/dataReport_manage/equityPackageStatistics.vue

@@ -59,15 +59,30 @@
           </el-col>
         </el-row>
       </div>
+      <div class="tabs-content-box">
+        <span v-for="item in listPermissionName" :key="item.ChartPermissionId" @click="tabsBoxBtn(item)" :class="item.PermissionName == tabsPitchon ? 'pitch' : ''">
+          {{ item.PermissionName }} ({{ item.Total }})
+        </span>
+      </div>
       <el-table :data="tableData" border style="margin-top: 20px; min-height: 400px" v-loading="isShowloadding" element-loading-text="数据加载中...">
         <el-table-column label="公司名称" prop="CompanyName" align="center"> </el-table-column>
-        <el-table-column label="所属销售" prop="SellerName" align="center"> </el-table-column>
+        <el-table-column width="100" label="所属销售" prop="SellerName" align="center"> </el-table-column>
         <el-table-column label="合同金额" prop="Money" align="center"> </el-table-column>
-        <el-table-column label="合同期限" prop="StartDate" align="center"> </el-table-column>
-        <el-table-column label="签约套餐" prop="PermissionName" align="center"> </el-table-column>
+        <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="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 row.PermissionName.split(',')" :key="key">{{ key }}</el-tag>
+            </template>
+          </template>
+        </el-table-column>
         <template v-if="filterObj.data_type == '行业未续约'">
-          <el-table-column label="当前行业状态" prop="PermissionName" align="center"> </el-table-column>
-          <el-table-column label="当前客户状态" prop="PermissionName" align="center"> </el-table-column>
+          <el-table-column width="118" label="当前行业状态" prop="PermissionNameStatus" align="center"> </el-table-column>
+          <el-table-column width="118" label="当前客户状态" prop="CompanyProductStatus" align="center"> </el-table-column>
         </template>
       </el-table>
       <el-col :span="24" class="toolbar" v-if="total">
@@ -88,7 +103,7 @@ export default {
   components: { mPage },
   computed: {
     exportExcel() {
-      let baseUrl = process.env.API_ROOT + "/statistic_report/incremental_company_list";
+      let baseUrl = process.env.API_ROOT + "/statistic_report/merge_company/company_contract_permission/list";
       let token = localStorage.getItem("auth") || "";
       let paramStr = "";
       // 处理销售筛选
@@ -99,13 +114,13 @@ export default {
         });
       }
       let obj = {
-        // AdminId: salesArr.join(","),
-        // EndDate: this.end_date,
-        // StartDate: this.start_date,
-        // DataType: this.filterObj.data_type == "新增试用客户" ? "新增试用" : this.filterObj.data_type,
-        // Keyword: this.searchVal,
-        // IsExport: true,
-        // IsConfirm: this.filterObj.data_type == "行业未续约" ? 1 : -1,
+        IsExport: true,
+        Keyword: this.searchVal,
+        AdminId: salesArr.join(","),
+        EndDate: this.end_date,
+        StartDate: this.start_date,
+        DataType: this.filterObj.data_type,
+        PermissionName: this.tabsPitchon,
       };
       for (let key in obj) {
         paramStr = `${paramStr}&${key}=${obj[key]}`;
@@ -174,6 +189,8 @@ export default {
       NewCompanyTotal: 0, //行业新签数
       NotRenewalCompanyTotal: 0, //行业未续约数
       RenewalCompanyTotal: 0, //行业续约数
+      listPermissionName: [],
+      tabsPitchon: "医药",
     };
   },
   /* 页面跳转前记录参数 */
@@ -242,9 +259,10 @@ export default {
         AdminId: salesArr.join(","),
         EndDate: this.end_date,
         StartDate: this.start_date,
-        DataType: this.filterObj.data_type == "新增试用客户" ? "新增试用" : this.filterObj.data_type,
+        DataType: this.filterObj.data_type,
+        PermissionName: this.tabsPitchon,
       };
-      dataMainInterface.incrementalEquityList(params).then((res) => {
+      dataMainInterface.incrementalCompanyContractPermissionList(params).then((res) => {
         if (res.Ret === 200) {
           this.tableData = res.Data.List || [];
           this.total = res.Data.Paging.Totals;
@@ -252,6 +270,7 @@ export default {
           this.RenewalCompanyTotal = res.Data.RenewalCompanyTotal;
           this.NotRenewalCompanyTotal = res.Data.NotRenewalCompanyTotal;
           this.isShowloadding = false;
+          this.listPermissionName = res.Data.ListPermissionName;
         }
       });
     },
@@ -285,6 +304,7 @@ export default {
     },
     /* 切换数据类型 */
     toggleType(label) {
+      this.tabsPitchon = "医药";
       this.filterObj.data_type = label;
       this.page_no = 1;
       this.getTableData();
@@ -314,6 +334,10 @@ export default {
         this.getTableData();
       }
     },
+    tabsBoxBtn(item) {
+      this.tabsPitchon = item.PermissionName;
+      this.changeFilter();
+    },
   },
   created() {},
   mounted() {
@@ -392,6 +416,24 @@ export default {
 .package-difference {
   cursor: pointer;
 }
+.tabs-content-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;
+  }
+}
 </style>
 <style lang="scss">
 #dataReport-container {