|
@@ -121,9 +121,9 @@
|
|
<vxe-column width="100px" title="合同金额(元)" field="contractAmount"></vxe-column>
|
|
<vxe-column width="100px" title="合同金额(元)" field="contractAmount"></vxe-column>
|
|
<vxe-column width="100px" title="创建人" field="createBy"></vxe-column>
|
|
<vxe-column width="100px" title="创建人" field="createBy"></vxe-column>
|
|
<vxe-column width="150px" title="签订日期" field="contractDate"></vxe-column>
|
|
<vxe-column width="150px" title="签订日期" field="contractDate"></vxe-column>
|
|
- <vxe-column width="100px" title="状态" field="status" >
|
|
|
|
|
|
+ <vxe-column width="120px" title="流程状态" field="status" >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{ $dictUtils.getDictLabel("approval_type", scope.row.status, '-') }}
|
|
|
|
|
|
+ <el-button type="text" @click="detail(scope.row)" :type="$dictUtils.getDictLabel('approval_type_status', scope.row.status, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("approval_type", scope.row.status, '-')}} </el-button>
|
|
</template>
|
|
</template>
|
|
</vxe-column>
|
|
</vxe-column>
|
|
<!-- <vxe-column width="100px" title="归档状态" field="filedType" >-->
|
|
<!-- <vxe-column width="100px" title="归档状态" field="filedType" >-->
|
|
@@ -171,6 +171,8 @@
|
|
import WorkContractService from '@/api/sys/WorkContractService'
|
|
import WorkContractService from '@/api/sys/WorkContractService'
|
|
import SelectUserTree from '@/views/modules/utils/treeUserSelect'
|
|
import SelectUserTree from '@/views/modules/utils/treeUserSelect'
|
|
import TaskService from '@/api/flowable/TaskService'
|
|
import TaskService from '@/api/flowable/TaskService'
|
|
|
|
+ import ProcessService from '@/api/flowable/ProcessService'
|
|
|
|
+ import pick from 'lodash.pick'
|
|
export default {
|
|
export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -192,14 +194,18 @@
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
orders: []
|
|
orders: []
|
|
},
|
|
},
|
|
|
|
+ processDefinitionId: '',
|
|
|
|
+ procDefKey: '',
|
|
loading: false
|
|
loading: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
workContractService: null,
|
|
workContractService: null,
|
|
taskService: null,
|
|
taskService: null,
|
|
|
|
+ processService: null,
|
|
created () {
|
|
created () {
|
|
this.workContractService = new WorkContractService()
|
|
this.workContractService = new WorkContractService()
|
|
this.taskService = new TaskService()
|
|
this.taskService = new TaskService()
|
|
|
|
+ this.processService = new ProcessService()
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
InputNumber,
|
|
InputNumber,
|
|
@@ -231,6 +237,12 @@
|
|
this.tablePage.total = data.total
|
|
this.tablePage.total = data.total
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
|
|
+ this.processService.getByName('合同登记新建').then(({data}) => {
|
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
+ this.processDefinitionId = data.id
|
|
|
|
+ this.procDefKey = data.key
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 当前页
|
|
// 当前页
|
|
currentChangeHandle ({currentPage, pageSize}) {
|
|
currentChangeHandle ({currentPage, pageSize}) {
|
|
@@ -250,6 +262,23 @@
|
|
add () {
|
|
add () {
|
|
this.start()
|
|
this.start()
|
|
},
|
|
},
|
|
|
|
+ // 新增
|
|
|
|
+ detail (row) {
|
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
|
+ if (!this.commonJS.isEmpty(row.status) && row.status != '1') {
|
|
|
|
+ console.log(row.procInsId)
|
|
|
|
+ console.log(row.processDefinitionId)
|
|
|
|
+ this.taskService.getTaskDef({
|
|
|
|
+ procInsId: row.procInsId,
|
|
|
|
+ procDefId: row.processDefinitionId
|
|
|
|
+ }).then(({data}) => {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
|
+ query: {readOnly: true, title: row.name + '流程详情', formTitle: row.name + '流程详情', ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')}
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 修改
|
|
// 修改
|
|
edit (row) {
|
|
edit (row) {
|
|
// row.id || this.$refs.workContractTable.getCheckboxRecords().map(item => {
|
|
// row.id || this.$refs.workContractTable.getCheckboxRecords().map(item => {
|
|
@@ -292,13 +321,13 @@
|
|
// 读取流程表单
|
|
// 读取流程表单
|
|
let tabTitle = `发起流程【合同登记新建】`
|
|
let tabTitle = `发起流程【合同登记新建】`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
|
|
- this.taskService.getTaskDef({ procDefId: 'Process_1662628133027:6:582ad0be-3329-11ed-bee1-b40ede887c28',
|
|
|
|
|
|
+ this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
status: 'startAndHold'}).then((data) => {
|
|
status: 'startAndHold'}).then((data) => {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/flowable/task/TaskForm',
|
|
path: '/flowable/task/TaskForm',
|
|
query: {
|
|
query: {
|
|
- procDefId: 'Process_1662628133027:6:582ad0be-3329-11ed-bee1-b40ede887c28',
|
|
|
|
- procDefKey: 'Process_1662628133027',
|
|
|
|
|
|
+ procDefId: this.processDefinitionId,
|
|
|
|
+ procDefKey: this.procDefKey,
|
|
status: 'startAndHold',
|
|
status: 'startAndHold',
|
|
title: tabTitle,
|
|
title: tabTitle,
|
|
formType: data.data.formType,
|
|
formType: data.data.formType,
|
|
@@ -313,15 +342,15 @@
|
|
// 读取流程表单
|
|
// 读取流程表单
|
|
let tabTitle = `发起流程【合同登记新建】`
|
|
let tabTitle = `发起流程【合同登记新建】`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
|
|
- this.taskService.getTaskDef({ procDefId: 'Process_1662628133027:6:582ad0be-3329-11ed-bee1-b40ede887c28',
|
|
|
|
|
|
+ this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
businessId: row.id,
|
|
businessId: row.id,
|
|
businessTable: 'work_contract_info',
|
|
businessTable: 'work_contract_info',
|
|
status: 'startAndHold'}).then((data) => {
|
|
status: 'startAndHold'}).then((data) => {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/flowable/task/TaskForm',
|
|
path: '/flowable/task/TaskForm',
|
|
query: {
|
|
query: {
|
|
- procDefId: 'Process_1662628133027:6:582ad0be-3329-11ed-bee1-b40ede887c28',
|
|
|
|
- procDefKey: 'Process_1662628133027',
|
|
|
|
|
|
+ procDefId: this.processDefinitionId,
|
|
|
|
+ procDefKey: this.procDefKey,
|
|
status: 'startAndHold',
|
|
status: 'startAndHold',
|
|
title: tabTitle,
|
|
title: tabTitle,
|
|
formType: data.data.formType,
|
|
formType: data.data.formType,
|
|
@@ -337,7 +366,7 @@
|
|
// 读取流程表单
|
|
// 读取流程表单
|
|
let tabTitle = `发起流程【合同登记新建】`
|
|
let tabTitle = `发起流程【合同登记新建】`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
|
|
- this.taskService.getTaskDef({ procDefId: 'Process_1662628133027:6:582ad0be-3329-11ed-bee1-b40ede887c28',
|
|
|
|
|
|
+ this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
businessId: row.id,
|
|
businessId: row.id,
|
|
businessTable: 'work_contract_info',
|
|
businessTable: 'work_contract_info',
|
|
taskId: row.procInsId,
|
|
taskId: row.procInsId,
|
|
@@ -345,8 +374,8 @@
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/flowable/task/TaskForm',
|
|
path: '/flowable/task/TaskForm',
|
|
query: {
|
|
query: {
|
|
- procDefId: 'Process_1662628133027:6:582ad0be-3329-11ed-bee1-b40ede887c28',
|
|
|
|
- procDefKey: 'Process_1662628133027',
|
|
|
|
|
|
+ procDefId: this.processDefinitionId,
|
|
|
|
+ procDefKey: this.procDefKey,
|
|
status: 'reback',
|
|
status: 'reback',
|
|
title: tabTitle,
|
|
title: tabTitle,
|
|
formType: data.data.formType,
|
|
formType: data.data.formType,
|