优化员工详情页面中的维修

This commit is contained in:
Your Name 2023-04-05 00:50:25 +08:00
parent 0da7a0b783
commit b2587daf6e
4 changed files with 98 additions and 139 deletions

View File

@ -1,108 +1,96 @@
<div class="margin-top">
<div class="row margin-top-lg">
<div class="col-lg-2 padding-right-xs padding-left-xl">
<input v-model="staffDetailRepairInfo.roomNum" type="text"
:placeholder="vc.i18n('请填写房屋编号','staffDetailRepair')" class="form-control">
</div>
<div class="col-lg-2 padding-right-xs padding-right-xl">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_qureyStaffDetailRepair()">
<i class="fa fa-search"></i>查询
</button>
</div>
<div class="">
<div class="row">
<div class="col-sm-4"></div>
<div class="col-lg-8 text-right">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-if="vc.hasPrivilege('502023021978930012')" v-on:click="_openAddOwnerRoom()">
<vc:i18n name="交房" namespace="simplifyRoomFee"></vc:i18n>
</button>
<div class="btn-group" role="group" aria-label="Basic example">
<button type="button" class="btn btn-sm"
v-bind:class="{'btn-primary': staffDetailRepairInfo.undoOrder == 'undo','btn-light':staffDetailRepairInfo.undoOrder != 'undo'}"
v-on:click="_switchUndoOrder('undo')">
<span>
<vc:i18n name="待办单" namespace="staffDetailRepair"></vc:i18n>
</span>
</button>
<button type="button" class="btn btn-sm"
v-bind:class="{'btn-primary': staffDetailRepairInfo.undoOrder == 'do','btn-light':staffDetailRepairInfo.undoOrder != 'do'}"
v-on:click="_switchUndoOrder('do')">
<span>
<vc:i18n name="已办单" namespace="staffDetailRepair"></vc:i18n>
</span>
</button>
</div>
</div>
</div>
<div class="margin-top">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<vc:i18n name="房屋ID" namespace="staffDetailRepair"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="楼层" namespace="staffDetailRepair"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="类型" namespace="staffDetailRepair"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="建筑/室内面积" namespace="staffDetailRepair"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="租金" namespace="staffDetailRepair"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="房屋状态" namespace="staffDetailRepair"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="房屋欠费" namespace="staffDetailRepair"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="操作" namespace="staffDetailRepair"></vc:i18n>
</th>
</tr>
<tr>
<th class="text-center">
<vc:i18n name="报修ID" namespace="staffDetailRepair"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="位置" namespace="staffDetailRepair"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="报修类型" namespace="staffDetailRepair"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="维修类型" namespace="staffDetailRepair"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="报修人" namespace="staffDetailRepair"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="联系方式" namespace="staffDetailRepair"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="预约时间" namespace="staffDetailRepair"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="状态" namespace="staffDetailRepair"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="操作" namespace="staffDetailRepair"></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="room in staffDetailRepairInfo.rooms">
<td class="text-center">
{{room.floorNum}}-{{room.unitNum}}-{{room.roomNum}}
</td>
<td class="text-center">
{{room.layer}}
</td>
<td class="text-center">
{{room.roomSubTypeName}}
</td>
<td class="text-center">
{{room.builtUpArea}}/{{room.roomArea}}
</td>
<td class="text-center">
{{room.roomRent}}
</td>
<td class="text-center">
{{room.stateName}}
</td>
<td class="text-center">
{{room.roomOweFee || '0.00'}}(按天更新)
</td>
<td class="text-center">
<div class="btn-group" v-if="vc.hasPrivilege('502020082493857941')">
<button class="btn-white btn btn-xs" v-on:click="_openEditRoomModel(room)">
<vc:i18n name="修改" namespace="staffDetailRepair"></vc:i18n>
</button>
</div>
<div class="btn-group" v-if="vc.hasPrivilege('502023021973760015')">
<button class="btn-white btn btn-xs" v-on:click="ownerExitRoomModel(room)">
<vc:i18n name="退房" namespace="staffDetailRepair"></vc:i18n>
</button>
</div>
<div class="btn-group" v-if="room.state != '2002'">
<button class="btn-white btn btn-xs" v-on:click="_toSimplifyAcceptance(room)">
<vc:i18n name="业务受理" namespace="staffDetailRepair"></vc:i18n>
</button>
</div>
</td>
</tr>
<tr v-for="ownerRepair in staffDetailRepairInfo.ownerRepairs">
<td class="text-center">{{ownerRepair.repairId}}</td>
<td class="text-center">{{ownerRepair.repairObjName}}</td>
<td class="text-center">{{ownerRepair.repairTypeName}}</td>
<td class="text-center" v-if="ownerRepair.maintenanceType == '1001'">有偿服务</td>
<td class="text-center" v-else-if="ownerRepair.maintenanceType == '1002'">无偿服务</td>
<td class="text-center" v-else-if="ownerRepair.maintenanceType == '1003'">需要用料</td>
<td class="text-center" v-else-if="ownerRepair.maintenanceType == '1004'">无需用料</td>
<td class="text-center" v-else>-</td>
<td class="text-center">{{ownerRepair.repairName}}</td>
<td class="text-center">{{ownerRepair.tel}}</td>
<td class="text-center">{{ownerRepair.appointmentTime}}</td>
<td class="text-center"
v-if="ownerRepair.state == '1800' && (ownerRepair.returnVisitFlag == '001' || ownerRepair.returnVisitFlag == '002')">
{{ownerRepair.stateName}}(定时任务处理)
</td>
<td class="text-center" v-else>
{{ownerRepair.stateName}}
</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openRepairDetail(ownerRepair)">
<vc:i18n name="详情" namespace="staffDetailRepair"></vc:i18n>
</button>
</div>
</td>
</tr>
</tbody>
</table>
<!-- 分页 -->
<div class="row">
<div class="col-sm-4">
<span>
<span><vc:i18n name="欠费小计:" namespace="staffDetailRepair"></vc:i18n> </span>{{staffDetailRepairInfo.allOweFeeAmount}}
</span>
</div>
<div class="col-sm-8">
<vc:create namespace="staffDetailRepair" path="frame/paginationPlus"></vc:create>
</div>
</div>
</div>
<vc:create path="property/ownerExitRoom"></vc:create>
<vc:create path="property/editRoom"></vc:create>
</div>

