[update] 修改年度制修订主动上报和流程中心
This commit is contained in:
+56
-40
@@ -51,7 +51,7 @@
|
||||
</a-col>
|
||||
<a-col :span="24" v-show="[2, 3, 4, 5].includes(currentNode)">
|
||||
<!-- 制修订计划说明 -->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('workCenter.revisionPlanActivelyReport.revisionPlanDesc')">
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('workCenter.revisionPlanActivelyReport.revisionPlanDesc')" :colon="formItemColon">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('workCenter.revisionPlanActivelyReport.revisionPlanDesc')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<!-- 人员信息 -->
|
||||
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||
<process-detail-list>
|
||||
<process-detail-list :processKey="ProcessKey.ES_ANNUAL_REPORT.value">
|
||||
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNodeName"></personnel-info>
|
||||
</process-detail-list>
|
||||
</div>
|
||||
@@ -157,22 +157,12 @@ import {
|
||||
activelyReportTurnTo,
|
||||
activelyReportAgree,
|
||||
activelyReportReject,
|
||||
activelyReportGetDataById
|
||||
activelyReportGetDataById,
|
||||
activelyReportGetDataDraft
|
||||
} from '@/api/workCenter'
|
||||
import pick from 'lodash.pick'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
import { ProcessKey } from '@/enums/commonEnums'
|
||||
|
||||
const taskNameConstant = {
|
||||
STANDARD_ENGINEER_INIT: '标准化工程师发起',
|
||||
CONTACT_USER_DISTRIBUTE: '各部所联络人 填写/下发任务',
|
||||
WORK_GROUP_COLLECT: '工作组联络人 线下收集,填写计划内容(可跳过)',
|
||||
COLLECT_LEADER_APPROVAL: '收集联络人主管级领导审批',
|
||||
CONTACT_USER_COLLECT: '各部所联络人汇总',
|
||||
CONTACT_USER_LEADER_APPROVAL: '联络人主管级上级领导审批',
|
||||
CONTACT_USER_EDIT: '各部所联络人修改调整',
|
||||
STANDARD_ENGINEER_COLLECT: '标准化工程师归档'
|
||||
}
|
||||
import { ProcessKey, EsRevisionPlanActivityReportNodes } from '@/enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'RevisionPlanActivelyReportFlow',
|
||||
@@ -197,37 +187,28 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// 获取人员信息结构
|
||||
this.getPersonInfoStructure(ProcessKey.ES_ANNUAL_REPORT.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
|
||||
if (taskName) {
|
||||
if (taskName === taskNameConstant.STANDARD_ENGINEER_INIT) {
|
||||
const nodeId = this.$route.query.nodeId
|
||||
if (nodeId) {
|
||||
if (nodeId === EsRevisionPlanActivityReportNodes.standardizationStart.value) {
|
||||
// 标准化工程师发起
|
||||
this.currentNode = 1
|
||||
} else if (taskName === taskNameConstant.CONTACT_USER_DISTRIBUTE) {
|
||||
} else if (nodeId === EsRevisionPlanActivityReportNodes.contactEnterSendTask.value) {
|
||||
// 各部所联络人 填写/下发任务
|
||||
this.currentNode = 2
|
||||
} else if (taskName === taskNameConstant.WORK_GROUP_COLLECT) {
|
||||
} else if (nodeId === EsRevisionPlanActivityReportNodes.contactEnterEs.value) {
|
||||
// 工作组联络人 线下收集,填写计划内容(可跳过)
|
||||
this.currentNode = 3
|
||||
} else if (taskName === taskNameConstant.COLLECT_LEADER_APPROVAL) {
|
||||
} else if (nodeId === EsRevisionPlanActivityReportNodes.contactLeaderApproval.value) {
|
||||
// 收集联络人主管级领导审批
|
||||
this.currentNode = 4
|
||||
} else if (taskName === taskNameConstant.CONTACT_USER_COLLECT) {
|
||||
} else if (nodeId === EsRevisionPlanActivityReportNodes.contactsApproval.value) {
|
||||
// 各部所联络人汇总
|
||||
this.currentNode = 5
|
||||
} else if (taskName === taskNameConstant.CONTACT_USER_LEADER_APPROVAL) {
|
||||
} else if (nodeId === EsRevisionPlanActivityReportNodes.contactLeaderLeaderApproval.value) {
|
||||
// 联络人主管级上级领导审批
|
||||
this.currentNode = 6
|
||||
} else if (taskName === taskNameConstant.STANDARD_ENGINEER_COLLECT) {
|
||||
} else if (nodeId === EsRevisionPlanActivityReportNodes.standardizationSumUp.value) {
|
||||
// 标准化工程师归档
|
||||
this.currentNode = 7
|
||||
} else {
|
||||
@@ -235,9 +216,32 @@ export default {
|
||||
this.currentNode = 999
|
||||
}
|
||||
}
|
||||
// 如果不是第一个节点,人员信息全部不可选
|
||||
if (this.currentNode !== 1) {
|
||||
this.initPersonInfoData()
|
||||
// 获取人员信息结构
|
||||
this.getPersonInfoStructure(ProcessKey.ES_ANNUAL_REPORT.value, () => {
|
||||
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 {
|
||||
this.currentNodeName = '发起人发起'
|
||||
}
|
||||
// 如果是查看进入的,不可编辑,不可操作
|
||||
if (this.$route.query.onlyLook) {
|
||||
@@ -247,6 +251,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
ProcessKey,
|
||||
switchValue: 'base',
|
||||
loading: false,
|
||||
processInfoForm: this.$form.createForm(this),
|
||||
@@ -301,15 +306,26 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getProcessData (taskId) {
|
||||
activelyReportGetDataById(taskId).then(res => {
|
||||
getProcessData (type, param) {
|
||||
let func
|
||||
let params = {}
|
||||
if (type === 'todo') {
|
||||
func = activelyReportGetDataById
|
||||
params = param.taskId
|
||||
} else {
|
||||
func = activelyReportGetDataDraft
|
||||
params = param
|
||||
}
|
||||
func(params).then(res => {
|
||||
if (res.success) {
|
||||
this.model = res.result
|
||||
this.$nextTick(() => {
|
||||
// 初始化流程信息,节点1没有制修订计划说明,其余节点都有制修订计划说明
|
||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes', 'processDescription'))
|
||||
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
||||
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
|
||||
// 初始化流程审批信息,草稿进来的才回显审批信息
|
||||
if (type === 'draft') {
|
||||
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
|
||||
}
|
||||
})
|
||||
// 初始化业务基本信息
|
||||
if (this.currentNode === 1) {
|
||||
|
||||
+50
-46
@@ -149,12 +149,12 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="decadeCode">
|
||||
<!--@change="decadeCodeChange"-->
|
||||
<j-date show-type="year"
|
||||
v-model="formInline.decadeCode"
|
||||
:default-value="yearNumberDefaultValue"
|
||||
date-format="YYYY"
|
||||
:disabled="disabled"
|
||||
@change="decadeCodeChange"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -538,7 +538,7 @@ import UploadFile from '@/components/UploadFile'
|
||||
import { getTreeList } from '@/api/enterpriseStandardLibraryApi'
|
||||
import Vue from 'vue'
|
||||
import { USER_INFO } from '@/store/mutation-types'
|
||||
import { getEnStandardNo } from '@/api/workCenter'
|
||||
// import { getEnStandardNo } from '@/api/workCenter'
|
||||
import TreeSelection from '@/components/selection/TreeSelection'
|
||||
|
||||
export default {
|
||||
@@ -734,18 +734,18 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 企业标准代号
|
||||
'formInline.enStandardCode' (value) {
|
||||
this.getEnStandardNo()
|
||||
},
|
||||
// 企业名称代号
|
||||
'formInline.enNameCode' (value) {
|
||||
this.getEnStandardNo()
|
||||
},
|
||||
// 标准类别代号
|
||||
'formInline.standardCategoryCode' (value) {
|
||||
this.getEnStandardNo()
|
||||
}
|
||||
// // 企业标准代号
|
||||
// 'formInline.enStandardCode' (value) {
|
||||
// this.getEnStandardNo()
|
||||
// },
|
||||
// // 企业名称代号
|
||||
// 'formInline.enNameCode' (value) {
|
||||
// this.getEnStandardNo()
|
||||
// },
|
||||
// // 标准类别代号
|
||||
// 'formInline.standardCategoryCode' (value) {
|
||||
// this.getEnStandardNo()
|
||||
// }
|
||||
},
|
||||
mounted () {
|
||||
this.getWorkGroupTree()
|
||||
@@ -789,39 +789,39 @@ export default {
|
||||
this.disabled = true
|
||||
},
|
||||
// watch监视年代号会滞后
|
||||
decadeCodeChange (value) {
|
||||
this.getEnStandardNo()
|
||||
},
|
||||
// decadeCodeChange (value) {
|
||||
// this.getEnStandardNo()
|
||||
// },
|
||||
// 根据三个代号和一个年代号获取企标编号
|
||||
getEnStandardNo () {
|
||||
// 如果是制定根据填的三个代号和一个年代号获取
|
||||
if (this.formInline.projectType === ProjectType.ENACT.value) {
|
||||
if (!this.formInline.enStandardCode || !this.formInline.enNameCode ||
|
||||
!this.formInline.standardCategoryCode || !this.formInline.decadeCode) {
|
||||
return
|
||||
}
|
||||
const param = {}
|
||||
param.enStandardCode = this.formInline.enStandardCode
|
||||
param.enNameCode = this.formInline.enNameCode
|
||||
param.standardCategoryCode = this.formInline.standardCategoryCode
|
||||
param.decadeCode = this.formInline.decadeCode
|
||||
getEnStandardNo(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$set(this.formInline, 'newEnStandardNo', res.message)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// 是修订,通过选中的企标编号和年代号拼接新企标编号
|
||||
if (this.formInline.originEnStandardNo && this.formInline.decadeCode) {
|
||||
const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode
|
||||
this.$set(this.formInline, 'newEnStandardNo', standardNo)
|
||||
this.$forceUpdate()
|
||||
// 返回流程名称
|
||||
this.returnProcessName()
|
||||
}
|
||||
}
|
||||
},
|
||||
// getEnStandardNo () {
|
||||
// // 如果是制定根据填的三个代号和一个年代号获取
|
||||
// if (this.formInline.projectType === ProjectType.ENACT.value) {
|
||||
// if (!this.formInline.enStandardCode || !this.formInline.enNameCode ||
|
||||
// !this.formInline.standardCategoryCode || !this.formInline.decadeCode) {
|
||||
// return
|
||||
// }
|
||||
// const param = {}
|
||||
// param.enStandardCode = this.formInline.enStandardCode
|
||||
// param.enNameCode = this.formInline.enNameCode
|
||||
// param.standardCategoryCode = this.formInline.standardCategoryCode
|
||||
// param.decadeCode = this.formInline.decadeCode
|
||||
// getEnStandardNo(param).then(res => {
|
||||
// if (res.success) {
|
||||
// this.$set(this.formInline, 'newEnStandardNo', res.message)
|
||||
// this.$forceUpdate()
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// // 是修订,通过选中的企标编号和年代号拼接新企标编号
|
||||
// if (this.formInline.originEnStandardNo && this.formInline.decadeCode) {
|
||||
// const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode
|
||||
// this.$set(this.formInline, 'newEnStandardNo', standardNo)
|
||||
// this.$forceUpdate()
|
||||
// // 返回流程名称
|
||||
// this.returnProcessName()
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// 获取标准体系下拉框数据
|
||||
initStandardSystemOptions () {
|
||||
getTreeList({ option: 1 }).then(res => {
|
||||
@@ -849,6 +849,10 @@ export default {
|
||||
return item
|
||||
})
|
||||
},
|
||||
// 零部件名称选择完成的回调
|
||||
treeSelectNameChange (value, fieldName) {
|
||||
this.formInline[fieldName + '_dictText'] = value
|
||||
},
|
||||
// 授权部门返回参数
|
||||
authDeptBack (value) {
|
||||
this.formInline.authDept_dictText = value.map(item => item.text).join(',')
|
||||
|
||||
@@ -278,10 +278,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initData (data) {
|
||||
console.log('--------initData---------', data)
|
||||
// 给表格赋值
|
||||
this.$nextTick(() => {
|
||||
this.dataSource = data.dataList
|
||||
})
|
||||
this.dataSource = data.dataList
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
|
||||
@@ -40,7 +40,10 @@ export default {
|
||||
methods: {
|
||||
getPersonInfoStructure (key) {
|
||||
const param = {}
|
||||
param.processDefinitionKey = key
|
||||
// param.processDefinitionKey = key
|
||||
if (this.$route.query.processDefinitionId) {
|
||||
param.processDefinitionId = this.$route.query.processDefinitionId
|
||||
}
|
||||
if (this.$route.query.processInstanceId) {
|
||||
param.processInstanceId = this.$route.query.processInstanceId
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
path: '/workCenter/processCenter/detail/processDetail',
|
||||
query: {
|
||||
processKey: processKey,
|
||||
processInstanceId: record.processInstanceId
|
||||
processDefinitionId: record.processDefinitionId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -257,6 +257,7 @@ export default {
|
||||
path: '/workCenter/processCenter/detail/processDetail',
|
||||
query: {
|
||||
processKey: processKey,
|
||||
processDefinitionId: record.processDefinitionId,
|
||||
processInstanceId: record.processInstanceId
|
||||
}
|
||||
})
|
||||
|
||||
@@ -266,7 +266,7 @@ export default {
|
||||
path: '/workCenter/processCenter/detail/processDetail',
|
||||
query: {
|
||||
processKey: processKey,
|
||||
processInstanceId: record.processInstanceId
|
||||
processDefinitionId: record.processDefinitionId
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user