Parcourir la source

修改之前的活动统计

wolyshaw il y a 2 ans
Parent
commit
8532f43525

+ 2 - 2
src/store/modules/permission.js

@@ -979,7 +979,7 @@ function setDetailRoute(accessedRoutes) {
           hidden: true,
           meta: {
             noCache: "1",
-            title: "2021双十一活动",
+            title: "双十一活动",
             belongTopMenu: "/operateManager",
             activeMenu: "/activeMarketing",
             id: "4594"
@@ -993,7 +993,7 @@ function setDetailRoute(accessedRoutes) {
           hidden: true,
           meta: {
             noCache: "1",
-            title: "2021双十一活动详情",
+            title: "双十一活动详情",
             belongTopMenu: "/operateManager",
             activeMenu: "/activeMarketing",
             id: "4595"

+ 36 - 13
src/views/activityScheduling/2021double11List.vue

@@ -3,7 +3,7 @@
   <div class="m-container">
     <el-page-header
       @back="onCancel"
-      :content="'2021双十一活动'"
+      :content="year === '2021'? '2021双十一活动' : '2022双十一活动'"
     ></el-page-header>
     <!-- <h2>
       <div class="squrt"></div>
@@ -188,6 +188,7 @@
           prop="targetAmount"
           label="乐理课成交金额/人数"
           width="150px"
+          v-if="year === '2021'"
         >
           <template slot-scope="scope">
             <div>
@@ -200,6 +201,7 @@
           prop="giveMemberNum"
           label="赠送会员人数"
           width="150px"
+          v-if="year === '2021'"
         >
           <template slot-scope="scope">
             <div>
@@ -238,7 +240,7 @@ 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 { getDoubleElevenList, getDoubleElevenList2022 } from "./api";
 import { Export } from "@/utils/downLoadFile";
 import cleanDeep from "clean-deep";
 import qs from "qs";
@@ -271,6 +273,7 @@ export default {
       },
       qrcodeStatus: false,
       codeUrl: "",
+      year: "2021",
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -279,6 +282,7 @@ export default {
   async mounted() {
     // 获取分部
     await this.$store.dispatch("setBranchs");
+    this.year = this.$route.query.year || "2021"
     this.init();
   },
   methods: {
@@ -287,10 +291,18 @@ export default {
     },
     async getList() {
       try {
-        const res = await getDoubleElevenList({
-          organId: this.searchForm.organId,
-          ...this.searchList
-        });
+        let res = null
+        if (this.year === "2021") {
+          res = await getDoubleElevenList({
+            organId: this.searchForm.organId,
+            ...this.searchList
+          });
+        } else {
+          res = await getDoubleElevenList2022({
+            organId: this.searchForm.organId,
+            ...this.searchList
+          });
+        }
         //   ...this.searchList,
         this.tableList = res.data;
         // this.head = res.data.head;
@@ -323,14 +335,25 @@ export default {
     onCreateQRCode(row) {
       // 生成报名二维码
       this.qrcodeStatus = true;
-      this.codeUrl = vaildTeachingUrl() + "/#/statistic-20211111";
+      if (this.year === "2022") {
+        this.codeUrl = vaildTeachingUrl() + "/#/statistic-20221111";
+      } else {
+        this.codeUrl = vaildTeachingUrl() + "/#/statistic-20211111";
+      }
     },
     gotoDetail(row) {
       // console.log('跳转详情')
-      this.$router.push({
-        path: "/operateManager/2021doubleDetail",
-        query: { organId: row.organId, organName: row.organName },
-      });
+      if (this.year === "2022") {
+        this.$router.push({
+          path: "/operateManager/2021doubleDetail",
+          query: { organId: row.organId, organName: row.organName },
+        });
+      } else {
+        this.$router.push({
+          path: "/operateManager/2021doubleDetail",
+          query: { organId: row.organId, organName: row.organName },
+        });
+      }
     },
     async onExport() {
       let obj = {
@@ -340,8 +363,8 @@ export default {
       await Export(
         this,
         {
-          url: "/api-web/export/organDoubleEleven2021Statis",
-          fileName: "2021双十一活动.xls",
+          url: this.year === "2021" ? "/api-web/export/organDoubleEleven2021Statis" : "/api-web/export/organDoubleEleven2022Statis",
+          fileName: this.year === "2021" ? "2021双十一活动.xls" : "2022双十一活动.xls",
           method: "post",
           params: qs.stringify(cleanDeep(obj)),
         },

+ 4 - 0
src/views/activityScheduling/activeMarketing.vue

@@ -177,6 +177,10 @@ export default {
         this.$router.push("/2021memeberActionManager");
       } else if (row.id == 2) {
         this.$router.push("/2021double11List");
+      } else if (row.id == 3) {
+        this.$router.push("/2021double11List?year=2022");
+      } else if (row.id == 4) {
+        this.$router.push("/2021double11List?year=2022&city=hz");
       }
     },
   },

+ 17 - 0
src/views/activityScheduling/api.js

@@ -50,3 +50,20 @@ export function getDoubleElevenDetail (data) {
       params: data
   })
 }
+
+// 2022 双十一活动列表
+export function getDoubleElevenList2022 (data) {
+  return request({
+      url: '/api-web/vipGroupActivity/organDoubleEleven2022Statis',
+      method: 'get',
+      params: data
+  })
+}
+// 2022 双十一分部详情列表
+export function getDoubleElevenDetail2022 (data) {
+  return request({
+      url: '/api-web/vipGroupActivity/doubleEleven2022OrderDetail',
+      method: 'get',
+      params: data
+  })
+}