优化diamante

This commit is contained in:
java110 2020-11-20 12:27:26 +08:00
parent 17dd10066c
commit beb9e6aff0
4 changed files with 261 additions and 36 deletions

View File

@ -1,6 +1,6 @@
<div>
<div class="row margin-top">
<div class="col-lg-11 text-right">
<div class="col-lg-12 text-right">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openProxyFeeModal()">
代收费用
@ -35,7 +35,7 @@
</tr>
</thead>
<tbody>
<tr v-for="fee in simplifyAcceptanceInfo.fees">
<tr v-for="fee in simplifyRoomFeeInfo.fees">
<!-- <td class="text-center">{{fee.feeId}}</td> -->
<td class="text-center">{{fee.feeName}}</td>
<td class="text-center">{{fee.feeFlagName}}</td>
@ -60,7 +60,6 @@
<div>用量:{{_getAttrValue(fee.feeAttrs,'390003')}}</div>
</td>
<td class="text-center" v-else>
<div>面积:{{listRoomCreateFeeInfo.builtUpArea}}</div>
<div>单价:{{fee.squarePrice}}</div>
<div v-if="fee.feeFlag == '1003006'">附加费:{{fee.additionalAmount}}</div>
<div v-else>固定费:{{fee.additionalAmount}}</div>
@ -94,4 +93,12 @@
</div>
</div>
</div>
<vc:create path="property/deleteFee"></vc:create>
<vc:create path="property/editFee"></vc:create>
<vc:create path="property/roomCreateFeeAdd"></vc:create>
<vc:create path="property/addMeterWater" callBackListener="" callBackFunction=""></vc:create>
<vc:create path="property/addProxyFee" callBackListener="" callBackFunction=""></vc:create>
</div>

View File

@ -0,0 +1,138 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
simplifyRoomFeeInfo: {
fees: [],
roomId:'',
roomName:'',
ownerName:'',
roomName:'',
floorNum:'',
unitNum:'',
roomNum:'',
}
},
_initMethod: function () {
},
_initEvent: function () {
//切换 至费用页面
vc.on('simplifyRoomFee', 'switch', function (_param) {
vc.copyObject(_param,$that.simplifyRoomFeeInfo)
$that._listSimplifyRoomFee(DEFAULT_PAGE,DEFAULT_ROWS);
});
vc.on('pagination', 'page_event',
function(_currentPage) {
vc.component._listSimplifyRoomFee(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listSimplifyRoomFee: function (_page,_row) {
let param = {
params: {
page: _page,
row: _row,
communityId: vc.getCurrentCommunity().communityId,
payerObjId: $that.simplifyRoomFeeInfo.roomId
}
};
//发送get请求
vc.http.get('listRoomFee',
'list',
param,
function (json) {
let _feeConfigInfo = JSON.parse(json);
vc.component.simplifyRoomFeeInfo.total = _feeConfigInfo.total;
vc.component.simplifyRoomFeeInfo.records = _feeConfigInfo.records;
vc.component.simplifyRoomFeeInfo.fees = _feeConfigInfo.fees;
vc.emit('pagination', 'init', {
total: _feeConfigInfo.records,
currentPage: _page
});
}, function () {
console.log('请求失败处理');
}
);
},
_toOwnerPayFee:function(){
vc.jumpToPage('/admin.html#/pages/property/owePayFeeOrder?payObjId='+$that.simplifyRoomFeeInfo.roomId+"&payObjType=3333&roomName="+$that.simplifyRoomFeeInfo.roomName);
},
_openRoomCreateFeeAddModal:function(){
vc.emit('roomCreateFeeAdd', 'openRoomCreateFeeAddModal',{
isMore:false,
room:$that.simplifyRoomFeeInfo
});
},
_openAddMeterWaterModal: function () {
vc.emit('addMeterWater', 'openAddMeterWaterModal', {
roomId:$that.simplifyRoomFeeInfo.roomId,
roomName:$that.simplifyRoomFeeInfo.roomName,
ownerName:$that.simplifyRoomFeeInfo.ownerName
});
},
_getAttrValue:function(_attrs,_specCd){
let _value = "";
_attrs.forEach(item => {
if(item.specCd == _specCd){
_value = item.value;
return ;
}
});
return _value;
},
_getDeadlineTime:function(_fee){
if(_fee.amountOwed == 0 && _fee.endTime == _fee.deadlineTime){
return "-";
}
if(_fee.state == '2009001'){
return "-";
}
return _fee.deadlineTime;
},
_getEndTime:function(_fee){
if(_fee.state == '2009001'){
return "-";
}
return _fee.endTime;
},
_openProxyFeeModal:function(){ //创建代收费用
vc.emit('addProxyFee', 'openAddProxyFeeModal', {
roomId:$that.simplifyRoomFeeInfo.roomId,
roomName:$that.simplifyRoomFeeInfo.roomName,
ownerName:$that.simplifyRoomFeeInfo.ownerName
});
},
_payFee:function(_fee){
_fee.roomName=$that.simplifyRoomFeeInfo.roomName;
_fee.builtUpArea=$that.simplifyRoomFeeInfo.builtUpArea;
vc.jumpToPage('/admin.html#/pages/property/payFeeOrder?'+vc.objToGetParam(_fee));
},
_editFee:function(_fee){
vc.emit('editFee', 'openEditFeeModal',_fee);
},
_payFeeHis:function(_fee){
_fee.builtUpArea=$that.simplifyRoomFeeInfo.builtUpArea;
vc.jumpToPage('/admin.html#/pages/property/propertyFee?'+vc.objToGetParam(_fee));
},
_deleteFee:function(_fee){
vc.emit('deleteFee','openDeleteFeeModal',{
communityId:vc.getCurrentCommunity().communityId,
feeId:_fee.feeId
});
},
}
});
})(window.vc);