View File

@ -7,18 +7,17 @@
vc.extends({
data: {
staffDetailRepairInfo: {
rooms: [],
ownerId:'',
roomNum: '',
allOweFeeAmount:'0'
ownerRepairs: [],
staffId:'',
undoOrder: 'undo',
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('staffDetailAttendance', 'switch', function (_data) {
$that.staffDetailAttendanceInfo.staffId = _data.staffId;
$that._loadStaffAttendances()
vc.on('staffDetailRepair', 'switch', function (_data) {
$that.staffDetailRepairInfo.staffId = _data.staffId;
$that._loadStaffDetailRepairData(DEFAULT_PAGE,DEFAULT_ROWS)
});
vc.on('staffDetailRepair', 'paginationPlus', 'page_event',
function (_currentPage) {
@ -33,20 +32,23 @@
let param = {
params: {
communityId: vc.getCurrentCommunity().communityId,
ownerId:$that.staffDetailRepairInfo.ownerId,
roomNum:$that.staffDetailRepairInfo.roomNum,
staffId:$that.staffDetailRepairInfo.staffId,
page:_page,
row:_row
}
};
let _url = "/ownerRepair.listUndoRepairsByStaff";
if($that.staffDetailRepairInfo.undoOrder == 'do'){
_url = "/ownerRepair.listFinishRepairsByStaff";
}
//发送get请求
vc.http.apiGet('/room.queryRoomsByOwner',
vc.http.apiGet(_url,
param,
function (json) {
var _roomInfo = JSON.parse(json);
vc.component.staffDetailRepairInfo.rooms = _roomInfo.rooms;
$that._computeOwnerRoomOweFeeAmount();
vc.component.staffDetailRepairInfo.ownerRepairs = _roomInfo.data;
vc.emit('staffDetailRepair', 'paginationPlus', 'init', {
total: _roomInfo.records,
dataCount: _roomInfo.total,
@ -62,45 +64,14 @@
_qureyStaffDetailRepair: function () {
$that._loadStaffDetailRepairData(DEFAULT_PAGE, DEFAULT_ROWS);
},
_computeOwnerRoomOweFeeAmount(){
let _rooms = $that.staffDetailRepairInfo.rooms;
let _totalOweFeeAmount = 0;
$that.staffDetailRepairInfo.allOweFeeAmount = 0;
if(!_rooms ||_rooms.length <1){
return ;
}
_rooms.forEach(_room => {
if(_room.roomOweFee){
_totalOweFeeAmount += parseFloat(_room.roomOweFee);
}
});
$that.staffDetailRepairInfo.allOweFeeAmount = _totalOweFeeAmount.toFixed(2);
_switchUndoOrder:function(_order){
$that.staffDetailRepairInfo.undoOrder = _order;
$that._loadStaffDetailRepairData(DEFAULT_PAGE,DEFAULT_ROWS);
},
_openAddOwnerRoom: function () {
vc.jumpToPage("/#/pages/property/addOwnerRoomBinding?ownerId=" + $that.staffDetailRepairInfo.ownerId);
},
ownerExitRoomModel: function(_room) {
vc.emit('ownerExitRoom', 'openExitRoomModel', {
ownerId: $that.staffDetailRepairInfo.ownerId,
roomId: _room.roomId
});
},
_toSimplifyAcceptance: function (_room) {
let _date = new Date();
vc.saveData("JAVA110_IS_BACK", _date.getTime());
vc.saveData('simplifyAcceptanceSearch', {
searchType: '1',
searchValue: _room.floorNum + "-" + _room.unitNum + "-" + _room.roomNum,
searchPlaceholder: '请输入房屋编号 楼栋-单元-房屋 如1-1-1',
})
vc.jumpToPage('/#/pages/property/simplifyAcceptance?tab=业务受理');
},
_openEditRoomModel: function (_room) {
vc.emit('editRoom', 'openEditRoomModal', _room);
_openRepairDetail: function (_repairPool) {
vc.jumpToPage('/#/pages/property/ownerRepairDetail?repairId=' + _repairPool.repairId)
},
}
});
})(window.vc);

View File

@ -1018,4 +1018,4 @@ nav-link nav-link-breadcrumb active:active {
text-align: center;
text-overflow: ellipsis;
white-space: normal;
}
}

View File

@ -67,7 +67,7 @@
param.params.repairName = param.params.repairName.trim();
param.params.tel = param.params.tel.trim();
//发送get请求
vc.http.apiGet('ownerRepair.listStaffFinishRepairs',
vc.http.apiGet('/ownerRepair.listStaffFinishRepairs',
param,
function (json, res) {
var _myRepairDispatchInfo = JSON.parse(json);