|  | @@ -66,6 +66,17 @@
 | 
	
		
			
				|  |  |      </el-form>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <el-row :gutter="10" class="mb8">
 | 
	
		
			
				|  |  | +      <el-button
 | 
	
		
			
				|  |  | +        type="primary"
 | 
	
		
			
				|  |  | +        size="mini"
 | 
	
		
			
				|  |  | +        icon="el-icon-download"
 | 
	
		
			
				|  |  | +        v-hasPermi="['order:orderMr:downloadExcel']"
 | 
	
		
			
				|  |  | +        @click="handleExport"
 | 
	
		
			
				|  |  | +        v-loading.fullscreen.lock="handleExportLoading"
 | 
	
		
			
				|  |  | +        element-loading-text="正在拼命生成数据中..."
 | 
	
		
			
				|  |  | +        element-loading-spinner="el-icon-loading"
 | 
	
		
			
				|  |  | +        element-loading-background="rgba(0, 0, 0, 0.5)"
 | 
	
		
			
				|  |  | +      >导出excel</el-button>
 | 
	
		
			
				|  |  |        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
	
		
			
				|  |  |      </el-row>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -203,12 +214,14 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import { getToken } from "@/utils/auth";
 | 
	
		
			
				|  |  | -import { pageList,gotoCorporatePay } from '@/api/order/groupBuyingMr'
 | 
	
		
			
				|  |  | +import { pageList,gotoCorporatePay, downOrderListXls } from '@/api/order/groupBuyingMr'
 | 
	
		
			
				|  |  |  import detailsDia from "./dialog/details.vue";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import { printApi } from '@/api/order/orderMr'
 | 
	
		
			
				|  |  |  import { pageList as getPrintListApi } from "@/api/device/pda";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import { exportExcel } from '@/utils/exportexcel'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  const https = require('https');
 | 
	
		
			
				|  |  |  const axios = require('axios');
 | 
	
		
			
				|  |  |  export default {
 | 
	
	
		
			
				|  | @@ -325,7 +338,9 @@ export default {
 | 
	
		
			
				|  |  |          url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
 | 
	
		
			
				|  |  |          Headers: { Authorization: "Bearer " + getToken() },
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      corporatePayLoading:false
 | 
	
		
			
				|  |  | +      corporatePayLoading:false,
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      handleExportLoading: false,
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
	
		
			
				|  | @@ -546,6 +561,40 @@ export default {
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        return isJPG;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 导出报表
 | 
	
		
			
				|  |  | +     * @date 2022-10-24
 | 
	
		
			
				|  |  | +     * @returns {any}
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +     handleExport() {
 | 
	
		
			
				|  |  | +      this.$confirm('您确定要导出当前查询的数据吗?', '提示', {
 | 
	
		
			
				|  |  | +        confirmButtonText: '确定 ',
 | 
	
		
			
				|  |  | +        cancelButtonText: '取消 ',
 | 
	
		
			
				|  |  | +        type: 'warning'
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +        .then(() => {
 | 
	
		
			
				|  |  | +          this.handleExportLoading = true;
 | 
	
		
			
				|  |  | +          // const { pageNum, pageSize} = this.params;
 | 
	
		
			
				|  |  | +          let postMap = {}
 | 
	
		
			
				|  |  | +          for (let key in this.queryParams) {
 | 
	
		
			
				|  |  | +            if(key != 'pageNum' && key != 'pageSize'){
 | 
	
		
			
				|  |  | +              postMap[key] = this.queryParams[key]
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          downOrderListXls(postMap)
 | 
	
		
			
				|  |  | +            .then((res) => {
 | 
	
		
			
				|  |  | +              exportExcel(res, '团购订单', '.xlsx');
 | 
	
		
			
				|  |  | +              this.handleExportLoading = false;
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +            .catch((error) => {
 | 
	
		
			
				|  |  | +              console.log("error===",error)
 | 
	
		
			
				|  |  | +              this.handleExportLoading = false;
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        .catch(() => {
 | 
	
		
			
				|  |  | +          this.$message.info('您已取消导出!');
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  </script>
 |