|
@@ -0,0 +1,443 @@
|
|
|
|
+<!-- -->
|
|
|
|
+<template>
|
|
|
|
+ <div class="m-container">
|
|
|
|
+ <el-page-header
|
|
|
|
+ @back="onCancel"
|
|
|
|
+ :content="'202双1十一活动'"
|
|
|
|
+ ></el-page-header>
|
|
|
|
+ <!-- <h2>
|
|
|
|
+ <div class="squrt"></div>
|
|
|
|
+ 2021十一会员活动
|
|
|
|
+ </h2> -->
|
|
|
|
+ <div class="m-core">
|
|
|
|
+ <save-form
|
|
|
|
+ :inline="true"
|
|
|
|
+ :model="searchForm"
|
|
|
|
+ @submit="search"
|
|
|
|
+ @reset="onReSet"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item prop="organId">
|
|
|
|
+ <el-select
|
|
|
|
+ class="multiple"
|
|
|
|
+ style="width: 180px !important"
|
|
|
|
+ v-model.trim="searchForm.organId"
|
|
|
|
+ filterable
|
|
|
|
+ clearable
|
|
|
|
+ placeholder="请选择分部"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item, index) in selects.branchs"
|
|
|
|
+ :key="index"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button native-type="submit" type="primary">搜索</el-button>
|
|
|
|
+ <el-button native-type="reset" type="danger">重置</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" @click="onCreateQRCode"
|
|
|
|
+ >H5统计链接</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <auth auths="export/countCloudTeacherActive">
|
|
|
|
+ <el-button type="primary" @click="onExport">导出</el-button>
|
|
|
|
+ </auth>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </save-form>
|
|
|
|
+ <!-- <div style="font-size: 14px; color: #f85043; padding-bottom: 10px"> -->
|
|
|
|
+ <!-- 应收总金额:{{ totalExpectAmount }}元
|
|
|
|
+ 现金实收总额:{{ totalActualAmount }}元
|
|
|
|
+ 余额实收总额:{{ Number((totalExpectAmount - totalActualAmount).toFixed(2)) }}元 -->
|
|
|
|
+ <!-- 营收金额=2-3
|
|
|
|
+ 实收金额=应收总额(包含余额支付)
|
|
|
|
+ 预收金额=充值总额(发生消费,记负数)
|
|
|
|
+ 预收余额=充值总余额 -->
|
|
|
|
+ <!-- 总金额:{{ head.buyAmount | moneyFormat }}元<i
|
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
|
+ ></i>
|
|
|
|
+ 目标总金额:{{ head.targetAmount | moneyFormat }}元<i
|
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
|
+ ></i>
|
|
|
|
+ 目标金额达成率:{{ head.targetAmountFinishScale }}%<i
|
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
|
+ ></i>
|
|
|
|
+
|
|
|
|
+ 购买人数:{{ head.buyNum }}人<i
|
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
|
+ ></i>
|
|
|
|
+ 人均购买金额:{{ head.avgBuyAmount | moneyFormat }}元<i
|
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
|
+ ></i>
|
|
|
|
+ 目标人数:{{ head.targetNum }}人<i
|
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
|
+ ></i>
|
|
|
|
+ 目标达成率:{{ head.targetFinishScale }}%<i
|
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
|
+ ></i> -->
|
|
|
|
+
|
|
|
|
+ <!-- 购买总金额:{{ head.buyAmount | moneyFormat }}元<i
|
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
|
+ ></i> -->
|
|
|
|
+
|
|
|
|
+ <!-- 购买率:{{ head.buyScale }}%
|
|
|
|
+ <i style="width: 10px; display: inline-block"></i> -->
|
|
|
|
+
|
|
|
|
+ <!-- 总人数:{{ head.totalNum }}元<i
|
|
|
|
+ style="width: 10px; display: inline-block"
|
|
|
|
+ ></i> -->
|
|
|
|
+ </div>
|
|
|
|
+ <div class="tableWrap">
|
|
|
|
+ <el-table
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
|
+ :data="tableList"
|
|
|
|
+ @sort-change="sortChang"
|
|
|
|
+
|
|
|
|
+ >
|
|
|
|
+ <!-- :default-sort="{
|
|
|
|
+ prop: 'targetFinishScale',
|
|
|
|
+ order: 'descending',
|
|
|
|
+ }" -->
|
|
|
|
+ <!-- <el-table-column
|
|
|
|
+ align="center"
|
|
|
|
+ prop="targetNum"
|
|
|
|
+ label="排名"
|
|
|
|
+ ></el-table-column> -->
|
|
|
|
+ <el-table-column align="center" label="排名" type="index" width="50">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="center"
|
|
|
|
+ prop="organName"
|
|
|
|
+ label="分部"
|
|
|
|
+ width="170px"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column align="center" prop="buyAmount" label="总金额">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>{{ scope.row.buyAmount | moneyFormat }}元</div>
|
|
|
|
+ </template></el-table-column
|
|
|
|
+ >
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="center"
|
|
|
|
+ prop="targetAmount"
|
|
|
|
+ sortable="custom"
|
|
|
|
+ label="目标金额"
|
|
|
|
+ width="150px"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>{{ scope.row.targetAmount | moneyFormat }}元</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="center"
|
|
|
|
+ prop="targetAmountFinishScale"
|
|
|
|
+ sortable="custom"
|
|
|
|
+ width="170px"
|
|
|
|
+ >
|
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
|
+ <div class="titleCell">
|
|
|
|
+ <span>目标金额达成率</span>
|
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
|
+ <div slot="content">总成交额/目标总额*100%</div>
|
|
|
|
+ <i
|
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
|
+ style="
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ color: #f56c6c;
|
|
|
|
+ top: 2px;
|
|
|
|
+ position: relative;
|
|
|
|
+ "
|
|
|
|
+ ></i>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>{{ scope.row.targetAmountFinishScale }}%</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="center"
|
|
|
|
+ prop="buyNum"
|
|
|
|
+ sortable="custom"
|
|
|
|
+ width="150px"
|
|
|
|
+ >
|
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
|
+ <div class="titleCell">
|
|
|
|
+ <span>购买人数</span>
|
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
|
+ <div slot="content">本次活动交易成功总人数(去重)</div>
|
|
|
|
+ <i
|
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
|
+ style="
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ color: #f56c6c;
|
|
|
|
+ top: 2px;
|
|
|
|
+ position: relative;
|
|
|
|
+ "
|
|
|
|
+ ></i>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>{{ scope.row.buyNum }}人</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="center"
|
|
|
|
+ prop="avgBuyAmount"
|
|
|
|
+ sortable="custom"
|
|
|
|
+ width="150px"
|
|
|
|
+ >
|
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
|
+ <div class="titleCell">
|
|
|
|
+ <span>人均购买金额</span>
|
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
|
+ <div slot="content">总金额 / 购买人数</div>
|
|
|
|
+ <i
|
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
|
+ style="
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ color: #f56c6c;
|
|
|
|
+ top: 2px;
|
|
|
|
+ position: relative;
|
|
|
|
+ "
|
|
|
|
+ ></i>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>{{ scope.row.avgBuyAmount }}元</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="center"
|
|
|
|
+ prop="targetNum"
|
|
|
|
+ sortable="custom"
|
|
|
|
+ width="150px"
|
|
|
|
+ >
|
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
|
+ <div class="titleCell">
|
|
|
|
+ <span>目标人数</span>
|
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
|
+ <div slot="content">
|
|
|
|
+ 进行中非会员乐团-已上乐团课小于等于4节学员-非本活动购买会员-弦乐声部学员
|
|
|
|
+ </div>
|
|
|
|
+ <i
|
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
|
+ style="
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ color: #f56c6c;
|
|
|
|
+ top: 2px;
|
|
|
|
+ position: relative;
|
|
|
|
+ "
|
|
|
|
+ ></i>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>{{ scope.row.targetNum }}人</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ align="center"
|
|
|
|
+ prop="targetFinishScale"
|
|
|
|
+ sortable="custom"
|
|
|
|
+ width="150px"
|
|
|
|
+ >
|
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
|
+ <div class="titleCell">
|
|
|
|
+ <span>目标达成率</span>
|
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
|
+ <div slot="content">
|
|
|
|
+ 该分部实际交易成功人数 / 目标人数*100%
|
|
|
|
+ </div>
|
|
|
|
+ <i
|
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
|
+ style="
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ color: #f56c6c;
|
|
|
|
+ top: 2px;
|
|
|
|
+ position: relative;
|
|
|
|
+ "
|
|
|
|
+ ></i>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>{{ scope.row.targetFinishScale }}%</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+ <el-table-column label="详情" align="left">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-button type="text" @click="gotoDetail(scope.row)"
|
|
|
|
+ >详情</el-button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <!-- <pagination
|
|
|
|
+ sync
|
|
|
|
+ :total.sync="rules.total"
|
|
|
|
+ :page.sync="rules.page"
|
|
|
|
+ :limit.sync="rules.limit"
|
|
|
|
+ :page-sizes="rules.page_size"
|
|
|
|
+ @pagination="getList"
|
|
|
|
+ /> -->
|
|
|
|
+ <!-- </div> -->
|
|
|
|
+ </div>
|
|
|
|
+ <qr-code v-model="qrcodeStatus" title="统计二维码" :codeUrl="codeUrl" />
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import axios from "axios";
|
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
|
+import QrCode from "@/components/QrCode/index";
|
|
|
|
+import { vaildTeachingUrl } from "@/utils/validate";
|
|
|
|
+import { getDoubleElevenList } from "./api";
|
|
|
|
+import { Export } from "@/utils/downLoadFile";
|
|
|
|
+import cleanDeep from "clean-deep";
|
|
|
|
+import qs from "qs";
|
|
|
|
+export default {
|
|
|
|
+ components: { pagination, QrCode },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ searchForm: {
|
|
|
|
+ organId: null,
|
|
|
|
+ },
|
|
|
|
+ searchList: { sort: "targetFinishScale", order: "DESC" },
|
|
|
|
+ head: {
|
|
|
|
+ avgBuyAmount: null,
|
|
|
|
+ buyAmount: null,
|
|
|
|
+ buyNum: null,
|
|
|
|
+ buyScale: null,
|
|
|
|
+ targetAmount: null,
|
|
|
|
+ targetFinishScale: null,
|
|
|
|
+ targetNum: null,
|
|
|
|
+ totalNum: null,
|
|
|
|
+ },
|
|
|
|
+ tableList: [],
|
|
|
|
+ organList: [],
|
|
|
|
+ rules: {
|
|
|
|
+ // 分页规则
|
|
|
|
+ limit: 10, // 限制显示条数
|
|
|
|
+ page: 1, // 当前页
|
|
|
|
+ total: 0, // 总条数
|
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
|
+ },
|
|
|
|
+ qrcodeStatus: false,
|
|
|
|
+ codeUrl: "",
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
|
+ created() {},
|
|
|
|
+ //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
|
+ async mounted() {
|
|
|
|
+ // 获取分部
|
|
|
|
+ await this.$store.dispatch("setBranchs");
|
|
|
|
+ this.init();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ init() {
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ async getList() {
|
|
|
|
+ try {
|
|
|
|
+ const res = await getDoubleElevenList({
|
|
|
|
+ organId: this.searchForm.organId,
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ // ...this.searchList,
|
|
|
|
+ this.tableList = res.data.resultList;
|
|
|
|
+ // this.head = res.data.head;
|
|
|
|
+ } catch (e) {
|
|
|
|
+ console.log(e);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ search() {
|
|
|
|
+ this.rules.page = 1;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ onReSet() {
|
|
|
|
+ this.searchForm.organId = null;
|
|
|
|
+ this.searchList = { sort: "targetFinishScale", order: "DESC" };
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
|
|
+ sortChang(val) {
|
|
|
|
+ const dates = {
|
|
|
|
+ ascending: "ASC",
|
|
|
|
+ descending: "DESC",
|
|
|
|
+ };
|
|
|
|
+ this.searchList = {};
|
|
|
|
+ if (val.prop && val.order) {
|
|
|
|
+ this.searchList = { sort: val.prop, order: dates[val.order] };
|
|
|
|
+ // this.searchList[val.prop] = dates[val.order];
|
|
|
|
+ }
|
|
|
|
+ this.rules.page = 1;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ onCreateQRCode(row) {
|
|
|
|
+ // 生成报名二维码
|
|
|
|
+ this.qrcodeStatus = true;
|
|
|
|
+ this.codeUrl = vaildTeachingUrl() + "/#/statisticOctober1st";
|
|
|
|
+ },
|
|
|
|
+ gotoDetail(row) {
|
|
|
|
+ // console.log('跳转详情')
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/operateManager/memberActiveDetail",
|
|
|
|
+ query: { organId: row.organId, organName: row.organName },
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ async onExport() {
|
|
|
|
+ let obj = {
|
|
|
|
+ organIds: this.searchForm.organId,
|
|
|
|
+ ...this.searchList,
|
|
|
|
+ };
|
|
|
|
+ await Export(
|
|
|
|
+ this,
|
|
|
|
+ {
|
|
|
|
+ url: "/api-web/export/organDoubleEleven2021Statis",
|
|
|
|
+ fileName: "2021双十一活动.xls",
|
|
|
|
+ method: "post",
|
|
|
|
+ params: qs.stringify(cleanDeep(obj)),
|
|
|
|
+ },
|
|
|
|
+ "您确定导出双十一活动列表?"
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ onCancel() {
|
|
|
|
+ this.$store.dispatch("delVisitedViews", this.$route);
|
|
|
|
+ this.$router.push("/activeMarketing");
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+<style lang='scss' scoped>
|
|
|
|
+.titleCell {
|
|
|
|
+ display: inline-block;
|
|
|
|
+}
|
|
|
|
+.tableWrap {
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+}
|
|
|
|
+.qrcode {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: center;
|
|
|
|
+ img {
|
|
|
|
+ width: 200px;
|
|
|
|
+ height: 200px;
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.code-url {
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ padding: 15px 15px 0 15px;
|
|
|
|
+}
|
|
|
|
+</style>
|