@lambo-design/workflow-approve 1.0.0-beta.65 → 1.0.0-beta.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/workflow-approve",
3
- "version": "1.0.0-beta.65",
3
+ "version": "1.0.0-beta.67",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -12,7 +12,7 @@
12
12
  "devDependencies": {
13
13
  "axios": "^0.24.0",
14
14
  "axios-cache-plugin": "^0.1.0",
15
- "@lambo-design/shared": "^1.0.0-beta.250",
15
+ "@lambo-design/shared": "^1.0.0-beta.252",
16
16
  "@lambo-design/core": "^4.7.1-beta.158"
17
17
  },
18
18
  "dependencies": {
package/src/portrait.vue CHANGED
@@ -198,13 +198,19 @@
198
198
 
199
199
  <Modal v-model="modal1" title="选择节点"
200
200
  @on-cancel="cancel"
201
- @on-ok="doPass">
201
+ @on-ok="doJump">
202
202
  <Table border
203
203
  :data="allNode"
204
204
  :columns="nodeColumn"
205
205
  highlight-row
206
206
  @on-current-change="selectNode">
207
207
  </Table>
208
+ <Card v-if="auditResult == '90'">
209
+ <p slot="title">选择驳回后流程流转方式:</p>
210
+ <RadioGroup v-model="rejectAttribute">
211
+ <Radio v-for="(item, index) in rejectAttributeList" :key="index" :label="item.type">{{item.name}}</Radio>
212
+ </RadioGroup>
213
+ </Card>
208
214
  </Modal>
209
215
  <assigneeBox ref="assigneeHelpBox" :execution-completed="executionCompleted"
210
216
  @update-selected="handleSelectedUser" @update-next-node-assignee="updateNextNodeAssignee"
@@ -314,6 +320,13 @@
314
320
  </Form>
315
321
  </Card>
316
322
  </Modal>
323
+ <Modal v-model="rejectAttributesBoxShow" title="选择被驳回任务通过后流程流转方式"
324
+ @on-cancel="rejectAttributesCancel"
325
+ @on-ok="rejectProcessWithRejectAttributes">
326
+ <RadioGroup v-model="rejectAttribute">
327
+ <Radio v-for="(item, index) in rejectAttributeList" :key="index" :label="item.type">{{item.name}}</Radio>
328
+ </RadioGroup>
329
+ </Modal>
317
330
  <candidateGroupsHelpBox ref="candidateGroupsHelpBox" :show="candidateGroupsHelpBoxShow"
318
331
  @update-cand-groups="updateCandGroups"
319
332
  :upms-server-context="upmsServerContext"
@@ -321,34 +334,34 @@
321
334
  <template slot="page-footer">
322
335
  <div>
323
336
  <slot name="footer-button"></slot>
324
- <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo70') && !isDetail && !appointTask"
337
+ <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo70') && !isDetail && !appointTask && !rejectedTask"
325
338
  :disabled="disable" :loading="loading" @click="audit('70')">驳回到原点
326
339
  </Button>
327
- <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo40') && !isDetail && !appointTask"
340
+ <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo40') && !isDetail && !appointTask && !rejectedTask"
328
341
  :disabled="disable" :loading="loading" @click="audit('40')">驳回上一节点
329
342
  </Button>
330
- <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo90') && !isDetail && !appointTask"
343
+ <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo90') && !isDetail && !appointTask && !rejectedTask"
331
344
  :disabled="disable" :loading="loading" @click="audit('90')">驳回指定节点
332
345
  </Button>
333
- <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo80') && !isDetail && !appointTask"
346
+ <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo80') && !isDetail && !appointTask && !rejectedTask"
334
347
  :disabled="disable" :loading="loading" @click="audit('80')">跳转指定节点
335
348
  </Button>
336
- <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo82') && !isDetail && !appointTask"
349
+ <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo82') && !isDetail && !appointTask && !rejectedTask"
337
350
  :disabled="disable" :loading="loading" @click="audit('82')">指定他人处理
338
351
  </Button>
339
352
  <Button style="margin-left: 10px;"
340
- v-if="curNodeType === 'userTask' && handleButtons && handleButtons.includes('delegateTask') && !isDetail && !appointTask"
353
+ v-if="curNodeType === 'userTask' && handleButtons && handleButtons.includes('delegateTask') && !isDetail && !appointTask && !rejectedTask"
341
354
  :disabled="disable" :loading="loading" @click="audit('84')">委派
342
355
  </Button>
343
356
  <Button style="margin-left: 10px;"
344
- v-if="curNodeType === 'multiNode' && handleButtons && handleButtons.includes('addMultitaskInstance') && !isDetail && !appointTask"
357
+ v-if="curNodeType === 'multiNode' && handleButtons && handleButtons.includes('addMultitaskInstance') && !isDetail && !appointTask && !rejectedTask"
345
358
  :disabled="disable" :loading="loading" @click="showUpdateMultitaskInstanceModal('81')">加签
346
359
  </Button>
347
360
  <Button style="margin-left: 10px;"
348
- v-if="curNodeType === 'multiNode' && handleButtons && handleButtons.includes('reductionMultitaskInstance') && !isDetail && !appointTask"
361
+ v-if="curNodeType === 'multiNode' && handleButtons && handleButtons.includes('reductionMultitaskInstance') && !isDetail && !appointTask && !rejectedTask"
349
362
  :disabled="disable" :loading="loading" @click="showUpdateMultitaskInstanceModal('83')">减签
350
363
  </Button>
351
- <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo50') && !isDetail && !appointTask"
364
+ <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo50') && !isDetail && !appointTask && !rejectedTask"
352
365
  :disabled="disable" :loading="loading" @click="audit('50')">直接结束流程
353
366
  </Button>
354
367
  <Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('processTrace')"
@@ -506,8 +519,12 @@ export default {
506
519
  reductionMultitaskInstanceModal: false,
507
520
  candidateGroupsHelpBoxShow: false,
508
521
  appointBoxShow: false,
522
+ rejectAttributesBoxShow: false,
523
+ rejectAttributes: {},
509
524
  autoOpenNode: '0',
510
525
  unapprovedAssigneeList: [],
526
+ rejectAttribute: 'inSequence',
527
+ rejectAttributeList: [],
511
528
  reductionAssigneeList: [],
512
529
  nextNodesOldSettings: [],
513
530
  nextNodesFormList: [],
@@ -526,6 +543,7 @@ export default {
526
543
  },
527
544
  loading: false,
528
545
  disable: false,
546
+ rejectedTask: false,
529
547
  revokeDelegateTask: false,
530
548
  appointTask: false,
531
549
  instanceId: '',
@@ -949,6 +967,11 @@ export default {
949
967
  self.instanceId = todoData.procInstanceId
950
968
  self.curAuditGroup = todoData.auditGroup
951
969
  self.revokeDelegateTask = todoData.delegateStatus ? todoData.delegateStatus === '10' : false
970
+ const taskExtensionAttributes = todoData.taskExtensionAttributes ? JSON.parse(todoData.taskExtensionAttributes) : ''
971
+ if (taskExtensionAttributes && taskExtensionAttributes.rejectAttributes) {
972
+ const rejectAttributes = taskExtensionAttributes.rejectAttributes
973
+ if (rejectAttributes && rejectAttributes.type && rejectAttributes.type != 'inSequence') self.rejectedTask = true
974
+ }
952
975
  self.appointTask = todoData.delegateStatus ? todoData.delegateStatus === '20' : false
953
976
  if (self.revokeDelegateTask) self.disable = true
954
977
  let procType = todoData.procType
@@ -1296,6 +1319,7 @@ export default {
1296
1319
  self.getNodesBehind()
1297
1320
  } else if (self.auditResult === '90') {
1298
1321
  //驳回到前序指定节点
1322
+ self.getProcessAttributes()
1299
1323
  self.getAllPreNodes()
1300
1324
  } else if (self.auditResult === '40') {
1301
1325
  //驳回到上一级
@@ -1354,39 +1378,15 @@ export default {
1354
1378
  self.executionCompleted(true, null, null, auditResult, self.curTaskId)
1355
1379
  }, 1000)
1356
1380
  } else {
1357
- self.loading = true
1358
- self.disable = true
1359
- let url = self.smartFlowServerContext + '/manage/processTodo/audit'
1360
- ajax.post(url, self.auditParams).then(function (resp) {
1361
- let result = resp.data
1362
- if (result.code == '200') {
1363
- self.loading = false
1364
- self.disable = false
1365
- self.$Message.success(result.message)
1366
- setTimeout(() => {
1367
- if (result.data) {
1368
- let taskIds = result.data.map(item => item.id).join(',')
1369
- self.executionCompleted(true, result.data[0].processInstanceId, taskIds, auditResult, self.curTaskId)
1370
- } else {
1371
- self.executionCompleted(true, null, null, auditResult, self.curTaskId)
1372
- }
1373
- }, 1000)
1374
- } else {
1375
- self.loading = false
1376
- self.disable = false
1377
- self.$Message.error(result.message)
1378
- setTimeout(() => {
1379
- self.executionCompleted(false, null, null, auditResult, self.curTaskId)
1380
- }, 1000)
1381
- }
1382
- bus.$emit('triggerTimer')
1383
- })
1381
+ self.getProcessAttributes()
1384
1382
  }
1385
1383
  })
