From ed19845f6425ec313839a532a40c406c155733bf Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Mon, 5 Jun 2023 15:07:47 +0800 Subject: [PATCH] optimize --- .../dataReportEarnedWayStatistics.html | 17 +++------- .../dataReportEarnedWayStatistics.js | 22 ++++++++++++ .../dataReportFeeStatistics.html | 6 ++-- .../dataReportFeeStatistics.js | 34 +++++++++++++++++++ .../dataReportOweDetailStatistics.html | 5 +-- .../dataReportOweDetailStatistics.js | 25 ++++++++++++++ .../dataReportOweStatistics.html | 16 ++------- .../dataReportOweStatistics.js | 24 ++++++++++++- 8 files changed, 118 insertions(+), 31 deletions(-) diff --git a/public/components/report/dataReportEarnedWayStatistics/dataReportEarnedWayStatistics.html b/public/components/report/dataReportEarnedWayStatistics/dataReportEarnedWayStatistics.html index 16babecb2..176b30edf 100644 --- a/public/components/report/dataReportEarnedWayStatistics/dataReportEarnedWayStatistics.html +++ b/public/components/report/dataReportEarnedWayStatistics/dataReportEarnedWayStatistics.html @@ -1,19 +1,10 @@
-
-
+
diff --git a/public/components/report/dataReportEarnedWayStatistics/dataReportEarnedWayStatistics.js b/public/components/report/dataReportEarnedWayStatistics/dataReportEarnedWayStatistics.js index 272916cec..4e2de9896 100644 --- a/public/components/report/dataReportEarnedWayStatistics/dataReportEarnedWayStatistics.js +++ b/public/components/report/dataReportEarnedWayStatistics/dataReportEarnedWayStatistics.js @@ -48,6 +48,28 @@ } ); }, + _exportReportEarnedWayExcel: function() { + let param = { + params: { + communityId: vc.getCurrentCommunity().communityId, + startDate: $that.dataReportEarnedStatisticsInfo.startDate, + endDate: $that.dataReportEarnedStatisticsInfo.endDate, + pagePath: 'dataReportEarnedWayStatistics' + } + }; + //发送get请求 + vc.http.apiGet('/export.exportData', param, + function(json, res) { + let _json = JSON.parse(json); + vc.toast(_json.msg); + if (_json.code == 0) { + vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心') + } + }, + function(errInfo, error) { + console.log('请求失败处理'); + }); + }, } }); })(window.vc); \ No newline at end of file diff --git a/public/components/report/dataReportFeeStatistics/dataReportFeeStatistics.html b/public/components/report/dataReportFeeStatistics/dataReportFeeStatistics.html index be3ed547b..6f0c06c4b 100644 --- a/public/components/report/dataReportFeeStatistics/dataReportFeeStatistics.html +++ b/public/components/report/dataReportFeeStatistics/dataReportFeeStatistics.html @@ -16,8 +16,10 @@ -
- +
+
diff --git a/public/components/report/dataReportFeeStatistics/dataReportFeeStatistics.js b/public/components/report/dataReportFeeStatistics/dataReportFeeStatistics.js index bfec3f875..83288db9a 100644 --- a/public/components/report/dataReportFeeStatistics/dataReportFeeStatistics.js +++ b/public/components/report/dataReportFeeStatistics/dataReportFeeStatistics.js @@ -90,6 +90,7 @@ let listFloorData = JSON.parse(json); let _floors = listFloorData.apiFloorDataVoList; + $that.dataReportFeeStatisticsInfo.floors = _floors; let _floorIds = []; for (let _floorIndex = 0; _floorIndex < _floors.length; _floorIndex++) { _floorIds.push(_floors[_floorIndex].floorId); @@ -113,6 +114,39 @@ _qureyDataReportFeeStatistics: function() { $that._loadFloors(); }, + _exportReportFeeExcel: function() { + let _floorIds = []; + let _floors = $that.dataReportFeeStatisticsInfo.floors; + for (let _floorIndex = 0; _floorIndex < _floors.length; _floorIndex++) { + _floorIds.push(_floors[_floorIndex].floorId); + } + if (!_floorIds || _floorIds.length < 1) { + vc.toast('没有可以导出的数据'); + return; + } + let param = { + params: { + communityId: vc.getCurrentCommunity().communityId, + startDate: $that.dataReportFeeStatisticsInfo.startDate, + endDate: $that.dataReportFeeStatisticsInfo.endDate, + feeTypeCd: $that.dataReportFeeStatisticsInfo.feeTypeCd, + floorIds: _floorIds.join(','), + pagePath: 'dataReportFeeStatistics' + } + }; + //发送get请求 + vc.http.apiGet('/export.exportData', param, + function(json, res) { + let _json = JSON.parse(json); + vc.toast(_json.msg); + if (_json.code == 0) { + vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心') + } + }, + function(errInfo, error) { + console.log('请求失败处理'); + }); + }, } }); })(window.vc); \ No newline at end of file diff --git a/public/components/report/dataReportOweDetailStatistics/dataReportOweDetailStatistics.html b/public/components/report/dataReportOweDetailStatistics/dataReportOweDetailStatistics.html index 7571eab96..7064aaf00 100644 --- a/public/components/report/dataReportOweDetailStatistics/dataReportOweDetailStatistics.html +++ b/public/components/report/dataReportOweDetailStatistics/dataReportOweDetailStatistics.html @@ -16,8 +16,9 @@
- - +
diff --git a/public/components/report/dataReportOweDetailStatistics/dataReportOweDetailStatistics.js b/public/components/report/dataReportOweDetailStatistics/dataReportOweDetailStatistics.js index 498af3625..9f48f6a2f 100644 --- a/public/components/report/dataReportOweDetailStatistics/dataReportOweDetailStatistics.js +++ b/public/components/report/dataReportOweDetailStatistics/dataReportOweDetailStatistics.js @@ -82,6 +82,31 @@ _qureyDataReportOweDetailStatistics: function() { $that._loadDataReportOweDetailStatisticsData(DEFAULT_PAGE, DEFAULT_ROWS); }, + _exportReportOweDetailExcel: function() { + let param = { + params: { + communityId: vc.getCurrentCommunity().communityId, + startDate: $that.dataReportOweDetailStatisticsInfo.startDate, + endDate: $that.dataReportOweDetailStatisticsInfo.endDate, + objName: $that.dataReportOweDetailStatisticsInfo.objName, + ownerName: $that.dataReportOweDetailStatisticsInfo.ownerName, + link: $that.dataReportOweDetailStatisticsInfo.link, + pagePath: 'dataReportOweDetailStatistics' + } + }; + //发送get请求 + vc.http.apiGet('/export.exportData', param, + function(json, res) { + let _json = JSON.parse(json); + vc.toast(_json.msg); + if (_json.code == 0) { + vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心') + } + }, + function(errInfo, error) { + console.log('请求失败处理'); + }); + }, } }); })(window.vc); \ No newline at end of file diff --git a/public/components/report/dataReportOweStatistics/dataReportOweStatistics.html b/public/components/report/dataReportOweStatistics/dataReportOweStatistics.html index added724d..4353055b5 100644 --- a/public/components/report/dataReportOweStatistics/dataReportOweStatistics.html +++ b/public/components/report/dataReportOweStatistics/dataReportOweStatistics.html @@ -1,18 +1,8 @@
-
-
diff --git a/public/components/report/dataReportOweStatistics/dataReportOweStatistics.js b/public/components/report/dataReportOweStatistics/dataReportOweStatistics.js index 3d4d0aec6..93571bbd8 100644 --- a/public/components/report/dataReportOweStatistics/dataReportOweStatistics.js +++ b/public/components/report/dataReportOweStatistics/dataReportOweStatistics.js @@ -13,7 +13,7 @@ roomNum: '', startDate: '', endDate: '', - + feeAmount: '0' } }, @@ -77,6 +77,28 @@ _qureyDataReportOweStatistics: function() { $that._loadDataReportOweStatisticsData(DEFAULT_PAGE, DEFAULT_ROWS); }, + _exportReportOweExcel: function() { + let param = { + params: { + communityId: vc.getCurrentCommunity().communityId, + startDate: $that.dataReportEarnedStatisticsInfo.startDate, + endDate: $that.dataReportEarnedStatisticsInfo.endDate, + pagePath: 'dataReportOweStatistics' + } + }; + //发送get请求 + vc.http.apiGet('/export.exportData', param, + function(json, res) { + let _json = JSON.parse(json); + vc.toast(_json.msg); + if (_json.code == 0) { + vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心') + } + }, + function(errInfo, error) { + console.log('请求失败处理'); + }); + }, } }); })(window.vc); \ No newline at end of file