Skip to content

Commit 3b40b69

Browse files
committed
优化房屋出租费用
1 parent 88be2ab commit 3b40b69

5 files changed

Lines changed: 58 additions & 26 deletions

File tree

public/components/property/simplifyShopsHireLog/simplifyShopsHireLog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<td class="text-center">
2222
<div class="btn-group">
2323
<button class="btn-white btn btn-xs"
24-
v-on:click="_openOwnerFee(owner)">查看费用
24+
v-on:click="_openShopsOwnerFee(owner)">查看费用
2525
</button>
2626
</div>
2727
</td>

public/components/property/simplifyShopsHireLog/simplifyShopsHireLog.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@
6060
);
6161

6262
},
63-
_openOwnerFee: function (_owner) {
64-
vc.emit('editMachineTranslate', 'openEditMachineTranslateModal', _owner);
63+
_openShopsOwnerFee: function (_owner) {
64+
//vc.emit('editMachineTranslate', 'openEditMachineTranslateModal', _owner);
65+
vc.jumpToPage('/admin.html#/pages/property/listRoomFee?roomId='
66+
+$that.simplifyShopsHireLogInfo.roomId
67+
+"&ownerId="+$that.simplifyShopsHireLogInfo.ownerId
68+
+"&hireOwnerFee=1")
6569
},
6670
clearSimplifyShopsHireLogInfo: function () {
6771
$that.simplifyShopsHireLogInfo = {

public/pages/property/listRoomFee/listRoomFee.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
<div class="ibox">
55
<div class="ibox-title">
66
<h5>{{listRoomCreateFeeInfo.roomName}}费用</h5>
7-
<div class="ibox-tools" style="top:10px;">
7+
<div class="ibox-tools" style="top:10px;" >
88
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
9-
v-on:click="_openProxyFeeModal()">
9+
v-on:click="_openProxyFeeModal()" v-if="listRoomCreateFeeInfo.hireOwnerFee == '0'">
1010
代收费用
1111
</button>
1212
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
13-
v-on:click="_openAddMeterWaterModal()">
13+
v-on:click="_openAddMeterWaterModal()" v-if="listRoomCreateFeeInfo.hireOwnerFee == '0'">
1414
水电抄表
1515
</button>
1616
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
17-
v-on:click="_openRoomCreateFeeAddModal()">
17+
v-on:click="_openRoomCreateFeeAddModal()" v-if="listRoomCreateFeeInfo.hireOwnerFee == '0'">
1818
创建费用
1919
</button>
2020
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
21-
v-on:click="_toOwnerPayFee()">
21+
v-on:click="_toOwnerPayFee()" v-if="listRoomCreateFeeInfo.hireOwnerFee == '0'">
2222
欠费缴费
2323
</button>
2424
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"

public/pages/property/listRoomFee/listRoomFee.js

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,22 @@
1414
unitNum: '',
1515
roomNum: '',
1616
ownerName: '',
17-
roomType: ''
17+
roomType: '',
18+
hireOwnerFee: '0',
19+
ownerId: ''
1820
}
1921
},
2022
_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+
}
2329

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");
3532
}
36-
vc.component._loadListRoomCreateFeeInfo(1, 10);
3733
},
3834
_initEvent: function () {
3935
vc.on('listRoomFee', 'notify', function (_param) {
@@ -51,7 +47,8 @@
5147
page: _page,
5248
row: _row,
5349
communityId: vc.getCurrentCommunity().communityId,
54-
payerObjId: vc.component.listRoomCreateFeeInfo.roomId
50+
payerObjId: vc.component.listRoomCreateFeeInfo.roomId,
51+
ownerId: $that.listRoomCreateFeeInfo.ownerId
5552
}
5653
};
5754
//发送get请求
@@ -149,7 +146,38 @@
149146
roomName: $that.listRoomCreateFeeInfo.roomName,
150147
ownerName: $that.listRoomCreateFeeInfo.ownerName
151148
});
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+
},
153181
}
154182
});
155183
})(window.vc);

public/pages/property/roomCreateFee/roomCreateFee.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
});
123123
},
124124
_openViewRoomCreateFee: function (_room) {
125-
vc.jumpToPage("/admin.html#/pages/property/listRoomFee?" + vc.objToGetParam(_room));
125+
vc.jumpToPage("/admin.html#/pages/property/listRoomFee?roomId=" + _room.roomId);
126126
},
127127
/**
128128
根据楼ID加载房屋

0 commit comments

Comments
 (0)