mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 14:17:54 +08:00
117 lines
4.6 KiB
JavaScript
117 lines
4.6 KiB
JavaScript
/**
|
|
入驻小区
|
|
**/
|
|
(function (vc) {
|
|
var DEFAULT_PAGE = 1;
|
|
var DEFAULT_ROW = 10;
|
|
vc.extends({
|
|
data: {
|
|
parkingSpaceUnits: [],
|
|
carCreateFeeInfo: {
|
|
cars: [],
|
|
states: [],
|
|
total: 0,
|
|
records: 1,
|
|
floorId: '',
|
|
unitId: '',
|
|
state: '',
|
|
num: '',
|
|
moreCondition: false,
|
|
conditions: {
|
|
psId: '',
|
|
ownerName: '',
|
|
carNum: '',
|
|
carNumLike: '',
|
|
allNum: '',
|
|
state: '',
|
|
carTypeCd: '1001'
|
|
}
|
|
}
|
|
},
|
|
_initMethod: function () {
|
|
$that.listCars(DEFAULT_PAGE, DEFAULT_ROW);
|
|
vc.getDict('owner_car', 'state', function (_data) {
|
|
$that.carCreateFeeInfo.states = _data;
|
|
});
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('pagination', 'page_event', function (_currentPage) {
|
|
$that.listCars(_currentPage, DEFAULT_ROW);
|
|
});
|
|
},
|
|
methods: {
|
|
listCars: function (_page, _row) {
|
|
$that.carCreateFeeInfo.conditions.page = _page;
|
|
$that.carCreateFeeInfo.conditions.row = _row;
|
|
$that.carCreateFeeInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
|
|
let _allNum = $that.carCreateFeeInfo.conditions.allNum.trim();
|
|
let _conditions = JSON.parse(JSON.stringify($that.carCreateFeeInfo.conditions));
|
|
let param = {
|
|
params: _conditions
|
|
};
|
|
if (_allNum.split('-').length == 2) {
|
|
let _allNums = _allNum.split('-')
|
|
param.params.areaNum = _allNums[0];
|
|
param.params.num = _allNums[1];
|
|
}
|
|
//发送get请求
|
|
vc.http.apiGet('/owner.queryOwnerCars',
|
|
param,
|
|
function (json, res) {
|
|
let _json = JSON.parse(json);
|
|
$that.carCreateFeeInfo.total = _json.total;
|
|
$that.carCreateFeeInfo.records = _json.records;
|
|
$that.carCreateFeeInfo.cars = _json.data;
|
|
vc.emit('pagination', 'init', {
|
|
total: $that.carCreateFeeInfo.records,
|
|
dataCount: $that.carCreateFeeInfo.total,
|
|
currentPage: _page
|
|
});
|
|
},
|
|
function (errInfo, error) {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
_openCarCreateFeeAddModal: function (_car, _isMore) {
|
|
vc.emit('carCreateFeeAdd', 'openCarCreateFeeAddModal', {
|
|
isMore: _isMore,
|
|
car: _car
|
|
});
|
|
},
|
|
_openViewParkingSpaceCreateFee: function (_car) {
|
|
vc.jumpToPage("/#/pages/property/listCarFee?carId=" + _car.carId + "&carNum=" + _car.carNum + "&areaNum=" + _car.areaNum + "&num=" + _car.num);
|
|
},
|
|
_toBuyCarMonthCard:function(){
|
|
vc.jumpToPage("/#/pages/fee/buyCarMonthCard");
|
|
},
|
|
//查询
|
|
_queryParkingSpaceMethod: function () {
|
|
$that.listCars(DEFAULT_PAGE, DEFAULT_ROW);
|
|
},
|
|
//重置
|
|
_resetParkingSpaceMethod: function () {
|
|
$that.carCreateFeeInfo.conditions.psId = "";
|
|
$that.carCreateFeeInfo.conditions.ownerName = "";
|
|
$that.carCreateFeeInfo.conditions.carNum = "";
|
|
$that.carCreateFeeInfo.conditions.carNumLike = "";
|
|
$that.carCreateFeeInfo.conditions.allNum = "";
|
|
$that.carCreateFeeInfo.conditions.state = "";
|
|
$that.listCars(DEFAULT_PAGE, DEFAULT_ROW);
|
|
},
|
|
_moreCondition: function () {
|
|
if ($that.carCreateFeeInfo.moreCondition) {
|
|
$that.carCreateFeeInfo.moreCondition = false;
|
|
} else {
|
|
$that.carCreateFeeInfo.moreCondition = true;
|
|
}
|
|
},
|
|
_openFeeImportExcel: function () {
|
|
vc.emit('exportCarFeeImportExcel', 'openExportCarFeeImportExcelModal', {})
|
|
},
|
|
_openDoCreateRoomFee: function () {
|
|
vc.emit('doImportCreateFee', 'openDoImportCreateFeeModal', {})
|
|
}
|
|
}
|
|
});
|
|
})(window.vc); |