Files
PropertyDeployment/resources/Web/MicroCommunityWeb/html/components/fee/aFeeDetailDiscount/aFeeDetailDiscount.js
2025-12-09 20:22:03 +08:00

59 lines
2.0 KiB
JavaScript

/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
aFeeDetailDiscountInfo: {
applyRoomDiscounts: [],
feeId: '',
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('aFeeDetailDiscount', 'switch', function (_data) {
$that.aFeeDetailDiscountInfo.feeId = _data.feeId;
$that._loadAFeeDetailDiscountData(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('aFeeDetailDiscount', 'paginationPlus', 'page_event',
function (_currentPage) {
$that._loadAFeeDetailDiscountData(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_loadAFeeDetailDiscountData: function (_page, _row) {
let param = {
params: {
feeId: $that.aFeeDetailDiscountInfo.feeId,
page: _page,
row: _row
}
};
//发送get请求
vc.http.apiGet('/fee.queryAdminApplyRoomDiscount',
param,
function (json) {
var _roomInfo = JSON.parse(json);
$that.aFeeDetailDiscountInfo.applyRoomDiscounts = _roomInfo.data;
vc.emit('aFeeDetailDiscount', 'paginationPlus', 'init', {
total: _roomInfo.records,
dataCount: _roomInfo.total,
currentPage: _page
});
},
function () {
console.log('请求失败处理');
}
);
},
//查询
_qureyAFeeDetailDiscount: function () {
$that._loadAFeeDetailDiscountData(DEFAULT_PAGE, DEFAULT_ROWS);
},
}
});
})(window.vc);