优化代码

This commit is contained in:
java110 2021-01-09 15:22:22 +08:00
parent 5e3e6ce7bd
commit 513c077cf3
6 changed files with 63 additions and 72 deletions

View File

@ -49,7 +49,7 @@
},
_addOwnerCar: function () { //出租
vc.jumpToPage('/admin.html#/pages/property/hireParkingSpace');
vc.jumpToPage('/admin.html#/pages/property/hireParkingSpace?ownerId='+$that.simplifyOwnerCarInfo.ownerId);
},
_openEditOwnerCar: function (_car) {
vc.emit('editCar', 'openEditCar', _car);

View File

@ -85,6 +85,7 @@
<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>
@ -96,6 +97,7 @@
<tbody>
<tr v-for="feeReceipt in feeReceiptManageInfo.feeReceipts">
<td class="text-center">{{feeReceipt.objType == '3333'? '房屋费':'车位费'}}</td>
<td class="text-center">{{feeReceipt.feeName}}</td>
<td class="text-center">{{feeReceipt.roomName}}</td>
<td class="text-center">{{feeReceipt.carNum}}</td>
<td class="text-center">{{feeReceipt.amount}}</td>

View File

@ -21,7 +21,7 @@
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="请输入业主身份证号" v-model="listOwnerInfo.conditions.idCard"
<input type="text" placeholder="请填写房屋编号 格式 楼栋-单元-房屋" v-model="listOwnerInfo.conditions.roomName"
class=" form-control">
</div>
</div>
@ -38,41 +38,20 @@
</button>
</div>
</div>
<div class="row" v-show="listOwnerInfo.moreCondition == true">
<div class="col-sm-4">
<div class="form-group input-group">
<vc:create path="property/floorSelect2" parentModal="listOwnerModel"
namespace="listOwner"></vc:create>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<vc:create path="property/unitSelect2" parentModal="listOwnerModel"
callBackListener="listOwner" callBackFunction="notify" namespace="listOwner">
</vc:create>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<vc:create path="property/roomSelect2" parentModal="listOwnerModel"
callBackListener="listOwner" callBackFunction="notify" namespace="listOwner">
</vc:create>
</div>
</div>
</div>
<div class="row" v-if="listOwnerInfo.moreCondition == true">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入业主ID" v-model="listOwnerInfo.conditions.ownerId"
class=" form-control">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="请输入业主身份证号" v-model="listOwnerInfo.conditions.idCard"
class=" form-control">
</div>
</div>
</div>

View File

@ -22,8 +22,9 @@
roomNum: '',
roomId: '',
roomNum: '',
roomName: ''
},
listColumns:[]
listColumns: []
}
},
_initMethod: function () {
@ -33,7 +34,7 @@
if (vc.notNull(_ownerId)) {
//vc.component.listOwnerInfo.conditions.ownerId = _ownerId;
}
$that._getColumns(function(){
$that._getColumns(function () {
vc.component._listOwnerData(DEFAULT_PAGE, DEFAULT_ROWS);
});
},
@ -130,7 +131,7 @@
vc.jumpToPage("/admin.html#/pages/property/sellParkingSpace?ownerId=" + _owner.ownerId);
},
_openOwnerDetailModel: function (_owner) {
vc.jumpToPage("/admin.html#/pages/property/ownerDetail?ownerId=" + _owner.ownerId+"&ownerName="+_owner.name);
vc.jumpToPage("/admin.html#/pages/property/ownerDetail?ownerId=" + _owner.ownerId + "&ownerName=" + _owner.name);
},
_openDeleteOwnerRoom: function (_owner) {
vc.jumpToPage("/admin.html#/pages/property/deleteOwnerRoom?ownerId=" + _owner.ownerId);
@ -234,14 +235,14 @@
vc.component.listOwnerInfo.moreCondition = true;
}
},
dealOwnerAttr: function (owners) {
dealOwnerAttr: function (owners) {
owners.forEach(item => {
$that._getColumnsValue(item);
});
},
_getColumnsValue: function (_owner) {
_owner.listValues = [];
if (!_owner.hasOwnProperty('ownerAttrDtos') || _owner.ownerAttrDtos.length < 1) {
$that.listOwnerInfo.listColumns.forEach(_value => {
_owner.listValues.push('');
@ -251,12 +252,12 @@
let _ownerAttrDtos = _owner.ownerAttrDtos;
$that.listOwnerInfo.listColumns.forEach(_value => {
let _tmpValue = '';
_ownerAttrDtos.forEach(_attrItem =>{
if(_value == _attrItem.specName){
_ownerAttrDtos.forEach(_attrItem => {
if (_value == _attrItem.specName) {
_tmpValue = _attrItem.valueName;
}
})
@ -270,13 +271,13 @@
vc.getAttrSpec('building_owner_attr', function (data) {
$that.listOwnerInfo.listColumns = [];
data.forEach(item => {
if(item.listShow == 'Y'){
if (item.listShow == 'Y') {
$that.listOwnerInfo.listColumns.push(item.specName);
}
});
_call();
});
}
}
})

View File

@ -17,6 +17,38 @@
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请填写房屋编号 格式 楼栋-单元-房屋" class="form-control form-control-sm"
v-model="roomInfo.conditions.roomId">
</div>
</div>
<div class="col-sm-3">
<select class="form-control-sm form-control input-s-sm inline"
v-model="roomInfo.conditions.state">
<option selected value="">请选择状态</option>
<option value="2002">未销售</option>
<option value="2001">已入住</option>
<option value="2003">已交房</option>
<option value="2004">未入住</option>
<option value="2005">已装修</option>
</select>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请填写房屋房间数" class="form-control form-control-sm"
v-model="roomInfo.conditions.section">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryRoomMethod()"><i
class="fa fa-search"></i> 查询
</button>
</div>
</div>
<div class="row" v-if="roomInfo.moreCondition == true">
<div class="col-sm-4">
<div class="form-group input-group">
<input type="text" placeholder="请选择楼栋"
@ -47,37 +79,6 @@
v-model="roomInfo.conditions.roomNum">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryRoomMethod()"><i
class="fa fa-search"></i> 查询
</button>
</div>
</div>
<div class="row" v-if="roomInfo.moreCondition == true">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请填写房屋ID" class="form-control form-control-sm"
v-model="roomInfo.conditions.roomId">
</div>
</div>
<div class="col-sm-3">
<select class="form-control-sm form-control input-s-sm inline"
v-model="roomInfo.conditions.state">
<option selected value="">请选择状态</option>
<option value="2002">未销售</option>
<option value="2001">已入住</option>
<option value="2003">已交房</option>
<option value="2004">未入住</option>
<option value="2005">已装修</option>
</select>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请填写房屋房间数" class="form-control form-control-sm"
v-model="roomInfo.conditions.section">
</div>
</div>
</div>
</div>
@ -122,7 +123,7 @@
{{room.roomId}}
</td> -->
<td>
{{room.floorNum}}栋{{room.unitNum}}单元{{room.roomNum}}室
{{room.floorNum}}-{{room.unitNum}}-{{room.roomNum}}
</td>
<td>
{{room.layer}}层

View File

@ -59,8 +59,16 @@
vc.component.roomInfo.conditions.row = _row;
vc.component.roomInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
var param = {
params: vc.component.roomInfo.conditions
params: JSON.parse(JSON.stringify(vc.component.roomInfo.conditions))
};
let _allNum = $that.roomInfo.conditions.roomId;
if (_allNum.split('-').length == 3) {
let _allNums = _allNum.split('-')
param.params.floorNum = _allNums[0].trim();
param.params.unitNum = _allNums[1].trim();
param.params.roomNum = _allNums[2].trim();
param.params.roomId = '';
}
//发送get请求
vc.http.get('room',
'listRoom',