优化房屋出租费用

This commit is contained in:
java110 2021-01-14 01:02:08 +08:00
parent 88be2abe09
commit 3b40b69216
5 changed files with 59 additions and 27 deletions

View File

@ -21,7 +21,7 @@
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openOwnerFee(owner)">查看费用
v-on:click="_openShopsOwnerFee(owner)">查看费用
</button>
</div>
</td>

View File

@ -60,8 +60,12 @@
);
},
_openOwnerFee: function (_owner) {
vc.emit('editMachineTranslate', 'openEditMachineTranslateModal', _owner);
_openShopsOwnerFee: function (_owner) {
//vc.emit('editMachineTranslate', 'openEditMachineTranslateModal', _owner);
vc.jumpToPage('/admin.html#/pages/property/listRoomFee?roomId='
+$that.simplifyShopsHireLogInfo.roomId
+"&ownerId="+$that.simplifyShopsHireLogInfo.ownerId
+"&hireOwnerFee=1")
},
clearSimplifyShopsHireLogInfo: function () {
$that.simplifyShopsHireLogInfo = {

View File

@ -4,21 +4,21 @@
<div class="ibox">
<div class="ibox-title">
<h5>{{listRoomCreateFeeInfo.roomName}}费用</h5>
<div class="ibox-tools" style="top:10px;">
<div class="ibox-tools" style="top:10px;" >
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openProxyFeeModal()">
v-on:click="_openProxyFeeModal()" v-if="listRoomCreateFeeInfo.hireOwnerFee == '0'">
代收费用
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openAddMeterWaterModal()">
v-on:click="_openAddMeterWaterModal()" v-if="listRoomCreateFeeInfo.hireOwnerFee == '0'">
水电抄表
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openRoomCreateFeeAddModal()">
v-on:click="_openRoomCreateFeeAddModal()" v-if="listRoomCreateFeeInfo.hireOwnerFee == '0'">
创建费用
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_toOwnerPayFee()">
v-on:click="_toOwnerPayFee()" v-if="listRoomCreateFeeInfo.hireOwnerFee == '0'">
欠费缴费
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"

View File

@ -14,26 +14,22 @@
unitNum: '',
roomNum: '',
ownerName: '',
roomType: ''
roomType: '',
hireOwnerFee: '0',
ownerId: ''
}
},
_initMethod: function () {
if (vc.notNull(vc.getParam("roomNum"))) {
$that.listRoomCreateFeeInfo.roomType = vc.getParam('roomType');
if ($that.listRoomCreateFeeInfo.roomType == '1010301') {
vc.component.listRoomCreateFeeInfo.roomName = vc.getParam('floorNum') + "-" + vc.getParam('unitNum') + "-" + vc.getParam("roomNum");
} else {
vc.component.listRoomCreateFeeInfo.roomName = vc.getParam('floorNum') + "-" + vc.getParam("roomNum");
}
vc.component.listRoomCreateFeeInfo.roomId = vc.getParam('roomId');
$that.listRoomCreateFeeInfo.builtUpArea = vc.getParam('builtUpArea');
$that.listRoomCreateFeeInfo.floorNum = vc.getParam('floorNum');
$that.listRoomCreateFeeInfo.unitNum = vc.getParam('unitNum');
$that.listRoomCreateFeeInfo.roomNum = vc.getParam('roomNum');
$that.listRoomCreateFeeInfo.ownerName = vc.getParam('ownerName');
if (vc.notNull(vc.getParam("roomId"))) {
$that._listRoom(vc.getParam("roomId"));
}
if (vc.notNull(vc.getParam("hireOwnerFee"))) {
$that.listRoomCreateFeeInfo.hireOwnerFee = vc.getParam("hireOwnerFee");
}
if (vc.notNull(vc.getParam('ownerId'))) {
$that.listRoomCreateFeeInfo.ownerId = vc.getParam("ownerId");
}
vc.component._loadListRoomCreateFeeInfo(1, 10);
},
_initEvent: function () {
vc.on('listRoomFee', 'notify', function (_param) {
@ -51,7 +47,8 @@
page: _page,
row: _row,
communityId: vc.getCurrentCommunity().communityId,
payerObjId: vc.component.listRoomCreateFeeInfo.roomId
payerObjId: vc.component.listRoomCreateFeeInfo.roomId,
ownerId: $that.listRoomCreateFeeInfo.ownerId
}
};
//发送get请求
@ -149,7 +146,38 @@
roomName: $that.listRoomCreateFeeInfo.roomName,
ownerName: $that.listRoomCreateFeeInfo.ownerName
});
}
},
_listRoom: function (roomId) {
let param = {
params: {
page: 1,
row: 1,
roomId: roomId,
communityId: vc.getCurrentCommunity().communityId
}
};
//发送get请求
vc.http.get('roomCreateFee',
'listRoom',
param,
function (json, res) {
let listRoomData = JSON.parse(json);
if (listRoomData.total < 1) {
return;
}
vc.copyObject(listRoomData.rooms[0], $that.listRoomCreateFeeInfo);
if (listRoomData.rooms[0].roomType == '1010301') {
$that.listRoomCreateFeeInfo.roomName = listRoomData.rooms[0].floorNum + "-" + listRoomData.rooms[0].unitNum + "-" + listRoomData.rooms[0].roomNum;
} else {
$that.listRoomCreateFeeInfo.roomName = listRoomData.rooms[0].floorNum + "-" + listRoomData.rooms[0].roomNum;
}
// 换存搜索条件
vc.emit('listRoomFee', 'notify', {})
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
}
});
})(window.vc);

View File

@ -122,7 +122,7 @@
});
},
_openViewRoomCreateFee: function (_room) {
vc.jumpToPage("/admin.html#/pages/property/listRoomFee?" + vc.objToGetParam(_room));
vc.jumpToPage("/admin.html#/pages/property/listRoomFee?roomId=" + _room.roomId);
},
/**
根据楼ID加载房屋