[update] 年度制修订计划主动上报流程查看详情
This commit is contained in:
+233
-26
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
|
||||
<!-- 标题右侧tab -->
|
||||
<template v-slot:titleRightCustom>
|
||||
<template v-slot:titleRightCustom v-if="!isLook">
|
||||
<div class="table-operator-tab">
|
||||
<!-- 基础信息 -->
|
||||
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
|
||||
@@ -23,7 +23,7 @@
|
||||
<!-- 流程名称 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')" :colon="formItemColon">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
||||
:disabled="disabled || processInfoDisabled"
|
||||
:disabled="disabled || processInfoDisabled || isLook"
|
||||
:maxLength="50"
|
||||
v-decorator="['prcName', validatorRules.prcName]" />
|
||||
</a-form-item>
|
||||
@@ -33,7 +33,7 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')" :colon="formItemColon">
|
||||
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
||||
style="width: 100%"
|
||||
:disabled="disabled || processInfoDisabled"
|
||||
:disabled="disabled || processInfoDisabled || isLook"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-decorator="['dueTime']" />
|
||||
</a-form-item>
|
||||
@@ -44,7 +44,7 @@
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
:disabled="disabled || processInfoDisabled"
|
||||
:disabled="disabled || processInfoDisabled || isLook"
|
||||
v-decorator="['prcMes']" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -64,19 +64,19 @@
|
||||
<!-- 业务基本信息 -->
|
||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||
<!-- 节点1、标准工程师发起的基本信息表单 -->
|
||||
<engineer-init-form v-if="currentNode === 1" ref="baseInfoFormRef"></engineer-init-form>
|
||||
<engineer-init-form v-if="currentNode === 1" ref="baseInfoFormRef" :disabled="isLook"></engineer-init-form>
|
||||
<!-- 节点2、各部所联络人填写/下发任务 -->
|
||||
<contact-enter-send-task-form v-else-if="currentNode === 2" ref="baseInfoFormRef"></contact-enter-send-task-form>
|
||||
<contact-enter-send-task-form v-else-if="currentNode === 2" ref="baseInfoFormRef" :disabled="isLook"></contact-enter-send-task-form>
|
||||
<!-- 节点3、工作组、所联络人填写企标-->
|
||||
<contact-enter-standard-form v-else-if="currentNode === 3" ref="baseInfoFormRef"></contact-enter-standard-form>
|
||||
<contact-enter-standard-form v-else-if="currentNode === 3" ref="baseInfoFormRef" :disabled="isLook"></contact-enter-standard-form>
|
||||
<!-- 节点4、收集联络人主管级领导审批 只有表格,不能操作 -->
|
||||
<only-table-form v-else-if="currentNode === 4" disabled noOperColumn ref="baseInfoFormRef"></only-table-form>
|
||||
<!-- 节点5、各部所联络人汇总 只有表格,可操作 -->
|
||||
<only-table-form v-else-if="currentNode === 5" ref="baseInfoFormRef" :currentNode="5"></only-table-form>
|
||||
<only-table-form v-else-if="currentNode === 5" ref="baseInfoFormRef" :disabled="isLook" :currentNode="5"></only-table-form>
|
||||
<!-- 节点6、联络人主管级上一级领导审批 表格不可操作,可以查看详情 -->
|
||||
<only-table-form v-else-if="currentNode === 6" :onlyCanLook="true" ref="baseInfoFormRef"></only-table-form>
|
||||
<only-table-form v-else-if="currentNode === 6" :onlyCanLook="true" ref="baseInfoFormRef" :disabled="isLook"></only-table-form>
|
||||
<!-- 节点7、标准化工程师归档 表格不可新增,可以编辑和删除 -->
|
||||
<only-table-form v-else-if="currentNode === 7" disabled :editAndDelete="true" ref="baseInfoFormRef"></only-table-form>
|
||||
<only-table-form v-else-if="currentNode === 7" disabled :editAndDelete="!isLook" ref="baseInfoFormRef"></only-table-form>
|
||||
|
||||
<!-- 流程审批信息 -->
|
||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||
@@ -86,11 +86,12 @@
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
:disabled="isLook"
|
||||
v-decorator="['commitText', validatorRules.commitText]" />
|
||||
</a-form-item>
|
||||
<!--附件-->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('attach')" :colon="formItemColon">
|
||||
<j-upload v-decorator="['commitFile']" return-id multiple />
|
||||
<j-upload v-decorator="['commitFile']" return-id multiple :disabled="isLook" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</div>
|
||||
@@ -103,7 +104,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="detail-page-bottom-operate-box">
|
||||
<div v-if="!isLook" class="detail-page-bottom-operate-box">
|
||||
<!-- 发起节点 -->
|
||||
<template v-if="currentNode === 1">
|
||||
<!-- 保存 -->
|
||||
@@ -157,11 +158,13 @@ import {
|
||||
activelyReportAgree,
|
||||
activelyReportReject,
|
||||
activelyReportGetDataById,
|
||||
activelyReportGetDataDraft
|
||||
activelyReportGetDataDraft,
|
||||
saveSnapShot,
|
||||
getLookData
|
||||
} from '@/api/workCenter'
|
||||
import pick from 'lodash.pick'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
import { ProcessKey, EsRevisionPlanActivityReportNodes } from '@/enums/commonEnums'
|
||||
import { ProcessKey, EsRevisionPlanActivityReportNodes, ProcessType } from '@/enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'RevisionPlanActivelyReportFlow',
|
||||
@@ -229,13 +232,22 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
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.isLook + '' === '1') {
|
||||
// 是查看
|
||||
this.isLook = true
|
||||
// 人员信息全部不可选
|
||||
this.initPersonInfoData(false)
|
||||
// 查询数据
|
||||
this.getProcessData('look', { snapshotId: this.$route.query.snapshotId })
|
||||
} else {
|
||||
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) {
|
||||
// 说明是已发起流程
|
||||
@@ -301,7 +313,8 @@ export default {
|
||||
url: {
|
||||
list: '' // 人员信息右侧表的分页查询接口
|
||||
},
|
||||
model: {}
|
||||
model: {},
|
||||
isLook: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -311,6 +324,9 @@ export default {
|
||||
if (type === 'todo') {
|
||||
func = activelyReportGetDataById
|
||||
params = param.taskId
|
||||
} else if (type === 'look') {
|
||||
func = getLookData
|
||||
params = param
|
||||
} else {
|
||||
func = activelyReportGetDataDraft
|
||||
params = param
|
||||
@@ -511,6 +527,186 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取快照json
|
||||
getParamJsonStr () {
|
||||
// 流程信息表单
|
||||
const processInfoForm = this.processInfoForm.getFieldsValue()
|
||||
// 流程审批信息
|
||||
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
|
||||
// 人员信息的数据, 处理成对象
|
||||
const personnelObj = this.$refs.personnelInfo.getDataObj()
|
||||
let infoJsonStr = ''
|
||||
// 业务基本信息
|
||||
const ruleForm = this.$refs.baseInfoFormRef.getData()
|
||||
if (this.currentNode === 1) {
|
||||
// 只有表单
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: [ruleForm.formInline],
|
||||
personnelObj: personnelObj
|
||||
})
|
||||
} else if (this.currentNode === 2) {
|
||||
if (ruleForm.dataSource && ruleForm.dataSource.length > 0) {
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: ruleForm.dataSource.map(item => {
|
||||
return { ...item, ...ruleForm.formInline }
|
||||
}),
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
} else {
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: [ruleForm.formInline],
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
}
|
||||
} else if (this.currentNode === 3) {
|
||||
// 业务基本信息有表单也有表格
|
||||
if (ruleForm.dataSource && ruleForm.dataSource.length > 0) {
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: ruleForm.dataSource.map(item => {
|
||||
return { ...item, ...ruleForm.formInline }
|
||||
}),
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
} else {
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: [ruleForm.formInline],
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
}
|
||||
} else if (this.currentNode === 5) {
|
||||
// 业务基础信息中只有表格
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: ruleForm.dataSource,
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
} else {
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
// 业务基础信息中只有表格
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: ruleForm.dataSource,
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
}
|
||||
return infoJsonStr
|
||||
},
|
||||
// 保存快照
|
||||
saveParamJsonStr () {
|
||||
// 流程信息表单
|
||||
const processInfoForm = this.processInfoForm.getFieldsValue()
|
||||
// 流程审批信息
|
||||
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
|
||||
// 人员信息的数据, 处理成对象
|
||||
const personnelObj = this.$refs.personnelInfo.getDataObj()
|
||||
const params = { ...processInfoForm, ...approvalInfoForm }
|
||||
let infoJsonStr = ''
|
||||
// 业务基本信息
|
||||
const ruleForm = this.$refs.baseInfoFormRef.getData()
|
||||
if (this.currentNode === 1) {
|
||||
// 只有表单
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: [ruleForm.formInline],
|
||||
personnelObj: personnelObj
|
||||
})
|
||||
} else if (this.currentNode === 2) {
|
||||
if (ruleForm.dataSource && ruleForm.dataSource.length > 0) {
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: ruleForm.dataSource.map(item => {
|
||||
return { ...item, ...ruleForm.formInline }
|
||||
}),
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
} else {
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: [ruleForm.formInline],
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
}
|
||||
} else if (this.currentNode === 3) {
|
||||
// 业务基本信息有表单也有表格
|
||||
if (ruleForm.dataSource && ruleForm.dataSource.length > 0) {
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: ruleForm.dataSource.map(item => {
|
||||
return { ...item, ...ruleForm.formInline }
|
||||
}),
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
} else {
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: [ruleForm.formInline],
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
}
|
||||
} else if (this.currentNode === 5) {
|
||||
// 业务基础信息中只有表格
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: ruleForm.dataSource,
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
} else {
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
// 业务基础信息中只有表格
|
||||
infoJsonStr = JSON.stringify({
|
||||
basicProcessInfoDTO: processInfoForm,
|
||||
basicTaskInfoDTO: approvalInfoForm,
|
||||
dataList: ruleForm.dataSource,
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
}
|
||||
params.infoJsonStr = infoJsonStr
|
||||
params.taskId = this.$route.query.taskId
|
||||
params.prcType = ProcessType.ES_ANNUAL_REPORT.value
|
||||
saveSnapShot(params).then(res => {
|
||||
if (!res.success) {
|
||||
console.log(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 节点一时候的提交,发起变更
|
||||
handleStart () {
|
||||
if (this.loading) return
|
||||
@@ -542,10 +738,15 @@ export default {
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
} else {
|
||||
func = activelyReportApproval
|
||||
// 快照JSON
|
||||
param.common.infoJsonStr = this.getParamJsonStr()
|
||||
}
|
||||
func(param).then(res => {
|
||||
func(param).then(async res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
if (this.$route.query.taskId) {
|
||||
await this.saveParamJsonStr()
|
||||
}
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
@@ -609,9 +810,11 @@ export default {
|
||||
}
|
||||
param.common = approvalValues
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
activelyReportAgree(param).then(res => {
|
||||
activelyReportAgree(param).then(async res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
// 保存快照
|
||||
await this.saveParamJsonStr()
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
@@ -636,9 +839,11 @@ export default {
|
||||
const param = {}
|
||||
param.common = Object.assign({}, values)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
activelyReportAgree(param).then(res => {
|
||||
activelyReportAgree(param).then(async res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
// 保存快照
|
||||
await this.saveParamJsonStr()
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
@@ -663,9 +868,11 @@ export default {
|
||||
const param = {}
|
||||
param.common = Object.assign({}, values)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
activelyReportReject(param).then(res => {
|
||||
activelyReportReject(param).then(async res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
// 保存快照
|
||||
await this.saveParamJsonStr()
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="distributeFlag">
|
||||
<a-radio-group v-model="formInline.distributeFlag">
|
||||
<a-radio-group v-model="formInline.distributeFlag" :disabled="disabled">
|
||||
<a-radio value="1">
|
||||
{{ $t('yes') }}
|
||||
</a-radio>
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
</a-form-model>
|
||||
|
||||
<!-- 表格 -->
|
||||
<only-table-form ref="tableRef"></only-table-form>
|
||||
<only-table-form ref="tableRef" :disabled="disabled"></only-table-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user