[update] 企标封存流程的查看详情
This commit is contained in:
+87
-19
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
|
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
|
||||||
<!-- 标题右侧tab -->
|
<!-- 标题右侧tab -->
|
||||||
<template v-slot:titleRightCustom>
|
<template v-slot:titleRightCustom v-if="!isLook">
|
||||||
<div class="table-operator-tab">
|
<div class="table-operator-tab">
|
||||||
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
|
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
|
||||||
@click="switchChange('base')">{{ $t('basicInformation') }}
|
@click="switchChange('base')">{{ $t('basicInformation') }}
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')" :colon="formItemColon">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')" :colon="formItemColon">
|
||||||
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="disabled"
|
:disabled="disabled || isLook"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
v-decorator="['dueTime']" />
|
v-decorator="['dueTime']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
:disabled="disabled"
|
:disabled="disabled || isLook"
|
||||||
v-decorator="['prcMes']" />
|
v-decorator="['prcMes']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<!-- 业务基本信息 -->
|
<!-- 业务基本信息 -->
|
||||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||||
<!-- 节点1、发起人发起 -->
|
<!-- 节点1、发起人发起 -->
|
||||||
<base-info-form v-if="currentNode === 1" ref="baseInfoRef" @processNameChange="processNameChange"></base-info-form>
|
<base-info-form v-if="currentNode === 1" ref="baseInfoRef" :disabled="isLook" @processNameChange="processNameChange"></base-info-form>
|
||||||
<!-- 节点2、相关人员会签 -->
|
<!-- 节点2、相关人员会签 -->
|
||||||
<!-- 节点3、起草人和会签人主管级领导审批 -->
|
<!-- 节点3、起草人和会签人主管级领导审批 -->
|
||||||
<!-- 节点4、标准化审批 -->
|
<!-- 节点4、标准化审批 -->
|
||||||
@@ -66,11 +66,12 @@
|
|||||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
|
:disabled="isLook"
|
||||||
v-decorator="['commitText', validatorRules.commitText]" />
|
v-decorator="['commitText', validatorRules.commitText]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!--附件-->
|
<!--附件-->
|
||||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('attach')" :colon="formItemColon">
|
<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-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -81,7 +82,7 @@
|
|||||||
</process-detail-list>
|
</process-detail-list>
|
||||||
</div>
|
</div>
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<div class="detail-page-bottom-operate-box">
|
<div v-if="!isLook" class="detail-page-bottom-operate-box">
|
||||||
<!-- 发起节点 -->
|
<!-- 发起节点 -->
|
||||||
<template v-if="currentNode === 1">
|
<template v-if="currentNode === 1">
|
||||||
<!-- 保存 -->
|
<!-- 保存 -->
|
||||||
@@ -119,11 +120,13 @@ import {
|
|||||||
enStandardSealSaveTurnTo,
|
enStandardSealSaveTurnTo,
|
||||||
enStandardSealSaveAgree,
|
enStandardSealSaveAgree,
|
||||||
enStandardSealSaveReject,
|
enStandardSealSaveReject,
|
||||||
enStandardSealSaveGetDataDraft
|
enStandardSealSaveGetDataDraft,
|
||||||
|
saveSnapShot,
|
||||||
|
getLookData
|
||||||
} 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, EsSealSaveNodes } from '@/enums/commonEnums'
|
import { ProcessKey, EsSealSaveNodes, ProcessType } from '@/enums/commonEnums'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EnterpriseStandardSealSaveFlow',
|
name: 'EnterpriseStandardSealSaveFlow',
|
||||||
@@ -175,13 +178,22 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (this.$route.query.taskId && !this.$route.query.draftId) {
|
if (this.$route.query.isLook + '' === '1') {
|
||||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
// 是查看
|
||||||
this.getProcessData('todo', { taskId: this.$route.query.taskId })
|
this.isLook = true
|
||||||
}
|
// 人员信息全部不可选
|
||||||
if (this.$route.query.draftId) {
|
this.initPersonInfoData(false)
|
||||||
// 有草稿id,说明是从流程中心-草稿来的,需要初始化数据
|
// 查询数据
|
||||||
this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId })
|
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) {
|
if (this.$route.query.taskName) {
|
||||||
// 说明是已发起流程
|
// 说明是已发起流程
|
||||||
@@ -238,7 +250,8 @@ export default {
|
|||||||
url: {
|
url: {
|
||||||
list: '' // 人员信息的右侧表格获取接口
|
list: '' // 人员信息的右侧表格获取接口
|
||||||
},
|
},
|
||||||
onlySelectFromFlowStation: [EsSealSaveNodes.standardizationApproval.value] // 只能在标准与流程所里选人的节点
|
onlySelectFromFlowStation: [EsSealSaveNodes.standardizationApproval.value], // 只能在标准与流程所里选人的节点
|
||||||
|
isLook: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -250,6 +263,9 @@ export default {
|
|||||||
if (type === 'todo') {
|
if (type === 'todo') {
|
||||||
func = enStandardSealSaveGetDataById
|
func = enStandardSealSaveGetDataById
|
||||||
params = param.taskId
|
params = param.taskId
|
||||||
|
} else if (type === 'look') {
|
||||||
|
func = getLookData
|
||||||
|
params = param
|
||||||
} else {
|
} else {
|
||||||
func = enStandardSealSaveGetDataDraft
|
func = enStandardSealSaveGetDataDraft
|
||||||
params = param
|
params = param
|
||||||
@@ -362,6 +378,49 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 获取快照json
|
||||||
|
getParamJsonStr () {
|
||||||
|
// 流程信息表单
|
||||||
|
const processInfoForm = this.processInfoForm.getFieldsValue()
|
||||||
|
// 流程审批信息
|
||||||
|
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObj()
|
||||||
|
// 业务基本信息
|
||||||
|
const baseInfo = this.$refs.baseInfoRef.getData()
|
||||||
|
const infoJsonStr = JSON.stringify({
|
||||||
|
basicProcessInfoDTO: processInfoForm,
|
||||||
|
basicTaskInfoDTO: approvalInfoForm,
|
||||||
|
data: baseInfo.formInline,
|
||||||
|
personnelObj: personnelObj
|
||||||
|
})
|
||||||
|
return infoJsonStr
|
||||||
|
},
|
||||||
|
// 保存快照
|
||||||
|
saveParamJsonStr () {
|
||||||
|
// 流程信息表单
|
||||||
|
const processInfoForm = this.processInfoForm.getFieldsValue()
|
||||||
|
// 流程审批信息
|
||||||
|
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObj()
|
||||||
|
// 业务基本信息
|
||||||
|
const baseInfo = this.$refs.baseInfoRef.getData()
|
||||||
|
const params = { ...processInfoForm, ...approvalInfoForm }
|
||||||
|
params.infoJsonStr = JSON.stringify({
|
||||||
|
basicProcessInfoDTO: processInfoForm,
|
||||||
|
basicTaskInfoDTO: approvalInfoForm,
|
||||||
|
data: baseInfo.formInline,
|
||||||
|
personnelObj: personnelObj
|
||||||
|
})
|
||||||
|
params.taskId = this.$route.query.taskId
|
||||||
|
params.prcType = ProcessType.ES_ARCHIVE.value
|
||||||
|
saveSnapShot(params).then(res => {
|
||||||
|
if (!res.success) {
|
||||||
|
console.log(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 节点一时候的提交
|
// 节点一时候的提交
|
||||||
handleStart () {
|
handleStart () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
@@ -393,10 +452,15 @@ export default {
|
|||||||
paramObj.common.taskId = this.$route.query.taskId
|
paramObj.common.taskId = this.$route.query.taskId
|
||||||
} else {
|
} else {
|
||||||
func = enStandardSealSaveApproval
|
func = enStandardSealSaveApproval
|
||||||
|
// 快照JSON
|
||||||
|
paramObj.common.infoJsonStr = this.getParamJsonStr()
|
||||||
}
|
}
|
||||||
func(paramObj).then(res => {
|
func(paramObj).then(async res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
if (this.$route.query.taskId) {
|
||||||
|
await this.saveParamJsonStr()
|
||||||
|
}
|
||||||
this.goBack()
|
this.goBack()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
@@ -448,9 +512,11 @@ export default {
|
|||||||
const param = {}
|
const param = {}
|
||||||
param.common = Object.assign({}, values)
|
param.common = Object.assign({}, values)
|
||||||
param.common.taskId = this.$route.query.taskId
|
param.common.taskId = this.$route.query.taskId
|
||||||
enStandardSealSaveAgree(param).then(res => {
|
enStandardSealSaveAgree(param).then(async res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
// 保存快照
|
||||||
|
await this.saveParamJsonStr()
|
||||||
this.goBack()
|
this.goBack()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
@@ -475,9 +541,11 @@ export default {
|
|||||||
const param = {}
|
const param = {}
|
||||||
param.common = Object.assign({}, values)
|
param.common = Object.assign({}, values)
|
||||||
param.common.taskId = this.$route.query.taskId
|
param.common.taskId = this.$route.query.taskId
|
||||||
enStandardSealSaveReject(param).then(res => {
|
enStandardSealSaveReject(param).then(async res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
// 保存快照
|
||||||
|
await this.saveParamJsonStr()
|
||||||
this.goBack()
|
this.goBack()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
|
|||||||
Reference in New Issue
Block a user