diff --git a/jero-web/src/views/processCenter/processForm/handshakeProcess/index.vue b/jero-web/src/views/processCenter/processForm/handshakeProcess/index.vue index 32b50142d..8ec29c682 100644 --- a/jero-web/src/views/processCenter/processForm/handshakeProcess/index.vue +++ b/jero-web/src/views/processCenter/processForm/handshakeProcess/index.vue @@ -51,6 +51,7 @@ import circulationHistory from '../../components/circulationHistory' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { mapGetters } from 'vuex' + import moment from 'moment' export default { name: 'handshakeProcess', @@ -229,11 +230,56 @@ if (res.success) { this.$message.success(this.$t('OperationSuccessful')) this.loading = false + if (value.flag == 0) { + if (this.queryProject.verifyDeliverableType) { + this.startProcessDesign(this.queryBy, 2) + } + if (this.queryProject.prehomoDeliverableType) { + this.startProcessDesign(this.queryBy, 3) + } + if (this.queryProject.designDeliverableType) { + this.startProcessDesign(this.queryBy, 4) + } + } else { + this.$router.push({ + path: '/ProcessCenter' + }) + } + } else { + this.loading = false + this.$message.warning(this.$t('operationFailed')) + } + }) + }, + startProcessDesign(value, num) { + let query = { + type: num, + msg: JSON.stringify(value).replace(/\"/g, '\'') + } + postAction('/workFlow/startProcess', query).then((res) => { + if (res.success) { + this.completeTaskDesign(value, res.result) + } + }) + }, + + completeTaskDesign(value, taskId) { + value.reviewResult = 'launch' + let operatorTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss') + value.operatorTime = operatorTime + let query = { + userid: this.userInfo().id, + taskId: taskId, + json: JSON.stringify(value).replace(/\"/g, '\'') + } + postAction('/workFlow/completeTask', query).then((res) => { + if (res.success) { + this.visible = false + this.$message.success(this.$t('OperationSuccessful')) this.$router.push({ path: '/ProcessCenter' }) } else { - this.loading = false this.$message.warning(this.$t('operationFailed')) } })