Browse Source

切换分支

bding 2 months ago
parent
commit
cb9661c093

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

@@ -477,7 +477,20 @@ const dataMainInterface = {
   getRaiDataSummary:params => {
 	return http.get('/statistic_report/rai_data_summary/list',params);
   },
-  
+  /**
+  * 权益数据汇总列表接口
+  * @returns  
+  */
+  getRaiDataSummary:params => {
+	return http.get('/statistic_report/rai_data_summary/list',params);
+  },
+  /**
+  * 获取权益开拓组或者服务组下面的销售接口
+  * @returns  
+  */
+  getListRaiSellerServer:params => {
+	return http.get('/custom/seller/check/list_rai/server_type',params);
+  },
 }
 
 export {

+ 23 - 4
src/views/dataReport_manage/components/DataSummary.vue

@@ -1,17 +1,25 @@
 <template>
   <div>
     <el-dialog v-dialogDrag :title="title" :visible.sync="visible" :close-on-click-modal="false" :modal-append-to-body="false" width="60%" @close="closeDialog">
-      <el-table :data="tableData" border style="margin:20px 0">
-        <el-table-column v-for="(col, index) in columns" :key="index" :prop="col.prop" :label="col.label" align="center" />
+      <p v-if="isShowText">共xxx家客户,其中x家客户有多份合同</p>
+      <el-table :data="tableData" border style="margin: 20px 0; height: 400px">
+        <el-table-column v-for="(col, index) in columns" :key="index" :prop="col.prop" :label="col.label" align="center">
+          <template slot-scope="{ row }" v-if="col.label === '操作'">
+            <span style="color: #409eff; cursor: pointer; font-size: 14px; margin-right: 20px" @click="historicalNotesClickHandler(row)">历史备注</span>
+          </template>
+        </el-table-column>
       </el-table>
     </el-dialog>
+    <HistoricalNotesDlg :historicalNotesDlgVisible.sync="historicalNotesDlgVisible" :CompanyId.sync="historicalNotesId" />
   </div>
 </template>
 
 <script>
+import HistoricalNotesDlg from "@/components/historicalNotesDlg.vue";
+
 export default {
   name: "",
-  components: {},
+  components: { HistoricalNotesDlg },
   props: {
     visible: {
       type: Boolean,
@@ -29,14 +37,25 @@ export default {
   data() {
     return {
       tableData: [],
+      historicalNotesDlgVisible: false, //历史备注的弹框
+      historicalNotesId: 0,
     };
   },
-  computed: {},
+  computed: {
+    isShowText() {
+      return ["新签合同", "到期合同", "续约合同", "确认不续约合同"].includes(this.title);
+    },
+  },
   watch: {},
   created() {},
   mounted() {},
   methods: {
     closeDialog() {},
+    // 点击了历史留言
+    historicalNotesClickHandler(row) {
+      this.historicalNotesDlgVisible = true;
+      this.historicalNotesId = Number(this.companyId);
+    },
   },
 };
 </script>

+ 6 - 0
src/views/dataReport_manage/configdata.js

@@ -578,6 +578,12 @@ export const tableConfigs = {
     { label: "到款金额", prop: "paymentAmount" },
     { label: "到款日期", prop: "paymentDate" },
   ],
+  // 未到款比例
+  UnpaidRatioCount: [
+    { label: "开票日期", prop: "invoiceDate" },
+    { label: "到款金额", prop: "invoiceDate" },
+    { label: "未到款金额", prop: "invoiceDate" },
+  ],
 };
 export const tableDlgTitle = {
   AddTrialCount: "新增试用", //新增试用

+ 147 - 19
src/views/dataReport_manage/equityDataSummary.vue

@@ -1,19 +1,49 @@
 <template>
-  <div class="dataReport-container">
-    <div class="dataReport-top">
-      <button :class="['button-sty', { act: month === item.label }]" v-for="item in monthLabel" @click="toggleMonth(item.label)" :key="item.label">
-        {{ item.label }}
-      </button>
-      <date-picker v-model="timeRange" type="year" range value-type="format" placeholder="自定义时间段" :editable="false" @change="dateChange" :disabled-date="disabledDate" @pick="onPick" clearable />
-    </div>
+  <div class="data-summary-container">
+    <el-card>
+      <div style="display: flex">
+        <div class="data-summary-top">
+          <span :class="['button-sty', { act: monthType === item.label }]" v-for="item in monthLabel" @click="toggleMonth(item.label)" :key="item.label">
+            {{ item.label }}
+          </span>
+        </div>
+        <date-picker v-model="timeRange" type="year" range value-type="format" placeholder="开始至结束" :editable="false" @change="dateChange" :disabled-date="disabledDate" @pick="onPick" clearable />
+      </div>
+    </el-card>
     <div class="dataReport-main">
-      <!-- 筛选项 -->
-      <el-checkbox-group v-model="selectedFilters">
-        <el-checkbox v-for="(fields, key) in filterOptions" :key="key" :label="key">
-          {{ key }}
-        </el-checkbox>
-      </el-checkbox-group>
-
+      <!-- 合同类型帅选项 -->
+      <div style="display: flex; flex-wrap: wrap">
+        <div class="data-summary-top">
+          <span :class="['button-sty btn-filter', { act: selectedFilters.includes(item) }]" v-for="(fields, item) in filterOptions" @click="toggleFilter(item)" :key="item">
+            {{ item }}
+          </span>
+        </div>
+        <el-cascader
+          v-model="pathfinderSales"
+          :options="salesArrRai"
+          :props="salesArrProps"
+          clearable
+          @change="salesChangeHandedl"
+          placeholder="选择开拓组销售"
+          :disabled="serviceGroupSalesAct.length"
+          style="margin-right: 20px"
+        ></el-cascader>
+        <el-cascader
+          v-model="serviceGroupSalesAct"
+          :options="salesArrRai"
+          :props="salesArrProps"
+          clearable
+          @change="salesChangeHandedl"
+          placeholder="选择服务组销售"
+          :disabled="pathfinderSales.length"
+        ></el-cascader>
+        <div class="switch-box">
+          <span>开拓组</span>
+          <el-switch v-model="pathfinderSwitch" :disabled="isSwitchDisabled" @change="salesChangeHandedl"></el-switch>
+          <span>服务组</span>
+          <el-switch v-model="serviceGroupSwitch" :disabled="isSwitchDisabled" @change="salesChangeHandedl"></el-switch>
+        </div>
+      </div>
       <!-- 数据表格 -->
       <el-table :data="flattenedData" border style="width: 100%; margin-top: 20px" :span-method="mergeRows">
         <!-- DataType 作为合并行 -->
@@ -52,7 +82,7 @@ export default {
     return {
       timeRange: [currentYear, currentYear],
       timePick: "",
-      month: "季度",
+      monthType: "季度",
       monthLabel: [
         {
           label: "季度",
@@ -95,6 +125,18 @@ export default {
       showDlg: false,
       titleDlg: "",
       columnsDlg: [],
+      salesArrRai: [], //开拓者销售
+      pathfinderSales: [], //选中的开拓者销售
+      salesArrProps: {
+        multiple: true,
+        value: "AdminId",
+        label: "RealName",
+        children: "ChildrenList",
+      },
+      serviceGroupSales: [], //服务组销售
+      serviceGroupSalesAct: [], //选中的服务组销售
+      pathfinderSwitch: false, //开拓者开关
+      serviceGroupSwitch: false, //服务组开关
     };
   },
   methods: {
@@ -118,10 +160,16 @@ export default {
     },
     // 获取表格数据
     async getDataList() {
+      let AdminId = this.pathfinderSales.map((item) => item[item.length - 1]).join(",");
+      let ServiceAdminId = this.serviceGroupSalesAct.map((item) => item[item.length - 1]).join(",");
       let params = {
-        StartYear: "2025",
-        EndYear: "2025",
-        DataType: "年度",
+        StartYear: this.timeRange[0],
+        EndYear: this.timeRange[1],
+        DataType: this.monthType,
+        AdminId,
+        ServiceAdminId,
+        DevelopButton:this.pathfinderSwitch,
+        ServerButton:this.serviceGroupSwitch,
       };
       const res = await dataMainInterface.getRaiDataSummary(params);
       this.tableData = res.Data.List;
@@ -151,6 +199,35 @@ export default {
       this.titleDlg = tableDlgTitle[key];
       this.columnsDlg = tableConfigs[key];
     },
+    // 点击头部筛选项
+    toggleMonth(key) {
+      if (this.monthType !== key) {
+        this.monthType = key;
+        this.getDataList();
+      }
+    },
+    // 点击了标签
+    toggleFilter(item) {
+      if (this.selectedFilters.includes(item)) {
+        let index = this.selectedFilters.findIndex((key) => key === item);
+        this.selectedFilters.splice(index, 1);
+      } else {
+        this.selectedFilters.push(item);
+      }
+      this.getDataList();
+    },
+    /* 获取权益销售 */
+    getSaleRai() {
+      dataMainInterface.getListRaiSellerServer().then((res) => {
+        if (res.Ret === 200) {
+          this.salesArrRai = res.Data.List;
+          this.serviceGroupSales = res.Data.List;
+        }
+      });
+    },
+    salesChangeHandedl() {
+      this.getDataList();
+    },
   },
   computed: {
     // 计算动态表头
@@ -165,15 +242,66 @@ export default {
       });
       return columns;
     },
+    // 开关选择是否禁用
+    isSwitchDisabled() {
+      return this.pathfinderSales.length || this.serviceGroupSalesAct.length;
+    },
   },
   mounted() {
     this.getDataList();
+    this.getSaleRai();
   },
 };
 </script>
 
 <style scoped lang="scss">
-@import "./index.scss";
+.data-summary-container {
+  .data-summary-top {
+    box-sizing: border-box;
+    height: 40px;
+    border: #dcdfe6 1px solid;
+    border-radius: 4px;
+    margin-right: 20px;
+    overflow: hidden;
+  }
+  .button-sty {
+    display: inline-block;
+    text-align: center;
+    line-height: 40px;
+    width: 120px;
+    height: 40px;
+    cursor: pointer;
+    &:nth-child(2) {
+      border-left: 1px solid #dcdfe6;
+      border-right: 1px solid #dcdfe6;
+    }
+  }
+  .act {
+    background-color: #409eff !important;
+    color: #fff !important;
+  }
+  .dataReport-main {
+    padding: 20px 20px 80px;
+    background: #fff;
+    margin-top: 20px;
+    border: 1px solid #ececec;
+    border-radius: 4px;
+    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
+    .btn-filter {
+      background-color: #eaf3fe;
+      color: #333;
+    }
+    .switch-box {
+      display: flex;
+      align-items: center;
+      span {
+        flex-shrink: 0;
+        display: inline-block;
+        margin: 0 10px 0 20px;
+      }
+    }
+  }
+}
 .dete-partition {
   display: inline-block;
   margin: 0 10px;