mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
c36b14c1b5
commit
62536c6423
@ -1,5 +1,6 @@
|
||||
/**
|
||||
入驻小区
|
||||
https://www.cnblogs.com/zsg88/p/12552378.html
|
||||
**/
|
||||
(function (vc) {
|
||||
|
||||
@ -56,6 +57,8 @@
|
||||
}
|
||||
//初始化
|
||||
window.initBpmnjs();
|
||||
//生成编号
|
||||
document.getElementById('camunda-id').value = "java110_" + _flowId
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
@ -64,7 +67,7 @@
|
||||
|
||||
_initBpmn();
|
||||
|
||||
_closeBpmnjs = function(){
|
||||
_closeBpmnjs = function () {
|
||||
window.close();
|
||||
}
|
||||
})(window.vc);
|
||||
@ -0,0 +1,75 @@
|
||||
<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="_goBack()">返回</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">工单编码:</label>
|
||||
<label class="">{{newOaWorkflowDetailInfo.repairId}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">报修类型:</label>
|
||||
<label class="">{{newOaWorkflowDetailInfo.repairTypeName}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">报修人:</label>
|
||||
<label class="">{{newOaWorkflowDetailInfo.repairName}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="table table-stripped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">序号</th>
|
||||
<th scope="col" class="text-center">处理人</th>
|
||||
<th scope="col" class="text-center">状态</th>
|
||||
<th scope="col" class="text-center">处理时间</th>
|
||||
<th scope="col" class="text-center">耗时</th>
|
||||
<th scope="col" class="text-center">意见</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in newOaWorkflowDetailInfo.repairUsers">
|
||||
<td scope="row" class="text-center">{{index+1}}</td>
|
||||
<td class="text-center">{{item.staffName}}</td>
|
||||
<td class="text-center">{{item.stateName}}</td>
|
||||
<td class="text-center">{{item.endTime}}</td>
|
||||
<td class="text-center">{{item.duration}}</td>
|
||||
<td class="text-center">{{item.context}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
152
public/pages/property/newOaWorkflowDetail/newOaWorkflowDetail.js
Normal file
152
public/pages/property/newOaWorkflowDetail/newOaWorkflowDetail.js
Normal file
@ -0,0 +1,152 @@
|
||||
(function (vc) {
|
||||
vc.extends({
|
||||
data: {
|
||||
newOaWorkflowDetailInfo: {
|
||||
id: '',
|
||||
repairUsers: [],
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
let id = vc.getParam('id');
|
||||
if (!vc.notNull(id)) {
|
||||
vc.toast('非法操作');
|
||||
vc.
|
||||
return;
|
||||
}
|
||||
$that.newOaWorkflowDetailInfo.repairId = repairId;
|
||||
$that._listRepairPools()
|
||||
},
|
||||
_initEvent: function () {
|
||||
},
|
||||
methods: {
|
||||
_getRoom: function () {
|
||||
var param = {
|
||||
params: {
|
||||
roomId: vc.component.newOaWorkflowDetailInfo.roomId,
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
page: 1,
|
||||
row: 1
|
||||
}
|
||||
};
|
||||
//查询房屋信息 业主信息
|
||||
vc.http.get('newOaWorkflowManage',
|
||||
'getRoom',
|
||||
param,
|
||||
function (json, res) {
|
||||
if (res.status == 200) {
|
||||
var _roomInfos = JSON.parse(json);
|
||||
if (!_roomInfos.hasOwnProperty("rooms")) {
|
||||
vc.toast("非法操作,未找到房屋信息");
|
||||
//vc.jumpToPage('/admin.html#/listOwner');
|
||||
return;
|
||||
}
|
||||
var _roomInfo = _roomInfos.rooms[0];
|
||||
vc.component.newOaWorkflowDetailInfo.roomName = _roomInfo.floorNum + "号楼 " + _roomInfo.unitNum + "单元 " + _roomInfo.roomNum + "室";
|
||||
} else {
|
||||
vc.toast("非法操作,未找到房屋信息");
|
||||
}
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast("非法操作,未找到房屋信息");
|
||||
}
|
||||
);
|
||||
},
|
||||
_listRepairPools: function () {
|
||||
var param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 1,
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
repairId: $that.newOaWorkflowDetailInfo.repairId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.get('newOaWorkflowManage',
|
||||
'list',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _repairPoolManageInfo = JSON.parse(json);
|
||||
let _repairs = _repairPoolManageInfo.data;
|
||||
if (_repairs.length < 1) {
|
||||
vc.toast("数据异常");
|
||||
vc.jumpToPage('/admin.html#/pages/property/repairPoolManage');
|
||||
return;
|
||||
}
|
||||
vc.copyObject(_repairs[0], $that.newOaWorkflowDetailInfo);
|
||||
//查询房屋信息
|
||||
//vc.component._getRoom();
|
||||
// 查询物品信息
|
||||
if ($that.newOaWorkflowDetailInfo.maintenanceType == '1001' || $that.newOaWorkflowDetailInfo.maintenanceType == '1003') {
|
||||
$that._loadResourceStoreList();
|
||||
}
|
||||
//查询处理轨迹
|
||||
$that._loadRepairUser();
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_loadResourceStoreList: function () {
|
||||
var param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 100,
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
repairId: $that.newOaWorkflowDetailInfo.repairId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('resourceStore.listResourceStoreUseRecords',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _repairResourceStoreInfo = JSON.parse(json);
|
||||
let _resource = _repairResourceStoreInfo.data;
|
||||
$that.newOaWorkflowDetailInfo.resourceStoreInfo = _resource;
|
||||
vc.component.newOaWorkflowDetailInfo.resourceStoreInfo.forEach((item) => {
|
||||
if (item.resId == '666666') {
|
||||
item.rstName = item.specName = '自定义';
|
||||
}
|
||||
})
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_loadRepairUser: function () {
|
||||
var param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 100,
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
repairId: $that.newOaWorkflowDetailInfo.repairId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('newOaWorkflow.listRepairStaffs',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _repairPoolManageInfo = JSON.parse(json);
|
||||
let _repairs = _repairPoolManageInfo.data;
|
||||
$that.newOaWorkflowDetailInfo.repairUsers = _repairs;
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_goBack: function () {
|
||||
vc.goBack()
|
||||
},
|
||||
openFile: function (_photo) {
|
||||
vc.emit('viewImage', 'showImage', {
|
||||
url: _photo.url
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 新增打印功能,跳转打印页面
|
||||
*/
|
||||
_printRepairDetail: function () {
|
||||
window.open("/print.html#/pages/property/printRepairDetail?repairId=" + $that.newOaWorkflowDetailInfo.repairId + "&repairType=" + $that.newOaWorkflowDetailInfo.repairType)
|
||||
},
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user