From 872a6e8feb265b9eb39d1a952f370db2b1bdbcca Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Thu, 25 May 2023 18:37:23 +0800 Subject: [PATCH] optimize --- public/pages/report/dataReport/dataReport.js | 68 ++------------------ 1 file changed, 7 insertions(+), 61 deletions(-) diff --git a/public/pages/report/dataReport/dataReport.js b/public/pages/report/dataReport/dataReport.js index f8e4a0a76..ad6b8ccb2 100644 --- a/public/pages/report/dataReport/dataReport.js +++ b/public/pages/report/dataReport/dataReport.js @@ -7,52 +7,7 @@ dataReportInfo: { curDay: 'today', _currentTab: 'dataReportEarnedStatistics', - fees: [{ - name: '实收金额', - value: '1000000元', - }, { - name: '优惠金额', - value: '3元', - }, { - name: '滞纳金', - value: '3元', - }, { - name: '账户预存', - value: '3元', - }, { - name: '账户扣款', - value: '3元', - }, { - name: '临时车收入', - value: '3元', - }, { - name: '押金退款', - value: '3元', - }, { - name: '退款订单数', - value: '1000元', - }, { - name: '退款金额', - value: '3元', - }, { - name: '欠费金额', - value: '3元', - }, { - name: '微信收入', - value: '3元', - }, { - name: '支付宝收入', - value: '1000元', - }, { - name: '现金收入', - value: '3元', - }, { - name: '转账收入', - value: '3元', - }, { - name: '充电金额', - value: '3元', - }, ], + fees: [], orders: [{ name: '投诉单', value: '3元', @@ -201,10 +156,10 @@ _initMethod: function() { $that._initDate(); $that.changeTab($that.dataReportInfo._currentTab); + $that._loadDataReportFee(); }, _initEvent: function() { vc.on('dataReport', 'listOwnerData', function(_info) { - vc.component._loadOwnerInfo(); $that.changeTab($that.dataReportInfo._currentTab); }); }, @@ -253,25 +208,16 @@ } }, - _loadOwnerInfo: function() { + _loadDataReportFee: function() { let param = { - params: { - ownerId: $that.dataReportInfo.ownerId, - page: 1, - row: 1, - communityId: vc.getCurrentCommunity().communityId, - ownerTypeCd: '1001' - } + params: $that.dataReportInfo.conditions } //发送get请求 - vc.http.apiGet('/owner.queryOwners', + vc.http.apiGet('/dataReport.queryFeeDataReport', param, function(json, res) { - var listOwnerData = JSON.parse(json); - vc.copyObject(listOwnerData.owners[0], vc.component.dataReportInfo); - $that.dataReportInfo.attrs = listOwnerData.owners[0].ownerAttrDtos - //加载图片 - vc.component._loadOwnerPhoto(); + let _json = JSON.parse(json); + $that.dataReportInfo.fees = _json.data }, function(errInfo, error) { console.log('请求失败处理');