Browse Source

1. 优化

MONSTER-ygh 1 year ago
parent
commit
186a2d5ad8

+ 9 - 0
src/api/distribution/recordMr.js

@@ -9,3 +9,12 @@ export const pageList = (query) => {
   })
 }
 
+//  场次统计导出
+export function downTimeCountListXls(params) {
+  return request({
+    url: '/order/orderInfo/marketPersonOrderListExport',
+    method: 'get',
+    responseType: 'blob',
+    params
+  });
+}

+ 49 - 3
src/views/distribution/recordMr/index.vue

@@ -50,6 +50,18 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
+      <el-button
+        type="primary"
+        size="mini"
+        icon="el-icon-download"
+        :disabled="dataList.length === 0"
+        v-hasPermi="['recordMr:recordMr: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>
 
@@ -102,9 +114,9 @@
 
 <script>
 
-import { pageList } from '@/api/distribution/recordMr'
+import { pageList , downTimeCountListXls } from '@/api/distribution/recordMr'
 import detailsDia from "./dialog/details.vue";
-
+import { exportExcel } from '@/utils/exportexcel'
 export default {
   name: "agreement",
   dicts: ['agreement_type', 'distribution_type'],
@@ -139,7 +151,8 @@ export default {
       },
       visibleStatus: false,
       newObj: {},
-      visibleType: ''
+      visibleType: '',
+      handleExportLoading: false,
     };
   },
   created() {
@@ -179,6 +192,39 @@ export default {
     openDetails(row, type) {
       this.$refs["detailsDia"].openDialog("详情", row, type);
     },
+    /**
+     * 导出报表
+     * @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]
+            }
+          }
+          downTimeCountListXls(postMap)
+            .then((res) => {
+              exportExcel(res, '分销记录', '.xlsx');
+              this.handleExportLoading = false;
+            })
+            .catch(() => {
+              this.handleExportLoading = false;
+            });
+        })
+        .catch(() => {
+          this.$message.info('您已取消导出!');
+        });
+    },
   }
 };
 </script>

+ 7 - 5
src/views/order/viewers/index.vue

@@ -44,13 +44,13 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
-      <el-button type="primary" size="mini" icon="el-icon-download" v-hasPermi="['order:orderMr:downloadExcel']"
+      <el-button type="primary" size="mini" icon="el-icon-download" v-hasPermi="['order:viewers: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>
       <el-button 
       type="primary" 
       size="mini" 
-      v-hasPermi="['order:orderMr:downloadExcel']"
+      v-hasPermi="['order:viewers:tuikuai']"
       :disabled="multipleSelection.length==0"
         @click="openRefundSubmitModel(multipleSelection)">批量退款</el-button>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -116,11 +116,13 @@
       <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button size="mini" type="text" @click="openDetails(scope.row)"
-            v-hasPermi="['orderMr:orderMr:details']">详情</el-button>
+            v-hasPermi="['order:viewers:details']">详情</el-button>
           <el-button v-if="scope.row.status == 3 || scope.row.status == 7" size="mini" type="text"
-            @click="handleOpen([scope.row])" v-hasPermi="['orderMr:orderMr:print']">打印</el-button>
+            @click="handleOpen([scope.row])" 
+            v-hasPermi="['order:viewers:print']">打印</el-button>
           <el-button v-if="scope.row.status == 3 || scope.row.status == 6" size="mini" type="text"
-            @click="openRefundSubmitModel([scope.row])" v-hasPermi="['orderMr:orderMr:print']">退款</el-button>
+            @click="openRefundSubmitModel([scope.row])" 
+            v-hasPermi="['order:viewers:tuikuai']">退款</el-button>
         </template>
       </el-table-column>
     </el-table>

+ 1 - 1
src/views/statisticalReport/sessionInventory.vue

@@ -20,7 +20,7 @@
         size="mini"
         icon="el-icon-download"
         :disabled="tableData.length === 0"
-        v-hasPermi="['statisticalReport:seatInventory:downloadExcel']"
+        v-hasPermi="['statisticalReport:sessionInventory:downloadExcel']"
         @click="handleExport"
         v-loading.fullscreen.lock="handleExportLoading"
         element-loading-text="正在拼命生成数据中..."

+ 2 - 2
src/views/statistics/index.vue

@@ -51,8 +51,8 @@ export default {
         // {id: 1, name: '总览统计', url: ''},
         // {id: 2, name: '渠道统计', url: ''},
         // {id: 3, name: '场次销售分析', hasPermi: 'session:session:list', url: 'statisticalReport/session'},
-        {id: 4, name: '场次销售统计', hasPermi: 'statisticalReport:sessionInventory:list', url: 'statisticalReport/sessionInventory'},
-        // {id: 5, name: '座位类型销售统计', hasPermi: 'statisticalReport:seatInventory:list', url: 'statisticalReport/seatInventory'},
+        {id: 4, name: '场次销售统计', hasPermi: 'statisticalReport:sessionInventory:downloadExcel', url: 'statisticalReport/sessionInventory'},
+        // {id: 5, name: '座位类型销售统计', hasPermi: 'statisticalReport:seatInventory:downloadExcel', url: 'statisticalReport/seatInventory'},
       ]
     };
   },

+ 2 - 2
src/views/venue/performanceHallMr/index.vue

@@ -131,8 +131,8 @@
 
 import { merchantPageList, deleteById } from '@/api/performanceHallMr/performanceHallMr'
 import addAndEdit from "./dialog/addAndEdit";
-// import seatTemplateEdit from "./dialog/seatTemplateEdit";
-import seatTemplateEdit from "./dialog/seatTemplateEditOld";
+import seatTemplateEdit from "./dialog/seatTemplateEdit";
+// import seatTemplateEdit from "./dialog/seatTemplateEditOld";
 import programmeAddAndEdit from "./dialog/programmeAddAndEdit";
 
 export default {