|
14 | 14 | unitNum: '', |
15 | 15 | roomNum: '', |
16 | 16 | ownerName: '', |
17 | | - roomType: '' |
| 17 | + roomType: '', |
| 18 | + hireOwnerFee: '0', |
| 19 | + ownerId: '' |
18 | 20 | } |
19 | 21 | }, |
20 | 22 | _initMethod: function () { |
21 | | - if (vc.notNull(vc.getParam("roomNum"))) { |
22 | | - $that.listRoomCreateFeeInfo.roomType = vc.getParam('roomType'); |
| 23 | + if (vc.notNull(vc.getParam("roomId"))) { |
| 24 | + $that._listRoom(vc.getParam("roomId")); |
| 25 | + } |
| 26 | + if (vc.notNull(vc.getParam("hireOwnerFee"))) { |
| 27 | + $that.listRoomCreateFeeInfo.hireOwnerFee = vc.getParam("hireOwnerFee"); |
| 28 | + } |
23 | 29 |
|
24 | | - if ($that.listRoomCreateFeeInfo.roomType == '1010301') { |
25 | | - vc.component.listRoomCreateFeeInfo.roomName = vc.getParam('floorNum') + "-" + vc.getParam('unitNum') + "-" + vc.getParam("roomNum"); |
26 | | - } else { |
27 | | - vc.component.listRoomCreateFeeInfo.roomName = vc.getParam('floorNum') + "-" + vc.getParam("roomNum"); |
28 | | - } |
29 | | - vc.component.listRoomCreateFeeInfo.roomId = vc.getParam('roomId'); |
30 | | - $that.listRoomCreateFeeInfo.builtUpArea = vc.getParam('builtUpArea'); |
31 | | - $that.listRoomCreateFeeInfo.floorNum = vc.getParam('floorNum'); |
32 | | - $that.listRoomCreateFeeInfo.unitNum = vc.getParam('unitNum'); |
33 | | - $that.listRoomCreateFeeInfo.roomNum = vc.getParam('roomNum'); |
34 | | - $that.listRoomCreateFeeInfo.ownerName = vc.getParam('ownerName'); |
| 30 | + if (vc.notNull(vc.getParam('ownerId'))) { |
| 31 | + $that.listRoomCreateFeeInfo.ownerId = vc.getParam("ownerId"); |
35 | 32 | } |
36 | | - vc.component._loadListRoomCreateFeeInfo(1, 10); |
37 | 33 | }, |
38 | 34 | _initEvent: function () { |
39 | 35 | vc.on('listRoomFee', 'notify', function (_param) { |
|
51 | 47 | page: _page, |
52 | 48 | row: _row, |
53 | 49 | communityId: vc.getCurrentCommunity().communityId, |
54 | | - payerObjId: vc.component.listRoomCreateFeeInfo.roomId |
| 50 | + payerObjId: vc.component.listRoomCreateFeeInfo.roomId, |
| 51 | + ownerId: $that.listRoomCreateFeeInfo.ownerId |
55 | 52 | } |
56 | 53 | }; |
57 | 54 | //发送get请求 |
|
149 | 146 | roomName: $that.listRoomCreateFeeInfo.roomName, |
150 | 147 | ownerName: $that.listRoomCreateFeeInfo.ownerName |
151 | 148 | }); |
152 | | - } |
| 149 | + }, |
| 150 | + _listRoom: function (roomId) { |
| 151 | + let param = { |
| 152 | + params: { |
| 153 | + page: 1, |
| 154 | + row: 1, |
| 155 | + roomId: roomId, |
| 156 | + communityId: vc.getCurrentCommunity().communityId |
| 157 | + } |
| 158 | + }; |
| 159 | + //发送get请求 |
| 160 | + vc.http.get('roomCreateFee', |
| 161 | + 'listRoom', |
| 162 | + param, |
| 163 | + function (json, res) { |
| 164 | + let listRoomData = JSON.parse(json); |
| 165 | + if (listRoomData.total < 1) { |
| 166 | + return; |
| 167 | + } |
| 168 | + vc.copyObject(listRoomData.rooms[0], $that.listRoomCreateFeeInfo); |
| 169 | + if (listRoomData.rooms[0].roomType == '1010301') { |
| 170 | + $that.listRoomCreateFeeInfo.roomName = listRoomData.rooms[0].floorNum + "-" + listRoomData.rooms[0].unitNum + "-" + listRoomData.rooms[0].roomNum; |
| 171 | + } else { |
| 172 | + $that.listRoomCreateFeeInfo.roomName = listRoomData.rooms[0].floorNum + "-" + listRoomData.rooms[0].roomNum; |
| 173 | + } |
| 174 | + // 换存搜索条件 |
| 175 | + vc.emit('listRoomFee', 'notify', {}) |
| 176 | + }, function (errInfo, error) { |
| 177 | + console.log('请求失败处理'); |
| 178 | + } |
| 179 | + ); |
| 180 | + }, |
153 | 181 | } |
154 | 182 | }); |
155 | 183 | })(window.vc); |
0 commit comments