From 50c3e987059272850bbfe8495f850871c1141ef2 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Fri, 11 Sep 2020 19:40:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BD=A6=E4=BD=8D=E6=8A=84?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/addMeterWater/addMeterWater.html | 2 +- .../property/addMeterWater/addMeterWater.js | 15 +- .../carCreateFeeAdd/carCreateFeeAdd.js | 1 + .../property/viewMainFee/viewMainFee.html | 23 ++ .../property/viewMainFee/viewMainFee.js | 5 +- .../property/carCreateFee/carCreateFee.html | 6 +- .../property/carCreateFee/carCreateFee.js | 2 +- .../pages/property/listCarFee/listCarFee.html | 30 ++- .../pages/property/listCarFee/listCarFee.js | 128 +++++++----- .../property/listRoomFee/listRoomFee.html | 2 +- .../property/roomCreateFee/roomCreateFee.html | 49 ++--- .../property/roomCreateFee/roomCreateFee.js | 197 +++++++++--------- 12 files changed, 274 insertions(+), 186 deletions(-) diff --git a/public/components/property/addMeterWater/addMeterWater.html b/public/components/property/addMeterWater/addMeterWater.html index 66f99c096..8c1d58f8a 100644 --- a/public/components/property/addMeterWater/addMeterWater.html +++ b/public/components/property/addMeterWater/addMeterWater.html @@ -52,7 +52,7 @@
- +
diff --git a/public/components/property/addMeterWater/addMeterWater.js b/public/components/property/addMeterWater/addMeterWater.js index 885617edb..b8932af9f 100644 --- a/public/components/property/addMeterWater/addMeterWater.js +++ b/public/components/property/addMeterWater/addMeterWater.js @@ -22,7 +22,8 @@ configId: '', objType: '1001', hasRoom: false, - ownerName: '' + ownerName: '', + objType:'3333' } }, _initMethod: function () { @@ -30,6 +31,9 @@ }, _initEvent: function () { vc.on('addMeterWater', 'openAddMeterWaterModal', function (_param) { + if(_param.hasOwnProperty("objType")){ + $that.addMeterWaterInfo.objType = _param.objType; + } if (_param.hasOwnProperty('roomId')) { $that.addMeterWaterInfo.hasRoom =true; $that.addMeterWaterInfo.roomId = _param.roomId; @@ -38,6 +42,8 @@ $that.addMeterWaterInfo.ownerName =_param.roomName +'('+_param.ownerName+')'; $that._queryPreMeterWater(_param.roomId); } + + $('#addMeterWaterModel').modal('show'); }); @@ -200,6 +206,8 @@ vc.component.clearAddMeterWaterInfo(); vc.emit('meterWaterManage', 'listMeterWater', {}); vc.emit('listRoomFee','notify', {}); + vc.emit('listParkingSpaceFee', 'notify', {}); + return; } @@ -241,7 +249,7 @@ params: { communityId: vc.getCurrentCommunity().communityId, objId: _roomId, - objType: '1001' + objType: $that.addMeterWaterInfo.objType } }; //发送get请求 @@ -277,7 +285,8 @@ configId: '', objType: '1001', hasRoom: false, - ownerName:'' + ownerName:'', + objType:'3333' }; } diff --git a/public/components/property/carCreateFeeAdd/carCreateFeeAdd.js b/public/components/property/carCreateFeeAdd/carCreateFeeAdd.js index 8ce1173a1..b6c98305d 100644 --- a/public/components/property/carCreateFeeAdd/carCreateFeeAdd.js +++ b/public/components/property/carCreateFeeAdd/carCreateFeeAdd.js @@ -110,6 +110,7 @@ var _json = JSON.parse(json); $('#carCreateFeeAddModel').modal('hide'); vc.component.clearAddFeeConfigInfo(); + vc.emit('listParkingSpaceFee', 'notify',{}); vc.toast("创建收费成功,总共["+_json.totalCar+"]车位,成功["+_json.successCar+"],失败["+_json.errorCar+"]",8000); return; } diff --git a/public/components/property/viewMainFee/viewMainFee.html b/public/components/property/viewMainFee/viewMainFee.html index 60c0f0183..168db1931 100644 --- a/public/components/property/viewMainFee/viewMainFee.html +++ b/public/components/property/viewMainFee/viewMainFee.html @@ -81,6 +81,29 @@
+
+ +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
diff --git a/public/components/property/viewMainFee/viewMainFee.js b/public/components/property/viewMainFee/viewMainFee.js index 26869854b..c5c98d82d 100644 --- a/public/components/property/viewMainFee/viewMainFee.js +++ b/public/components/property/viewMainFee/viewMainFee.js @@ -32,8 +32,8 @@ squarePrice:0, builtUpArea:'', deadlineTime:'', - payerObjType:'' - + payerObjType:'', + feeAttrs:[], } }, _initMethod:function(){ @@ -93,6 +93,7 @@ function(json,res){ var _fee =JSON.parse(json).fees[0]; vc.copyObject(_fee,vc.component.mainFeeInfo); + $that.mainFeeInfo.feeAttrs = _fee.feeAttrs; vc.emit('propertyFee','listFeeDetail',{ feeId:_fee.feeId }); diff --git a/public/pages/property/carCreateFee/carCreateFee.html b/public/pages/property/carCreateFee/carCreateFee.html index 0db591e5f..0e9a7ac41 100644 --- a/public/pages/property/carCreateFee/carCreateFee.html +++ b/public/pages/property/carCreateFee/carCreateFee.html @@ -15,7 +15,7 @@
-
@@ -23,14 +23,14 @@
-
-
diff --git a/public/pages/property/carCreateFee/carCreateFee.js b/public/pages/property/carCreateFee/carCreateFee.js index 0fa778c90..e41327ca6 100644 --- a/public/pages/property/carCreateFee/carCreateFee.js +++ b/public/pages/property/carCreateFee/carCreateFee.js @@ -71,7 +71,7 @@ }, _openViewParkingSpaceCreateFee: function (_car) { - vc.jumpToPage("/admin.html#/pages/property/listCarFee?carId=" + _car.carId + "&carNum=" + _car.carNum); + vc.jumpToPage("/admin.html#/pages/property/listCarFee?carId=" + _car.carId + "&carNum=" + _car.carNum+"&areaNum="+_car.areaNum+"&num="+_car.num); }, _queryParkingSpaceMethod: function () { vc.component.listCars(DEFAULT_PAGE, DEFAULT_ROW); diff --git a/public/pages/property/listCarFee/listCarFee.html b/public/pages/property/listCarFee/listCarFee.html index e89ba7a7f..2e00a02a4 100644 --- a/public/pages/property/listCarFee/listCarFee.html +++ b/public/pages/property/listCarFee/listCarFee.html @@ -5,6 +5,14 @@
{{listCarFeeInfo.carNum}}费用
+ +
\ No newline at end of file diff --git a/public/pages/property/listCarFee/listCarFee.js b/public/pages/property/listCarFee/listCarFee.js index 72fb8146e..266a487d7 100644 --- a/public/pages/property/listCarFee/listCarFee.js +++ b/public/pages/property/listCarFee/listCarFee.js @@ -1,88 +1,106 @@ -(function(vc){ +(function (vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROWS = 10; vc.extends({ - data:{ - listCarFeeInfo:{ - fees:[], - carNum:'', - carId:'', + data: { + listCarFeeInfo: { + fees: [], + carNum: '', + carId: '', total: 0, records: 1, + areaNum: '', + num: '' } }, - _initMethod:function(){ - if(vc.notNull(vc.getParam("carNum"))){ - vc.component.listCarFeeInfo.carNum = vc.getParam('carNum'); - vc.component.listCarFeeInfo.carId = vc.getParam('carId'); + _initMethod: function () { + if (vc.notNull(vc.getParam("carNum"))) { + vc.component.listCarFeeInfo.carNum = vc.getParam('carNum'); + vc.component.listCarFeeInfo.carId = vc.getParam('carId'); + vc.component.listCarFeeInfo.areaNum = vc.getParam('areaNum'); + vc.component.listCarFeeInfo.num = vc.getParam('num'); }; - vc.component._loadlistCarFeeInfo(1,10); + vc.component._loadlistCarFeeInfo(1, 10); }, - _initEvent:function(){ - vc.on('listParkingSpaceFee','notify',function(_param){ + _initEvent: function () { + vc.on('listParkingSpaceFee', 'notify', function (_param) { vc.component._loadlistCarFeeInfo(DEFAULT_PAGE, DEFAULT_ROWS); }); vc.on('pagination', 'page_event', - function(_currentPage) { + function (_currentPage) { vc.component._loadlistCarFeeInfo(_currentPage, DEFAULT_ROWS); }); }, - methods:{ - _loadlistCarFeeInfo:function(_page,_row){ + methods: { + _loadlistCarFeeInfo: function (_page, _row) { var param = { - params:{ - page:_page, - row:_row, - communityId:vc.getCurrentCommunity().communityId, - payerObjId:vc.component.listCarFeeInfo.carId + params: { + page: _page, + row: _row, + communityId: vc.getCurrentCommunity().communityId, + payerObjId: vc.component.listCarFeeInfo.carId } }; //发送get请求 - vc.http.get('listParkingSpaceFee', - 'list', - param, - function(json){ - var _feeConfigInfo = JSON.parse(json); - vc.component.listCarFeeInfo.total = _feeConfigInfo.total; - vc.component.listCarFeeInfo.records = _feeConfigInfo.records; - vc.component.listCarFeeInfo.fees = _feeConfigInfo.fees; - vc.emit('pagination', 'init', { - total: _feeConfigInfo.records, - currentPage: _page - }); - },function(){ - console.log('请求失败处理'); - } - ); + vc.http.get('listParkingSpaceFee', + 'list', + param, + function (json) { + var _feeConfigInfo = JSON.parse(json); + vc.component.listCarFeeInfo.total = _feeConfigInfo.total; + vc.component.listCarFeeInfo.records = _feeConfigInfo.records; + vc.component.listCarFeeInfo.fees = _feeConfigInfo.fees; + vc.emit('pagination', 'init', { + total: _feeConfigInfo.records, + currentPage: _page + }); + }, function () { + console.log('请求失败处理'); + } + ); }, - _payFee:function(_fee){ - vc.jumpToPage('/admin.html#/pages/property/payFeeOrder?'+vc.objToGetParam(_fee)); + _payFee: function (_fee) { + vc.jumpToPage('/admin.html#/pages/property/payFeeOrder?' + vc.objToGetParam(_fee)); }, - _payFeeHis:function(_fee){ - vc.jumpToPage('/admin.html#/pages/property/propertyFee?'+vc.objToGetParam(_fee)); + _payFeeHis: function (_fee) { + vc.jumpToPage('/admin.html#/pages/property/propertyFee?' + vc.objToGetParam(_fee)); }, - _editFee:function(_fee){ - vc.emit('editFee', 'openEditFeeModal',_fee); + _editFee: function (_fee) { + vc.emit('editFee', 'openEditFeeModal', _fee); }, - _deleteFee:function(_fee){ + _deleteFee: function (_fee) { - var dateA = new Date(_fee.startTime); - var dateB = new Date(); - if(dateA.setHours(0, 0, 0, 0) != dateB.setHours(0, 0, 0, 0)){ - vc.toast("只能取消当天添加的费用"); - return; - } + // var dateA = new Date(_fee.startTime); + // var dateB = new Date(); + // if(dateA.setHours(0, 0, 0, 0) != dateB.setHours(0, 0, 0, 0)){ + // vc.toast("只能取消当天添加的费用"); + // return; + // } - vc.emit('deleteFee','openDeleteFeeModal',{ - communityId:vc.getCurrentCommunity().communityId, - feeId:_fee.feeId + vc.emit('deleteFee', 'openDeleteFeeModal', { + communityId: vc.getCurrentCommunity().communityId, + feeId: _fee.feeId }); }, - _refreshlistCarFeeInfo:function(){ + _refreshlistCarFeeInfo: function () { vc.component.listCarFeeInfo._currentFeeConfigName = ""; }, - _goBack:function(){ + _openCarCreateFeeAddModal: function () { + vc.emit('carCreateFeeAdd', 'openCarCreateFeeAddModal', { + isMore: false, + car: $that.listCarFeeInfo + }); + }, + _openAddMeterWaterModal: function () { + vc.emit('addMeterWater', 'openAddMeterWaterModal', { + roomId: $that.listCarFeeInfo.carId, + roomName: $that.listCarFeeInfo.carNum, + ownerName: $that.listCarFeeInfo.areaNum + "停车场" + $that.listCarFeeInfo.num + "车位", + objType: '6666' + }); + }, + _goBack: function () { vc.goBack(); } } diff --git a/public/pages/property/listRoomFee/listRoomFee.html b/public/pages/property/listRoomFee/listRoomFee.html index 8ac9b928b..8c80d2267 100644 --- a/public/pages/property/listRoomFee/listRoomFee.html +++ b/public/pages/property/listRoomFee/listRoomFee.html @@ -60,7 +60,7 @@
单价:{{fee.squarePrice}}
附加费:{{fee.additionalAmount}}
- +
算法:{{_getAttrValue(fee.feeAttrs,'390005')}}
用量:{{_getAttrValue(fee.feeAttrs,'390003')}}
diff --git a/public/pages/property/roomCreateFee/roomCreateFee.html b/public/pages/property/roomCreateFee/roomCreateFee.html index 1a25f6da4..8a70fa50e 100644 --- a/public/pages/property/roomCreateFee/roomCreateFee.html +++ b/public/pages/property/roomCreateFee/roomCreateFee.html @@ -12,6 +12,28 @@
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+ +
+
-
-
- -
- -
-
-
-
- -
-
-
- -
-
- -
+
diff --git a/public/pages/property/roomCreateFee/roomCreateFee.js b/public/pages/property/roomCreateFee/roomCreateFee.js index 0c1e24c82..5df4b11e6 100644 --- a/public/pages/property/roomCreateFee/roomCreateFee.js +++ b/public/pages/property/roomCreateFee/roomCreateFee.js @@ -1,177 +1,186 @@ /** 入驻小区 **/ -(function(vc){ +(function (vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROW = 10; vc.extends({ - data:{ - roomUnits:[], - roomCreateFeeInfo:{ - rooms:[], - total:0, - records:1, - floorId:'', - unitId:'', - state:'', - roomNum:'', - moreCondition:false, - conditions:{ - floorId:'', - floorName:'', - unitId:'', - roomNum:'', - roomId:'', - state:'', - section:'' + data: { + roomUnits: [], + roomCreateFeeInfo: { + rooms: [], + total: 0, + records: 1, + floorId: '', + unitId: '', + state: '', + roomNum: '', + moreCondition: false, + conditions: { + floorId: '', + floorName: '', + unitId: '', + roomNum: '', + roomId: '', + state: '', + section: '', + allNum: '' } } }, - _initMethod:function(){ + _initMethod: function () { vc.component.roomCreateFeeInfo.conditions.floorId = vc.getParam("floorId"); vc.component.roomCreateFeeInfo.conditions.floorName = vc.getParam("floorName"); - vc.component.listRoom(DEFAULT_PAGE,DEFAULT_ROW); + vc.component.listRoom(DEFAULT_PAGE, DEFAULT_ROW); }, - _initEvent:function(){ - vc.on('room','chooseFloor',function(_param){ + _initEvent: function () { + vc.on('room', 'chooseFloor', function (_param) { vc.component.roomCreateFeeInfo.conditions.floorId = _param.floorId; vc.component.roomCreateFeeInfo.conditions.floorName = _param.floorName; vc.component.loadUnits(_param.floorId); }); - vc.on('pagination','page_event',function(_currentPage){ - vc.component.listRoom(_currentPage,DEFAULT_ROW); + vc.on('pagination', 'page_event', function (_currentPage) { + vc.component.listRoom(_currentPage, DEFAULT_ROW); }); }, - methods:{ + methods: { - listRoom:function(_page,_row){ - if(vc.component.roomCreateFeeInfo.conditions.floorName==''||vc.component.roomCreateFeeInfo.conditions.floorName==null){ - vc.component.roomCreateFeeInfo.conditions.floorId='' + listRoom: function (_page, _row) { + if (vc.component.roomCreateFeeInfo.conditions.floorName == '' || vc.component.roomCreateFeeInfo.conditions.floorName == null) { + vc.component.roomCreateFeeInfo.conditions.floorId = '' } - vc.component.roomCreateFeeInfo.conditions.page=_page; - vc.component.roomCreateFeeInfo.conditions.row=_row; + vc.component.roomCreateFeeInfo.conditions.page = _page; + vc.component.roomCreateFeeInfo.conditions.row = _row; vc.component.roomCreateFeeInfo.conditions.communityId = vc.getCurrentCommunity().communityId; - var param = { - params:vc.component.roomCreateFeeInfo.conditions + let _allNum = $that.roomCreateFeeInfo.conditions.allNum; + let _conditions = JSON.parse(JSON.stringify(vc.component.roomCreateFeeInfo.conditions)); + let param = { + params: _conditions }; - //发送get请求 - vc.http.get('roomCreateFee', - 'listRoom', - param, - function(json,res){ - var listRoomData =JSON.parse(json); + if (_allNum.split('-').length == 3) { + let _allNums = _allNum.split('-') + param.params.floorNum = _allNums[0]; + param.params.unitNum = _allNums[1]; + param.params.roomNum = _allNums[2]; + } - vc.component.roomCreateFeeInfo.total = listRoomData.total; - vc.component.roomCreateFeeInfo.records = listRoomData.records; - vc.component.roomCreateFeeInfo.rooms = listRoomData.rooms; + //发送get请求 + vc.http.get('roomCreateFee', + 'listRoom', + param, + function (json, res) { + var listRoomData = JSON.parse(json); - vc.emit('pagination','init',{ - total:vc.component.roomCreateFeeInfo.records, - dataCount: vc.component.roomCreateFeeInfo.total, - currentPage:_page - }); - },function(errInfo,error){ - console.log('请求失败处理'); - } - ); + vc.component.roomCreateFeeInfo.total = listRoomData.total; + vc.component.roomCreateFeeInfo.records = listRoomData.records; + vc.component.roomCreateFeeInfo.rooms = listRoomData.rooms; + vc.emit('pagination', 'init', { + total: vc.component.roomCreateFeeInfo.records, + dataCount: vc.component.roomCreateFeeInfo.total, + currentPage: _page + }); + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); }, - _openRoomCreateFeeAddModal:function(_room,_isMore){ - vc.emit('roomCreateFeeAdd', 'openRoomCreateFeeAddModal',{ - isMore:_isMore, - room:_room + _openRoomCreateFeeAddModal: function (_room, _isMore) { + vc.emit('roomCreateFeeAdd', 'openRoomCreateFeeAddModal', { + isMore: _isMore, + room: _room }); }, - _openViewRoomCreateFee:function(_room){ - vc.jumpToPage("/admin.html#/pages/property/listRoomFee?"+vc.objToGetParam(_room)); + _openViewRoomCreateFee: function (_room) { + vc.jumpToPage("/admin.html#/pages/property/listRoomFee?" + vc.objToGetParam(_room)); }, /** 根据楼ID加载房屋 **/ - loadUnits:function(_floorId){ + loadUnits: function (_floorId) { vc.component.addRoomUnits = []; var param = { - params:{ - floorId:_floorId, - communityId:vc.getCurrentCommunity().communityId + params: { + floorId: _floorId, + communityId: vc.getCurrentCommunity().communityId } } vc.http.get( 'roomCreateFee', 'loadUnits', - param, - function(json,res){ + param, + function (json, res) { //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); - if(res.status == 200){ + if (res.status == 200) { var tmpUnits = JSON.parse(json); vc.component.roomUnits = tmpUnits; - return ; + return; } vc.toast(json); - }, - function(errInfo,error){ + }, + function (errInfo, error) { console.log('请求失败处理'); vc.toast(errInfo); - }); + }); }, - _queryRoomMethod:function(){ - vc.component.listRoom(DEFAULT_PAGE,DEFAULT_ROW); + _queryRoomMethod: function () { + vc.component.listRoom(DEFAULT_PAGE, DEFAULT_ROW); }, - _loadDataByParam: function(){ + _loadDataByParam: function () { vc.component.roomCreateFeeInfo.conditions.floorId = vc.getParam("floorId"); vc.component.roomCreateFeeInfo.conditions.floorId = vc.getParam("floorName"); //如果 floodId 没有传 则,直接结束 - /* if(!vc.notNull(vc.component.roomCreateFeeInfo.conditions.floorId)){ - return ; - }*/ + /* if(!vc.notNull(vc.component.roomCreateFeeInfo.conditions.floorId)){ + return ; + }*/ var param = { - params:{ - communityId:vc.getCurrentCommunity().communityId, - floorId:vc.component.roomCreateFeeInfo.conditions.floorId + params: { + communityId: vc.getCurrentCommunity().communityId, + floorId: vc.component.roomCreateFeeInfo.conditions.floorId } } vc.http.get( 'roomCreateFee', 'loadFloor', - param, - function(json,res){ - if(res.status == 200){ + param, + function (json, res) { + if (res.status == 200) { var _floorInfo = JSON.parse(json); var _tmpFloor = _floorInfo.apiFloorDataVoList[0]; /*vc.emit('roomSelectFloor','chooseFloor', _tmpFloor); */ - return ; + return; } vc.toast(json); - }, - function(errInfo,error){ + }, + function (errInfo, error) { console.log('请求失败处理'); vc.toast(errInfo); - }); + }); }, - _moreCondition:function(){ - if(vc.component.roomCreateFeeInfo.moreCondition){ + _moreCondition: function () { + if (vc.component.roomCreateFeeInfo.moreCondition) { vc.component.roomCreateFeeInfo.moreCondition = false; - }else{ + } else { vc.component.roomCreateFeeInfo.moreCondition = true; } }, - _openChooseFloorMethod:function(){ - vc.emit('searchFloor','openSearchFloorModel',{}); + _openChooseFloorMethod: function () { + vc.emit('searchFloor', 'openSearchFloorModel', {}); }, - _toOwnerPayFee:function(_room){ - let roomName = _room.floorNum + "栋"+_room.unitNum+"单元"+_room.roomNum+"室" - vc.jumpToPage('/admin.html#/pages/property/owePayFeeOrder?payObjId='+_room.roomId+"&payObjType=3333&roomName="+roomName); + _toOwnerPayFee: function (_room) { + let roomName = _room.floorNum + "栋" + _room.unitNum + "单元" + _room.roomNum + "室" + vc.jumpToPage('/admin.html#/pages/property/owePayFeeOrder?payObjId=' + _room.roomId + "&payObjType=3333&roomName=" + roomName); }, - + } }); })(window.vc);