From 4e885dad1e3f835cccbb15bc3bd2b1882dfa91d9 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Fri, 13 May 2022 17:03:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E5=8F=91=E5=B7=A5?= =?UTF-8?q?=E7=A8=8B=E5=B8=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processForm/handshakeProcess/index.vue | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) 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')) } })