|
@@ -1,8 +1,8 @@
|
|
|
<style scoped lang="scss">
|
|
|
- ::v-deep a {
|
|
|
- color: #409eff;
|
|
|
- display: block;
|
|
|
- }
|
|
|
+::v-deep a {
|
|
|
+ color: #409eff;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
</style>
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
@@ -50,7 +50,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="选择日期" >
|
|
|
+ <el-form-item label="选择日期">
|
|
|
<el-date-picker
|
|
|
v-model="uploadDate"
|
|
|
style="width: 240px"
|
|
@@ -76,16 +76,16 @@
|
|
|
>重置
|
|
|
</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- plain
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="handleExport"
|
|
|
- :loading="downLoadLoading"
|
|
|
- >导出
|
|
|
- </el-button
|
|
|
- >
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleExport"
|
|
|
+ :loading="downLoadLoading"
|
|
|
+ >导出
|
|
|
+ </el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="tableBox">
|
|
@@ -130,7 +130,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="类型" align="center" prop="mediaId" >
|
|
|
+ <el-table-column label="类型" align="center" prop="mediaId">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="!!scope.row.type">
|
|
|
{{ scope.row.type | typeStatusName }}
|
|
@@ -141,22 +141,22 @@
|
|
|
<el-table-column label="绑定人" align="center" prop="userName">
|
|
|
<template slot-scope="scope">
|
|
|
{{
|
|
|
- scope.row.userName
|
|
|
- ? scope.row.userName
|
|
|
- : "-"
|
|
|
+ scope.row.userName
|
|
|
+ ? scope.row.userName
|
|
|
+ : "-"
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- label="挂车数"
|
|
|
+ label="导师"
|
|
|
align="center"
|
|
|
- prop="videoCount"
|
|
|
+ prop="expertMentorName"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- label="曝光数"
|
|
|
+ label="商务"
|
|
|
align="center"
|
|
|
- prop="videoShow"
|
|
|
+ prop="expertBusinessName"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -177,9 +177,9 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
{{
|
|
|
- scope.row.validRadio
|
|
|
- ? (scope.row.validRadio * 100).toFixed(2) + "%"
|
|
|
- : "-"
|
|
|
+ scope.row.validRadio
|
|
|
+ ? (scope.row.validRadio * 100).toFixed(2) + "%"
|
|
|
+ : "-"
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -187,7 +187,7 @@
|
|
|
<el-table-column label="GMV" align="center" prop="payAmount">
|
|
|
<template slot-scope="scope">
|
|
|
{{
|
|
|
- scope.row.payAmount ? (scope.row.payAmount / 100).toFixed(2) : "-"
|
|
|
+ scope.row.payAmount ? (scope.row.payAmount / 100).toFixed(2) : "-"
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -195,7 +195,7 @@
|
|
|
<el-table-column label="GMV(有效)" align="center" prop="validPayAmount" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
{{
|
|
|
- scope.row.validPayAmount ? (scope.row.validPayAmount / 100).toFixed(2) : "-"
|
|
|
+ scope.row.validPayAmount ? (scope.row.validPayAmount / 100).toFixed(2) : "-"
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -213,9 +213,9 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
{{
|
|
|
- scope.row.deliveryRadio
|
|
|
- ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
|
|
|
- : "-"
|
|
|
+ scope.row.deliveryRadio
|
|
|
+ ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
|
|
|
+ : "-"
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -254,83 +254,192 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {
|
|
|
- listType,
|
|
|
- getType,
|
|
|
- delType,
|
|
|
- addType,
|
|
|
- updateType,
|
|
|
- refreshCache,
|
|
|
- } from "@/api/system/dict/type";
|
|
|
- import {promoterReport} from "@/api/jiaoyang/report";
|
|
|
- import {downFile} from "@/api/bytedance/bytedance";
|
|
|
+import {
|
|
|
+ listType,
|
|
|
+ getType,
|
|
|
+ delType,
|
|
|
+ addType,
|
|
|
+ updateType,
|
|
|
+ refreshCache,
|
|
|
+} from "@/api/system/dict/type";
|
|
|
+import {promoterReport} from "@/api/jiaoyang/report";
|
|
|
+import {downFile} from "@/api/bytedance/bytedance";
|
|
|
|
|
|
- export default {
|
|
|
- name: "Index",
|
|
|
- dicts: ["sys_normal_disable"],
|
|
|
- data() {
|
|
|
- return {
|
|
|
- downLoadLoading: false,
|
|
|
- dialogTableVisible: false,
|
|
|
- logPage: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
- },
|
|
|
- logData: [],
|
|
|
- logTotal: 0,
|
|
|
- logLoading: false,
|
|
|
- // 遮罩层
|
|
|
- loading: true,
|
|
|
- // 选中数组
|
|
|
- ids: [],
|
|
|
- // 非单个禁用
|
|
|
- single: true,
|
|
|
- // 非多个禁用
|
|
|
- multiple: true,
|
|
|
- // 显示搜索条件
|
|
|
- showSearch: true,
|
|
|
- // 总条数
|
|
|
- total: 0,
|
|
|
- // 字典表格数据
|
|
|
- typeList: [],
|
|
|
- // 弹出层标题
|
|
|
- title: "",
|
|
|
- // 是否显示弹出层
|
|
|
- open: false,
|
|
|
- // 分配销售
|
|
|
- openAllocation: false,
|
|
|
- // 选择的销售id
|
|
|
- saleId: undefined,
|
|
|
- // 获取用户id
|
|
|
- userId: undefined,
|
|
|
- // 销售列表
|
|
|
- saleList: [],
|
|
|
- // 分配销售确定loading
|
|
|
- confirmLoadingSale: false,
|
|
|
- // 日期范围
|
|
|
- dateRange: [],
|
|
|
- // 查询参数
|
|
|
- queryParams: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
- promoterId: undefined,
|
|
|
- promoterNickName: undefined,
|
|
|
- orderStartDate: undefined,
|
|
|
- orderEndDate: undefined,
|
|
|
+export default {
|
|
|
+ name: "Index",
|
|
|
+ dicts: ["sys_normal_disable"],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ downLoadLoading: false,
|
|
|
+ dialogTableVisible: false,
|
|
|
+ logPage: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ },
|
|
|
+ logData: [],
|
|
|
+ logTotal: 0,
|
|
|
+ logLoading: false,
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 字典表格数据
|
|
|
+ typeList: [],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 分配销售
|
|
|
+ openAllocation: false,
|
|
|
+ // 选择的销售id
|
|
|
+ saleId: undefined,
|
|
|
+ // 获取用户id
|
|
|
+ userId: undefined,
|
|
|
+ // 销售列表
|
|
|
+ saleList: [],
|
|
|
+ // 分配销售确定loading
|
|
|
+ confirmLoadingSale: false,
|
|
|
+ // 日期范围
|
|
|
+ dateRange: [],
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ promoterId: undefined,
|
|
|
+ promoterNickName: undefined,
|
|
|
+ orderStartDate: undefined,
|
|
|
+ orderEndDate: undefined,
|
|
|
|
|
|
- },
|
|
|
- uploadDate: [new Date(), new Date()],
|
|
|
- //查询参数所用下拉数据
|
|
|
- queryParamsList: {
|
|
|
- typeList: [
|
|
|
- {value: 1, label: "自营"},
|
|
|
- {value: 2, label: "分销"},
|
|
|
- ],
|
|
|
- },
|
|
|
+ },
|
|
|
+ uploadDate: [new Date(), new Date()],
|
|
|
+ //查询参数所用下拉数据
|
|
|
+ queryParamsList: {
|
|
|
+ typeList: [
|
|
|
+ {value: 1, label: "自营"},
|
|
|
+ {value: 2, label: "分销"},
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.userId = this.$store.getters.userId;
|
|
|
+ let date = new Date();
|
|
|
+ let y = date.getFullYear();
|
|
|
+ let MM = date.getMonth() + 1;
|
|
|
+ MM = MM < 10 ? "0" + MM : MM;
|
|
|
+ let dd = date.getDate();
|
|
|
+ dd = dd < 10 ? "0" + dd : dd;
|
|
|
+ this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ filters: {
|
|
|
+ typeStatusName(status) {
|
|
|
+ const statusMap = {
|
|
|
+ 1: "自营",
|
|
|
+ 2: "分销",
|
|
|
};
|
|
|
+ return statusMap[status];
|
|
|
},
|
|
|
- created() {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ this.downLoadLoading = true;
|
|
|
+ downFile(
|
|
|
+ "/jy/report/exportPromoter",
|
|
|
+ this.addDateRange(
|
|
|
+ {
|
|
|
+ ...this.queryParams,
|
|
|
+ collectSampleId: !!this.$route.query.id
|
|
|
+ ? this.$route.query.id
|
|
|
+ : this.$store.getters.remark == "管理员"
|
|
|
+ ? null
|
|
|
+ : this.$store.getters.userId,
|
|
|
+ },
|
|
|
+ this.uploadDate,
|
|
|
+ "orderStartDate",
|
|
|
+ "orderEndDate"
|
|
|
+ )
|
|
|
+ ).then((res) => {
|
|
|
+ let blob = new Blob([res], {
|
|
|
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
|
+ });
|
|
|
+ let downloadElement = document.createElement("a");
|
|
|
+ let href = window.URL.createObjectURL(blob); //创建下载的链接
|
|
|
+ downloadElement.href = href;
|
|
|
+ downloadElement.download = `达人报表${this.uploadDate[0]}-${this.uploadDate[1]}.xlsx`; //下载后文件名
|
|
|
+ document.body.appendChild(downloadElement);
|
|
|
+ downloadElement.click(); //点击下载
|
|
|
+ document.body.removeChild(downloadElement); //下载完成移除元素
|
|
|
+ window.URL.revokeObjectURL(href); //释放掉blob对象
|
|
|
+ this.downLoadLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ toPromoterDetail(item) {
|
|
|
+ this.$router.replace({
|
|
|
+ path: "/jiaoyang/jyPromoterDetailsReport",
|
|
|
+ query: {
|
|
|
+ id: item.promoterId,
|
|
|
+ name: item.promoterNickName,
|
|
|
+ orderStartDate: this.uploadDate[0],
|
|
|
+ orderEndDate: this.uploadDate[1],
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 查询字典类型列表 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
this.userId = this.$store.getters.userId;
|
|
|
+ this.queryParams.userId = this.userId;
|
|
|
+ promoterReport(
|
|
|
+ this.addDateRange(
|
|
|
+ this.queryParams,
|
|
|
+ this.uploadDate,
|
|
|
+ "orderStartDate",
|
|
|
+ "orderEndDate"
|
|
|
+ )
|
|
|
+ ).then((response) => {
|
|
|
+ this.typeList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.confirmLoading = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {};
|
|
|
+ this.dateFile = null;
|
|
|
+ this.resetForm("form");
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.dateRange = [];
|
|
|
let date = new Date();
|
|
|
let y = date.getFullYear();
|
|
|
let MM = date.getMonth() + 1;
|
|
@@ -338,124 +447,15 @@
|
|
|
let dd = date.getDate();
|
|
|
dd = dd < 10 ? "0" + dd : dd;
|
|
|
this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.queryParams.type = undefined;
|
|
|
+ this.handleQuery();
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.getList();
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- filters: {
|
|
|
- typeStatusName(status) {
|
|
|
- const statusMap = {
|
|
|
- 1: "自营",
|
|
|
- 2: "分销",
|
|
|
- };
|
|
|
- return statusMap[status];
|
|
|
- },
|
|
|
-
|
|
|
- },
|
|
|
- methods: {
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- this.downLoadLoading = true;
|
|
|
- downFile(
|
|
|
- "/jy/report/exportPromoter",
|
|
|
- this.addDateRange(
|
|
|
- {
|
|
|
- ...this.queryParams,
|
|
|
- collectSampleId: !!this.$route.query.id
|
|
|
- ? this.$route.query.id
|
|
|
- : this.$store.getters.remark == "管理员"
|
|
|
- ? null
|
|
|
- : this.$store.getters.userId,
|
|
|
- },
|
|
|
- this.uploadDate,
|
|
|
- "orderStartDate",
|
|
|
- "orderEndDate"
|
|
|
- )
|
|
|
- ).then((res) => {
|
|
|
- let blob = new Blob([res], {
|
|
|
- type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
|
- });
|
|
|
- let downloadElement = document.createElement("a");
|
|
|
- let href = window.URL.createObjectURL(blob); //创建下载的链接
|
|
|
- downloadElement.href = href;
|
|
|
- downloadElement.download = `达人报表${this.uploadDate[0]}-${this.uploadDate[1]}.xlsx`; //下载后文件名
|
|
|
- document.body.appendChild(downloadElement);
|
|
|
- downloadElement.click(); //点击下载
|
|
|
- document.body.removeChild(downloadElement); //下载完成移除元素
|
|
|
- window.URL.revokeObjectURL(href); //释放掉blob对象
|
|
|
- this.downLoadLoading = false;
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
- toPromoterDetail(item) {
|
|
|
- this.$router.replace({
|
|
|
- path: "/jiaoyang/jyPromoterDetailsReport",
|
|
|
- query: {
|
|
|
- id: item.promoterId,
|
|
|
- name: item.promoterNickName,
|
|
|
- orderStartDate: this.uploadDate[0],
|
|
|
- orderEndDate: this.uploadDate[1],
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- /** 查询字典类型列表 */
|
|
|
- getList() {
|
|
|
- this.loading = true;
|
|
|
- this.userId = this.$store.getters.userId;
|
|
|
- this.queryParams.userId = this.userId;
|
|
|
- promoterReport(
|
|
|
- this.addDateRange(
|
|
|
- this.queryParams,
|
|
|
- this.uploadDate,
|
|
|
- "orderStartDate",
|
|
|
- "orderEndDate"
|
|
|
- )
|
|
|
- ).then((response) => {
|
|
|
- this.typeList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
- // 取消按钮
|
|
|
- cancel() {
|
|
|
- this.open = false;
|
|
|
- this.confirmLoading = false;
|
|
|
- this.reset();
|
|
|
- },
|
|
|
- // 表单重置
|
|
|
- reset() {
|
|
|
- this.form = {};
|
|
|
- this.dateFile = null;
|
|
|
- this.resetForm("form");
|
|
|
- },
|
|
|
- /** 搜索按钮操作 */
|
|
|
- handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- /** 重置按钮操作 */
|
|
|
- resetQuery() {
|
|
|
- this.dateRange = [];
|
|
|
- let date = new Date();
|
|
|
- let y = date.getFullYear();
|
|
|
- let MM = date.getMonth() + 1;
|
|
|
- MM = MM < 10 ? "0" + MM : MM;
|
|
|
- let dd = date.getDate();
|
|
|
- dd = dd < 10 ? "0" + dd : dd;
|
|
|
- this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.queryParams.type = undefined;
|
|
|
- this.handleQuery();
|
|
|
- },
|
|
|
- // 多选框选中数据
|
|
|
- handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map((item) => item.id);
|
|
|
- },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
},
|
|
|
- };
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|