From 8e65b980e53f9d44d42660d2acedd65a5694cce1 Mon Sep 17 00:00:00 2001 From: dengbw Date: Fri, 9 Dec 2022 17:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=88=86=E7=BB=84=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/gro-order-search.vue | 164 +++++++----------- src/views/sylive/groups-order/index.vue | 60 +++---- 2 files changed, 95 insertions(+), 129 deletions(-) diff --git a/src/views/sylive/groups-order/components/gro-order-search.vue b/src/views/sylive/groups-order/components/gro-order-search.vue index 55f6c14..3011866 100644 --- a/src/views/sylive/groups-order/components/gro-order-search.vue +++ b/src/views/sylive/groups-order/components/gro-order-search.vue @@ -7,6 +7,38 @@ @submit.native.prevent > + + + + + + + + + + + + @@ -30,19 +62,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/views/sylive/groups-order/index.vue b/src/views/sylive/groups-order/index.vue index 8e99f04..92118b3 100644 --- a/src/views/sylive/groups-order/index.vue +++ b/src/views/sylive/groups-order/index.vue @@ -43,6 +43,7 @@ components: { GroOrderSearch }, data() { return { + activityId: null, // 加载状态 title: '权益订单', loading: true, @@ -101,18 +102,6 @@ return this.$util.toDateString(cellValue); } }, - { - prop: 'area', - label: '区域', - showOverflowTooltip: true, - minWidth: 80 - }, - { - prop: 'stores', - label: '门店', - showOverflowTooltip: true, - minWidth: 80 - }, { prop: 'consultant', label: '顾问', @@ -125,17 +114,29 @@ showOverflowTooltip: true, minWidth: 70 }, - { - prop: 'cfromName', - label: '来源', - showOverflowTooltip: true, - minWidth: 50 - }, { prop: 'statusName', label: '状态', showOverflowTooltip: true, minWidth: 60 + }, + { + prop: 'levelName1', + label: '战区', + showOverflowTooltip: true, + minWidth: 80 + }, + { + prop: 'levelName2', + label: '战队', + showOverflowTooltip: true, + minWidth: 80 + }, + { + prop: 'stores', + label: '门店', + showOverflowTooltip: true, + minWidth: 80 } ] }; @@ -143,16 +144,12 @@ methods: { /* 表格数据源 */ datasource({ page, limit, where, order }) { - const activityId = this.$route.query.id; + const activityId = this.activityId; return listGroupsOrder({ ...where, ...order, page, limit, activityId }); }, query() { - const activityId = this.$route.query.id; - if (!activityId) { - return; - } this.loading = true; - getActivity(Number(activityId)) + getActivity(Number(this.activityId)) .then((data) => { this.loading = false; // 修改页签标题 @@ -181,11 +178,11 @@ '订单价格', '付款时间', '创建时间', - '区域', + '战区', + '战队', '门店', '顾问', '订单类型', - '来源', '状态', '所选经销商', '地址' @@ -193,7 +190,7 @@ ]; const loading = this.$loading({ lock: true }); this.$refs.table.doRequest(({ where, order }) => { - const activityId = this.$route.query.id; + const activityId = this.activityId; exportGroupsOrder({ ...where, ...order, activityId }) .then((data) => { loading.close(); @@ -206,11 +203,11 @@ d.totalPrice, this.$util.toDateString(d.payTime), this.$util.toDateString(d.createTime), - d.area, + d.levelName1, + d.levelName2, d.stores, d.consultant, d.typeName, - d.cfromName, d.statusName, d.biz, d.address @@ -240,6 +237,11 @@ if (path !== ROUTE_PATH) { return; } + const activityId = this.$route.query.id; + if (!activityId || activityId == this.activityId) { + return; + } + this.activityId = activityId; this.query(); if (this.$refs.table) { this.$refs.table.reload({ page: 1 });