(function (vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROWS = 10; vc.extends({ data: { managementFee: { _currentTab: 'reportFeeDetailRoom', floors: [], moreCondition: false, communitys: [], fees: [], feeTypeCds: [], total: 0, records: 0, conditions: { floorId: '', // objName: '', // startDate: '', // endDate: '', // configId: '', feeTypeCd: '', ownerName: '', importFee: '', communityId: '' }, history: [{ year: 2020, value1: 200, value2: 200, value3: 200, }, { year: 2021, value1: 200, value2: 200, value3: 200, }, { year: 2023, value1: 200, value2: 200, value3: 200, }, { year: 2024, value1: 200, value2: 200, value3: 200, }, { year: 2025, value1: 200, value2: 200, value3: 200, } ], headerList:[] }, }, _initMethod: function () { $that.managementFee.conditions.communityId = vc.getCurrentCommunity().communityId; // $that.changeTab($that.managementFee._currentTab); vc.getDict('pay_fee_config', "fee_type_cd_show", function (_data) { $that.managementFee.feeTypeCds = _data }); $that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS); }, _initEvent: function () { vc.on("indexContext", "_queryIndexContextData", function (_param) {}); vc.on('reportFeeDetailOwner', 'switch', function (_data) { $that.managementFee.conditions = _data; $that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS); }); vc.on('reportFeeDetailOwner', 'notify', function (_data) { $that.managementFee.conditions = _data; $that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS); }); vc.on('reportFeeDetailOwner', 'paginationPlus', 'page_event', function (_currentPage) { $that._listReportFeeDetailOwners(_currentPage, DEFAULT_ROWS); }); }, methods: { _toDetail: function (_fee) { const combinedValue = _fee[2] + '-' + _fee[3] + '-' + _fee[4] vc.jumpToPage('/#/pages/property/managementFeesDetail?roomNum=' + combinedValue); }, _computeTableDivWidth: function () { let mainWidth = document.getElementsByTagName('body')[0].clientWidth - document.getElementById('menu-nav').offsetWidth; //let treeWidth = document.getElementsByClassName('room-floor-unit-tree')[0].offsetWidth; mainWidth = mainWidth - 20 - 15 - 20; //document.getElementsByClassName('hc-table-div')[0].style.width=mainWidth+'px'; return mainWidth + 'px'; }, changeTab: function (_tab) { $that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS); $that.managementFee._currentTab = _tab; vc.emit(_tab, 'switch', $that.managementFee.conditions) }, //查询 _queryMethod: function () { $that.changeTab($that.managementFee._currentTab); }, //重置 _resetMethod: function () { vc.component.managementFee.conditions.floorId = ""; vc.component.managementFee.conditions.feeTypeCd = ""; vc.component.managementFee.conditions.ownerName = ""; vc.component.managementFee.conditions.importFee = ""; $that.changeTab($that.managementFee._currentTab); }, _changCommunity: function () { $that.changeTab($that.managementFee._currentTab); }, _moreCondition: function () { if (vc.component.managementFee.moreCondition) { vc.component.managementFee.moreCondition = false; } else { vc.component.managementFee.moreCondition = true; } }, _listReportFeeDetailOwners: function (_page, _rows) { console.log('_listReportFeeDetailOwners11111'); $that.managementFee.conditions.page = _page; $that.managementFee.conditions.row = _rows; let param = { params: $that.managementFee.conditions }; //发送get请求 vc.http.apiGet('/fee.reportPropertyFeeCmd', param, function (json, res) { let _json = JSON.parse(json); console.log('_listReportFeeDetailOwners2222222', _json); $that.managementFee.total = _json.total; $that.managementFee.records = _json.records; $that.managementFee.fees = _json.data.data; $that.managementFee.headerList = _json.data.header || []; $that.managementFee.fees.history =$that.managementFee.history vc.emit('reportFeeDetailOwner', 'paginationPlus', 'init', { total: $that.managementFee.records, dataCount: $that.managementFee.total, currentPage: _page, }); }, function (errInfo, error) { console.log('请求失败处理'); } ); }, _exportReportFeeDetailOwnerExcel: function () { $that.managementFee.conditions.communityId = vc.getCurrentCommunity().communityId; $that.managementFee.conditions.pagePath = 'reportPropertyFee'; let param = { params: $that.managementFee.conditions }; //发送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);