浏览代码

15.9 准备合并14.7.1

bding 8 月之前
父节点
当前提交
f903924282

+ 6 - 1
src/routes/modules/statisticRoutes.js

@@ -121,7 +121,12 @@ export default [
 				},
 				hidden: true
 			}, */
-
+			{
+				path: 'equityServiceStatistics',
+				component: () => import('@/views/dataReport_manage/equityServiceStatistics.vue'),
+				name: '权益服务统计',
+				hidden: false
+			},
 		]
 	},
 ]

+ 38 - 0
src/views/custom_manage/contacts/compontents/feedbackDlg.vue

@@ -0,0 +1,38 @@
+<template>
+  <div class="container">
+    <el-dialog v-dialogDrag :visible.sync="showFeedbackDlg" :close-on-click-modal="false" :modal-append-to-body="false" @close="cancelHandle" center title="交流反馈">
+      <div>
+        <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="textarea"> </el-input>
+        <el-table border :data="tableData"></el-table>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "",
+  components: {},
+  props: {
+    showFeedbackDlg: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      tableData: "",
+    };
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {
+    cancelHandle() {
+      this.$emit("update:cancelHandle", false);
+    },
+  },
+};
+</script>
+<style scoped lang=""></style>

+ 18 - 15
src/views/custom_manage/contacts/contactsList.vue

@@ -56,7 +56,7 @@
     <el-card>
       <el-table :data="tableData" style="width: 100%" border @sort-change="sortChangeHandle">
         <el-table-column align="center" prop="RealName" width="90" label="姓名"> </el-table-column>
-        <el-table-column align="center" prop="Mobile" width="130" label="手机号/邮箱">
+        <el-table-column align="center" prop="Mobile" width="110" label="手机号/邮箱">
           <template slot-scope="{ row }"> {{ row.Mobile || row.Email }} </template>
         </el-table-column>
         <el-table-column align="center" prop="CompanyName" label="公司名称">
@@ -64,20 +64,20 @@
             <span class="editsty" @click="goDetail(scope.row)">{{ scope.row.CompanyName }}</span></template
           >
         </el-table-column>
-        <el-table-column align="center" prop="Status" width="100" label="状态"> </el-table-column>
+        <el-table-column align="center" prop="Status" width="110" label="状态"> </el-table-column>
         <el-table-column align="center" prop="SellerName" width="110" label="所属销售"> </el-table-column>
         <el-table-column align="center" prop="IsMaker" width="80" label="是否KP">
           <template slot-scope="{ row }">
             {{ row.IsMaker == 1 ? "是" : "否" }}
           </template>
         </el-table-column>
-        <el-table-column align="center" prop="RegisterTime" width="130" label="注册时间"> </el-table-column>
-        <el-table-column align="center" width="130" label="是否关注公众号">
+        <el-table-column align="center" prop="RegisterTime" width="110" label="注册时间"> </el-table-column>
+        <el-table-column align="center" width="120" label="是否关注公众号">
           <template slot-scope="{ row }">
             {{ row.IsSubscribeCygx == 1 ? "是" : "否" }}
           </template>
         </el-table-column>
-        <el-table-column align="center" prop="InteractionNum" width="130" label="互动量" :render-header="renderHeader" sortable="custom">
+        <el-table-column align="center" prop="InteractionNum" width="110" label="互动量" :render-header="renderHeader" sortable="custom">
           <template slot-scope="{ row }">
             <span class="editsty" @click="lookInteraction(row, '个人')">{{ row.InteractionNum }}</span> /
             <el-popover trigger="hover" placement="right" @show="isShowOrganization(row)">
@@ -95,14 +95,7 @@
           <div slot="header" slot-scope="{}" style="text-align: center">标签</div>
           <template slot-scope="{ row }">
             <div class="popover-item">
-              <el-tag
-                size="mini"
-                style="margin: 5px 8px; cursor: pointer"
-                v-for="item in lookLabelListNumber(row)"
-                :key="item"
-                :type="userLabel == item && 'danger'"
-                @click="labelChildren(item, row)"
-              >
+              <el-tag size="mini" style="margin: 5px 8px; cursor: pointer" v-for="item in lookLabelListNumber(row)" :key="item" :type="userLabel == item && 'danger'" @click="labelChildren(item, row)">
                 {{ item }}
               </el-tag>
               <span @click="showLabelDlg(row)" style="font-weight: 700; padding: 5px 10px" class="editsty" v-if="row.Labels && row.Labels.split(',').length > 10">...</span>
