|
@@ -1,22 +1,22 @@
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
- ::v-deep a {
|
|
|
|
- color: #409eff;
|
|
|
|
- display: block;
|
|
|
|
- }
|
|
|
|
|
|
+::v-deep a {
|
|
|
|
+ color: #409eff;
|
|
|
|
+ display: block;
|
|
|
|
+}
|
|
|
|
|
|
- .item-name-calss p {
|
|
|
|
- margin: 0;
|
|
|
|
- text-align: left;
|
|
|
|
- }
|
|
|
|
|
|
+.item-name-calss p {
|
|
|
|
+ margin: 0;
|
|
|
|
+ text-align: left;
|
|
|
|
+}
|
|
|
|
|
|
- .tableBox {
|
|
|
|
- width: 100%;
|
|
|
|
- }
|
|
|
|
|
|
+.tableBox {
|
|
|
|
+ width: 100%;
|
|
|
|
+}
|
|
|
|
|
|
- ::v-deep .el-table {
|
|
|
|
|
|
+::v-deep .el-table {
|
|
|
|
|
|
- height: calc(100vh - 280px);
|
|
|
|
- }
|
|
|
|
|
|
+ height: calc(100vh - 280px);
|
|
|
|
+}
|
|
</style>
|
|
</style>
|
|
<template>
|
|
<template>
|
|
<div class="app-container" style="height: 100%">
|
|
<div class="app-container" style="height: 100%">
|
|
@@ -73,7 +73,7 @@
|
|
>重置
|
|
>重置
|
|
</el-button
|
|
</el-button
|
|
>
|
|
>
|
|
-<!-- <el-button
|
|
|
|
|
|
+ <el-button
|
|
type="warning"
|
|
type="warning"
|
|
plain
|
|
plain
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
@@ -81,7 +81,7 @@
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
:loading="downLoadLoading"
|
|
:loading="downLoadLoading"
|
|
>导出
|
|
>导出
|
|
- </el-button>-->
|
|
|
|
|
|
+ </el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
@@ -127,9 +127,9 @@
|
|
<p>
|
|
<p>
|
|
佣金率:
|
|
佣金率:
|
|
{{
|
|
{{
|
|
- scope.row.itemCommissionRate
|
|
|
|
- ? scope.row.itemCommissionRate / 10 + "%"
|
|
|
|
- : "-"
|
|
|
|
|
|
+ scope.row.itemCommissionRate
|
|
|
|
+ ? scope.row.itemCommissionRate / 10 + "%"
|
|
|
|
+ : "-"
|
|
}}
|
|
}}
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
@@ -158,9 +158,9 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
{{
|
|
{{
|
|
- scope.row.validRadio
|
|
|
|
- ? (scope.row.validRadio * 100).toFixed(2) + "%"
|
|
|
|
- : "-"
|
|
|
|
|
|
+ scope.row.validRadio
|
|
|
|
+ ? (scope.row.validRadio * 100).toFixed(2) + "%"
|
|
|
|
+ : "-"
|
|
}}
|
|
}}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -179,9 +179,9 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
{{
|
|
{{
|
|
- scope.row.deliveryRadio
|
|
|
|
- ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
|
|
|
|
- : "-"
|
|
|
|
|
|
+ scope.row.deliveryRadio
|
|
|
|
+ ? (scope.row.deliveryRadio * 100).toFixed(2) + "%"
|
|
|
|
+ : "-"
|
|
}}
|
|
}}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -207,85 +207,211 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import {
|
|
|
|
- listType,
|
|
|
|
- getType,
|
|
|
|
- delType,
|
|
|
|
- addType,
|
|
|
|
- updateType,
|
|
|
|
- refreshCache,
|
|
|
|
- } from "@/api/system/dict/type";
|
|
|
|
- import {
|
|
|
|
- getItemList,
|
|
|
|
- } from "@/api/jiaoyang/report";
|
|
|
|
-
|
|
|
|
- export default {
|
|
|
|
- name: "Goods",
|
|
|
|
- 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
|
|
|
|
|
|
+import {
|
|
|
|
+ listType,
|
|
|
|
+ getType,
|
|
|
|
+ delType,
|
|
|
|
+ addType,
|
|
|
|
+ updateType,
|
|
|
|
+ refreshCache,
|
|
|
|
+} from "@/api/system/dict/type";
|
|
|
|
+import {
|
|
|
|
+ getItemList,
|
|
|
|
+} from "@/api/jiaoyang/report";
|
|
|
|
+import {downFile} from "@/api/bytedance/bytedance";
|
|
|
|
+export default {
|
|
|
|
+ name: "Goods",
|
|
|
|
+ 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,
|
|
userId: undefined,
|
|
userId: undefined,
|
|
- // 销售列表
|
|
|
|
- saleList: [],
|
|
|
|
- // 分配销售确定loading
|
|
|
|
- confirmLoadingSale: false,
|
|
|
|
- // 日期范围
|
|
|
|
- dateRange: [],
|
|
|
|
- // 查询参数
|
|
|
|
- queryParams: {
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
- userId: undefined,
|
|
|
|
- itemId: undefined,
|
|
|
|
- itemTitle: undefined,
|
|
|
|
- orderStartDate: undefined,
|
|
|
|
- orderEndDate: undefined,
|
|
|
|
- },
|
|
|
|
- uploadDate: [new Date(), new Date()],
|
|
|
|
- //查询参数所用下拉数据
|
|
|
|
- queryParamsList: {
|
|
|
|
- personList: [],
|
|
|
|
|
|
+ itemId: undefined,
|
|
|
|
+ itemTitle: undefined,
|
|
|
|
+ orderStartDate: undefined,
|
|
|
|
+ orderEndDate: undefined,
|
|
|
|
+ },
|
|
|
|
+ uploadDate: [new Date(), new Date()],
|
|
|
|
+ //查询参数所用下拉数据
|
|
|
|
+ queryParamsList: {
|
|
|
|
+ personList: [],
|
|
|
|
+ },
|
|
|
|
+ videoTag: [],
|
|
|
|
+ videoVisibleChange: undefined,
|
|
|
|
+ prop: "orderNum",
|
|
|
|
+ sort: "desc",
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ 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();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ /** 导出按钮操作 */
|
|
|
|
+ handleExport() {
|
|
|
|
+ this.downLoadLoading = true;
|
|
|
|
+ downFile(
|
|
|
|
+ "/jy/report/exportItem",
|
|
|
|
+ this.addDateRange(
|
|
|
|
+ {
|
|
|
|
+ ...this.queryParams,
|
|
|
|
+ collectSampleId: !!this.$route.query.id
|
|
|
|
+ ? this.$route.query.id
|
|
|
|
+ : this.$store.getters.remark == "管理员"
|
|
|
|
+ ? null
|
|
|
|
+ : this.$store.getters.userId,
|
|
|
|
+ fieId:this.prop,
|
|
|
|
+ sort:this.sort
|
|
|
|
+ },
|
|
|
|
+ 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;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ showTitle(visible) {
|
|
|
|
+ console.log(visible);
|
|
|
|
+ if (this.videoVisibleChange != visible.itemId) {
|
|
|
|
+ this.videoVisibleChange = visible.itemId;
|
|
|
|
+ this.videoTag = [];
|
|
|
|
+ getTopPromoterByItemId(
|
|
|
|
+ this.addDateRange(
|
|
|
|
+ {itemId: visible.itemId},
|
|
|
|
+ this.uploadDate,
|
|
|
|
+ "orderStartDate",
|
|
|
|
+ "orderEndDate"
|
|
|
|
+ )
|
|
|
|
+ ).then((res) => {
|
|
|
|
+ this.videoTag = res.rows;
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ toIndexDetail(item) {
|
|
|
|
+ this.$router.replace({
|
|
|
|
+ path: "/jiaoyang/jyItemDetailsReport",
|
|
|
|
+ query: {
|
|
|
|
+ id: item.itemId,
|
|
|
|
+ name: item.itemTitle,
|
|
|
|
+ orderStartDate: this.uploadDate[0],
|
|
|
|
+ orderEndDate: this.uploadDate[1],
|
|
},
|
|
},
|
|
- videoTag: [],
|
|
|
|
- videoVisibleChange: undefined,
|
|
|
|
- prop: "orderNum",
|
|
|
|
- sort: "desc",
|
|
|
|
- };
|
|
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ sortChange(col, prop, order) {
|
|
|
|
+ this.prop = col.prop;
|
|
|
|
+ this.sort = !!col.order
|
|
|
|
+ ? col.order == "descending"
|
|
|
|
+ ? "desc"
|
|
|
|
+ : "asc"
|
|
|
|
+ : "desc";
|
|
|
|
+ this.handleQuery();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ /** 查询字典类型列表 */
|
|
|
|
+ getList() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ getItemList(
|
|
|
|
+ this.addDateRange(
|
|
|
|
+ {...this.queryParams, fieId: this.prop, sort: this.sort},
|
|
|
|
+ this.uploadDate,
|
|
|
|
+ "orderStartDate",
|
|
|
|
+ "orderEndDate"
|
|
|
|
+ )
|
|
|
|
+ ).then((response) => {
|
|
|
|
+ this.typeList = response.rows;
|
|
|
|
+ this.total = response.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
- this.userId = this.$store.getters.userId;
|
|
|
|
|
|
+ // 取消按钮
|
|
|
|
+ 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 date = new Date();
|
|
let y = date.getFullYear();
|
|
let y = date.getFullYear();
|
|
let MM = date.getMonth() + 1;
|
|
let MM = date.getMonth() + 1;
|
|
@@ -293,105 +419,14 @@
|
|
let dd = date.getDate();
|
|
let dd = date.getDate();
|
|
dd = dd < 10 ? "0" + dd : dd;
|
|
dd = dd < 10 ? "0" + dd : dd;
|
|
this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
|
|
this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
|
|
|
|
+ this.resetForm("queryForm");
|
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
|
+ this.handleQuery();
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.getList();
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- showTitle(visible) {
|
|
|
|
- console.log(visible);
|
|
|
|
- if (this.videoVisibleChange != visible.itemId) {
|
|
|
|
- this.videoVisibleChange = visible.itemId;
|
|
|
|
- this.videoTag = [];
|
|
|
|
- getTopPromoterByItemId(
|
|
|
|
- this.addDateRange(
|
|
|
|
- {itemId: visible.itemId},
|
|
|
|
- this.uploadDate,
|
|
|
|
- "orderStartDate",
|
|
|
|
- "orderEndDate"
|
|
|
|
- )
|
|
|
|
- ).then((res) => {
|
|
|
|
- this.videoTag = res.rows;
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- toIndexDetail(item) {
|
|
|
|
- this.$router.replace({
|
|
|
|
- path: "/jiaoyang/jyItemDetailsReport",
|
|
|
|
- query: {
|
|
|
|
- id: item.itemId,
|
|
|
|
- name: item.itemTitle,
|
|
|
|
- orderStartDate: this.uploadDate[0],
|
|
|
|
- orderEndDate: this.uploadDate[1],
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- sortChange(col, prop, order) {
|
|
|
|
- this.prop = col.prop;
|
|
|
|
- this.sort = !!col.order
|
|
|
|
- ? col.order == "descending"
|
|
|
|
- ? "desc"
|
|
|
|
- : "asc"
|
|
|
|
- : "desc";
|
|
|
|
- this.handleQuery();
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /** 查询字典类型列表 */
|
|
|
|
- getList() {
|
|
|
|
- this.loading = true;
|
|
|
|
- getItemList(
|
|
|
|
- this.addDateRange(
|
|
|
|
- {...this.queryParams, fieId: this.prop, sort: this.sort},
|
|
|
|
- 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.handleQuery();
|
|
|
|
- },
|
|
|
|
- // 多选框选中数据
|
|
|
|
- handleSelectionChange(selection) {
|
|
|
|
- this.ids = selection.map((item) => item.id);
|
|
|
|
- },
|
|
|
|
|
|
+ // 多选框选中数据
|
|
|
|
+ handleSelectionChange(selection) {
|
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
},
|
|
},
|
|
- };
|
|
|
|
|
|
+ },
|
|
|
|
+};
|
|
</script>
|
|
</script>
|