Browse Source

修改报表导出

lex-xin 5 years ago
parent
commit
88281772b4

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 1 - 1
dist/static/css/chunk-9810e3b0.6a244655.css → dist/static/css/chunk-8035a444.1bb40ef8.css

@@ -1 +1 @@
-.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.newBand[data-v-b49ea06e]{display:inline-block;margin-right:10px}.right-code .title[data-v-b49ea06e]{font-size:18px;text-align:center;padding-bottom:8px}
+.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.newBand[data-v-43e614f8]{display:inline-block;margin-right:10px}.right-code .title[data-v-43e614f8]{font-size:18px;text-align:center;padding-bottom:8px}

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.af4f8816.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-3386b90c.0cb787a7.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-40e665d1.1b084692.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-40e665d1.be9d41b6.js


+ 0 - 0
dist/static/js/chunk-419ce36c.cb81e2b2.js → dist/static/js/chunk-419ce36c.9b623981.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6181ddae.a202ff44.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6181ddae.e1d45149.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-68259a14.63ecfe02.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-8035a444.5ca7fbf1.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-9810e3b0.075a6a90.js


+ 151 - 151
src/views/businessManager/orderManager/incomeOne.vue

@@ -4,211 +4,211 @@
       <div class="squrt"></div>订单管理
     </h2>
     <div class="m-core">
-      <!-- <div class="newBand">报表导出</div> -->
+      <div class="newBand" @click="onOrderExport" v-permission="{child: 'export/orderList', parent: '/incomeOne'}">报表导出</div>
       <!-- 搜索类型 -->
-      <el-form :inline="true"
-               class="searchForm"
-               v-model="searchForm">
+      <el-form :inline="true" class="searchForm" v-model="searchForm">
         <el-form-item prop='organId'>
-          <el-select class='multiple'
-                     v-model="searchForm.organId"
-                     filterable
-                     clearable
-                     placeholder="请选择分部">
-            <el-option v-for="(item,index) in organList"
-                       :key="index"
-                       :label="item.name"
-                       :value="item.id"></el-option>
+          <el-select class='multiple' v-model="searchForm.organId" filterable clearable placeholder="请选择分部">
+            <el-option v-for="(item,index) in organList" :key="index" :label="item.name" :value="item.id"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-date-picker v-model="orderDate"
-                          style="width:410px;"
-                          type="daterange"
-                          value-format="yyyy-MM-dd"
-                          @change="searchOrderDate"
-                          range-separator="至"
-                          start-placeholder="开始日期"
-                          end-placeholder="结束日期">
+          <el-date-picker v-model="orderDate" style="width:410px;" type="daterange" value-format="yyyy-MM-dd" @change="searchOrderDate"
+            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
           </el-date-picker>
         </el-form-item>
         <el-form-item>
-          <el-select v-model="searchForm.paymentType"
-                     clearable
-                     filterable
-                     placeholder="交易类型">
-            <el-option v-for="(item, index) in orderStatus"
-                       :key="index"
-                       :label="item.label"
-                       :value="item.value"></el-option>
+          <el-select v-model="searchForm.paymentType" clearable filterable placeholder="交易类型">
+            <el-option v-for="(item, index) in orderStatus" :key="index" :label="item.label" :value="item.value"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-select v-model="searchForm.paymentStatus"
-                     clearable
-                     filterable
-                     placeholder="交易状态">
-            <el-option v-for="(item, index) in dealStatus"
-                       :key="index"
-                       :label="item.label"
-                       :value="item.value"></el-option>
+          <el-select v-model="searchForm.paymentStatus" clearable filterable placeholder="交易状态">
+            <el-option v-for="(item, index) in dealStatus" :key="index" :label="item.label" :value="item.value"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-button @click="search"
-                     type="danger">搜索</el-button>
-          <el-button @click="onReSet"
-                     type="primary">重置</el-button>
+          <el-button @click="search" type="danger">搜索</el-button>
+          <el-button @click="onReSet" type="primary">重置</el-button>
         </el-form-item>
       </el-form>
       <!-- 列表 -->
       <div class="tableWrap">