@@ -119,9 +112,11 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column align="center" prop="" label="操作" width="100">
+        <el-table-column align="center" prop="" label="操作" width="160">
           <template slot-scope="{ row }">
             <span :class="row.IsRemind ? 'deletesty' : 'editsty'" @click="remindHandler(row)">{{ row.IsRemind ? "取消提醒" : "互动提醒" }}</span>
+            &nbsp;&nbsp;&nbsp;&nbsp;
+            <span class="editsty" @click="feedbackHandler(row)">交流反馈</span>
           </template>
         </el-table-column>
       </el-table>
@@ -154,6 +149,7 @@
     <InteractionDlg :interactionDlg.sync="interactionDlg" :interactionFrom="interactionFrom" />
     <label-dlg :isShowLabelDlg.sync="isShowLabelDlg" :dlgLabelList.sync="dlgLabelList" @labelChildren="labelChildren" :userLabel="userLabel" />
     <remind-dlg :isShowRemindDlg.sync="isShowRemindDlg" :remindList.sync="remindList" />
+    <FeedbackDlg :showFeedbackDlg.sync="showFeedbackDlg" :remindList.sync="remindList" />
   </div>
 </template>
 
@@ -164,9 +160,10 @@ import mDialog from "@/components/mDialog.vue";
 import InteractionDlg from "./compontents/interactionDlg.vue";
 import LabelDlg from "./compontents/labelDlg.vue";
 import RemindDlg from "./compontents/remindDlg.vue";
+import FeedbackDlg from "./compontents/feedbackDlg.vue";
 export default {
   name: "",
-  components: { mPage, mDialog, InteractionDlg, LabelDlg, RemindDlg },
+  components: { mPage, mDialog, InteractionDlg, LabelDlg, RemindDlg, FeedbackDlg },
   props: {},
   data() {
     return {
@@ -222,6 +219,7 @@ export default {
       dlgLabelList: {}, //
       isShowRemindDlg: false, // 消息提醒的弹框
       remindList: {}, // 消息提醒的数据
+      showFeedbackDlg: false, // 交流反馈的弹框
     };
   },
   computed: {},
@@ -436,6 +434,11 @@ export default {
       this.dlgLabelList = row;
       this.isShowLabelDlg = true;
     },
+    // 点击了交流反馈
+    feedbackHandler(item) {
+      this.remindList = item;
+      this.showFeedbackDlg = true;
+    },
   },
   /* 页面跳转前记录参数 */
   beforeRouteLeave(to, from, next) {

+ 24 - 1
src/views/custom_manage/contacts/mutualList.vue

@@ -1,7 +1,10 @@
 <template>
   <div class="container-mutualList">
     <el-card>
-      <span class="intro">{{ userForm.UserName }}-{{ userForm.Mobile }}-{{ userForm.ComapnyName }}</span>
+      <div>
+        <span class="intro">{{ userForm.UserName }}-{{ userForm.Mobile }}-{{ userForm.ComapnyName }}</span>
+        <span class="organization-details" @click="goWholeDetail">构互动详情>></span>
+      </div>
       <div class="tabs">
         <span :class="['item', activeName == item.Source && 'active']" v-for="item in list" :key="item.Source" @click="handleTabsClick(item)">{{ item.PermissionName }} ({{ item.TotalNum }})</span>
       </div>
@@ -193,6 +196,19 @@ export default {
     chartDetial(item) {
       window.open(item.HttpUrl, "_blank");
     },
+    // 机构互助详情
+    goWholeDetail() {
+      console.log(this.$route.query);
+      return
+      const { href } = this.$router.resolve({
+        path: "/organizationList",
+        query: {
+          id: this.$route.query.id,
+          CompanyId: this.$route.query.CompanyId,
+        },
+      });
+      window.open(href, "_blank");
+    },
   },
 };
 </script>
@@ -206,5 +222,12 @@ export default {
     border-radius: 4px;
   }
   @import "./compontents/details.scss";
+  .organization-details {
+    display: inline-block;
+    margin-left: 20px;
+    cursor: pointer;
+    font-size: 14px;
+    color: #3385ff;
+  }
 }
 </style>

+ 92 - 0
src/views/dataReport_manage/components/CoverageRateDlg.vue

