Files
PropertyDeployment/resources/Web/MicroCommunityWeb/html/pages/owner/adminAccountDetail/adminAccountDetail.js
2025-12-09 20:22:03 +08:00

79 lines
3.0 KiB
JavaScript

/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
adminAccountDetailInfo: {
accountDetails: [],
shopAccounts: [],
total: 0,
records: 1,
moreCondition: false,
scId: '',
conditions: {
acctId: '',
detailType: '',
orderId: ''
}
}
},
_initMethod: function () {
$that.adminAccountDetailInfo.conditions.acctId = vc.getParam('acctId');
$that._listAdminAccountDetails(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('adminAccountDetail', 'listAccountDetail', function (_param) {
$that._listAdminAccountDetails(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
$that._listAdminAccountDetails(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listAdminAccountDetails: function (_page, _rows) {
$that.adminAccountDetailInfo.conditions.page = _page;
$that.adminAccountDetailInfo.conditions.row = _rows;
let param = {
params: $that.adminAccountDetailInfo.conditions
};
//发送get请求
vc.http.apiGet('/account.queryAdminAccountDetail',
param,
function (json, res) {
let _json = JSON.parse(json);
$that.adminAccountDetailInfo.total = _json.total;
$that.adminAccountDetailInfo.records = _json.records;
$that.adminAccountDetailInfo.accountDetails = _json.data;
vc.emit('pagination', 'init', {
total: $that.adminAccountDetailInfo.records,
dataCount: $that.adminAccountDetailInfo.total,
currentPage: _page
});
},
function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_queryAccountDetailMethod: function () {
$that._listAdminAccountDetails(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if ($that.adminAccountDetailInfo.moreCondition) {
$that.adminAccountDetailInfo.moreCondition = false;
} else {
$that.adminAccountDetailInfo.moreCondition = true;
}
},
_cancelAccountDetail: function (_detail) {
vc.emit('cancelAccountDetail', 'openAddModal', _detail);
},
_goBack: function () {
vc.goBack();
}
}
});
})(window.vc);