فهرست منبع

增加年份接口

bding 1 سال پیش
والد
کامیت
72bd62dd2a
2فایلهای تغییر یافته به همراه23 افزوده شده و 3 حذف شده
  1. 7 0
      src/api/modules/statisticApi.js
  2. 16 3
      src/views/dataReport_manage/equityCustomStatistics.vue

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

@@ -392,6 +392,13 @@ const dataMainInterface = {
   */
   incrementalCompanyContractPercentageList:params => {
 	return http.get('/statistic_report/merge_company/company_contract_percentage/list',params);
+},
+  /**
+  * 权益客户续约率统计所能查询的年份
+  * @returns  
+  */
+  incrementalCompanyContractGetYearList:params => {
+	return http.get('/statistic_report/merge_company/get_year_list',params);
 },
 }
 

+ 16 - 3
src/views/dataReport_manage/equityCustomStatistics.vue

@@ -69,16 +69,19 @@
               </el-tooltip>
             </div>
             <div style="display: flex; align-items: center">
-              <el-date-picker
+              <!-- <el-date-picker
                 style="width: 105px; margin-right: 6px"
                 v-model="yearValue"
                 :clearable="false"
                 type="year"
                 value-format="yyyy"
                 placeholder="选择年"
-                @change="getIncrementalCompanyContractPercentageList"
+              
               >
-              </el-date-picker>
+              </el-date-picker> -->
+              <el-select v-model="yearValue" @change="getIncrementalCompanyContractPercentageList" placeholder="选择年">
+                <el-option v-for="item in yearList" :key="item" :label="item" :value="item"> </el-option>
+              </el-select>
               <span @click="annualSelectHandler(item)" :class="['select-lable', annualSelectActivue == item.name && 'act-select-lable']" v-for="item in annualSelectList" :key="item.name">
                 {{ item.name }}
               </span>
@@ -339,6 +342,7 @@ export default {
       previousDetailDlg: false,
       packageTypeList: ["增加套餐", "减少套餐", "维持套餐"],
       yearValue: new Date().getFullYear().toString(),
+      yearList: [],
       annualSelectList: [
         {
           name: "全年",
@@ -672,9 +676,18 @@ export default {
       };
       return params;
     },
+    // 获取年份
+    async getYearList() {
+      const res = await dataMainInterface.incrementalCompanyContractGetYearList();
+      if (res.Ret === 200) {
+        this.yearList = res.Data.List.reverse();
+        this.yearValue = this.yearList[0];
+      }
+    },
   },
   created() {},
   mounted() {
+    this.getYearList();
     this.getIncrementalCompanyContractPercentageList();
     this.incrementTableColums = equityTableColums(this.filterObj.data_type);
     this.getSale();