diff --git a/public/bpmnjs/index.js b/public/bpmnjs/index.js index 32e58acf6..813584f59 100644 --- a/public/bpmnjs/index.js +++ b/public/bpmnjs/index.js @@ -8,7 +8,7 @@ //发送get请求 let _modelId = vc.getParam('modelId'); let _param = { - 'xml': _xml, + 'xml': _xml.replaceAll('Process_1',"java110_" + vc.getParam('flowId')), 'svg': svg }; vc.http.apiPost('/activiti/model/' + _modelId + '/save', @@ -57,8 +57,6 @@ } //初始化 window.initBpmnjs(); - //生成编号 - document.getElementById('camunda-id').value = "java110_" + _flowId }, function (errInfo, error) { console.log('请求失败处理'); } diff --git a/public/components/property/newOaWorkflowPool/newOaWorkflowPool.js b/public/components/property/newOaWorkflowPool/newOaWorkflowPool.js index 380c665db..11c763035 100644 --- a/public/components/property/newOaWorkflowPool/newOaWorkflowPool.js +++ b/public/components/property/newOaWorkflowPool/newOaWorkflowPool.js @@ -34,7 +34,7 @@ $that._listOaWorkFlowPoolForm(); vc.component._listOaWorkflowPools(DEFAULT_PAGE, DEFAULT_ROWS); }) - vc.on('newOaWorkflowPool','paginationPlus', 'page_event', function (_currentPage) { + vc.on('newOaWorkflowPool', 'paginationPlus', 'page_event', function (_currentPage) { vc.component._listOaWorkflowPools(_currentPage, DEFAULT_ROWS); }); }, @@ -73,7 +73,7 @@ vc.component.newOaWorkflowPoolInfo.total = _newOaWorkflowPoolInfo.total; vc.component.newOaWorkflowPoolInfo.records = _newOaWorkflowPoolInfo.records; vc.component.newOaWorkflowPoolInfo.pools = _newOaWorkflowPoolInfo.data; - vc.emit('newOaWorkflowPool','paginationPlus', 'init', { + vc.emit('newOaWorkflowPool', 'paginationPlus', 'init', { total: vc.component.newOaWorkflowPoolInfo.records, dataCount: vc.component.newOaWorkflowPoolInfo.total, currentPage: _page @@ -83,8 +83,8 @@ } ); }, - _openNewOaWorkflowPoolDetail: function (_notice) { - vc.jumpToPage("/admin.html#/pages/common/noticeDetail?noticeId=" + _notice.noticeId); + _openNewOaWorkflowPoolDetail: function (_pool) { + vc.jumpToPage("/admin.html#/pages/property/newOaWorkflowDetail?id=" + _pool.id + "&flowId=" + $that.newOaWorkflowPoolInfo.conditions.flowId); }, _queryOaWorkflowPoolMethod: function () { vc.component._listOaWorkflowPools(DEFAULT_PAGE, DEFAULT_ROWS); diff --git a/public/pages/property/newOaWorkflowDetail/newOaWorkflowDetail.html b/public/pages/property/newOaWorkflowDetail/newOaWorkflowDetail.html index 417bee88f..25ad542ee 100644 --- a/public/pages/property/newOaWorkflowDetail/newOaWorkflowDetail.html +++ b/public/pages/property/newOaWorkflowDetail/newOaWorkflowDetail.html @@ -11,23 +11,33 @@
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
-
+
- - -
-
-
-
- - -
-
-
-
- - + +
@@ -48,24 +58,22 @@
- - - - - - - - + + + + + + + - - - - - - - - + + + + + + +
序号处理人状态处理时间耗时意见
序号处理人状态耗时意见
{{index+1}}{{item.staffName}}{{item.stateName}}{{item.endTime}}{{item.duration}}{{item.context}}
{{index+1}}{{item.auditName}}{{item.stateName}}{{item.duration}}{{item.message}}
diff --git a/public/pages/property/newOaWorkflowDetail/newOaWorkflowDetail.js b/public/pages/property/newOaWorkflowDetail/newOaWorkflowDetail.js index 2e89242fa..fded3e35d 100644 --- a/public/pages/property/newOaWorkflowDetail/newOaWorkflowDetail.js +++ b/public/pages/property/newOaWorkflowDetail/newOaWorkflowDetail.js @@ -3,7 +3,10 @@ data: { newOaWorkflowDetailInfo: { id: '', - repairUsers: [], + flowId: '', + pools: {}, + formJson: [], + comments: [], } }, _initMethod: function () { @@ -11,123 +14,73 @@ if (!vc.notNull(id)) { vc.toast('非法操作'); vc. - return; + return; } - $that.newOaWorkflowDetailInfo.repairId = repairId; - $that._listRepairPools() + $that.newOaWorkflowDetailInfo.id = id; + $that.newOaWorkflowDetailInfo.flowId = vc.getParam('flowId'); + $that._listOaWorkflowDetails(); + $that._loadComments(); }, _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 () { + _listOaWorkFlowDetailForm: function () { var param = { params: { page: 1, row: 1, - communityId: vc.getCurrentCommunity().communityId, - repairId: $that.newOaWorkflowDetailInfo.repairId + flowId: $that.newOaWorkflowDetailInfo.flowId } }; //发送get请求 - vc.http.get('newOaWorkflowManage', - 'list', + vc.http.apiGet('/oaWorkflow/queryOaWorkflowForm', 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'); + let _newOaWorkflowFormInfo = JSON.parse(json); + $that.newOaWorkflowDetailInfo.formJson = JSON.parse(_newOaWorkflowFormInfo.data[0].formJson).components; + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _listOaWorkflowDetails: function (_page, _rows) { + var param = { + params: { + page: 1, + row: 1, + id: $that.newOaWorkflowDetailInfo.id, + flowId: $that.newOaWorkflowDetailInfo.flowId + } + }; + + //发送get请求 + vc.http.apiGet('/oaWorkflow/queryOaWorkflowFormData', + param, + function (json, res) { + var _newOaWorkflowDetailInfo = JSON.parse(json); + vc.component.newOaWorkflowDetailInfo.pools = _newOaWorkflowDetailInfo.data[0]; + $that._listOaWorkFlowDetailForm(); + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _loadComments: function () { + var param = { + params: { + communityId: vc.getCurrentCommunity().communityId, + businessKey: $that.newOaWorkflowDetailInfo.id + } + }; + //发送get请求 + vc.http.apiGet('workflow.listWorkflowAuditInfo', + param, + function (json, res) { + var _workflowManageInfo = JSON.parse(json); + if (_workflowManageInfo.code != '0') { 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; + $that.newOaWorkflowDetailInfo.comments = _workflowManageInfo.data; }, function (errInfo, error) { console.log('请求失败处理'); } @@ -136,17 +89,29 @@ _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) - }, + _getNewOaWorkflowDetailState: function (_pool) { + /** + * 1001 申请 1002 待审核 1003 退回 1004 委托 1005 办结 + */ + if (!_pool.hasOwnProperty('state')) { + return "未知"; + } + + switch (_pool.state) { + case '1001': + return "申请"; + case '1002': + return "待审核"; + case '1003': + return "退回"; + case '1004': + return "委托"; + case '1005': + return "办结"; + } + + return "未知" + } } }); })(window.vc);