@@ -0,0 +1,92 @@
+<template>
+  <el-dialog v-dialogDrag :visible.sync="isCoverageRateShow" @close="handleClose" :modal-append-to-body="false" center title="近4周服务覆盖率">
+    <el-table :data="dataList" border max-height="250" style="width: 100%;margin-bottom:20px">
+      <el-table-column align="center" prop="address">
+        <template slot="header" slot-scope="{}">
+          <p>本周服务覆盖率</p>
+          <p>{{ getWeekRange(0) }}</p>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="address">
+        <template slot="header" slot-scope="{}">
+          <p>上周服务覆盖率</p>
+          <p>{{ getWeekRange(-1) }}</p>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="address">
+        <template slot="header" slot-scope="{}">
+          <p>上上周服务覆盖率</p>
+          <p>{{ getWeekRange(-2) }}</p>
+        </template></el-table-column
+      >
+      <el-table-column align="center" prop="address">
+        <template slot="header" slot-scope="{}">
+          <p>上三周服务覆盖率</p>
+          <p>{{ getWeekRange(-3) }}</p>
+        </template>
+      </el-table-column>
+    </el-table>
+  </el-dialog>
+</template>
+
+<script>
+import { dataMainInterface } from "@/api/api.js";
+export default {
+  props: {
+    rowInfo: {
+      type: Object,
+      default: null,
+    },
+    isCoverageRateShow: {
+      type: Boolean,
+      require: true,
+    },
+  },
+  data() {
+    return {
+      dataList: [],
+    };
+  },
+  methods: {
+    handleClose() {
+      this.$emit("update:isCoverageRateShow", false);
+    },
+    async getrenewalReasonList() {
+      const res = await dataMainInterface.mergeCompanyPreviousDetail({
+        CompanyContractId: this.rowInfo.CompanyContractId,
+      });
+      if (res.Ret == 200) {
+        this.dataList = [res.Data.Detail];
+      }
+    },
+    // 时间的计算
+    getWeekRange(offset) {
+      const now = new Date();
+      const startOfWeek = new Date(now);
+      startOfWeek.setDate(now.getDate() - now.getDay() + 1 + offset * 7); // 设置为每周的周一
+      const endOfWeek = new Date(startOfWeek);
+      endOfWeek.setDate(startOfWeek.getDate() + 6); // 设置为每周的周日
+
+      const formatDate = (date) => {
+        const year = date.getFullYear();
+        const month = ("0" + (date.getMonth() + 1)).slice(-2);
+        const day = ("0" + date.getDate()).slice(-2);
+        return `${month}-${day}`;
+      };
+
+      return `(${formatDate(startOfWeek)} ~ ${formatDate(endOfWeek)})`;
+    },
+  },
+  watch: {
+    isCoverageRateShow(val) {
+      if (val) {
+        this.getrenewalReasonList();
+      } else {
+        this.renewalList = [];
+      }
+    },
+  },
+};
+</script>
+
+<style></style>

+ 110 - 0
src/views/dataReport_manage/components/ServiceDetailsDlg.vue