-        <el-table :data='tableList'
-                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-          <el-table-column align='center' width="180px"
-                           prop="transNo"
-                           label="交易流水号">
+        <el-table :data='tableList' :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+          <el-table-column align='center' width="180px" prop="transNo" label="交易流水号">
           </el-table-column>
-          <el-table-column align='center'
-                           width="210px"
-                           prop="orderNo"
-                           label="订单号">
+          <el-table-column align='center' width="210px" prop="orderNo" label="订单号">
           </el-table-column>
-          <el-table-column align='center' width="180px"
-                           prop="createTime"
-                           label="订单日期">
+          <el-table-column align='center' width="180px" prop="createTime" label="订单日期">
           </el-table-column>
-          <el-table-column align='center'
-                           label="交易类型">
+          <el-table-column align='center' label="交易类型">
             <template slot-scope="scope">
               {{ scope.row.type | orderType }}
             </template>
           </el-table-column>
-          <el-table-column align='center'
-                           prop="expectAmount"
-                           label="应付金额">
+          <el-table-column align='center' prop="expectAmount" label="应付金额">
           </el-table-column>
-          <el-table-column align='center'
-                           prop="balancePaymentAmount"
-                           label="余额支付">
+          <el-table-column align='center' prop="balancePaymentAmount" label="余额支付">
           </el-table-column>
-          <el-table-column align='center'
-                           prop="actualAmount"
-                           label="实付金额">
+          <el-table-column align='center' prop="actualAmount" label="实付金额">
           </el-table-column>
-          <el-table-column align='center'
-                           prop="user.username"
-                           label="学员姓名">
+          <el-table-column align='center' prop="user.username" label="学员姓名">
           </el-table-column>
-          <el-table-column align='center'
-                           prop="paymentChannel"
-                           label="交易方式">
+          <el-table-column align='center' prop="paymentChannel" label="交易方式">
             <template slot-scope="scope">
               {{ scope.row.paymentChannel | paymentChannelStatus }}
             </template>
           </el-table-column>
-          <el-table-column align='center'
-                           label="收款账户">
+          <el-table-column align='center' label="收款账户">
             <template slot-scope="scope">
               {{ scope.row.paymentChannelType | paymentChannelType }}
             </template>
           </el-table-column>
-          <el-table-column align='center'
-                           label="交易状态">
+          <el-table-column align='center' label="交易状态">
             <template slot-scope="scope">
               {{ scope.row.status | dealStatus }}
             </template>
           </el-table-column>
         </el-table>
-        <pagination :total="pageInfo.total"
-                    :page.sync="pageInfo.page"
-                    :limit.sync="pageInfo.limit"
-                    :page-sizes="pageInfo.page_size"
-                    @pagination="getList" />
+        <pagination :total="pageInfo.total" :page.sync="pageInfo.page" :limit.sync="pageInfo.limit" :page-sizes="pageInfo.page_size"
+          @pagination="getList" />
       </div>
     </div>
   </div>
 </template>
 <script>