1386
1384
  } else {
1387
- if (self.auditResult === '30' && (!self.handleButtons || self.handleButtons.includes('appointHandler') || self.handleButtons.includes('appointTimeoutTime'))) {
1385
+ if (self.auditResult === '30' && !self.rejectedTask && (!self.handleButtons || self.handleButtons.includes('appointHandler') || self.handleButtons.includes('appointTimeoutTime'))) {
1388
1386
  self.getNextNodes()
1389
1387
  self.appointBoxShow = true
1388
+ } else if (self.auditResult === '70'){
1389
+ self.getProcessAttributes()
1390
1390
  } else {
1391
1391
  self.doPass()
1392
1392
  }
@@ -1451,6 +1451,12 @@ export default {
1451
1451
  })
1452
1452
  }
1453
1453
  },
1454
+ doJump(){
1455
+ if (this.auditResult === '90'){
1456
+ this.auditParams.rejectAttribute = this.rejectAttribute ? this.rejectAttribute :'inSequence'
1457
+ }
1458
+ this.doPass()
1459
+ },
1454
1460
  showUpdateMultitaskInstanceModal(updateType) {
1455
1461
  const self = this
1456
1462
  if (updateType === '81') {
@@ -1540,6 +1546,10 @@ export default {
1540
1546
  const assingees = this.reductionAssigneeList.map(item => item.auditId).join(',')
1541
1547
  this.updateMultitaskInstance('83', assingees)
1542
1548
  },
1549
+ rejectProcessWithRejectAttributes(){
1550
+ this.auditParams.rejectAttribute = this.rejectAttribute ? this.rejectAttribute :'inSequence'
1551
+ this.doPass()
1552
+ },
1543
1553
 
1544
1554
  doSearch() {
1545
1555
  //不需要实现,是子组件assigneeBox要求使用父组件的这个方法
@@ -1627,11 +1637,18 @@ export default {
1627
1637
  cancel() {
1628
1638
  this.modal = false
1629
1639
  this.auditResult = ''
1640
+ this.rejectAttribute = 'inSequence'
1630
1641
  },
1631
1642
  reductionModalCancel() {
1632
1643
  this.reductionMultitaskInstanceModal = false
1633
1644
  this.reductionAssigneeList = []
1634
1645
  },
1646
+ rejectAttributesCancel() {
1647
+ this.rejectAttributesBoxShow = false
1648
+ this.rejectAttribute = 'inSequence'
1649
+ this.loading = false
1650
+ this.disable = false
1651
+ },
1635
1652
  selectAssignee(selection) {
1636
1653
  this.reductionAssigneeList = selection
1637
1654
  },
@@ -1835,6 +1852,56 @@ export default {
1835
1852
  this.$forceUpdate()
1836
1853
  }
1837
1854
  },
1855
+ getProcessAttributes(){
1856
+ const self = this
1857
+ let params = {
1858
+ procId: self.procId,
1859
+ taskNode: self.taskNode
1860
+ }
1861
+ self.rejectAttributeList = [{
1862
+ _checked: true,
1863
+ type: 'inSequence',
1864
+ name: '按顺序流转'
1865
+ }]
1866
+
1867
+ ajax.get(self.smartFlowServerContext + '/manage/processTodo/getProcessAttributes', { params: params }).then(function (resp) {
1868
+ if (resp.data.code === '200') {
1869
+ if ((self.auditParams.auditResult == '70' && !resp.data.data.jumpFirstNode) || (self.auditParams.auditResult == '40' && resp.data.data.multiNode)){
1870
+ self.doPass()
1871
+ return
1872
+ } else {
1873
+ if (self.auditParams.auditResult == '40'){
1874
+ self.rejectAttributeList.push(
1875
+ {
1876
+ type: 'returnToCurrentAuditUser',
1877
+ name: '返回我'
1878
+ }
1879
+ )
1880
+ } else {
1881
+ self.rejectAttributeList.push(
1882
+ {
1883
+ type: 'returnToCurrentNode',
1884
+ name: '返回本节点'
1885
+ }
1886
+ )
1887
+ if (!resp.data.data.multiNode){
1888
+ self.rejectAttributeList.push(
1889
+ {
1890
+ type: 'returnToCurrentAuditUser',
1891
+ name: '返回我'
1892
+ }
1893
+ )
1894
+ }
1895
+ }
1896
+ if (self.auditParams.auditResult != '90') self.rejectAttributesBoxShow = true
1897
+ }
1898
+ } else {
1899
+ self.$Message.error(resp.data.message)
1900
+ }
1901
+ }).catch((err) => {
1902
+ console.log(err)
1903
+ })
1904
+ }
1838
1905
  },
1839
1906
  watch: {
1840
1907
  auditOpinionText(label) {
@@ -30,7 +30,7 @@
30
30
 
31
31
  <Modal v-model="showDetail" :width="modelWidth" :footer-hide='true' :title="detailDones[0] && detailDones[0].handleName ? detailDones[0].handleName + '详情' : '审批详情'">
32
32
  <Card v-for="(item,index) in detailDones" :key="index" style="margin-bottom: 10px">
33
- <Form :model="item" :label-width="140">
33
+ <Form :model="item" :label-width="120">
34
34
  <Row>
35
35
  <i-col span="12" offset="0">
36
36
  <FormItem :label="item.handleName ? item.handleName + '节点:' : '审批节点:'">
@@ -54,11 +54,11 @@
54
54
  <i-col span="12" offset="0">
55
55
  <FormItem :label="item.handleName ? item.handleName + '结果:' : '审批结果:'">
56
56
  <Tag color="green" v-if="item.auditResult == '00'">流程发起</Tag>
57
- <Tag color="green" v-if="item.auditResult == '10'">自动跳过</Tag>
58
- <Tag color="green" v-if="item.auditResult == '11'">与上一环节办理人相同自动跳过</Tag>
59
- <Tag color="green" v-if="item.auditResult == '12'">与发起人相同自动跳过</Tag>
60
- <Tag color="green" v-if="item.auditResult == '13'">办理人为空自动跳过</Tag>
61
- <Tag color="green" v-if="item.auditResult == '14'">符合流程变量条件自动跳过</Tag>
57
+ <Tag color="green" v-else-if="item.auditResult == '10'">自动跳过</Tag>
58
+ <Tag color="green" v-else-if="item.auditResult == '11'">与上一环节办理人相同自动跳过</Tag>
59
+ <Tag color="green" v-else-if="item.auditResult == '12'">与发起人相同自动跳过</Tag>
60
+ <Tag color="green" v-else-if="item.auditResult == '13'">办理人为空自动跳过</Tag>
61
+ <Tag color="green" v-else-if="item.auditResult == '14'">符合流程变量条件自动跳过</Tag>
62
62
  <Tag color="green" v-else-if="item.auditResult == '30'">通过</Tag>
63
63
  <Tag color="volcano" v-else-if="item.auditResult == '40'">驳回上一节点</Tag>
64
64
  <Tag color="red" v-else-if="item.auditResult=='50'">驳回到原点</Tag>