mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-26 08:16:47 +08:00
85 lines
3.3 KiB
JavaScript
85 lines
3.3 KiB
JavaScript
(function (vc) {
|
|
var DEFAULT_PAGE = 1;
|
|
var DEFAULT_ROWS = 10;
|
|
vc.extends({
|
|
data: {
|
|
simplifyRefundDepositInfo: {
|
|
fees: [],
|
|
ownerId: '',
|
|
roomId: '',
|
|
roomName: '',
|
|
total: 0,
|
|
records: 0
|
|
}
|
|
},
|
|
_initMethod: function () {
|
|
},
|
|
_initEvent: function () {
|
|
//切换 至费用页面
|
|
vc.on('simplifyRefundDeposit', 'switch', function (_param) {
|
|
if (!_param.roomId) {
|
|
return;
|
|
}
|
|
$that.clearSimplifyFeeDepositInfo();
|
|
vc.copyObject(_param, $that.simplifyRefundDepositInfo)
|
|
$that._listSimplifyFeeDeposit(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
});
|
|
vc.on('simplifyRefundDeposit', 'paginationPlus', 'page_event',
|
|
function (_currentPage) {
|
|
$that._listSimplifyFeeDeposit(_currentPage, DEFAULT_ROWS);
|
|
}
|
|
);
|
|
},
|
|
methods: {
|
|
_listSimplifyFeeDeposit: function (_page, _rows) {
|
|
let param = {
|
|
params: {
|
|
page: DEFAULT_PAGE,
|
|
row: DEFAULT_ROWS,
|
|
payerObjId: $that.simplifyRefundDepositInfo.roomId,
|
|
ownerId: $that.simplifyRefundDepositInfo.ownerId,
|
|
communityId: vc.getCurrentCommunity().communityId,
|
|
state:'1400',
|
|
}
|
|
};
|
|
//发送get请求
|
|
vc.http.apiGet('/fee.queryFeeDeposit',
|
|
param,
|
|
function (json, res) {
|
|
let _json = JSON.parse(json);
|
|
if(_json.code != 0){
|
|
return;
|
|
}
|
|
$that.simplifyRefundDepositInfo.total = _json.total;
|
|
$that.simplifyRefundDepositInfo.records = _json.records;
|
|
$that.simplifyRefundDepositInfo.fees = _json.data;
|
|
vc.emit('simplifyRefundDeposit', 'paginationPlus', 'init', {
|
|
total: $that.simplifyRefundDepositInfo.records,
|
|
dataCount: $that.simplifyRefundDepositInfo.total,
|
|
currentPage: _page
|
|
});
|
|
}, function (errInfo, error) {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
clearSimplifyFeeDepositInfo: function () {
|
|
$that.simplifyRefundDepositInfo = {
|
|
fees: [],
|
|
ownerId: '',
|
|
roomId: '',
|
|
roomName: '',
|
|
total: 0,
|
|
records: 0
|
|
}
|
|
},
|
|
_openRefundModel: function (_fee) {
|
|
let _roomId = $that.simplifyRefundDepositInfo.roomId;
|
|
vc.jumpToPage('/#/pages/fee/refundDepositFee?roomId='+_roomId);
|
|
},
|
|
_toSimplifyFeeDepositFeeDetail:function(_fee){
|
|
vc.jumpToPage('/#/pages/property/propertyFee?feeId='+_fee.feeId);
|
|
},
|
|
}
|
|
});
|
|
})(window.vc); |