|
@@ -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>
|