浏览代码

1. 修复导出功能

MONSTER-ygh 1 年之前
父节点
当前提交
2c7a4712a9

+ 13 - 3
src/views/distribution/detailMr/index.vue

@@ -233,9 +233,19 @@ export default {
           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]
+          if(this.queryParams.time && this.queryParams.time.length > 0){
+            this.queryParams.beginTime = this.queryParams.time[0];
+            this.queryParams.endTime = this.queryParams.time[1];
+          } else {
+            if(this.queryParams.beginTime){
+              delete this.queryParams.beginTime
+              delete this.queryParams.endTime
+            }
+          }
+          let params = JSON.parse(JSON.stringify(this.queryParams))
+          for (let key in params) {
+            if(key != 'pageNum' && key != 'pageSize' && key != 'time'){
+              postMap[key] = params[key]
             }
           }
           downOrderListXls(postMap)

+ 21 - 3
src/views/order/groupBuyingMr/index.vue

@@ -436,6 +436,9 @@ export default {
       if(params.performDate&&params.performDate.length==2){
         params.performDateStart = params.performDate[0];
         params.performDateEnd = params.performDate[1];
+      }else {
+        params.performDateStart = null
+        params.performDateEnd =null
       }
       delete params.performDate;
       pageList(params)
@@ -666,9 +669,24 @@ export default {
           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]
+          if(this.queryParams.time){
+            this.queryParams.beginTime = this.queryParams.time[0];
+            this.queryParams.endTime = this.queryParams.time[1];
+          }else{
+            this.queryParams.beginTime = null
+            this.queryParams.endTime = null
+          }
+          if(this.queryParams.performDate&&this.queryParams.performDate.length==2){
+            this.queryParams.performDateStart = this.queryParams.performDate[0];
+            this.queryParams.performDateEnd = this.queryParams.performDate[1];
+          }else {
+            this.queryParams.performDateStart = null
+            this.queryParams.performDateEnd =null
+          }
+          let params = JSON.parse(JSON.stringify(this.queryParams))
+          for (let key in params) {
+            if(key != 'pageNum' && key != 'pageSize' && key != 'time' && key != 'performDate'){
+              postMap[key] = params[key]
             }
           }
           downOrderListXls(postMap)

+ 26 - 3
src/views/order/orderMr/index.vue

@@ -476,9 +476,32 @@ export default {
           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]
+          
+          if(this.queryParams.time){
+            this.queryParams.payBeginTime = this.queryParams.time[0];
+            this.queryParams.payEndTime = this.queryParams.time[1];
+          }else {
+            this.queryParams.payBeginTime = null
+            this.queryParams.payEndTime = null
+          }
+          if(this.queryParams.createTime&&this.queryParams.createTime.length>0){
+            this.queryParams.createBeginTime = this.queryParams.createTime[0];
+            this.queryParams.createEndTime = this.queryParams.createTime[1];
+          }else {
+            this.queryParams.createBeginTime = null
+            this.queryParams.createEndTime = null
+          }
+          if(this.queryParams.performDate){
+            this.queryParams.performDateStart   = this.queryParams.performDate[0];
+            this.queryParams.performDateEnd = this.queryParams.performDate[1];
+          }else {
+            this.queryParams.performDateStart   = null
+            this.queryParams.performDateEnd = null
+          }
+          let params = JSON.parse(JSON.stringify(this.queryParams))
+          for (let key in params) {
+            if(key != 'pageNum' && key != 'pageSize' && key != 'time' && key != 'createTime' && key != 'performDate'){
+              postMap[key] = params[key]
             }
           }
           downOrderListXls(postMap)

+ 28 - 3
src/views/order/viewers/index.vue

@@ -486,9 +486,34 @@ export default {
           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]
+          if (this.queryParams.time) {
+            this.queryParams.beginTime = this.queryParams.time[0];
+            this.queryParams.endTime = this.queryParams.time[1];
+          }else {
+            this.queryParams.beginTime = null
+            this.queryParams.endTime = null
+          }
+          if (this.queryParams.createTime && this.queryParams.createTime.length > 0) {
+            this.queryParams.createBeginTime = this.queryParams.createTime[0];
+            this.queryParams.createEndTime = this.queryParams.createTime[1];
+          }else {
+            this.queryParams.createBeginTime = null
+            this.queryParams.createEndTime = null
+          }
+
+          if (this.queryParams.payTime && this.queryParams.payTime.length > 0) {
+            this.queryParams.payBeginTime = this.queryParams.payTime[0];
+            this.queryParams.payEndTime = this.queryParams.payTime[1];
+          
+          }else {
+            this.queryParams.payBeginTime = null
+            this.queryParams.payEndTime = null
+            
+          }
+          let params = JSON.parse(JSON.stringify(this.queryParams))
+          for (let key in params) {
+            if(key != 'pageNum' && key != 'pageSize' && key != 'time' && key != 'createTime' && key != 'payTime'){
+              postMap[key] = params[key]
             }
           }
           downOrderListXls(postMap)

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

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