(function (vc) {
|
var DEFAULT_PAGE = 1;
|
var DEFAULT_ROWS = 10;
|
vc.extends({
|
data: {
|
transactionReport: {
|
_currentTab: 'reportFeeDetailRoom',
|
fees: [],
|
feeTypeCds: [],
|
total: 0,
|
records: 0,
|
conditions: {
|
importFee: '',
|
feeTypeCd: '',
|
feeYear: '',
|
communityId: vc.getCurrentCommunity().communityId,
|
},
|
},
|
},
|
_initMethod: function () {
|
$that.transactionReport.conditions.communityId = vc.getCurrentCommunity().communityId;
|
vc.getDict('pay_fee_config', "fee_type_cd_show", function (_data) {
|
$that.transactionReport.feeTypeCds = _data
|
});
|
$that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS);
|
},
|
_initEvent: function () {
|
vc.on('reportFeeDetailOwner', 'switch', function (_data) {
|
$that.transactionReport.conditions = _data;
|
$that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS);
|
});
|
vc.on('reportFeeDetailOwner', 'paginationPlus', 'page_event', function (_currentPage) {
|
$that._listReportFeeDetailOwners(_currentPage, DEFAULT_ROWS);
|
});
|
},
|
methods: {
|
_queryMethod: function () {
|
$that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS, true);
|
},
|
_resetMethod: function () {
|
$that.transactionReport.conditions.importFee = "";
|
$that.transactionReport.conditions.feeTypeCd = "";
|
$that.transactionReport.conditions.feeYear = "";
|
$that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS);
|
},
|
_computeTableDivWidth: function () {
|
let mainWidth = document.getElementsByTagName('body')[0].clientWidth - document.getElementById('menu-nav').offsetWidth;
|
mainWidth = mainWidth - 20 - 15 - 20;
|
return mainWidth + 'px';
|
},
|
_listReportFeeDetailOwners: function (_page, _rows, _reload) {
|
let param = {
|
params: {
|
communityId: vc.getCurrentCommunity().communityId,
|
page: _page,
|
row: _rows,
|
importFee: $that.transactionReport.conditions.importFee,
|
feeTypeCd: $that.transactionReport.conditions.feeTypeCd,
|
feeYear: $that.transactionReport.conditions.feeYear,
|
}
|
};
|
if (_reload) {
|
param.params.reload = true;
|
}
|
vc.http.apiGet('/fee.whiteOrderReportFeeCmd', param,
|
function (json, res) {
|
let _json = JSON.parse(json);
|
$that.transactionReport.total = _json.total;
|
$that.transactionReport.records = _json.records;
|
$that.transactionReport.fees = _json.data;
|
vc.emit('reportFeeDetailOwner', 'paginationPlus', 'init', {
|
total: $that.transactionReport.records,
|
dataCount: $that.transactionReport.total,
|
currentPage: _page,
|
});
|
},
|
function (errInfo, error) {
|
console.log('请求失败处理');
|
}
|
);
|
},
|
_exportReportFeeDetailOwnerExcel: function () {
|
$that.transactionReport.conditions.communityId = vc.getCurrentCommunity().communityId;
|
$that.transactionReport.conditions.pagePath = 'whiteOrderReport';
|
let param = {
|
params: $that.transactionReport.conditions
|
};
|
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);
|