View File

@ -5,14 +5,17 @@
<div class="col-lg-1 padding-lr-0 margin-left-xs">
<select v-model="simplifyAcceptanceInfo.searchType" class=" form-control" @change="_changeSearchType()">
<option value="1">房屋号</option>
<option value="2">姓名</option>
<option value="3">电话</option>
<option value="4">身份证</option>
<option value="2">业主姓名</option>
<option value="3">业主电话</option>
<option value="4">业主身份证</option>
<option value="5">车牌号</option>
<option value="6">成员姓名</option>
<option value="7">成员手机号</option>
<option value="8">成员身份证</option>
</select>
</div>
<div class="col-lg-4 padding-lr-0 margin-left-xs">
<input class="form-control" v-bind:placeholder="simplifyAcceptanceInfo.searchPlaceholder" />
<input class="form-control" v-bind:placeholder="simplifyAcceptanceInfo.searchPlaceholder" v-model="simplifyAcceptanceInfo.searchValue" @keyup.enter="_doSearch()"/>
</div>
<div class="col-lg-1 padding-lr-0 margin-left-sm">
<button type="button" class="form-control btn btn-primary" @click="_doSearch()">查询</button>
@ -59,7 +62,7 @@
<div class="col-sm-3">
<div class="form-group">
<label class="col-form-label">入住日期:</label>
<label class="">{{simplifyAcceptanceInfo.age}}</label>
<label class="">{{simplifyAcceptanceInfo.createTime}}</label>
</div>
</div>
<div class="col-sm-3">
@ -77,25 +80,25 @@
<div class="col-sm-3">
<div class="form-group">
<label class="col-form-label">房屋编号:</label>
<label class="">{{simplifyAcceptanceInfo.age}}</label>
<label class="">{{simplifyAcceptanceInfo.floorNum}}-{{simplifyAcceptanceInfo.unitNum}}-{{simplifyAcceptanceInfo.roomNum}}</label>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="col-form-label">房屋面积:</label>
<label class="">{{simplifyAcceptanceInfo.age}}</label>
<label class="">{{simplifyAcceptanceInfo.builtUpArea}}</label>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="col-form-label">算费系数:</label>
<label class="">{{simplifyAcceptanceInfo.age}}</label>
<label class="">{{simplifyAcceptanceInfo.feeCoefficient}}</label>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="col-form-label">户型:</label>
<label class="">{{simplifyAcceptanceInfo.age}}</label>
<label class="">{{simplifyAcceptanceInfo.apartmentName}}</label>
</div>
</div>
</div>
@ -103,19 +106,13 @@
<div class="col-sm-3">
<div class="form-group">
<label class="col-form-label">房屋状态:</label>
<label class="">{{simplifyAcceptanceInfo.age}}</label>
<label class="">{{simplifyAcceptanceInfo.stateName}}</label>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="col-form-label">房屋编号:</label>
<label class="">{{simplifyAcceptanceInfo.age}}</label>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">车辆车位:</label>
<label class="">{{simplifyAcceptanceInfo.age}}</label>
<label class="col-form-label">房屋ID</label>
<label class="">{{simplifyAcceptanceInfo.roomId}}</label>
</div>
</div>
</div>
@ -126,8 +123,8 @@
<div class="margin-top">
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 1}"
v-on:click="changeTab(1)">房屋费用</a>
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 'simplifyRoomFee'}"
v-on:click="changeTab('simplifyRoomFee')">房屋费用</a>
</li>
<li class="nav-item">
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 2}"
@ -138,27 +135,34 @@
v-on:click="changeTab(3)">家庭成员</a>
</li>
<li class="nav-item">
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 3}"
v-on:click="changeTab(3)">车辆信息</a>
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 4}"
v-on:click="changeTab(4)">车辆信息</a>
</li>
<li class="nav-item">
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 4}"
v-on:click="changeTab(4)">报修单</a>
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 5}"
v-on:click="changeTab(5)">报修单</a>
</li>
<li class="nav-item">
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 4}"
v-on:click="changeTab(4)">投诉单</a>
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 6}"
v-on:click="changeTab(6)">投诉单</a>
</li>
<li class="nav-item">
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 4}"
v-on:click="changeTab(4)">门禁同步</a>
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 7}"
v-on:click="changeTab(7)">门禁同步</a>
</li>
<li class="nav-item">
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 4}"
v-on:click="changeTab(4)">道闸同步</a>
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 8}"
v-on:click="changeTab(8)">道闸同步</a>
</li>
</ul>
</div>
<div v-if="simplifyAcceptanceInfo._currentTab == 'simplifyRoomFee'">
<vc:create path="property/simplifyRoomFee"></vc:create>
</div>
</div>
<vc:create path="property/searchRoom" emitChooseRoom="simplifyAcceptance" emitLoadData="list" roomFlag="1"
showSearchCondition="false"></vc:create>
</div>