@@ -0,0 +1,110 @@
+<template>
+  <el-dialog v-dialogDrag :visible.sync="isServiceDetailsShow" @close="handleClose" :modal-append-to-body="false" center title="服务明细--">
+    <el-table ref="updateTable" :data="tableData" style="width: 100%" border height="400px">
+      <el-table-column align="center" prop="CompanyName" label="服务内容"> </el-table-column>
+      <el-table-column align="center" prop="address" label="服务类型"> </el-table-column>
+      <el-table-column align="center" prop="address" label="主题标签"> </el-table-column>
+      <el-table-column align="center" prop="address" label="参与人"> </el-table-column>
+      <el-table-column align="center" prop="address" label="是否kp"> </el-table-column>
+      <el-table-column align="center" prop="address" label="服务量小计 "> </el-table-column>
+      <el-table-column align="center" prop="address" label="时间">
+        <template slot="header" slot-scope="{}">
+          <span>时间</span>
+          <el-tooltip class="item" effect="dark" content="时间指的是:活动开始时间,一对一路演开始时间,报告阅读时间,交流反馈提交时间" placement="top-start">
+            <i class="el-icon-warning"></i>
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+  </el-dialog>
+</template>
+
+<script>
+import { dataMainInterface, raiInterface } from "@/api/api.js";
+export default {
+  props: {
+    rowInfo: {
+      type: Object,
+      default: null,
+    },
+    isServiceDetailsShow: {
+      type: Boolean,
+      require: true,
+    },
+  },
+  data() {
+    return {
+      tableData: [], // 初始表格数据
+      page_no: 1, // 当前页码
+      pageSize: 6, // 每页显示的行数
+      noMoreData: false,
+    };
+  },
+  methods: {
+    /* 滚动监听 */
+    loadMoveHandler() {
+      let dom = this.$refs.updateTable.bodyWrapper;
+      dom.addEventListener(
+        "scroll",
+        _.throttle(() => {
+          const scroll = dom.scrollHeight - dom.scrollTop - dom.clientHeight;
+          if (scroll <= 1 && !this.noMoreData) {
+            this.page_no++;
+            this.loadData();
+          }
+        }, 300)
+      );
+    },
+
+    async loadData() {
+      const res = await raiInterface.adviceList({
+        PageSize: this.pageSize,
+        CurrentIndex: this.page_no,
+      });
+      if (res.Ret == 200) {
+        this.tableData = this.tableData.concat(res.Data.List);
+        this.noMoreData = res.Data.Paging.IsEnd;
+      }
+    },
+    // 关闭弹框
+    handleClose() {
+      this.$emit("update:isServiceDetailsShow", false);
+    },
+    // 时间的计算
+    getWeekRange(offset) {
+      const now = new Date();
+      const startOfWeek = new Date(now);
+      startOfWeek.setDate(now.getDate() - now.getDay() + 1 + offset * 7); // 设置为每周的周一
+      const endOfWeek = new Date(startOfWeek);
+      endOfWeek.setDate(startOfWeek.getDate() + 6); // 设置为每周的周日
+
+      const formatDate = (date) => {
+        const year = date.getFullYear();
+        const month = ("0" + (date.getMonth() + 1)).slice(-2);
+        const day = ("0" + date.getDate()).slice(-2);
+        return `${month}-${day}`;
+      };
+
+      return `(${formatDate(startOfWeek)} ~ ${formatDate(endOfWeek)})`;
+    },
+  },
+  watch: {
+    isServiceDetailsShow: {
+      handler(val) {
+        if (val) {
+          this.loadData();
+          this.$nextTick(() => {
+            this.loadMoveHandler();
+          });
+        } else {
+          this.tableData = [];
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+};
+</script>
+
+<style></style>

+ 177 - 0
src/views/dataReport_manage/equityServiceStatistics.vue

@@ -0,0 +1,177 @@
+<template>
+  <div class="dataReport-service-container">
+    <el-card>
+      <el-cascader
+        v-model="filterObj.sale"
+        placeholder="请选择销售"
+        style="width: 230px; margin-right: 10px"
+        :options="salesArr"
+        :props="defaultSalesProps"
+        :show-all-levels="false"
+        collapse-tags
+        clearable
+        filterable
+        @change="changeFilter"
+      >
+      </el-cascader>
+      <el-cascader
+        v-model="filterObj.sale"
+        placeholder="请选择咨询销售"
+        style="width: 230px; margin-right: 10px"
+        :options="salesArr"
+        :props="defaultSalesProps"
+        :show-all-levels="false"
+        collapse-tags
+        clearable
+        filterable
+        @change="changeFilter"
+      >
+      </el-cascader>
+      <el-select v-model="filterObj.status" placeholder="客户状态" style="width: 230px; margin-right: 10px">
+        <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+      </el-select>
+      <el-select v-model="filterObj.serviceType" placeholder="服务类型" style="width: 230px; margin-right: 10px">
+        <el-option v-for="item in serviceTypeOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+      </el-select>
+      <el-input v-model="filterObj.lable" placeholder="请输入服务主题标签" style="width: 230px; margin-right: 10px"></el-input>
+      <a :href="exportExcel" download>
+        <el-button type="primary">下载</el-button>
+      </a>
+    </el-card>
+    <el-card style="margin-top: 20px">
+      <el-table :data="tableData" border style="width: 100%">
+        <el-table-column align="center" prop="date" label="客户名称" width="180"> </el-table-column>
+        <el-table-column align="center" prop="name" width="180">
+          <template slot="header" slot-scope="{}">
+            <span>近4周平均服务覆盖率</span>
+            <el-tooltip effect="dark" placement="top-start" content="近4周服务覆盖率的平均值">
+              <i class="el-icon-warning"></i>
+            </el-tooltip> </template
+        ></el-table-column>
+        <el-table-column align="center" prop="address" label="当前状态"> </el-table-column>
+        <el-table-column align="center" prop="address" label="销售"> </el-table-column>
+        <el-table-column align="center" prop="address" label="服务组销售"> </el-table-column>
+        <el-table-column align="center" prop="address" label="合同期限"> </el-table-column>
+        <el-table-column align="center" prop="address" label="合同金额"> </el-table-column>
+        <el-table-column align="center" prop="address" label="签约套餐"> </el-table-column>
+        <el-table-column align="center" prop="address" width="118">
+          <template slot="header" slot-scope="{}">
+            <p>本周服务量</p>
+            <p>{{ getWeekRange(0) }}</p>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="address" width="118">
+          <template slot="header" slot-scope="{}">
+            <p>上周服务量</p>
+            <p>{{ getWeekRange(-1) }}</p>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="address" width="118">
+          <template slot="header" slot-scope="{}">
+            <p>上上周服务量</p>
+            <p>{{ getWeekRange(-2) }}</p>
+          </template></el-table-column
+        >
+        <el-table-column align="center" prop="address" width="118">
+          <template slot="header" slot-scope="{}">
+            <p>上三周服务量</p>
+            <p>{{ getWeekRange(-3) }}</p>
+          </template></el-table-column
+        >
+      </el-table>
+      <!-- 页数选择器 -->
+      <m-page style="margin:20px 0" :page_no="page_no" :pageSize="15" :total="total" @handleCurrentChange="pageChange" />
+    </el-card>
+    <!-- 覆盖率弹框 -->
+    <coverage-rate-dlg :isCoverageRateShow.sync="isCoverageRateShow" />
+    <!-- 服务明细- -->
+    <service-details-dlg :isServiceDetailsShow.sync="isServiceDetailsShow" />
+  </div>
+</template>
+
+<script>
+import { dataMainInterface, customInterence } from "@/api/api.js";
+import CoverageRateDlg from "./components/CoverageRateDlg.vue";
+import ServiceDetailsDlg from "./components/ServiceDetailsDlg.vue";
+import mPage from "@/components/mPage.vue";
+
+export default {
+  name: "",
+  components: { CoverageRateDlg, ServiceDetailsDlg, mPage },
+  props: {},
+  data() {
+    return {
+      page_no: 1,
+      total: 0,
+      salesArr: [], //销售列表
+      tableData:[],
+      defaultSalesProps: {
+        multiple: true,
+        label: "RealName",
+        children: "ChildrenList",
+        value: "AdminId",
+      }, //销售级联配置
+      filterObj: {
+        sale: "",
+        status: "",
+        serviceType: "",
+        lable: "",
+      },
+      statusOptions: [
+        { label: "正式客户", value: "正式客户" },
+        { label: "未续约客户", value: "未续约客户" },
+      ],
+      serviceTypeOptions: [
+        { label: "线上活动", value: "线上活动" },
+        { label: "线下活动", value: "线下活动" },
+      ],
+      isCoverageRateShow: false, //覆盖率弹框
+      isServiceDetailsShow: true, //服务明细弹框
+    };
+  },
+  computed: {
+    exportExcel() {
+      return "";
+    },
+  },
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {
+    /* 获取销售 */
+    getSale() {
+      customInterence.getSalesRaiData().then((res) => {
+        if (res.Ret === 200) {
+          this.salesArr = res.Data.List;
+        }
+      });
+    },
+    /* 筛选改变时 */
+    changeFilter() {
+      this.page_no = 1;
+    },
+    // 时间的计算
+    getWeekRange(offset) {
+      const now = new Date();
+      const startOfWeek = new Date(now);
+      startOfWeek.setDate(now.getDate() - now.getDay() + 1 + offset * 7); // 设置为每周的周一
+      const endOfWeek = new Date(startOfWeek);
+      endOfWeek.setDate(startOfWeek.getDate() + 6); // 设置为每周的周日
+
+      const formatDate = (date) => {
+        const year = date.getFullYear();
+        const month = ("0" + (date.getMonth() + 1)).slice(-2);
+        const day = ("0" + date.getDate()).slice(-2);
+        return `${month}-${day}`;
+      };
+
+      return `(${formatDate(startOfWeek)} ~ ${formatDate(endOfWeek)})`;
+    },
+    pageChange() {},
+  },
+};
+</script>
+<style scoped lang="scss">
+.dataReport-service-container {
+}
+</style>