[update 查看详情] 会后管理流程
This commit is contained in:
@@ -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="!disabled">
|
||||||
<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' : ''"
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
<!-- 业务基本信息 -->
|
<!-- 业务基本信息 -->
|
||||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||||
|
|
||||||
<base-info-form ref="baseInfoForm" :disabled="currentNode !== PostMeetingManage.initiate.value" :current-node="currentNode"/>
|
<base-info-form ref="baseInfoForm" :disabled="(currentNode !== PostMeetingManage.initiate.value) || disabled" :current-node="currentNode"/>
|
||||||
|
|
||||||
<!-- 流程审批信息 -->
|
<!-- 流程审批信息 -->
|
||||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||||
@@ -67,12 +67,13 @@
|
|||||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
|
||||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
|
:disabled="disabled"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
v-decorator="['commitText', validatorRules.remarks]" />
|
v-decorator="['commitText', validatorRules.remarks]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!--附件-->
|
<!--附件-->
|
||||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
||||||
<j-upload v-decorator="['commitFile']" return-id multiple />
|
<j-upload v-decorator="['commitFile']" return-id multiple :disabled="disabled" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -85,7 +86,7 @@
|
|||||||
</process-detail-list>
|
</process-detail-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detail-page-bottom-operate-box">
|
<div class="detail-page-bottom-operate-box" v-if="!disabled">
|
||||||
<!--未参加-->
|
<!--未参加-->
|
||||||
<a-button v-if="btn.includes('uncommitted')" type="primary" :loading="loading" @click="handleUncommitted" ghost>{{ $t('workCenter.postMeetingManageProcess.uncommitted') }}</a-button>
|
<a-button v-if="btn.includes('uncommitted')" type="primary" :loading="loading" @click="handleUncommitted" ghost>{{ $t('workCenter.postMeetingManageProcess.uncommitted') }}</a-button>
|
||||||
<!--转办-->
|
<!--转办-->
|
||||||
@@ -108,12 +109,12 @@ import InternalDetailPage from '@comp/InternalDetailPage'
|
|||||||
import BaseInfoForm from '@views/workCenter/postMeetingManageProcess/modules/BaseInfoForm'
|
import BaseInfoForm from '@views/workCenter/postMeetingManageProcess/modules/BaseInfoForm'
|
||||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||||
import UserSelectModal from '@comp/selection/UserSelectModal'
|
import UserSelectModal from '@comp/selection/UserSelectModal'
|
||||||
import { ApprovalOpinions, PostMeetingManage, ProcessKey } from '@/enums/commonEnums'
|
import { ApprovalOpinions, PostMeetingManage, ProcessKey, ProcessType } from '@/enums/commonEnums'
|
||||||
import {
|
import {
|
||||||
approvalPostMeetingManage,
|
approvalPostMeetingManage, getLookData,
|
||||||
getPostMeetingManageDataById,
|
getPostMeetingManageDataById,
|
||||||
getPostMeetingManageDetail,
|
getPostMeetingManageDetail,
|
||||||
getPostMeetingManageProjectId, savePostMeetingManage, startPostMeetingManage, transferPostMeetingManage
|
getPostMeetingManageProjectId, savePostMeetingManage, saveSnapShot, startPostMeetingManage, transferPostMeetingManage
|
||||||
} from '@api/workCenter'
|
} from '@api/workCenter'
|
||||||
|
|
||||||
const tabList = ['base', 'user']
|
const tabList = ['base', 'user']
|
||||||
@@ -127,7 +128,7 @@ export default {
|
|||||||
isShowProcessInfo: true,
|
isShowProcessInfo: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
switchValue: 'base',
|
switchValue: 'base',
|
||||||
disabled: false,
|
disabled: false, // 禁用全部
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 4 }
|
sm: { span: 4 }
|
||||||
@@ -204,7 +205,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
const { projectId, nodeId, taskName } = this.$route.query
|
const { projectId, nodeId, taskName, isLook } = this.$route.query
|
||||||
|
this.disabled = isLook === '1'
|
||||||
// 发起、草稿进来没有nodeId,就默认发起节点
|
// 发起、草稿进来没有nodeId,就默认发起节点
|
||||||
this.currentNode = nodeId || PostMeetingManage.initiate.value
|
this.currentNode = nodeId || PostMeetingManage.initiate.value
|
||||||
this.currentNodeName = taskName || PostMeetingManage.initiate.text
|
this.currentNodeName = taskName || PostMeetingManage.initiate.text
|
||||||
@@ -215,6 +217,11 @@ export default {
|
|||||||
// 提交按钮
|
// 提交按钮
|
||||||
this.btn = ['submit']
|
this.btn = ['submit']
|
||||||
}
|
}
|
||||||
|
// 快照回显
|
||||||
|
if (this.$route.query.snapshotId) {
|
||||||
|
this.loadSnapshotPage()
|
||||||
|
return
|
||||||
|
}
|
||||||
// 查询人员信息
|
// 查询人员信息
|
||||||
this.getPersonInfoStructure(this.processKey, () => {
|
this.getPersonInfoStructure(this.processKey, () => {
|
||||||
this.initPersonInfoData(this.isInitiate)
|
this.initPersonInfoData(this.isInitiate)
|
||||||
@@ -365,6 +372,8 @@ export default {
|
|||||||
// 保存清空校验
|
// 保存清空校验
|
||||||
this.approvalInfoForm.validateFields(['commitText'], { force: true }, () => {})
|
this.approvalInfoForm.validateFields(['commitText'], { force: true }, () => {})
|
||||||
}
|
}
|
||||||
|
// 保存一下所有表单收集的数据用于快照回显
|
||||||
|
params.formDataList = formDataList
|
||||||
|
|
||||||
// 收集人员信息
|
// 收集人员信息
|
||||||
const personInfo = this.getPersonInfo(isValidate && !flag)
|
const personInfo = this.getPersonInfo(isValidate && !flag)
|
||||||
@@ -406,7 +415,9 @@ export default {
|
|||||||
// 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了)
|
// 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了)
|
||||||
personInfo: this.$refs.personnelInfo.getDataObj(),
|
personInfo: this.$refs.personnelInfo.getDataObj(),
|
||||||
// 业务数据,用于强制撤回后回显
|
// 业务数据,用于强制撤回后回显
|
||||||
draftData: params.processMeetingManage
|
draftData: params.processMeetingManage,
|
||||||
|
// 将流程数据保存json,后续进行快照回显
|
||||||
|
prcData: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -416,6 +427,65 @@ export default {
|
|||||||
}
|
}
|
||||||
return params
|
return params
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 保存快照信息
|
||||||
|
*/
|
||||||
|
saveSnapShotInfo (prcParams) {
|
||||||
|
// 没有taskId就不保存
|
||||||
|
if (!this.$route.query.taskId) {
|
||||||
|
return Promise.resolve({ success: true })
|
||||||
|
}
|
||||||
|
const { processAll = {}, processApprovalRecord = {} } = prcParams
|
||||||
|
const params = Object.assign({}, {
|
||||||
|
taskId: this.$route.query.taskId,
|
||||||
|
pcrType: ProcessType.POST_MEETING_MANAGE.value,
|
||||||
|
// 流程信息
|
||||||
|
prcName: processAll.prcName,
|
||||||
|
processDueDate: processAll.dueTime,
|
||||||
|
processDescription: processAll.prcMes,
|
||||||
|
// 流程审批信息
|
||||||
|
handleText: processApprovalRecord.commitText,
|
||||||
|
handleFile: processApprovalRecord.commitFile,
|
||||||
|
// 流程json字符串存储全部信息
|
||||||
|
infoJsonStr: JSON.stringify({
|
||||||
|
// 人员信息
|
||||||
|
personInfo: this.$refs.personnelInfo.getDataObj(),
|
||||||
|
// 流程信息
|
||||||
|
prcData: prcParams
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return saveSnapShot(params)
|
||||||
|
},
|
||||||
|
// 回显快照页面
|
||||||
|
loadSnapshotPage () {
|
||||||
|
const { snapshotId } = this.$route.query
|
||||||
|
if (!snapshotId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
getLookData({ snapshotId }).then(res => {
|
||||||
|
const result = res.result || {}
|
||||||
|
const jsonData = JSON.parse(result.infoJsonStr || '{}')
|
||||||
|
const prcData = jsonData.prcData || {}
|
||||||
|
this.info = prcData
|
||||||
|
this.processInfoForm && this.processInfoForm.setFieldsValue({
|
||||||
|
prcName: prcData.processAll.prcName,
|
||||||
|
dueTime: prcData.processAll.dueTime,
|
||||||
|
prcMes: prcData.processAll.prcMes
|
||||||
|
})
|
||||||
|
this.approvalInfoForm && this.approvalInfoForm.setFieldsValue({
|
||||||
|
commitText: prcData.processApprovalRecord.commitText,
|
||||||
|
commitFile: prcData.processApprovalRecord.commitFile
|
||||||
|
})
|
||||||
|
// 保存并回显表单信息
|
||||||
|
this.formInfo = prcData.processMeetingManage
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.baseInfoForm.initData(prcData.processMeetingManage)
|
||||||
|
})
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 转办弹框
|
* 转办弹框
|
||||||
*/
|
*/
|
||||||
@@ -513,20 +583,26 @@ export default {
|
|||||||
handleAgree (isSubmitBtn) {
|
handleAgree (isSubmitBtn) {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.getPageParams().then(res => {
|
this.getPageParams().then(params => {
|
||||||
// 同意和提交一直传true
|
// 同意和提交一直传true
|
||||||
res.map.pass = true
|
params.map.pass = true
|
||||||
res.notAttend = false
|
params.notAttend = false
|
||||||
// 不是提交按钮
|
// 不是提交按钮
|
||||||
if (isSubmitBtn !== true) {
|
if (isSubmitBtn !== true) {
|
||||||
// 没有填写注释,就默认同意
|
// 没有填写注释,就默认同意
|
||||||
if (!res.processApprovalRecord.commitText) {
|
if (!params.processApprovalRecord.commitText) {
|
||||||
res.processApprovalRecord.commitText = '同意'
|
params.processApprovalRecord.commitText = '同意'
|
||||||
}
|
}
|
||||||
// 审批意见
|
// 审批意见
|
||||||
res.processApprovalRecord.commitFlag = ApprovalOpinions.AGREE.value
|
params.processApprovalRecord.commitFlag = ApprovalOpinions.AGREE.value
|
||||||
}
|
}
|
||||||
return approvalPostMeetingManage(res)
|
return this.saveSnapShotInfo(params).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
return approvalPostMeetingManage(params)
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
})
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
|||||||
Reference in New Issue
Block a user