View File

@ -11,17 +11,34 @@
searchValue: '',
searchPlaceholder: '请输入房屋编号 楼栋-单元-房屋 如1-1-1',
ownerPhoto: '',
_currentTab: 1
_currentTab: 'simplifyRoomFee',
roomId: '',
ownerId: '',
name: '',
idCard: '',
link: '',
createTime: '',
apartmentName: '',
floorNum: '',
unitNum: '',
roomNum: '',
builtUpArea: '',
feeCoefficient: '',
stateName: '',
roomName: ''
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('simplifyAcceptance', 'chooseRoom', function (_room) {
vc.copyObject(_room, $that.simplifyAcceptanceInfo);
$that.simplifyAcceptanceInfo.roomName = _room.floorNum + '栋' + _room.unitNum + '单元' + _room.roomNum;
vc.emit('simplifyRoomFee', 'switch', $that.simplifyAcceptanceInfo)
});
},
methods: {
_changeSearchType: function () {
switch ($that.simplifyAcceptanceInfo.searchType) {
case '1':
@ -39,6 +56,15 @@
case '5':
$that.simplifyAcceptanceInfo.searchPlaceholder = '请输入业主车牌号';
break;
case '6':
$that.simplifyAcceptanceInfo.searchPlaceholder = '请输入家庭成员名称';
break;
case '7':
$that.simplifyAcceptanceInfo.searchPlaceholder = '请输入家庭成员电话';
break;
case '8':
$that.simplifyAcceptanceInfo.searchPlaceholder = '请输入家庭成员身份证';
break;
default:
$that.simplifyAcceptanceInfo.searchPlaceholder = '请输入房屋编号 楼栋-单元-房屋 如1-1-1';
}
@ -48,12 +74,62 @@
vc.toast('请输入查询条件');
return;
}
// 清理信息
$that._clearData();
let _param = {
params: {
searchType: $that.simplifyAcceptanceInfo.searchType,
searchValue: $that.simplifyAcceptanceInfo.searchValue,
communityId: vc.getCurrentCommunity().communityId
}
}
vc.http.apiGet('/ownerApi/comprehensiveQuery',
_param,
function (json, res) {
let _ownerJson = JSON.parse(json);
if (_ownerJson.code != 0) {
vc.toast(_ownerJson.msg);
return;
}
let _owner = _ownerJson.data;
vc.copyObject(_owner, $that.simplifyAcceptanceInfo);
if (!_owner.hasOwnProperty('rooms')) {
return;
}
let _rooms = _owner.rooms;
if (_rooms.length > 1) {
vc.emit('searchRoom', 'showOwnerRooms', _rooms);
return;
}
vc.copyObject(_rooms[0], $that.simplifyAcceptanceInfo);
$that.simplifyAcceptanceInfo.roomName = _rooms[0].floorNum + '栋' + _rooms[0].unitNum + '单元' + _rooms[0].roomNum;
vc.emit('simplifyRoomFee', 'switch', $that.simplifyAcceptanceInfo);
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
changeTab: function (_tab) {
$that.simplifyAcceptanceInfo._currentTab = _tab;
vc.emit(_tab, 'switch', {
ownerId: $that.simplifyAcceptanceInfo.ownerId,
roomId: $that.simplifyAcceptanceInfo.roomId
})
},
errorLoadImg: function () {
vc.component.simplifyAcceptanceInfo.ownerPhoto = "/img/noPhoto.jpg";
},
_clearData: function () {
$that.simplifyAcceptanceInfo.roomId = '';
$that.simplifyAcceptanceInfo.ownerId = '';
}
}
});
})(window.vc);