-import pagination from '@/components/Pagination/index'
-import { orderQueryPage1 } from '@/api/orderManager'
-import { getEmployeeOrgan } from '@/api/buildTeam'
-import store from '@/store'
-import { orderStatus, dealStatus } from '@/utils/searchArray'
-export default {
-  components: { pagination },
-  name: 'income',
-  data () {
-    return {
-      orderStatus: orderStatus,
-      dealStatus: dealStatus,
-      orderDate: null,
-      searchForm: {
-        orderStartDate: null,
-        orderEndDate: null,
-        paymentStatus: null,
-        paymentType: null,
-        organId: null
-      },
-      tableList: [],
-      organList: [],
-      pageInfo: {
-        // 分页规则
-        limit: 10, // 限制显示条数
-        page: 1, // 当前页
-        total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
-      },
-    }
-  },
-  mounted () {
-    getEmployeeOrgan().then(res => {
-      if (res.code == 200) {
-        this.organList = res.data;
+  import pagination from '@/components/Pagination/index'
+  import {
+    orderQueryPage1
+  } from '@/api/orderManager'
+  import {
+    getEmployeeOrgan
+  } from '@/api/buildTeam'
+  // import store from '@/store'
+  import {
+    orderStatus,
+    dealStatus
+  } from '@/utils/searchArray'
+  import axios from 'axios'
+  import qs from 'qs'
+  import {
+    getToken
+  } from '@/utils/auth'
+  export default {
+    components: {
+      pagination
+    },
+    name: 'income',
+    data() {
+      return {
+        orderStatus: orderStatus,
+        dealStatus: dealStatus,
+        orderDate: null,
+        searchForm: {
+          orderStartDate: null,
+          orderEndDate: null,
+          paymentStatus: null,
+          paymentType: null,
+          organId: null
+        },
+        tableList: [],
+        organList: [],
+        pageInfo: {
+          // 分页规则
+          limit: 10, // 限制显示条数
+          page: 1, // 当前页
+          total: 0, // 总条数
+          page_size: [10, 20, 40, 50] // 选择限制显示条数
+        },
       }
-    })
-    this.getList()
-  },
-  methods: {
-    search () {
-      this.pageInfo.page = 1;
-      this.getList();
     },
-    getList () {
-      let params = this.searchForm
-      params.rows = this.pageInfo.limit
-      params.page = this.pageInfo.page
-      orderQueryPage1(params).then(res => {
-        let result = res.data
+    mounted() {
+      getEmployeeOrgan().then(res => {
         if (res.code == 200) {
-          this.tableList = result.rows
-          this.pageInfo.total = result.total
-
+          this.organList = res.data;
         }
       })
-    },
-    searchOrderDate (value) {
-      if (value) {
-        this.searchForm.orderStartDate = value[0]
-        this.searchForm.orderEndDate = value[1]
-      } else {
-        this.searchForm.orderStartDate = null
-        this.searchForm.orderEndDate = null
-      }
-    },
-    onReSet () { // 重置搜索
-      this.orderDate = null
-      this.searchForm = {
-        orderStartDate: null,
-        orderEndDate: null,
-        paymentStatus: null,
-        paymentType: null,
-        organId: null
-      }
       this.getList()
     },
+    methods: {
+      onOrderExport() { // 报表导出
+        let url = '/api-web/export/orderList'
+        let data = {
+          orderType: 1,
+        }
+        const options = {
+          method: 'POST',
+          headers: {
+            'Authorization': getToken()
+          },
+          data: qs.stringify(data),
+          url,
+          responseType: 'blob'
+        }
+        this.$confirm('您确定导出报表', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          axios(options).then(res => {
+            let blob = new Blob([res.data], {
+              // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+              type: 'application/vnd.ms-excel;charset=utf-8'
+              //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+            })
+            let objectUrl = URL.createObjectURL(blob)
+            let link = document.createElement("a")
+            let nowTime = new Date()
+            let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' +
+              nowTime.getHours() +
+              '' + nowTime.getMinutes()
+            let fname = this.$route.query.id + '-' + ymd + '发放清单' //下载文件的名字
+            link.href = objectUrl
+            link.setAttribute("download", fname)
+            document.body.appendChild(link)
+            link.click()
+          })
+        }).catch(() => {})
+      },
+      search() {
+        this.pageInfo.page = 1;
+        this.getList();
+      },
+      getList() {
+        let params = this.searchForm
+        params.rows = this.pageInfo.limit
+        params.page = this.pageInfo.page
+        orderQueryPage1(params).then(res => {
+          let result = res.data
+          if (res.code == 200) {
+            this.tableList = result.rows
+            this.pageInfo.total = result.total
+
+          }
+        })
+      },
+      searchOrderDate(value) {
+        if (value) {
+          this.searchForm.orderStartDate = value[0]
+          this.searchForm.orderEndDate = value[1]
+        } else {
+          this.searchForm.orderStartDate = null
+          this.searchForm.orderEndDate = null
+        }
+      },
+      onReSet() { // 重置搜索
+        this.orderDate = null
+        this.searchForm = {
+          orderStartDate: null,
+          orderEndDate: null,
+          paymentStatus: null,
+          paymentType: null,
+          organId: null
+        }
+        this.getList()
+      },
+    }
   }
-}
 </script>
 <style lang="scss">
-</style>
+</style>

+ 47 - 3
src/views/businessManager/orderManager/incomeTwo.vue

@@ -4,7 +4,7 @@
       <div class="squrt"></div>订单管理
     </h2>
     <div class="m-core">
-      <!-- <div class="newBand">报表导出</div> -->
+      <div class="newBand" @click="onOrderExport" v-permission="{child: 'export/orderList', parent: '/incomeTwo'}">报表导出</div>
       <!-- 搜索类型 -->
       <el-form :inline="true"
                class="searchForm"
@@ -133,8 +133,13 @@
 import pagination from '@/components/Pagination/index'
 import { orderQueryPage2 } from '@/api/orderManager'
 import { getEmployeeOrgan } from '@/api/buildTeam'
-import store from '@/store'
+// import store from '@/store'
 import { orderStatus, dealStatus } from '@/utils/searchArray'
+  import axios from 'axios'
+  import qs from 'qs'
+  import {
+    getToken
+  } from '@/utils/auth'
 export default {
   components: { pagination },
   name: 'income',
@@ -170,6 +175,45 @@ export default {
     this.getList()
   },
   methods: {
+    onOrderExport() { // 报表导出
+      let url = '/api-web/export/orderList'
+      let data = {
+        orderType: 2,
+      }
+      const options = {
+        method: 'POST',
+        headers: {
+          'Authorization': getToken()
+        },
+        data: qs.stringify(data),
+        url,
+        responseType: 'blob'
+      }
+      this.$confirm('您确定导出报表', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        axios(options).then(res => {
+          let blob = new Blob([res.data], {
+            // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+            type: 'application/vnd.ms-excel;charset=utf-8'
+            //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+          })
+          let objectUrl = URL.createObjectURL(blob)
+          let link = document.createElement("a")
+          let nowTime = new Date()
+          let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' +
+            nowTime.getHours() +
+            '' + nowTime.getMinutes()
+          let fname = this.$route.query.id + '-' + ymd + '发放清单' //下载文件的名字
+          link.href = objectUrl
+          link.setAttribute("download", fname)
+          document.body.appendChild(link)
+          link.click()
+        })
+      }).catch(() => {})
+    },
     search () {
       this.pageInfo.page = 1;
       this.getList();
@@ -211,4 +255,4 @@ export default {
 }
 </script>
 <style lang="scss">
-</style>
+</style>

+ 23 - 15
src/views/studentManager/studentList.vue

@@ -344,22 +344,30 @@ export default {
         url,
         responseType: 'blob'
       }
-      axios(options).then(res => {
-        let blob = new Blob([res.data], {
-            // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
-            type: 'application/vnd.ms-excel;charset=utf-8'
-            // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+      
+      this.$confirm('您确定导出未激活学生列表?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        axios(options).then(res => {
+          let blob = new Blob([res.data], {
+              // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
+              type: 'application/vnd.ms-excel;charset=utf-8'
+              // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+          })
+          let objectUrl = URL.createObjectURL(blob)
+          let link = document.createElement("a")
+          let nowTime = new Date()
+          let ymd = nowTime.getFullYear() + (nowTime.getMonth() + 1) + nowTime.getDate()
+          let fname = `未激活学生` + ymd //下载文件的名字
+          link.href = objectUrl
+          link.setAttribute("download", fname)
+          document.body.appendChild(link)
+          link.click()
         })
-        let objectUrl = URL.createObjectURL(blob)
-        let link = document.createElement("a")
-        let nowTime = new Date()
-        let ymd = nowTime.getFullYear() + (nowTime.getMonth() + 1) + nowTime.getDate()
-        let fname = `未激活学生` + ymd //下载文件的名字
-        link.href = objectUrl
-        link.setAttribute("download", fname)
-        document.body.appendChild(link)
-        link.click()
-      })
+      }).catch(() => { })
+      
     },
     checkPhone (val) {
       var regu = /^1[3456789]\d{9}$/;

+ 224 - 197
src/views/teamDetail/components/baseInfo.vue

@@ -2,52 +2,43 @@
   <div class='basea-container'>
     <div class="baseTop">
       <div class="left">
-        <el-form :inline="true"
-                 :model="topForm">
+        <el-form :inline="true" :model="topForm">
           <el-form-item label="乐团编号">
-            <el-input v-model="topForm.num"
-                      disabled></el-input>
+            <el-input v-model="topForm.num" disabled></el-input>
           </el-form-item>
           <el-form-item label="教务老师">
-            <el-input v-model="topForm.teacher"
-                      disabled></el-input>
+            <el-input v-model="topForm.teacher" disabled></el-input>
             <!-- <el-select>
               <el-option label="啦啦啦"
                          value="1"></el-option>
             </el-select> -->
           </el-form-item>
           <el-form-item label="所属分部">
-            <el-input v-model="topForm.section"
-                      disabled></el-input>
+            <el-input v-model="topForm.section" disabled></el-input>
             <!-- <el-select v-model="topForm.section">
               <el-option label="啦啦啦"
                          value="1"></el-option>
             </el-select> -->
           </el-form-item>
           <el-form-item label="乐队指导">
-            <el-input v-model="topForm.boss"
-                      disabled></el-input>
+            <el-input v-model="topForm.boss" disabled></el-input>
             <!-- <el-select v-model="topForm.boss">
               <el-option label="啦啦啦"
                          value="1"></el-option>
             </el-select> -->
           </el-form-item>
           <el-form-item label="合作单位">
-            <el-input v-model="topForm.cooperate"
-                      disabled></el-input>
+            <el-input v-model="topForm.cooperate" disabled></el-input>
             <!-- <el-select v-model="topForm.cooperate">
               <el-option label="啦啦啦"
                          value="1"></el-option>
             </el-select> -->
           </el-form-item>
           <el-form-item label="上课地点">
-            <el-input v-model="topForm.add"
-                      disabled
-                      style="width:370px;"></el-input>
+            <el-input v-model="topForm.add" disabled style="width:370px;"></el-input>
           </el-form-item>
           <el-form-item label="收费类型">
-            <el-input v-model="topForm.type"
-                      disabled></el-input>
+            <el-input v-model="topForm.type" disabled></el-input>
             <!-- <el-select v-model="topForm.type">
               <el-option label="啦啦啦"
                          value="1"></el-option>
@@ -67,8 +58,7 @@
       </div>
       <div class="right">
         <ul>
-          <li v-for="(item,index) in processList"
-              :key='index'>{{ item.createTime}} {{ item.realName }} {{item.event}}</li>
+          <li v-for="(item,index) in processList" :key='index'>{{ item.createTime}} {{ item.realName }} {{item.event}}</li>
 
         </ul>
       </div>
@@ -81,198 +71,235 @@
   </div>
 </template>
 <script>
-import { getMusicGroup, getMusicGroupProcess } from '@/api/buildTeam'
-import QRCode from 'qrcodejs2'
-import axios from 'axios'
-import qs from 'qs'
-import { getToken } from '@/utils/auth'
-export default {
-  props: {
-    teamid: {
-      type: String,
-      required: true
-    },
-  },
-  data () {
-    return {
-      topForm: {
-        num: '',
-        teacher: '',
-        section: '',
-        boss: '',
-        cooperate: '',
-        add: '',
-        type: '',
-        salary: ''
+  import {
+    getMusicGroup,
+    getMusicGroupProcess
+  } from '@/api/buildTeam'
+  import QRCode from 'qrcodejs2'
+  import axios from 'axios'
+  import qs from 'qs'
+  import {
+    getToken
+  } from '@/utils/auth'
+  export default {
+    props: {
+      teamid: {
+        type: String,
+        required: true
       },
-      name: '',
-      processList: []
-    }
-  },
-  mounted () {
-    // 获取乐团基本信息
-    // let teamid = '191014135135001';
-    // this.creatQrCode();
-    getMusicGroup({ musicGroupId: this.teamid }).then(res => {
-      if (res.code == 200) {
-        this.topForm.num = res.data.id;
-        // this.topForm.teacher = res.data.teamTeacherName;
-        this.topForm.teacher = res.data.educationalTeacherName;
-        this.topForm.boss = res.data.directorUserName;
-        this.topForm.cooperate = res.data.schoolName;
-        this.topForm.type = res.data.chargeTypeName;
-        this.topForm.section = res.data.organName;
-        this.topForm.add = res.data.address
-        // 差上课地点
-        this.$emit('getname', res.data.name)
+    },
+    data() {
+      return {
+        topForm: {
+          num: '',
+          teacher: '',
+          section: '',
+          boss: '',
+          cooperate: '',
+          add: '',
+          type: '',
+          salary: ''
+        },
+        name: '',
+        processList: []
       }
-    })
+    },
+    mounted() {
+      // 获取乐团基本信息
+      // let teamid = '191014135135001';
+      // this.creatQrCode();
+      getMusicGroup({
+        musicGroupId: this.teamid
+      }).then(res => {
+        if (res.code == 200) {
+          this.topForm.num = res.data.id;
+          // this.topForm.teacher = res.data.teamTeacherName;
+          this.topForm.teacher = res.data.educationalTeacherName;
+          this.topForm.boss = res.data.directorUserName;
+          this.topForm.cooperate = res.data.schoolName;
+          this.topForm.type = res.data.chargeTypeName;
+          this.topForm.section = res.data.organName;
+          this.topForm.add = res.data.address
+          // 差上课地点
+          this.$emit('getname', res.data.name)
+        }
+      })
 
-    // 根据乐团id获取乐团流程
-    getMusicGroupProcess({ musicGroupId: this.teamid }).then(res => {
-      if (res.code == 200) {
-        this.processList = res.data;
-      }
-    })
-  }, methods: {
-    creatQrCode () {
-      var qrcode = new QRCode(this.$refs.qrCodeUrl, {
-        text: 'http://www.baidu.com',
-        width: 300,
-        height: 300,
-        colorDark: '#000000',
-        colorLight: '#ffffff',
-        correctLevel: QRCode.CorrectLevel.H
+      // 根据乐团id获取乐团流程
+      getMusicGroupProcess({
+        musicGroupId: this.teamid
+      }).then(res => {
+        if (res.code == 200) {
+          this.processList = res.data;
+        }
       })
     },
-	musicalListExport () { // 报表导出
-	  let url = '/api-web/order/musicalListExport'
-	  let data = {
-	    musicGroupId: this.$route.query.id,
-	  }
-	  const options = {
-	    method: 'POST',
-	    headers: {
-	      'Authorization': getToken()
-	    },
-	    data: qs.stringify(data),
-	    url,
-	    responseType: 'blob'
-	  }
-	  axios(options).then(res => {
-	    let blob = new Blob([res.data], {
-	        // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-	        type: 'application/vnd.ms-excel;charset=utf-8'
-	        //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-	    })
-	    let objectUrl = URL.createObjectURL(blob)
-	    let link = document.createElement("a")
-	    let nowTime = new Date()
-	    let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' + nowTime.getHours() + '' + nowTime.getMinutes()
-	    let fname = this.$route.query.id + '-' + ymd + '发放清单' //下载文件的名字
-	    link.href = objectUrl
-	    link.setAttribute("download", fname)
-	    document.body.appendChild(link)
-	    link.click()
-	  })
-	},
-	musicalListDetailExport () { // 报表导出
-	  let url = '/api-web/order/musicalListDetailExport'
-	  let data = {
-	    musicGroupId: this.$route.query.id
-	  }
-	  const options = {
-	    method: 'POST',
-	    headers: {
-	      'Authorization': getToken()
-	    },
-	    data: qs.stringify(data),
-	    url,
-	    responseType: 'blob'
-	  }
-	  axios(options).then(res => {
-	    let blob = new Blob([res.data], {
-	        // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-	        type: 'application/vnd.ms-excel;charset=utf-8'
-	        //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-	    })
-	    let objectUrl = URL.createObjectURL(blob)
-	    let link = document.createElement("a")
-	    let nowTime = new Date()
-	    let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' + nowTime.getHours() + '' + nowTime.getMinutes()
-	    let fname = this.$route.query.id + '-' + ymd + '分发清单' //下载文件的名字
-	    link.href = objectUrl
-	    link.setAttribute("download", fname)
-	    document.body.appendChild(link)
-	    link.click()
-	  })
-	}
-  },
-}
-</script>
-<style lang="scss" scope>
-.basea-container {
-  margin-top: 35px;
-  .baseTop {
-    display: flex;
-    flex-direction: row;
-    justify-content: space-between;
-    .left {
-      max-width: 750px;
-      .el-select {
-        width: 180px !important;
-      }
-    }
-    .right {
-      height: 40vh;
-      overflow: scroll;
-      ul {
-        li {
-          list-style: none;
-          line-height: 22px;
-          font-size: 14px;
-          color: #aaa;
+    methods: {
+      creatQrCode() {
+        var qrcode = new QRCode(this.$refs.qrCodeUrl, {
+          text: 'http://www.baidu.com',
+          width: 300,
+          height: 300,
+          colorDark: '#000000',
+          colorLight: '#ffffff',
+          correctLevel: QRCode.CorrectLevel.H
+        })
+      },
+      musicalListExport() { // 报表导出
+        let url = '/api-web/order/musicalListExport'
+        let data = { }
+        const options = {
+          method: 'POST',
+          headers: {
+            'Authorization': getToken()
+          },
+          data: qs.stringify(data),
+          url,
+          responseType: 'blob'
         }
+        this.$confirm('您确定导出发放清单', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          axios(options).then(res => {
+            let blob = new Blob([res.data], {
+              // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+              type: 'application/vnd.ms-excel;charset=utf-8'
+              //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+            })
+            let objectUrl = URL.createObjectURL(blob)
+            let link = document.createElement("a")
+            let nowTime = new Date()
+            let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' +
+              nowTime.getHours() +
+              '' + nowTime.getMinutes()
+            let fname = this.$route.query.id + '-' + ymd + '发放清单' //下载文件的名字
+            link.href = objectUrl
+            link.setAttribute("download", fname)
+            document.body.appendChild(link)
+            link.click()
+          })
+        }).catch(() => {})
+
+      },
+      musicalListDetailExport() { // 报表导出
+        let url = '/api-web/order/musicalListDetailExport'
+        let data = {
+          musicGroupId: this.$route.query.id
+        }
+        const options = {
+          method: 'POST',
+          headers: {
+            'Authorization': getToken()
+          },
+          data: qs.stringify(data),
+          url,
+          responseType: 'blob'
+        }
+        this.$confirm('您确定导出分发清单', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          axios(options).then(res => {
+            let blob = new Blob([res.data], {
+              // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+              type: 'application/vnd.ms-excel;charset=utf-8'
+              //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+            })
+            let objectUrl = URL.createObjectURL(blob)
+            let link = document.createElement("a")
+            let nowTime = new Date()
+            let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' +
+              nowTime.getHours() +
+              '' + nowTime.getMinutes()
+            let fname = this.$route.query.id + '-' + ymd + '分发清单' //下载文件的名字
+            link.href = objectUrl
+            link.setAttribute("download", fname)
+            document.body.appendChild(link)
+            link.click()
+          })
+        }).catch(() => {})
       }
-      &::-webkit-scrollbar {
-        display: none;
-      }
-    }
+    },
   }
-  .baseBottom {
-    margin-top: 40px;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    .code {
-      width: 300px;
-      height: 300px;
-      background-color: red;
-      margin-bottom: 20px;
-    }
-    .btnList {
-      width: 300px;
+</script>
+<style lang="scss" scope>
+  .basea-container {
+    margin-top: 35px;
+
+    .baseTop {
       display: flex;
       flex-direction: row;
       justify-content: space-between;
-      margin-top: 60px;
-      div {
-        cursor: pointer;
-        width: 120px;
-        height: 40px;
-        line-height: 40px;
-        border-radius: 4px;
-        color: #fff;
-        text-align: center;
+
+      .left {
+        max-width: 750px;
+
+        .el-select {
+          width: 180px !important;
+        }
+      }
+
+      .right {
+        height: 40vh;
+        overflow: scroll;
+
+        ul {
+          li {
+            list-style: none;
+            line-height: 22px;
+            font-size: 14px;
+            color: #aaa;
+          }
+        }
+
+        &::-webkit-scrollbar {
+          display: none;
+        }
       }
-      .closeBtn {
-        background-color: #777;
+    }
+
+    .baseBottom {
+      margin-top: 40px;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: center;
+
+      .code {
+        width: 300px;
+        height: 300px;
+        background-color: red;
+        margin-bottom: 20px;
       }
-      .okBtn {
-        background-color: #f97215;
+
+      .btnList {
+        width: 300px;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        margin-top: 60px;
+
+        div {
+          cursor: pointer;
+          width: 120px;
+          height: 40px;
+          line-height: 40px;
+          border-radius: 4px;
+          color: #fff;
+          text-align: center;
+        }
+
+        .closeBtn {
+          background-color: #777;
+        }
+
+        .okBtn {
+          background-color: #f97215;
+        }
       }
     }
   }
-}
 </style>

+ 44 - 32
src/views/teamDetail/teamDetailedList.vue

@@ -126,22 +126,28 @@ export default {
         url,
         responseType: 'blob'
       }
-      axios(options).then(res => {
-        let blob = new Blob([res.data], {
-            // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-            type: 'application/vnd.ms-excel;charset=utf-8'
-            //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-        })
-        let objectUrl = URL.createObjectURL(blob)
-        let link = document.createElement("a")
-        let nowTime = new Date()
-        let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' + nowTime.getHours() + '' + nowTime.getMinutes()
-        let fname = this.$route.query.id + '-' + ymd + '发放清单' //下载文件的名字
-        link.href = objectUrl
-        link.setAttribute("download", fname)
-        document.body.appendChild(link)
-        link.click()
-      })
+      this.$confirm('您确定导出发放清单', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+       }).then(() => {
+         axios(options).then(res => {
+           let blob = new Blob([res.data], {
+               // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+               type: 'application/vnd.ms-excel;charset=utf-8'
+               //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+           })
+           let objectUrl = URL.createObjectURL(blob)
+           let link = document.createElement("a")
+           let nowTime = new Date()
+           let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' + nowTime.getHours() + '' + nowTime.getMinutes()
+           let fname = this.$route.query.id + '-' + ymd + '发放清单' //下载文件的名字
+           link.href = objectUrl
+           link.setAttribute("download", fname)
+           document.body.appendChild(link)
+           link.click()
+         })
+       }).catch(() => {})
     },
     musicalListDetailExport () { // 报表导出
       let url = '/api-web/order/musicalListDetailExport'
@@ -157,22 +163,28 @@ export default {
         url,
         responseType: 'blob'
       }
-      axios(options).then(res => {
-        let blob = new Blob([res.data], {
-            // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-            type: 'application/vnd.ms-excel;charset=utf-8'
-            //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-        })
-        let objectUrl = URL.createObjectURL(blob)
-        let link = document.createElement("a")
-        let nowTime = new Date()
-        let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' + nowTime.getHours() + '' + nowTime.getMinutes()
-        let fname = this.$route.query.id + '-' + ymd + '分发清单' //下载文件的名字
-        link.href = objectUrl
-        link.setAttribute("download", fname)
-        document.body.appendChild(link)
-        link.click()
-      })
+      this.$confirm('您确定导出分发清单', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+       }).then(() => {
+         axios(options).then(res => {
+           let blob = new Blob([res.data], {
+               // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+               type: 'application/vnd.ms-excel;charset=utf-8'
+               //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+           })
+           let objectUrl = URL.createObjectURL(blob)
+           let link = document.createElement("a")
+           let nowTime = new Date()
+           let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' + nowTime.getHours() + '' + nowTime.getMinutes()
+           let fname = this.$route.query.id + '-' + ymd + '分发清单' //下载文件的名字
+           link.href = objectUrl
+           link.setAttribute("download", fname)
+           document.body.appendChild(link)
+           link.click()
+         })
+       }).catch(() => {})
     }
   },
 }

Some files were not shown because too many files changed in this diff