Kaynağa Gözat

对公对账导出

shipeng 2 hafta önce
ebeveyn
işleme
81c15e2f2e

+ 11 - 1
src/api/financeMr/reconciliation.js

@@ -17,7 +17,7 @@ export const orderInfoList = (query) => {
   })
 }
 
-//  导出
+//  对公对账 详情导出
 export function downOrderListXls(params) {
   return request({
     url: '/member/marketTeam/coreStateOrderExport',
@@ -26,3 +26,13 @@ export function downOrderListXls(params) {
     params
   });
 }
+
+//  对公对账导出
+export function exportOrderListXls(params) {
+  return request({
+    url: '/member/marketTeam/coreStateListExport',
+    method: 'get',
+    responseType: 'blob',
+    params
+  });
+}

+ 1 - 1
src/views/finance/reconciliation/dialog/orderInfo.vue

@@ -153,7 +153,7 @@ export default {
             endDate: this.queryParams.endDate,
            })
             .then((res) => {
-              exportExcel(res, '对公对账', '.xlsx');
+              exportExcel(res, '对账订单详情', '.xlsx');
               this.handleExportLoading = false;
             })
             .catch((error) => {

+ 45 - 1
src/views/finance/reconciliation/index.vue

@@ -30,6 +30,20 @@
     </div>
     
     <div class="app-container-table-box">
+      <el-row :gutter="10" class="mb8">
+        <el-button
+          type="primary"
+          size="mini"
+          icon="el-icon-download"
+          v-hasPermi="['groupBuyingMr:groupBuyingMr:excel']"
+          @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>
       <div class="app-container-table-info">
         <el-table ref="tables" v-loading="loading" height="100%" :data="dataList" border>
           <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
@@ -78,11 +92,13 @@
 <script>
 
 import { 
-  pageList
+  pageList,
+  exportOrderListXls,
 } from '@/api/financeMr/reconciliation'
 import orderInfo from "./dialog/orderInfo.vue";
 import moment from "moment"
 // import html2canvas from 'html2canvas'
+import { exportExcel } from '@/utils/exportexcel'
 
 export default {
   name: "Reconciliation",
@@ -119,6 +135,7 @@ export default {
         pageSize: 10,
         teamName: ""
       },
+      handleExportLoading: false,
     };
   },
   created() {
@@ -189,6 +206,33 @@ export default {
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },
+    /**
+     * 导出报表
+     * @date 2022-10-24
+     * @returns {any}
+     */
+     handleExport() {
+      this.$confirm('您确定要导出当前查询的数据吗?', '提示', {
+        confirmButtonText: '确定 ',
+        cancelButtonText: '取消 ',
+        type: 'warning'
+      })
+        .then(() => {
+          this.handleExportLoading = true;
+          exportOrderListXls(this.queryParams)
+            .then((res) => {
+              exportExcel(res, '对公对账', '.xlsx');
+              this.handleExportLoading = false;
+            })
+            .catch((error) => {
+              // console.log("error===",error)
+              this.handleExportLoading = false;
+            });
+        })
+        .catch(() => {
+          this.$message.info('您已取消导出!');
+        });
+    },
     
   },
   beforeDestroy() {