修改分发工程师

This commit is contained in:
qq787203167
2022-05-13 17:03:22 +08:00
parent bacc0494ed
commit 4e885dad1e
@@ -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'))
}
})