Browse Source

导出和缴费记录

lex-xin 4 years ago
parent
commit
80200f463b

+ 26 - 0
src/views/categroyManager/vipActiveList.vue

@@ -13,6 +13,14 @@
         @click="gotoNewActive"
         >新建</el-button
       >
+      <!-- v-permission="'export/vipGroupActivity'" -->
+      <el-button
+        type="primary"
+        style="margin-bottom: 20px"
+        
+        @click="onExport"
+        >VIP活动导出</el-button
+      >
       <save-form
         :inline="true"
         class="searchForm"
@@ -461,6 +469,9 @@ import {
   resetVipActive,
   removeVipActive,
 } from "@/api/vipSeting";
+import qs from 'qs';
+import { Export } from '@/utils/downLoadFile'
+import cleanDeep from 'clean-deep'
 export default {
   name: "vipActiveList",
   components: { pagination },
@@ -666,6 +677,21 @@ export default {
 
       this.getList();
     },
+    // 导出
+    async onExport () {
+      const { ...rest } = this.searchForm;
+      let obj =  {
+        ...rest,
+        page: this.rules.page,
+        rows: this.rules.limit,
+      };
+      await Export(this, {
+        url: '/api-web/export/vipGroupActivity',
+        fileName: '活动列表.xlsx',
+        method: 'post',
+        params: qs.stringify(cleanDeep(obj))
+      }, '您确定活动列表?')
+    },
     loadNumber(event) {
       var el = event.currentTarget;
       var elValue = el.value;

+ 25 - 3
src/views/stuRecodeManager/index.vue

@@ -117,6 +117,12 @@
         <el-form-item>
           <el-button native-type="submit" type="danger">搜索</el-button>
           <el-button native-type="reset" type="primary">重置</el-button>
+          <el-button
+            @click="onExport"
+            type="primary"
+            v-permission="'export/queryTeacherAttendances'"
+            style="background-color: #14928a; border: 1px solid #14928a"
+            >导出</el-button>
         </el-form-item>
       </save-form>
       <div class="tableWrap">
@@ -287,9 +293,10 @@ import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { getTimes } from "@/utils";
-import qs from "qs";
+import qs from 'qs';
 import { findStudentAttendance } from "@/api/buildTeam";
-
+import { Export } from '@/utils/downLoadFile'
+import cleanDeep from 'clean-deep'
 // import { queryTeacherAttendances } from "@/api/recodeManager";
 import { courseType, courseListType, stuAttendance } from "@/utils/searchArray";
 export default {
@@ -338,6 +345,22 @@ export default {
       await this.$store.dispatch("setBranchs");
       this.getList();
     },
+    // 导出
+    async onExport () {
+      const { dates, ...rest } = this.searchForm;
+      let obj =  {
+        ...rest,
+        page: this.rules.page,
+        rows: this.rules.limit,
+        ...getTimes(dates, ["classStartDate", "classEndDate"],  "YYYY-MM-DD"),
+      };
+      await Export(this, {
+        url: '/api-web/export/exportStudentAttendances',
+        fileName: '考勤列表.xlsx',
+        method: 'post',
+        params: qs.stringify(cleanDeep(obj))
+      }, '您确定考勤列表?')
+    },
     getList() {
       const { dates, ...rest } = this.searchForm;
       let obj =  {
@@ -345,7 +368,6 @@ export default {
         page: this.rules.page,
         rows: this.rules.limit,
         ...getTimes(dates, ["startDateOfCourse", "endDateOfCourse"],  "YYYY-MM-DD"),
-
       };
 
       // let obj = {

+ 5 - 1
src/views/teamDetail/components/studentList.vue

@@ -223,7 +223,11 @@
         </el-table-column>
         <el-table-column align="center" label="欠费金额(元)">
           <template slot-scope="scope">
-            <div :class="[scope.row.noPaymentAmount > 0 ? 'error' : null]">{{ scope.row.noPaymentAmount | moneyFormat }} <i style="color: #14928A; font-size: 17px;" class="el-icon-view" @click="onPaymentDetail(scope.row)"></i></div>
+            <div :class="[scope.row.noPaymentAmount > 0 ? 'error' : null]">{{ scope.row.noPaymentAmount | moneyFormat }}
+              <auth auths="musicGroupPaymentCalenderDetail/queryPage" :router="['/business/teamDetails']">
+                <i style="color: #14928A; font-size: 17px;" title="缴费记录" class="el-icon-view" @click="onPaymentDetail(scope.row)"></i>
+              </auth>
+            </div>
           </template>
         </el-table-column>
         <el-table-column label="退团原因" align="center">