From beb9e6aff0b0de73dd0f763b06e0fb1ec0fa3495 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Fri, 20 Nov 2020 12:27:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96diamante?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../simplifyRoomFee/simplifyRoomFee.html | 13 +- .../simplifyRoomFee/simplifyRoomFee.js | 138 ++++++++++++++++++ .../simplifyAcceptance.html | 64 ++++---- .../simplifyAcceptance/simplifyAcceptance.js | 82 ++++++++++- 4 files changed, 261 insertions(+), 36 deletions(-) diff --git a/public/components/property/simplifyRoomFee/simplifyRoomFee.html b/public/components/property/simplifyRoomFee/simplifyRoomFee.html index eaecd6be5..470fed4fa 100644 --- a/public/components/property/simplifyRoomFee/simplifyRoomFee.html +++ b/public/components/property/simplifyRoomFee/simplifyRoomFee.html @@ -1,6 +1,6 @@
-
+
+ + + + + + + +
\ No newline at end of file diff --git a/public/components/property/simplifyRoomFee/simplifyRoomFee.js b/public/components/property/simplifyRoomFee/simplifyRoomFee.js index e69de29bb..2fe609565 100644 --- a/public/components/property/simplifyRoomFee/simplifyRoomFee.js +++ b/public/components/property/simplifyRoomFee/simplifyRoomFee.js @@ -0,0 +1,138 @@ +/** + 入驻小区 + **/ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + simplifyRoomFeeInfo: { + fees: [], + roomId:'', + roomName:'', + ownerName:'', + roomName:'', + floorNum:'', + unitNum:'', + roomNum:'', + } + }, + _initMethod: function () { + + }, + _initEvent: function () { + //切换 至费用页面 + vc.on('simplifyRoomFee', 'switch', function (_param) { + vc.copyObject(_param,$that.simplifyRoomFeeInfo) + $that._listSimplifyRoomFee(DEFAULT_PAGE,DEFAULT_ROWS); + }); + + vc.on('pagination', 'page_event', + function(_currentPage) { + vc.component._listSimplifyRoomFee(_currentPage, DEFAULT_ROWS); + }); + }, + methods: { + _listSimplifyRoomFee: function (_page,_row) { + let param = { + params: { + page: _page, + row: _row, + communityId: vc.getCurrentCommunity().communityId, + payerObjId: $that.simplifyRoomFeeInfo.roomId + } + }; + + //发送get请求 + vc.http.get('listRoomFee', + 'list', + param, + function (json) { + let _feeConfigInfo = JSON.parse(json); + vc.component.simplifyRoomFeeInfo.total = _feeConfigInfo.total; + vc.component.simplifyRoomFeeInfo.records = _feeConfigInfo.records; + vc.component.simplifyRoomFeeInfo.fees = _feeConfigInfo.fees; + vc.emit('pagination', 'init', { + total: _feeConfigInfo.records, + currentPage: _page + }); + }, function () { + console.log('请求失败处理'); + } + ); + }, + _toOwnerPayFee:function(){ + vc.jumpToPage('/admin.html#/pages/property/owePayFeeOrder?payObjId='+$that.simplifyRoomFeeInfo.roomId+"&payObjType=3333&roomName="+$that.simplifyRoomFeeInfo.roomName); + }, + _openRoomCreateFeeAddModal:function(){ + vc.emit('roomCreateFeeAdd', 'openRoomCreateFeeAddModal',{ + isMore:false, + room:$that.simplifyRoomFeeInfo + }); + }, + _openAddMeterWaterModal: function () { + vc.emit('addMeterWater', 'openAddMeterWaterModal', { + roomId:$that.simplifyRoomFeeInfo.roomId, + roomName:$that.simplifyRoomFeeInfo.roomName, + ownerName:$that.simplifyRoomFeeInfo.ownerName + + }); + }, + _getAttrValue:function(_attrs,_specCd){ + let _value = ""; + _attrs.forEach(item => { + if(item.specCd == _specCd){ + _value = item.value; + return ; + } + }); + + return _value; + }, + _getDeadlineTime:function(_fee){ + + if(_fee.amountOwed == 0 && _fee.endTime == _fee.deadlineTime){ + return "-"; + } + + if(_fee.state == '2009001'){ + return "-"; + } + + return _fee.deadlineTime; + }, + _getEndTime:function(_fee){ + if(_fee.state == '2009001'){ + return "-"; + } + return _fee.endTime; + }, + _openProxyFeeModal:function(){ //创建代收费用 + vc.emit('addProxyFee', 'openAddProxyFeeModal', { + roomId:$that.simplifyRoomFeeInfo.roomId, + roomName:$that.simplifyRoomFeeInfo.roomName, + ownerName:$that.simplifyRoomFeeInfo.ownerName + }); + }, + _payFee:function(_fee){ + _fee.roomName=$that.simplifyRoomFeeInfo.roomName; + _fee.builtUpArea=$that.simplifyRoomFeeInfo.builtUpArea; + vc.jumpToPage('/admin.html#/pages/property/payFeeOrder?'+vc.objToGetParam(_fee)); + }, + _editFee:function(_fee){ + vc.emit('editFee', 'openEditFeeModal',_fee); + }, + _payFeeHis:function(_fee){ + _fee.builtUpArea=$that.simplifyRoomFeeInfo.builtUpArea; + vc.jumpToPage('/admin.html#/pages/property/propertyFee?'+vc.objToGetParam(_fee)); + }, + _deleteFee:function(_fee){ + + vc.emit('deleteFee','openDeleteFeeModal',{ + communityId:vc.getCurrentCommunity().communityId, + feeId:_fee.feeId + }); + }, + } + }); +})(window.vc); diff --git a/public/pages/property/simplifyAcceptance/simplifyAcceptance.html b/public/pages/property/simplifyAcceptance/simplifyAcceptance.html index 8b33c4b14..6a60fcf82 100644 --- a/public/pages/property/simplifyAcceptance/simplifyAcceptance.html +++ b/public/pages/property/simplifyAcceptance/simplifyAcceptance.html @@ -5,14 +5,17 @@
- +
@@ -59,7 +62,7 @@
- +
@@ -77,25 +80,25 @@
- +
- +
- +
- +
@@ -103,19 +106,13 @@
- +
- - -
-
-
-
- - + +
@@ -126,8 +123,8 @@
+ +
+ +
+ + \ No newline at end of file diff --git a/public/pages/property/simplifyAcceptance/simplifyAcceptance.js b/public/pages/property/simplifyAcceptance/simplifyAcceptance.js index c440d49d1..90a7de755 100644 --- a/public/pages/property/simplifyAcceptance/simplifyAcceptance.js +++ b/public/pages/property/simplifyAcceptance/simplifyAcceptance.js @@ -11,17 +11,34 @@ searchValue: '', searchPlaceholder: '请输入房屋编号 楼栋-单元-房屋 如1-1-1', ownerPhoto: '', - _currentTab: 1 + _currentTab: 'simplifyRoomFee', + roomId: '', + ownerId: '', + name: '', + idCard: '', + link: '', + createTime: '', + apartmentName: '', + floorNum: '', + unitNum: '', + roomNum: '', + builtUpArea: '', + feeCoefficient: '', + stateName: '', + roomName: '' } }, _initMethod: function () { }, _initEvent: function () { - + vc.on('simplifyAcceptance', 'chooseRoom', function (_room) { + vc.copyObject(_room, $that.simplifyAcceptanceInfo); + $that.simplifyAcceptanceInfo.roomName = _room.floorNum + '栋' + _room.unitNum + '单元' + _room.roomNum; + vc.emit('simplifyRoomFee', 'switch', $that.simplifyAcceptanceInfo) + }); }, methods: { - _changeSearchType: function () { switch ($that.simplifyAcceptanceInfo.searchType) { case '1': @@ -39,6 +56,15 @@ case '5': $that.simplifyAcceptanceInfo.searchPlaceholder = '请输入业主车牌号'; break; + case '6': + $that.simplifyAcceptanceInfo.searchPlaceholder = '请输入家庭成员名称'; + break; + case '7': + $that.simplifyAcceptanceInfo.searchPlaceholder = '请输入家庭成员电话'; + break; + case '8': + $that.simplifyAcceptanceInfo.searchPlaceholder = '请输入家庭成员身份证'; + break; default: $that.simplifyAcceptanceInfo.searchPlaceholder = '请输入房屋编号 楼栋-单元-房屋 如1-1-1'; } @@ -48,12 +74,62 @@ vc.toast('请输入查询条件'); return; } + // 清理信息 + $that._clearData(); + let _param = { + params: { + searchType: $that.simplifyAcceptanceInfo.searchType, + searchValue: $that.simplifyAcceptanceInfo.searchValue, + communityId: vc.getCurrentCommunity().communityId + } + } + vc.http.apiGet('/ownerApi/comprehensiveQuery', + _param, + function (json, res) { + let _ownerJson = JSON.parse(json); + if (_ownerJson.code != 0) { + vc.toast(_ownerJson.msg); + return; + } + + let _owner = _ownerJson.data; + vc.copyObject(_owner, $that.simplifyAcceptanceInfo); + if (!_owner.hasOwnProperty('rooms')) { + return; + } + let _rooms = _owner.rooms; + if (_rooms.length > 1) { + vc.emit('searchRoom', 'showOwnerRooms', _rooms); + return; + } + vc.copyObject(_rooms[0], $that.simplifyAcceptanceInfo); + $that.simplifyAcceptanceInfo.roomName = _rooms[0].floorNum + '栋' + _rooms[0].unitNum + '单元' + _rooms[0].roomNum; + vc.emit('simplifyRoomFee', 'switch', $that.simplifyAcceptanceInfo); + + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + + }, + changeTab: function (_tab) { + $that.simplifyAcceptanceInfo._currentTab = _tab; + + vc.emit(_tab, 'switch', { + ownerId: $that.simplifyAcceptanceInfo.ownerId, + roomId: $that.simplifyAcceptanceInfo.roomId + }) }, errorLoadImg: function () { vc.component.simplifyAcceptanceInfo.ownerPhoto = "/img/noPhoto.jpg"; }, + _clearData: function () { + $that.simplifyAcceptanceInfo.roomId = ''; + $that.simplifyAcceptanceInfo.ownerId = ''; + } + } }); })(window.vc);