[update] 企标流程联调
This commit is contained in:
@@ -306,6 +306,24 @@ export const EsInitChangeNodes = new EsEnums({
|
|||||||
mainDrafterCopy: { text: '主起草人抄送', value: 'sid-08D0381A-5C20-4708-9D73-C7EB5C51DB02' }
|
mainDrafterCopy: { text: '主起草人抄送', value: 'sid-08D0381A-5C20-4708-9D73-C7EB5C51DB02' }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 企标更改流程
|
||||||
|
export const EsChangeNodes = new EsEnums({
|
||||||
|
mainDrafterStart: { text: '主起草人发起', value: 'sid-030A34BF-65B2-460C-BCAB-4BFEE0F77987' },
|
||||||
|
relevantPersonnelCheck: { text: '相关人员校对', value: 'sid-109C6F14-FB23-4A90-A462-F10F344BECD1' },
|
||||||
|
mainDrafterLeaderApproval: { text: '主起草人主管级领导审批', value: 'sid-8A8307F2-20BB-423C-80AA-F426F5F612C3' },
|
||||||
|
standardizationApproval: { text: '标准化审批', value: 'sid-F0B237E0-1D97-455B-BE15-C3796429B412' },
|
||||||
|
mainDrafterLeaderLeaderApproval: { text: '起草人主管级上一级领导审批', value: 'sid-05CC5BD1-2451-45AF-9453-74AE93D026EF' }
|
||||||
|
})
|
||||||
|
|
||||||
|
// 企标复审流程
|
||||||
|
export const EsRecheckNodes = new EsEnums({
|
||||||
|
standardizationSelectContact: { text: '标准化工程师选择联络人', value: 'sid-9E19F873-6E54-427A-938F-0DBADD1DD7E5' },
|
||||||
|
initiatorStart: { text: '发起人发起', value: 'sid-2E53F267-8541-40FB-974D-D8DDD03191CB' },
|
||||||
|
drafterEnterOption: { text: '起草人填写意见', value: 'sid-72303DAD-0B49-471B-828E-66602468BE44' },
|
||||||
|
drafterMinisterApproval: { text: '起草人部长审批', value: 'sid-18EE1480-C281-4569-93F6-F94F204B71ED' },
|
||||||
|
standardizationApproval: { text: '标准化审批', value: 'sid-6BF8F285-0A2A-449C-A108-24024A922723' }
|
||||||
|
})
|
||||||
|
|
||||||
// 企标废止流程
|
// 企标废止流程
|
||||||
export const EsAnnulNodes = new EsEnums({
|
export const EsAnnulNodes = new EsEnums({
|
||||||
initiatorStart: { text: '发起人发起', value: 'sid-5F5FC475-64DE-4F98-A52D-5F6837C39B63' },
|
initiatorStart: { text: '发起人发起', value: 'sid-5F5FC475-64DE-4F98-A52D-5F6837C39B63' },
|
||||||
|
|||||||
@@ -123,7 +123,8 @@ import {
|
|||||||
} from '@/api/workCenter'
|
} from '@/api/workCenter'
|
||||||
import BaseInfoForm from './modules/BaseInfoForm'
|
import BaseInfoForm from './modules/BaseInfoForm'
|
||||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||||
import { ProcessKey } from '@/enums/commonEnums'
|
import { ProcessKey, EsAnnulNodes } from '@/enums/commonEnums'
|
||||||
|
import { enStandardAnnulGetDataDraft } from '../../../api/workCenter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EnterpriseStandardAnnulFlow',
|
name: 'EnterpriseStandardAnnulFlow',
|
||||||
@@ -142,18 +143,18 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// 初始化节点
|
// 初始化节点
|
||||||
const taskName = this.$route.query.taskName
|
const nodeId = this.$route.query.nodeId
|
||||||
if (taskName) {
|
if (nodeId) {
|
||||||
if (taskName === '发起人发起') {
|
if (nodeId === EsAnnulNodes.initiatorStart.value) {
|
||||||
// 发起人发起
|
// 发起人发起
|
||||||
this.currentNode = 1
|
this.currentNode = 1
|
||||||
} else if (taskName === '相关人员会签') {
|
} else if (nodeId === EsAnnulNodes.relevantPersonnelWillSign.value) {
|
||||||
// 起草人填写意见
|
// 起草人填写意见
|
||||||
this.currentNode = 2
|
this.currentNode = 2
|
||||||
} else if (taskName === '起草人和会签人主管级领导审批') {
|
} else if (nodeId === EsAnnulNodes.leaderApproval.value) {
|
||||||
// 起草人和会签人主管级领导审批
|
// 起草人和会签人主管级领导审批
|
||||||
this.currentNode = 3
|
this.currentNode = 3
|
||||||
} else if (taskName === '标准化审批') {
|
} else if (nodeId === EsAnnulNodes.standardizationApproval.value) {
|
||||||
// 标准化审批
|
// 标准化审批
|
||||||
this.currentNode = 4
|
this.currentNode = 4
|
||||||
} else {
|
} else {
|
||||||
@@ -174,10 +175,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (this.$route.query.taskId) {
|
if (this.$route.query.taskId && !this.$route.query.draftId) {
|
||||||
this.currentNodeName = this.$route.query.taskName
|
|
||||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
// 有流程id说明是从流程中心来的,需要初始化数据
|
||||||
this.getProcessData(this.$route.query.taskId)
|
this.getProcessData('todo', { taskId: this.$route.query.taskId })
|
||||||
|
}
|
||||||
|
if (this.$route.query.draftId) {
|
||||||
|
// 有草稿id,说明是从流程中心-草稿来的,需要初始化数据
|
||||||
|
this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId })
|
||||||
|
}
|
||||||
|
if (this.$route.query.taskName) {
|
||||||
|
// 说明是已发起流程
|
||||||
|
this.currentNodeName = this.$route.query.taskName
|
||||||
} else {
|
} else {
|
||||||
this.currentNodeName = '发起人发起'
|
this.currentNodeName = '发起人发起'
|
||||||
}
|
}
|
||||||
@@ -238,16 +246,27 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 根据流程id获取数据并回显
|
// 根据流程id获取数据并回显
|
||||||
getProcessData (taskId) {
|
getProcessData (type, param) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
enStandardAnnulGetDataById(taskId).then(res => {
|
let func
|
||||||
|
let params = {}
|
||||||
|
if (type === 'todo') {
|
||||||
|
func = enStandardAnnulGetDataById
|
||||||
|
params = param.taskId
|
||||||
|
} else {
|
||||||
|
func = enStandardAnnulGetDataDraft
|
||||||
|
params = param
|
||||||
|
}
|
||||||
|
func(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.model = res.result
|
this.model = res.result
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 初始化流程信息
|
// 初始化流程信息
|
||||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
||||||
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
// 初始化流程审批信息,草稿进来的才回显审批信息
|
||||||
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
|
if (type === 'draft') {
|
||||||
|
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
|
||||||
|
}
|
||||||
if (this.$refs.baseInfoRef) {
|
if (this.$refs.baseInfoRef) {
|
||||||
this.$refs.baseInfoRef.initData(this.model.data)
|
this.$refs.baseInfoRef.initData(this.model.data)
|
||||||
}
|
}
|
||||||
@@ -292,6 +311,8 @@ export default {
|
|||||||
// 需要传给后端的数据
|
// 需要传给后端的数据
|
||||||
const paramObj = {}
|
const paramObj = {}
|
||||||
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
||||||
|
paramObj.common.taskId = this.$route.query.taskId || null
|
||||||
|
paramObj.common.processInstanceId = this.model.common ? this.model.common.processInstanceId : null
|
||||||
paramObj.flowUser = personnelObj
|
paramObj.flowUser = personnelObj
|
||||||
paramObj.data = baseInfo.formInline
|
paramObj.data = baseInfo.formInline
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@@ -320,6 +341,7 @@ export default {
|
|||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
this.loading = true
|
||||||
const paramObj = {} // 需要传给后端的数据
|
const paramObj = {} // 需要传给后端的数据
|
||||||
paramObj.common = { ...values, ...approvalValues }
|
paramObj.common = { ...values, ...approvalValues }
|
||||||
paramObj.flowUser = personnelObj
|
paramObj.flowUser = personnelObj
|
||||||
|
|||||||
@@ -125,7 +125,8 @@ import {
|
|||||||
import MainDrafterInitBaseInfo from './modules/MainDrafterInitBaseInfo'
|
import MainDrafterInitBaseInfo from './modules/MainDrafterInitBaseInfo'
|
||||||
import ApproveBaseInfo from './modules/ApproveBaseInfo'
|
import ApproveBaseInfo from './modules/ApproveBaseInfo'
|
||||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||||
import { ProcessKey } from '../../../enums/commonEnums'
|
import { ProcessKey, EsChangeNodes } from '@/enums/commonEnums'
|
||||||
|
import { enStandardChangeGetDataDraft } from '../../../api/workCenter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EnterpriseStandardChangeFlow',
|
name: 'EnterpriseStandardChangeFlow',
|
||||||
@@ -144,39 +145,50 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// 获取人员信息结构
|
|
||||||
this.getPersonInfoStructure(ProcessKey.ES_CHANGE.value)
|
|
||||||
if (this.$route.query.taskId) {
|
|
||||||
this.currentNodeName = this.$route.query.taskName
|
|
||||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
|
||||||
this.getProcessData(this.$route.query.taskId)
|
|
||||||
} else {
|
|
||||||
this.currentNodeName = '标准化工程师发起'
|
|
||||||
}
|
|
||||||
// 初始化节点
|
// 初始化节点
|
||||||
const taskName = this.$route.query.taskName
|
const nodeId = this.$route.query.nodeId
|
||||||
if (taskName) {
|
if (nodeId) {
|
||||||
if (taskName === '主起草人发起') {
|
if (nodeId === EsChangeNodes.mainDrafterStart.value) {
|
||||||
this.currentNode = 1
|
this.currentNode = 1
|
||||||
} else if (taskName === '相关人员校对') {
|
} else if (nodeId === EsChangeNodes.relevantPersonnelCheck.value) {
|
||||||
this.currentNode = 2
|
this.currentNode = 2
|
||||||
} else if (taskName === '起草人主管级领导审批') {
|
} else if (nodeId === EsChangeNodes.mainDrafterLeaderApproval.value) {
|
||||||
this.currentNode = 3
|
this.currentNode = 3
|
||||||
} else if (taskName === '标准化审批') {
|
} else if (nodeId === EsChangeNodes.standardizationApproval.value) {
|
||||||
this.currentNode = 4
|
this.currentNode = 4
|
||||||
} else if (taskName === '起草人主管级上一级领导审批') {
|
} else if (nodeId === EsChangeNodes.mainDrafterLeaderLeaderApproval.value) {
|
||||||
this.currentNode = 5
|
this.currentNode = 5
|
||||||
} else {
|
} else {
|
||||||
// 预留加签节点
|
// 预留加签节点
|
||||||
this.currentNode = 999
|
this.currentNode = 999
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.currentNode === 1) {
|
// 获取人员信息结构
|
||||||
this.disabled = false
|
this.getPersonInfoStructure(ProcessKey.ES_CHANGE.value, () => {
|
||||||
this.initPersonInfoData(true)
|
if (this.$route.query.processInstanceId) {
|
||||||
|
if (this.currentNode === 1) {
|
||||||
|
this.disabled = false
|
||||||
|
this.initPersonInfoData(true)
|
||||||
|
} else {
|
||||||
|
this.disabled = true
|
||||||
|
// 如果不是第一个节点,人员信息全部不可选
|
||||||
|
this.initPersonInfoData(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (this.$route.query.taskId && !this.$route.query.draftId) {
|
||||||
|
// 有流程id说明是从流程中心来的,需要初始化数据
|
||||||
|
this.getProcessData('todo', { taskId: this.$route.query.taskId })
|
||||||
|
}
|
||||||
|
if (this.$route.query.draftId) {
|
||||||
|
// 有草稿id,说明是从流程中心-草稿来的,需要初始化数据
|
||||||
|
this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId })
|
||||||
|
}
|
||||||
|
if (this.$route.query.taskName) {
|
||||||
|
// 说明是已发起流程
|
||||||
|
this.currentNodeName = this.$route.query.taskName
|
||||||
} else {
|
} else {
|
||||||
this.disabled = true
|
this.currentNodeName = '发起人发起'
|
||||||
this.initPersonInfoData(false)
|
|
||||||
}
|
}
|
||||||
// 如果是查看进入的,不可编辑,不可操作
|
// 如果是查看进入的,不可编辑,不可操作
|
||||||
if (this.$route.query.onlyLook) {
|
if (this.$route.query.onlyLook) {
|
||||||
@@ -235,15 +247,26 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 根据流程id获取数据并回显
|
// 根据流程id获取数据并回显
|
||||||
getProcessData (taskId) {
|
getProcessData (type, param) {
|
||||||
enStandardChangeGetDataById(taskId).then(res => {
|
let func
|
||||||
|
let params = {}
|
||||||
|
if (type === 'todo') {
|
||||||
|
func = enStandardChangeGetDataById
|
||||||
|
params = param.taskId
|
||||||
|
} else {
|
||||||
|
func = enStandardChangeGetDataDraft
|
||||||
|
params = param
|
||||||
|
}
|
||||||
|
func(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.model = res.result
|
this.model = res.result
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 初始化流程信息
|
// 初始化流程信息
|
||||||
this.processInfoForm.setFieldsValue(pick(this.model[0], 'prcName', 'dueTime', 'prcMes'))
|
this.processInfoForm.setFieldsValue(pick(this.model[0], 'prcName', 'dueTime', 'prcMes'))
|
||||||
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
// 初始化流程审批信息,草稿进来的才回显审批信息
|
||||||
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
|
if (type === 'draft') {
|
||||||
|
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// 初始化业务基本信息中组件内容
|
// 初始化业务基本信息中组件内容
|
||||||
} else {
|
} else {
|
||||||
@@ -274,6 +297,8 @@ export default {
|
|||||||
// 需要传给后端的
|
// 需要传给后端的
|
||||||
const paramObj = {}
|
const paramObj = {}
|
||||||
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
||||||
|
paramObj.common.taskId = this.$route.query.taskId || null
|
||||||
|
paramObj.common.processInstanceId = this.model.common ? this.model.common.processInstanceId : null
|
||||||
paramObj.flowUser = personnelObj
|
paramObj.flowUser = personnelObj
|
||||||
if (this.$refs.baseInfoRef) {
|
if (this.$refs.baseInfoRef) {
|
||||||
// 业务基本信息
|
// 业务基本信息
|
||||||
@@ -285,12 +310,9 @@ export default {
|
|||||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
paramObj.data = Object.assign({}, baseInfo.formInline)
|
||||||
if (baseInfo.dataSource) {
|
if (baseInfo.dataSource) {
|
||||||
paramObj.dataList = baseInfo.dataSource.map(item => {
|
paramObj.data.list = baseInfo.dataSource
|
||||||
return { ...item, ...baseInfo.formInline }
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
paramObj.dataList = [baseInfo.formInline]
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
||||||
@@ -328,12 +350,12 @@ export default {
|
|||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
this.loading = true
|
||||||
const param = {} // 需要传给后端的数据
|
const param = {} // 需要传给后端的数据
|
||||||
param.common = { ...values, ...approvalValues }
|
param.common = { ...values, ...approvalValues }
|
||||||
param.flowUser = personnelObj
|
param.flowUser = personnelObj
|
||||||
param.dataList = data.dataSource.map(item => {
|
param.data = Object.assign({}, data.formInline)
|
||||||
return { ...item, ...data.formInline }
|
param.data.list = data.dataSource
|
||||||
})
|
|
||||||
enStandardChangeApproval(param).then(res => {
|
enStandardChangeApproval(param).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
|||||||
@@ -139,7 +139,8 @@ import StandardizationInitBaseInfo from './modules/StandardizationInitBaseInfo'
|
|||||||
import DrafterEnterOptionBaseInfo from './modules/DrafterEnterOptionBaseInfo'
|
import DrafterEnterOptionBaseInfo from './modules/DrafterEnterOptionBaseInfo'
|
||||||
import RecheckApproveBaseInfo from './modules/RecheckApproveBaseInfo'
|
import RecheckApproveBaseInfo from './modules/RecheckApproveBaseInfo'
|
||||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||||
import { ProcessKey } from '../../../enums/commonEnums'
|
import { ProcessKey, EsRecheckNodes } from '@/enums/commonEnums'
|
||||||
|
import { enStandardRecheckGetDataDraft } from '../../../api/workCenter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EnterpriseStandardRecheckFlow',
|
name: 'EnterpriseStandardRecheckFlow',
|
||||||
@@ -161,21 +162,21 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// 初始化节点
|
// 初始化节点
|
||||||
const taskName = this.$route.query.taskName
|
const nodeId = this.$route.query.taskName
|
||||||
if (taskName) {
|
if (nodeId) {
|
||||||
if (taskName === '标准化发起') {
|
if (nodeId === EsRecheckNodes.standardizationSelectContact.value) {
|
||||||
// 发起人发起
|
// 标准化工程师选择联络人
|
||||||
this.currentNode = 1
|
this.currentNode = 1
|
||||||
} else if (taskName === '联络人发起') {
|
} else if (nodeId === EsRecheckNodes.initiatorStart.value) {
|
||||||
// 联络人发起
|
// 发起人发起
|
||||||
this.currentNode = 2
|
this.currentNode = 2
|
||||||
} else if (taskName === '起草人填写意见') {
|
} else if (nodeId === EsRecheckNodes.drafterEnterOption.value) {
|
||||||
// 起草人填写意见
|
// 起草人填写意见
|
||||||
this.currentNode = 3
|
this.currentNode = 3
|
||||||
} else if (taskName === '起草人部长审批') {
|
} else if (nodeId === EsRecheckNodes.drafterMinisterApproval.value) {
|
||||||
// 起草人部长审批
|
// 起草人部长审批
|
||||||
this.currentNode = 4
|
this.currentNode = 4
|
||||||
} else if (taskName === '标准化审批') {
|
} else if (nodeId === EsRecheckNodes.standardizationApproval.value) {
|
||||||
// 标准化审批
|
// 标准化审批
|
||||||
this.currentNode = 5
|
this.currentNode = 5
|
||||||
} else {
|
} else {
|
||||||
@@ -197,13 +198,21 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (this.$route.query.taskId) {
|
if (this.$route.query.taskId && !this.$route.query.draftId) {
|
||||||
this.currentNodeName = this.$route.query.taskName
|
|
||||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
// 有流程id说明是从流程中心来的,需要初始化数据
|
||||||
this.getProcessData(this.$route.query.taskId)
|
this.getProcessData('todo', { taskId: this.$route.query.taskId })
|
||||||
} else {
|
|
||||||
this.currentNodeName = '联络人发起'
|
|
||||||
}
|
}
|
||||||
|
if (this.$route.query.draftId) {
|
||||||
|
// 有草稿id,说明是从流程中心-草稿来的,需要初始化数据
|
||||||
|
this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId })
|
||||||
|
}
|
||||||
|
if (this.$route.query.taskName) {
|
||||||
|
// 说明是已发起流程
|
||||||
|
this.currentNodeName = this.$route.query.taskName
|
||||||
|
} else {
|
||||||
|
this.currentNodeName = '发起人发起'
|
||||||
|
}
|
||||||
|
// 从企标计划复审发起跳转过来的
|
||||||
if (this.$route.query.recheckPlanId) {
|
if (this.$route.query.recheckPlanId) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 说明是从企标复审计划页面发起跳转过来的
|
// 说明是从企标复审计划页面发起跳转过来的
|
||||||
@@ -267,16 +276,27 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 根据流程id获取数据并回显
|
// 根据流程id获取数据并回显
|
||||||
getProcessData (taskId) {
|
getProcessData (type, param) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
enStandardRecheckGetDataById(taskId).then(res => {
|
let func
|
||||||
|
let params = {}
|
||||||
|
if (type === 'todo') {
|
||||||
|
func = enStandardRecheckGetDataById
|
||||||
|
params = param.taskId
|
||||||
|
} else {
|
||||||
|
func = enStandardRecheckGetDataDraft
|
||||||
|
params = param
|
||||||
|
}
|
||||||
|
func(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.model = res.result
|
this.model = res.result
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 初始化流程信息
|
// 初始化流程信息
|
||||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
||||||
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
// 初始化流程审批信息,草稿进来的才回显审批信息
|
||||||
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
|
if (type === 'draft') {
|
||||||
|
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
|
||||||
|
}
|
||||||
// 初始化业务基本信息中组件内容
|
// 初始化业务基本信息中组件内容
|
||||||
if (this.$refs.baseInfoRef) {
|
if (this.$refs.baseInfoRef) {
|
||||||
this.$refs.baseInfoRef.initData(this.model.data)
|
this.$refs.baseInfoRef.initData(this.model.data)
|
||||||
@@ -321,6 +341,8 @@ export default {
|
|||||||
// 需要传给后端的数据
|
// 需要传给后端的数据
|
||||||
const paramObj = {}
|
const paramObj = {}
|
||||||
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
||||||
|
paramObj.common.taskId = this.$route.query.taskId || null
|
||||||
|
paramObj.common.processInstanceId = this.model.common ? this.model.common.processInstanceId : null
|
||||||
paramObj.flowUser = personnelObj
|
paramObj.flowUser = personnelObj
|
||||||
paramObj.data = baseInfo.formInline
|
paramObj.data = baseInfo.formInline
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@@ -349,6 +371,7 @@ export default {
|
|||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
this.loading = true
|
||||||
const paramObj = {} // 需要传给后端的数据
|
const paramObj = {} // 需要传给后端的数据
|
||||||
paramObj.common = { ...values, ...approvalValues }
|
paramObj.common = { ...values, ...approvalValues }
|
||||||
paramObj.flowUser = personnelObj
|
paramObj.flowUser = personnelObj
|
||||||
|
|||||||
+36
-14
@@ -123,7 +123,8 @@ import {
|
|||||||
} from '@/api/workCenter'
|
} from '@/api/workCenter'
|
||||||
import BaseInfoForm from './modules/BaseInfoForm'
|
import BaseInfoForm from './modules/BaseInfoForm'
|
||||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||||
import { ProcessKey } from '@/enums/commonEnums'
|
import { ProcessKey, EsSealSaveNodes } from '@/enums/commonEnums'
|
||||||
|
import { enStandardSealSaveGetDataDraft } from '../../../api/workCenter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EnterpriseStandardSealSaveFlow',
|
name: 'EnterpriseStandardSealSaveFlow',
|
||||||
@@ -142,18 +143,18 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// 初始化节点
|
// 初始化节点
|
||||||
const taskName = this.$route.query.taskName
|
const nodeId = this.$route.query.nodeId
|
||||||
if (taskName) {
|
if (nodeId) {
|
||||||
if (taskName === '发起人发起') {
|
if (nodeId === EsSealSaveNodes.initiatorStart.value) {
|
||||||
// 发起人发起
|
// 发起人发起
|
||||||
this.currentNode = 1
|
this.currentNode = 1
|
||||||
} else if (taskName === '相关人员会签') {
|
} else if (nodeId === EsSealSaveNodes.relevantPersonnelWillSign.value) {
|
||||||
// 起草人填写意见
|
// 起草人填写意见
|
||||||
this.currentNode = 2
|
this.currentNode = 2
|
||||||
} else if (taskName === '起草人和会签人主管级领导审批') {
|
} else if (nodeId === EsSealSaveNodes.leaderApproval.value) {
|
||||||
// 起草人和会签人主管级领导审批
|
// 起草人和会签人主管级领导审批
|
||||||
this.currentNode = 3
|
this.currentNode = 3
|
||||||
} else if (taskName === '标准化审批') {
|
} else if (nodeId === EsSealSaveNodes.standardizationApproval.value) {
|
||||||
// 标准化审批
|
// 标准化审批
|
||||||
this.currentNode = 4
|
this.currentNode = 4
|
||||||
} else {
|
} else {
|
||||||
@@ -174,10 +175,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (this.$route.query.taskId) {
|
if (this.$route.query.taskId && !this.$route.query.draftId) {
|
||||||
this.currentNodeName = this.$route.query.taskName
|
|
||||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
// 有流程id说明是从流程中心来的,需要初始化数据
|
||||||
this.getProcessData(this.$route.query.taskId)
|
this.getProcessData('todo', { taskId: this.$route.query.taskId })
|
||||||
|
}
|
||||||
|
if (this.$route.query.draftId) {
|
||||||
|
// 有草稿id,说明是从流程中心-草稿来的,需要初始化数据
|
||||||
|
this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId })
|
||||||
|
}
|
||||||
|
if (this.$route.query.taskName) {
|
||||||
|
// 说明是已发起流程
|
||||||
|
this.currentNodeName = this.$route.query.taskName
|
||||||
} else {
|
} else {
|
||||||
this.currentNodeName = '发起人发起'
|
this.currentNodeName = '发起人发起'
|
||||||
}
|
}
|
||||||
@@ -238,16 +246,27 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 根据流程id获取数据并回显
|
// 根据流程id获取数据并回显
|
||||||
getProcessData (taskId) {
|
getProcessData (type, param) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
enStandardSealSaveGetDataById(taskId).then(res => {
|
let func
|
||||||
|
let params = {}
|
||||||
|
if (type === 'todo') {
|
||||||
|
func = enStandardSealSaveGetDataById
|
||||||
|
params = param.taskId
|
||||||
|
} else {
|
||||||
|
func = enStandardSealSaveGetDataDraft
|
||||||
|
params = param
|
||||||
|
}
|
||||||
|
func(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.model = res.result
|
this.model = res.result
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 初始化流程信息
|
// 初始化流程信息
|
||||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
||||||
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
// 初始化流程审批信息,草稿进来的才回显审批信息
|
||||||
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
|
if (type === 'draft') {
|
||||||
|
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
|
||||||
|
}
|
||||||
if (this.$refs.baseInfoRef) {
|
if (this.$refs.baseInfoRef) {
|
||||||
this.$refs.baseInfoRef.initData(this.model.data)
|
this.$refs.baseInfoRef.initData(this.model.data)
|
||||||
}
|
}
|
||||||
@@ -292,6 +311,8 @@ export default {
|
|||||||
// 需要传给后端的数据
|
// 需要传给后端的数据
|
||||||
const paramObj = {}
|
const paramObj = {}
|
||||||
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
||||||
|
paramObj.common.taskId = this.$route.query.taskId || null
|
||||||
|
paramObj.common.processInstanceId = this.model.common ? this.model.common.processInstanceId : null
|
||||||
paramObj.flowUser = personnelObj
|
paramObj.flowUser = personnelObj
|
||||||
paramObj.data = baseInfo.formInline
|
paramObj.data = baseInfo.formInline
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@@ -320,6 +341,7 @@ export default {
|
|||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
this.loading = true
|
||||||
const paramObj = {} // 需要传给后端的数据
|
const paramObj = {} // 需要传给后端的数据
|
||||||
paramObj.common = { ...values, ...approvalValues }
|
paramObj.common = { ...values, ...approvalValues }
|
||||||
paramObj.flowUser = personnelObj
|
paramObj.flowUser = personnelObj
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (this.$route.query.taskId) {
|
if (this.$route.query.taskId && !this.$route.query.draftId) {
|
||||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
// 有流程id说明是从流程中心来的,需要初始化数据
|
||||||
this.getProcessData('todo', { taskId: this.$route.query.taskId })
|
this.getProcessData('todo', { taskId: this.$route.query.taskId })
|
||||||
}
|
}
|
||||||
@@ -341,6 +341,7 @@ export default {
|
|||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
this.loading = true
|
||||||
const paramObj = {} // 需要传给后端的数据
|
const paramObj = {} // 需要传给后端的数据
|
||||||
paramObj.common = { ...values, ...approvalValues }
|
paramObj.common = { ...values, ...approvalValues }
|
||||||
paramObj.flowUser = personnelObj
|
paramObj.flowUser = personnelObj
|
||||||
|
|||||||
Reference in New Issue
Block a user