优化完成房屋出租

This commit is contained in:
java110 2020-09-27 00:31:07 +08:00
parent 9acd79e26f
commit 4d16d62477
4 changed files with 194 additions and 6 deletions

View File

@ -29,8 +29,8 @@
roomId: '',
ownerName: '',
link: '',
objType:'1111',
objId:'-1'
objType: '1111',
objId: '-1'
}
},
_initMethod: function () {
@ -50,7 +50,7 @@
},
_initEvent: function () {
vc.on('addContract', 'openAddContractModal', function (_param) {
vc.copyObject(_param,$that.addContractInfo);
vc.copyObject(_param, $that.addContractInfo);
$('#addContractModel').modal('show');
});
$('#addContractModel').on('show.bs.modal', function (e) {
@ -271,7 +271,7 @@
$('#addContractModel').modal('hide');
vc.component.clearAddContractInfo();
vc.emit('contractManage', 'listContract', {});
vc.emit('rentingPoolManage', 'listRentingPool', {});
return;
}
vc.message(_json.msg);
@ -308,8 +308,8 @@
roomId: '',
ownerName: '',
link: '',
objId:'-1',
objType:'1111'
objId: '-1',
objType: '1111'
};
},
_loadAddContractType: function () {

View File

@ -0,0 +1,108 @@
<div>
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>查询条件</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入租房名称"
v-model="rentingPoolManageInfo.conditions.rentingTitle" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<select class="custom-select" v-model="rentingPoolManageInfo.conditions.paymentType">
<option selected value="">请选择预付类型</option>
<option value="1001">押一付一</option>
<option value="2002">押一付三</option>
<option value="3003">押一付六</option>
</select> </div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="请输入业主名称"
v-model="rentingPoolManageInfo.conditions.ownerName" class=" form-control">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryRentingPoolMethod()">
<i class="glyphicon glyphicon-search"></i> 查询
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>出租历史</h5>
<div class="ibox-tools" style="top:10px;">
<!-- <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddRentingPoolModal()">
<i class="glyphicon glyphicon-plus"></i>
房屋出租
</button> -->
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">房屋</th>
<th class="text-center">出租标题</th>
<th class="text-center">租金</th>
<th class="text-center">预付类型</th>
<th class="text-center">入住时间</th>
<th class="text-center">出租配置</th>
<th class="text-center">业主名称</th>
<th class="text-center">业主电话</th>
<th class="text-center">状态</th>
<th class="text-right">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="rentingPool in rentingPoolManageInfo.rentingPools">
<td class="text-center">{{rentingPool.roomName}}</td>
<td class="text-center">{{rentingPool.rentingTitle}}</td>
<td class="text-center">{{rentingPool.price}}</td>
<td class="text-center">{{rentingPool.paymentTypeName}}</td>
<td class="text-center">{{rentingPool.checkIn == '1001'?'立即入住':'预约入住'}}</td>
<td class="text-center">{{rentingPool.rentingType=='3344'?'整租':'合租'}}</td>
<td class="text-center">{{rentingPool.ownerName}}</td>
<td class="text-center">{{rentingPool.ownerTel}}</td>
<td class="text-center">{{rentingPool.stateName}}</td>
<td class="text-right">
<div class="btn-group" >
<button class="btn-white btn btn-xs"
v-on:click="_toRentingHistory(rentingPool)">详情</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,79 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
rentingPoolManageInfo: {
rentingPools: [],
total: 0,
records: 1,
moreCondition: false,
rentingId: '',
conditions: {
rentingTitle: '',
paymentType: '',
ownerName: '',
state: '6'
}
}
},
_initMethod: function () {
vc.component._listRentingPools(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('rentingPoolManage', 'listRentingPool', function (_param) {
vc.component._listRentingPools(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
vc.component._listRentingPools(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listRentingPools: function (_page, _rows) {
vc.component.rentingPoolManageInfo.conditions.page = _page;
vc.component.rentingPoolManageInfo.conditions.row = _rows;
vc.component.rentingPoolManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
var param = {
params: vc.component.rentingPoolManageInfo.conditions
};
//发送get请求
vc.http.apiGet('/renting/queryRentingPool',
param,
function (json, res) {
var _rentingPoolManageInfo = JSON.parse(json);
vc.component.rentingPoolManageInfo.total = _rentingPoolManageInfo.total;
vc.component.rentingPoolManageInfo.records = _rentingPoolManageInfo.records;
vc.component.rentingPoolManageInfo.rentingPools = _rentingPoolManageInfo.data;
vc.emit('pagination', 'init', {
total: vc.component.rentingPoolManageInfo.records,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_queryRentingPoolMethod: function () {
vc.component._listRentingPools(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if (vc.component.rentingPoolManageInfo.moreCondition) {
vc.component.rentingPoolManageInfo.moreCondition = false;
} else {
vc.component.rentingPoolManageInfo.moreCondition = true;
}
},
_toRentingHistory:function(rentingPool){
}
}
});
})(window.vc);

View File

@ -122,6 +122,7 @@
ownerName: _rentingPool.ownerName,
link: _rentingPool.ownerTel,
objId: _rentingPool.roomId,
objType: '3333',
allNum: _rentingPool.roomName,
partyB:_flow.useName,
bContacts:_flow.useName,