Merge remote-tracking branch 'origin/fourthStage-snapshot' into fourthStage

# Conflicts:
#	src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue
#	src/views/workCenter/annualRevisionPlanStandardizationInit/RevisionPlanStandardizationInitFlow.vue
This commit is contained in:
lideqin
2024-08-07 16:35:09 +08:00
69 changed files with 3530 additions and 1152 deletions
+6
View File
@@ -6,6 +6,10 @@ const getProcessNodeList = (params) => getAction('/activiti/getNodeList', params
const urgeProcessNode = (params) => postAction('/workCenter/urging', params) const urgeProcessNode = (params) => postAction('/workCenter/urging', params)
// 获取taskName // 获取taskName
const queryTaskNameByTaskId = (params) => getAction('/workCenter/getByTaskId', params) const queryTaskNameByTaskId = (params) => getAction('/workCenter/getByTaskId', params)
// 流程中心-保存快照
const saveSnapShot = (params) => postAction('/workCenter/snapshotSave', params)
// 流程中心-查看-获取数据
const getLookData = (params) => getAction('/workCenter/snapshotHandle', params)
// 流程配置-部署 // 流程配置-部署
const deployWorkFlow = (params) => getAction('/activitiModel/deploy', params) const deployWorkFlow = (params) => getAction('/activitiModel/deploy', params)
@@ -448,6 +452,8 @@ export {
getProcessNodeList, getProcessNodeList,
urgeProcessNode, urgeProcessNode,
queryTaskNameByTaskId, queryTaskNameByTaskId,
saveSnapShot,
getLookData,
deployWorkFlow, deployWorkFlow,
getFlowNodeList, getFlowNodeList,
+147 -1
View File
@@ -56,6 +56,16 @@
<!-- </a-tooltip>--> <!-- </a-tooltip>-->
<!--</template>--> <!--</template>-->
<!-- 任务节点 -->
<template v-slot:taskNode="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text && record.snapshotId" class="link-a" @click="handleLookDetail(record)">{{ text }}</a>
<div v-else-if="text && !record.snapshotId" class="table-text">{{ text }}</div>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<!--审批意见--> <!--审批意见-->
<template v-slot:approvalOpinion="{text, record}"> <template v-slot:approvalOpinion="{text, record}">
<a-tooltip overlay-class-name="tooltip-style"> <a-tooltip overlay-class-name="tooltip-style">
@@ -103,6 +113,7 @@ import UploadFile from './UploadFile'
import { filterObj } from '../utils/util' import { filterObj } from '../utils/util'
import { kkFilePreview } from '../utils/kkFilePreview' import { kkFilePreview } from '../utils/kkFilePreview'
import { urgeProcessNode } from '../api/workCenter' import { urgeProcessNode } from '../api/workCenter'
import { ProcessKey } from '../enums/commonEnums'
// 支持预览的文件后缀 // 支持预览的文件后缀
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'] const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
@@ -147,6 +158,30 @@ export default {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false
},
// 是否可以点击节点名称跳转
nodeNameClick: {
type: Boolean,
required: false,
default: false
},
// 详情页从哪里点进来的(已办,已发还是监控流程)
detailFrom: {
type: String,
required: false,
default: ''
}
},
watch: {
nodeNameClick: {
immediate: true,
handler (val) {
if (val) {
this.columns[0].scopedSlots.customRender = 'taskNode'
} else {
this.columns[0].scopedSlots.customRender = 'text'
}
}
} }
}, },
computed: { computed: {
@@ -173,7 +208,8 @@ export default {
{ {
dataIndex: 'taskName', dataIndex: 'taskName',
title: this.$t('workCenter.processDetail.taskNode'), title: this.$t('workCenter.processDetail.taskNode'),
width: 150 width: 150,
scopedSlots: { customRender: 'taskNode' }
}, },
// 任务受理人 // 任务受理人
{ {
@@ -248,6 +284,10 @@ export default {
if (this.$route.query.source === 'monitorList' && this.$route.query.prcStatus === '3') { if (this.$route.query.source === 'monitorList' && this.$route.query.prcStatus === '3') {
params.finishFlagSearch = '2,3,4' params.finishFlagSearch = '2,3,4'
} }
// 是已办,已发还是监控流程的查审批记录
if (this.detailFrom) {
params.type = this.detailFrom
}
if (this.$route.query.processInstanceId) { if (this.$route.query.processInstanceId) {
params.processInstanceId = this.$route.query.processInstanceId params.processInstanceId = this.$route.query.processInstanceId
} else { } else {
@@ -372,6 +412,112 @@ export default {
} }
// 其余可预览文件仍使用KKFile进行预览 // 其余可预览文件仍使用KKFile进行预览
kkFilePreview(fileFullUrl) kkFilePreview(fileFullUrl)
},
// 跳转流程基本信息页面
handleLookDetail (record) {
let path = ''
console.log('-------processKey', this.$route.query.processKey)
// 跳转到对应流程页面
switch (this.$route.query.processKey + '') {
// 标准法规入库/变更流程
case ProcessKey.FB_ENTRY_CHANGE.value:
path = '/workCenter/StandardEntryOrChangeProcess'
break
// 标准征求意见流程
case ProcessKey.CONSULTATION.value:
path = '/workCenter/StandardConsultationProcess'
break
// 项目合规评估流程
case ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value:
path = '/workCenter/ProjectComplianceEvaluationProcess'
break
// 未符合项跟踪流程
case ProcessKey.NO_MATCH_TRACKING.value:
path = '/workCenter/NoMatchTrackingProcess'
break
// 法规合规评估流程
case ProcessKey.REGULATORY_COMPLIANCE_ASSESSMENT.value:
path = '/workCenter/StandardComplianceProcess'
break
// 法规采购流程
case ProcessKey.LEGAL_PROCUREMENT.value:
path = '/workCenter/StandardProcurementProcess'
break
// 企标立项、变更计划
case ProcessKey.ES_INIT_CHANGE.value:
path = '/workCenter/enterpriseStandardInitChange/planApprovalChangeFlow'
break
// 年度制修订计划(各部门主动上报)
case ProcessKey.ES_ANNUAL_REPORT.value:
path = '/workCenter/annualRevisionPlanActivelyReport/revisionPlanActivelyReportFlow'
break
// 年度制修订计划(标准化发起)
case ProcessKey.ES_ANNUAL_INIT.value:
path = '/workCenter/annualRevisionPlanStandardizationInit/revisionPlanStandardizationInitFlow'
break
// 企标制修订流程
case ProcessKey.ES_EDIT.value:
path = '/workCenter/enterpriseStandardRevision/enterpriseStandardRevisionFlow'
break
// 企标更改流程
case ProcessKey.ES_CHANGE.value:
path = '/workCenter/enterpriseStandardChange/enterpriseStandardChangeFlow'
break
// 企标复审流程
case ProcessKey.ES_RECHECK.value:
path = '/workCenter/enterpriseStandardRecheck/enterpriseStandardRecheckFlow'
break
// 企标废止流程
case ProcessKey.ES_ABOLISH.value:
path = '/workCenter/enterpriseStandardAnnul/enterpriseStandardAnnulFlow'
break
// 企标封存流程
case ProcessKey.ES_ARCHIVE.value:
path = '/workCenter/enterpriseStandardSealSave/enterpriseStandardSealSaveFlow'
break
// 已封存企标启用流程
case ProcessKey.ES_ENABLE.value:
path = '/workCenter/enterpriseStandardStartUse/enterpriseStandardStartUseFlow'
break
// 企标稽查计划
case ProcessKey.ES_INSPECTION_PLAN.value:
path = '/workCenter/EnterpriseStandardInspectionPlan'
break
// 企标稽查流程
case ProcessKey.ES_INSPECTION_PROCESS.value:
path = '/workCenter/EnterpriseStandardInspectionProcess'
break
// 稽查延期申请流程
case ProcessKey.INSPECTION_EXTENSION_REQUEST_PROCESS.value:
path = '/workCenter/InspectionExtensionRequestProcess'
break
// 企标稽查整改
case ProcessKey.ES_INSPECTION_RECTIFICATION.value:
path = '/workCenter/EnterpriseStandardInspectionRectification'
break
// 权限申请流程
case ProcessKey.PERMISSION_APPLY.value:
path = '/workCenter/PermissionApplicationProcess'
break
// 标准宣贯流程
case ProcessKey.STANDARD_PROMOTION.value:
path = '/workCenter/StandardPromotionProcess'
break
// 会后管理流程
case ProcessKey.POST_MEETING_MANAGE.value:
path = '/workCenter/PostMeetingManageProcess'
break
}
const query = {}
query.taskName = record.taskName
query.taskId = record.taskId // 为了不影响部分节点的导出
query.snapshotId = record.snapshotId // 快照id
query.nodeId = record.nodeId // 节点的id
query.isLook = 1
this.$router.push({
path: path,
query: query
})
} }
} }
} }
+9
View File
@@ -170,6 +170,15 @@ export const EnterpriseStandardStatus = {
ARCHIVE: { text: '封存', value: '10' } ARCHIVE: { text: '封存', value: '10' }
} }
// 流程中心-查看跳转详情需要传是已办,已发还是监控流程
export const Process = {
TO_DO: { text: '待办流程', value: 'todo' },
DONE: { text: '已办流程', value: '1' },
SENT: { text: '已发流程', value: '2' },
MONITOR: { text: '监控流程', value: '3' },
DRAFT: { text: '草稿', value: 'draft' }
}
// 流程key,获取人员信息前需要获取流程定义id,传这里的名字到WorkCenterMixin的getFlowDefinition方法中 // 流程key,获取人员信息前需要获取流程定义id,传这里的名字到WorkCenterMixin的getFlowDefinition方法中
export const ProcessKey = { export const ProcessKey = {
// 企标立项/变更计划 // 企标立项/变更计划
@@ -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' : ''"
@@ -23,7 +23,7 @@
<!-- 流程名称 --> <!-- 流程名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')" :colon="formItemColon"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')" :colon="formItemColon">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')" <a-input :placeholder="$t('pleaseEnter') + $t('processName')"
:disabled="disabled || processInfoDisabled" :disabled="disabled || processInfoDisabled || isLook"
:maxLength="50" :maxLength="50"
v-decorator="['prcName', validatorRules.prcName]" /> v-decorator="['prcName', validatorRules.prcName]" />
</a-form-item> </a-form-item>
@@ -33,7 +33,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 || processInfoDisabled" :disabled="disabled || processInfoDisabled || isLook"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['dueTime']" /> v-decorator="['dueTime']" />
</a-form-item> </a-form-item>
@@ -44,7 +44,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 || processInfoDisabled" :disabled="disabled || processInfoDisabled || isLook"
v-decorator="['prcMes']" /> v-decorator="['prcMes']" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -64,19 +64,19 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 节点1标准工程师发起的基本信息表单 --> <!-- 节点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各部所联络人填写/下发任务 --> <!-- 节点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工作组所联络人填写企标--> <!-- 节点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收集联络人主管级领导审批 只有表格,不能操作 --> <!-- 节点4收集联络人主管级领导审批 只有表格,不能操作 -->
<only-table-form v-else-if="currentNode === 4" disabled noOperColumn ref="baseInfoFormRef"></only-table-form> <only-table-form v-else-if="currentNode === 4" disabled noOperColumn ref="baseInfoFormRef"></only-table-form>
<!-- 节点5各部所联络人汇总 只有表格可操作 --> <!-- 节点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联络人主管级上一级领导审批 表格不可操作可以查看详情 --> <!-- 节点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标准化工程师归档 表格不可新增可以编辑和删除 --> <!-- 节点7标准化工程师归档 表格不可新增可以编辑和删除 -->
<only-table-form v-else-if="currentNode === 7" disabled :editAndDelete="true" canEditNewStandardNumber ref="baseInfoFormRef"></only-table-form> <only-table-form v-else-if="currentNode === 7" disabled :editAndDelete="!isLook" canEditNewStandardNumber ref="baseInfoFormRef"></only-table-form>
<!-- 流程审批信息 --> <!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -86,11 +86,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>
@@ -103,7 +104,7 @@
</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">
<!-- 保存 --> <!-- 保存 -->
@@ -157,11 +158,13 @@ import {
activelyReportAgree, activelyReportAgree,
activelyReportReject, activelyReportReject,
activelyReportGetDataById, activelyReportGetDataById,
activelyReportGetDataDraft activelyReportGetDataDraft,
saveSnapShot,
getLookData
} from '@/api/workCenter' } from '@/api/workCenter'
import pick from 'lodash.pick' import pick from 'lodash.pick'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { ProcessKey, EsRevisionPlanActivityReportNodes } from '@/enums/commonEnums' import { ProcessKey, EsRevisionPlanActivityReportNodes, ProcessType } from '@/enums/commonEnums'
export default { export default {
name: 'RevisionPlanActivelyReportFlow', name: 'RevisionPlanActivelyReportFlow',
@@ -229,13 +232,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) {
// 说明是已发起流程 // 说明是已发起流程
@@ -301,7 +313,8 @@ export default {
url: { url: {
list: '' // 人员信息右侧表的分页查询接口 list: '' // 人员信息右侧表的分页查询接口
}, },
model: {} model: {},
isLook: false
} }
}, },
methods: { methods: {
@@ -311,6 +324,9 @@ export default {
if (type === 'todo') { if (type === 'todo') {
func = activelyReportGetDataById func = activelyReportGetDataById
params = param.taskId params = param.taskId
} else if (type === 'look') {
func = getLookData
params = param
} else { } else {
func = activelyReportGetDataDraft func = activelyReportGetDataDraft
params = param params = param
@@ -511,6 +527,189 @@ 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 (callback) {
// 流程信息表单
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(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
// 节点一时候的提交,发起变更 // 节点一时候的提交,发起变更
handleStart () { handleStart () {
if (this.loading) return if (this.loading) return
@@ -542,16 +741,32 @@ export default {
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
} else { } else {
func = activelyReportApproval func = activelyReportApproval
// 快照JSON
param.common.infoJsonStr = this.getParamJsonStr()
}
if (this.$route.query.taskId) {
this.saveParamJsonStr(() => {
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
})
} else {
func(param).then(async res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} }
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
} }
@@ -609,14 +824,17 @@ export default {
} }
param.common = approvalValues param.common = approvalValues
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
activelyReportAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) activelyReportAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
@@ -636,14 +854,17 @@ 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
activelyReportAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) activelyReportAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
}) })
@@ -663,14 +884,17 @@ 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
activelyReportReject(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) activelyReportReject(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
}) })
@@ -11,7 +11,7 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="distributeFlag"> <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"> <a-radio value="1">
{{ $t('yes') }} {{ $t('yes') }}
</a-radio> </a-radio>
@@ -24,7 +24,7 @@
</a-form-model> </a-form-model>
<!-- 表格 --> <!-- 表格 -->
<only-table-form ref="tableRef"></only-table-form> <only-table-form ref="tableRef" :disabled="disabled"></only-table-form>
</div> </div>
</template> </template>
@@ -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' : ''"
@@ -23,7 +23,7 @@
<!-- 流程名称 --> <!-- 流程名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')" :colon="formItemColon"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')" :colon="formItemColon">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')" <a-input :placeholder="$t('pleaseEnter') + $t('processName')"
:disabled="disabled || processInfoDisabled" :disabled="disabled || processInfoDisabled || isLook"
:maxLength="50" :maxLength="50"
v-decorator="['prcName', validatorRules.prcName]" /> v-decorator="['prcName', validatorRules.prcName]" />
</a-form-item> </a-form-item>
@@ -33,7 +33,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 || processInfoDisabled" :disabled="disabled || processInfoDisabled || isLook"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['dueTime']" /> v-decorator="['dueTime']" />
</a-form-item> </a-form-item>
@@ -44,7 +44,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 || processInfoDisabled" :disabled="disabled || processInfoDisabled || isLook"
v-decorator="['prcMes']" /> v-decorator="['prcMes']" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -54,16 +54,16 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 节点1标准工程师发起的基本信息表单 --> <!-- 节点1标准工程师发起的基本信息表单 -->
<engineer-init-base-info v-if="[1, 3, 10].includes(currentNode)" ref="baseInfoRef" :currentNode="currentNode"></engineer-init-base-info> <engineer-init-base-info v-if="[1, 3, 10].includes(currentNode)" ref="baseInfoRef" :disabled="isLook" :currentNode="currentNode"></engineer-init-base-info>
<!-- 节点2部所联络人选取审批人 --> <!-- 节点2部所联络人选取审批人 -->
<contact-select-approver-base-info v-else-if="[2, 5].includes(currentNode)" ref="baseInfoRef" :currentNode="currentNode" @batchReject="handleBatchReject"></contact-select-approver-base-info> <contact-select-approver-base-info v-else-if="[2, 5].includes(currentNode)" ref="baseInfoRef" :disabled="isLook" :currentNode="currentNode" @batchReject="handleBatchReject"></contact-select-approver-base-info>
<!-- 节点3主起草单位主管级领导审批下发 --> <!-- 节点3主起草单位主管级领导审批下发 -->
<leader-approve-sent-base-info v-else-if="currentNode === 4" ref="baseInfoRef"></leader-approve-sent-base-info> <leader-approve-sent-base-info v-else-if="currentNode === 4" ref="baseInfoRef" :disabled="isLook"></leader-approve-sent-base-info>
<!-- 节点4主起草人填写信息 --> <!-- 节点4主起草人填写信息 -->
<!-- 节点5部所联络人汇总 --> <!-- 节点5部所联络人汇总 -->
<!-- 节点6主起草单位主管级领导批准 --> <!-- 节点6主起草单位主管级领导批准 -->
<!-- 节点7标准化归档 --> <!-- 节点7标准化归档 -->
<table-base-info v-else ref="baseInfoRef" :current-node="currentNode" :canEditNewStandardNumber="currentNode === 9"></table-base-info> <table-base-info v-else ref="baseInfoRef" :disabled="isLook" :current-node="currentNode" :canEditNewStandardNumber="currentNode === 9"></table-base-info>
<!-- 流程审批信息 --> <!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -73,11 +73,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>
@@ -90,7 +91,7 @@
</div> </div>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div class="detail-page-bottom-operate-box"> <div v-if="!isLook" class="detail-page-bottom-operate-box">
<!-- 发起节点 --> <!-- 发起节点 -->
<template v-if="[1, 3, 10].includes(currentNode)"> <template v-if="[1, 3, 10].includes(currentNode)">
<!-- 保存 --> <!-- 保存 -->
@@ -145,11 +146,13 @@ import {
standardizationInitReject, standardizationInitReject,
standardizationInitGetDataById, standardizationInitGetDataById,
standardizationInitGetDataDraft, standardizationInitGetDataDraft,
standardizationInitBatchReject standardizationInitBatchReject,
saveSnapShot,
getLookData
} from '@/api/workCenter' } from '@/api/workCenter'
import pick from 'lodash.pick' import pick from 'lodash.pick'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { ProcessKey, EsRevisionPlanStandardizationInitNodes } from '@/enums/commonEnums' import { ProcessKey, EsRevisionPlanStandardizationInitNodes, ProcessType } from '@/enums/commonEnums'
export default { export default {
name: 'RevisionPlanStandardizationInitFlow', name: 'RevisionPlanStandardizationInitFlow',
@@ -227,13 +230,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) {
// 说明是已发起流程 // 说明是已发起流程
@@ -295,7 +307,8 @@ export default {
url: { url: {
list: '' // 人员信息右侧表的分页查询接口 list: '' // 人员信息右侧表的分页查询接口
}, },
model: {} model: {},
isLook: false
} }
}, },
methods: { methods: {
@@ -305,6 +318,9 @@ export default {
if (type === 'todo') { if (type === 'todo') {
func = standardizationInitGetDataById func = standardizationInitGetDataById
params = param.taskId params = param.taskId
} else if (type === 'look') {
func = getLookData
params = param
} else { } else {
func = standardizationInitGetDataDraft func = standardizationInitGetDataDraft
params = param params = param
@@ -407,6 +423,52 @@ export default {
} }
}) })
}, },
// 获取快照json
getParamJsonStr () {
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 人员信息的数据, 处理成对象
const personnelObj = this.$refs.personnelInfo.getDataObj()
// 业务基本信息
const ruleForm = this.$refs.baseInfoRef.getData()
const infoJsonStr = JSON.stringify({
basicProcessInfoDTO: processInfoForm,
basicTaskInfoDTO: approvalInfoForm,
dataList: ruleForm.dataSource,
personnelObj: personnelObj
})
return infoJsonStr
},
// 保存快照
saveParamJsonStr (callback) {
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 人员信息的数据, 处理成对象
const personnelObj = this.$refs.personnelInfo.getDataObj()
// 业务基本信息
const ruleForm = this.$refs.baseInfoRef.getData()
const params = { ...processInfoForm, ...approvalInfoForm }
params.infoJsonStr = JSON.stringify({
basicProcessInfoDTO: processInfoForm,
basicTaskInfoDTO: approvalInfoForm,
dataList: ruleForm.dataSource,
personnelObj: personnelObj
})
params.taskId = this.$route.query.taskId
params.prcType = ProcessType.ES_ANNUAL_INIT.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
// 节点一时候的提交,发起变更 // 节点一时候的提交,发起变更
handleStart () { handleStart () {
if (this.loading) return if (this.loading) return
@@ -435,16 +497,33 @@ export default {
param.common.taskId = this.$route.query.taskId || '' param.common.taskId = this.$route.query.taskId || ''
} else { } else {
func = standardizationInitApproval func = standardizationInitApproval
// 快照JSON
param.common.infoJsonStr = this.getParamJsonStr()
}
if (this.$route.query.taskId) {
// 先保存快照再提交
this.saveParamJsonStr(() => {
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
})
} else {
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} }
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
} }
@@ -491,14 +570,17 @@ export default {
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
param.dataList = data.dataSource param.dataList = data.dataSource
this.loading = true this.loading = true
standardizationInitAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) standardizationInitAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
@@ -521,14 +603,17 @@ export default {
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
param.dataList = data.dataSource param.dataList = data.dataSource
this.loading = true this.loading = true
standardizationInitAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) standardizationInitAgree(param).then(async res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
}) })
@@ -549,14 +634,17 @@ export default {
param.common = Object.assign({}, values) param.common = Object.assign({}, values)
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
console.log(param, this.$route.query.taskId) console.log(param, this.$route.query.taskId)
standardizationInitReject(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) standardizationInitReject(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
}) })
@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 操作区域 --> <!-- 操作区域 -->
<div class="table-operator"> <div v-if="!disabled" class="table-operator">
<!-- 批量驳回 --> <!-- 批量驳回 -->
<!--<a-button icon="close" type="primary" ghost @click="batchReject">--> <!--<a-button icon="close" type="primary" ghost @click="batchReject">-->
<!-- {{ $t('batchReject') }}--> <!-- {{ $t('batchReject') }}-->
@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 操作区域 --> <!-- 操作区域 -->
<div class="table-operator"> <div v-if="!disabled" class="table-operator">
<!-- 新增 --> <!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd"> <a-button icon="plus" type="primary" @click="handleAdd">
{{ $t('newlyAdded') }} {{ $t('newlyAdded') }}
@@ -53,9 +53,9 @@
<!-- 操作栏 --> <!-- 操作栏 -->
<div slot="action" slot-scope="{record}" class="action-span-cell"> <div slot="action" slot-scope="{record}" class="action-span-cell">
<a @click="handleEdit(record)" class="table-ope-btn">{{ $t('edit') }}</a> <a v-if="!disabled" @click="handleEdit(record)" class="table-ope-btn">{{ $t('edit') }}</a>
<a-divider type="vertical" /> <a-divider v-if="!disabled" type="vertical" />
<a @click="handleDelete(record.uid)" class="table-ope-btn">{{ $t('delete') }}</a> <a v-if="!disabled" @click="handleDelete(record.uid)" class="table-ope-btn">{{ $t('delete') }}</a>
</div> </div>
</j-table> </j-table>
@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 操作区域 --> <!-- 操作区域 -->
<div class="table-operator"> <div v-if="!disabled" class="table-operator">
<!-- 批量设置主起草人 --> <!-- 批量设置主起草人 -->
<a-button icon="setting" type="primary" ghost @click="batchSetDrafter"> <a-button icon="setting" type="primary" ghost @click="batchSetDrafter">
{{ $t('workCenter.revisionPlanActivelyReport.batchSetDrafter') }} {{ $t('workCenter.revisionPlanActivelyReport.batchSetDrafter') }}
@@ -23,9 +23,9 @@
<!-- 操作栏 --> <!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell"> <div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn">{{ $t('edit') }}</a> <a v-if="!disabled" @click="handleEdit(record, index)" class="table-ope-btn">{{ $t('edit') }}</a>
<a-divider v-if="currentNode === 9" type="vertical" /> <a-divider v-if="currentNode === 9 ? !disabled : false" type="vertical" />
<a v-if="currentNode === 9" @click="handleDelete(record.id, index)" class="table-ope-btn">{{ $t('delete') }}</a> <a v-if="currentNode === 9 ? !disabled : false" @click="handleDelete(record.id, index)" class="table-ope-btn">{{ $t('delete') }}</a>
</div> </div>
</j-table> </j-table>
@@ -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 {
enStandardAnnulTurnTo, enStandardAnnulTurnTo,
enStandardAnnulAgree, enStandardAnnulAgree,
enStandardAnnulReject, enStandardAnnulReject,
enStandardAnnulGetDataDraft enStandardAnnulGetDataDraft,
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, EsAnnulNodes } from '@/enums/commonEnums' import { ProcessKey, EsAnnulNodes, ProcessType } from '@/enums/commonEnums'
export default { export default {
name: 'EnterpriseStandardAnnulFlow', name: 'EnterpriseStandardAnnulFlow',
@@ -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: [EsAnnulNodes.standardizationApproval.value] // 只能在标准与流程所里选人的节点 onlySelectFromFlowStation: [EsAnnulNodes.standardizationApproval.value], // 只能在标准与流程所里选人的节点
isLook: false
} }
}, },
methods: { methods: {
@@ -250,6 +263,9 @@ export default {
if (type === 'todo') { if (type === 'todo') {
func = enStandardAnnulGetDataById func = enStandardAnnulGetDataById
params = param.taskId params = param.taskId
} else if (type === 'look') {
func = getLookData
params = param
} else { } else {
func = enStandardAnnulGetDataDraft func = enStandardAnnulGetDataDraft
params = param params = param
@@ -360,6 +376,52 @@ 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 (callback) {
// 流程信息表单
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_ABOLISH.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
// 节点一时候的提交 // 节点一时候的提交
handleStart () { handleStart () {
if (this.loading) return if (this.loading) return
@@ -391,16 +453,33 @@ export default {
paramObj.common.taskId = this.$route.query.taskId paramObj.common.taskId = this.$route.query.taskId
} else { } else {
func = enStandardAnnulApproval func = enStandardAnnulApproval
// 快照JSON
paramObj.common.infoJsonStr = this.getParamJsonStr()
}
if (this.$route.query.taskId) {
// 保存快照后同意
this.saveParamJsonStr(() => {
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
})
} else {
func(paramObj).then(async res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} }
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
} }
@@ -446,14 +525,17 @@ 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
enStandardAnnulAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardAnnulAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
}) })
@@ -473,16 +555,19 @@ 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
enStandardAnnulReject(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardAnnulReject(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.loading = false
this.validatorRules.commitText.rules[0].required = false }
}).finally(() => {
this.validatorRules.commitText.rules[0].required = false
})
}) })
} }
}) })
@@ -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,12 +52,12 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 节点1主起草人发起 --> <!-- 节点1主起草人发起 -->
<main-drafter-init-base-info v-if="currentNode === 1" ref="baseInfoRef" @processNameChange="processNameChange" @save="handleSave"></main-drafter-init-base-info> <main-drafter-init-base-info v-if="currentNode === 1" ref="baseInfoRef" :disabled="isLook" @processNameChange="processNameChange" @save="handleSave"></main-drafter-init-base-info>
<!-- 节点2相关人员校对 --> <!-- 节点2相关人员校对 -->
<!-- 节点3起草人主管级领导审批 --> <!-- 节点3起草人主管级领导审批 -->
<!-- 节点4标准化审批 --> <!-- 节点4标准化审批 -->
<!-- 节点5起草人主管级上一级领导审批 --> <!-- 节点5起草人主管级上一级领导审批 -->
<approve-base-info v-else ref="baseInfoRef"></approve-base-info> <approve-base-info v-else ref="baseInfoRef" :disabled="isLook"></approve-base-info>
<!-- 流程审批信息 --> <!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -67,11 +67,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>
@@ -82,7 +83,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">
<!-- 保存 --> <!-- 保存 -->
@@ -120,12 +121,14 @@ import {
enStandardChangeReject, enStandardChangeReject,
enStandardChangeTurnTo, enStandardChangeTurnTo,
enStandardChangeGetDataById, enStandardChangeGetDataById,
enStandardChangeGetDataDraft enStandardChangeGetDataDraft,
saveSnapShot,
getLookData
} from '@/api/workCenter' } from '@/api/workCenter'
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, EsChangeNodes } from '@/enums/commonEnums' import { ProcessKey, EsChangeNodes, ProcessType } from '@/enums/commonEnums'
export default { export default {
name: 'EnterpriseStandardChangeFlow', name: 'EnterpriseStandardChangeFlow',
@@ -176,13 +179,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) {
// 说明是已发起流程 // 说明是已发起流程
@@ -249,7 +261,8 @@ export default {
list: '' // 人员信息的右侧表格获取接口 list: '' // 人员信息的右侧表格获取接口
}, },
tempDraftId: '', // 临时草稿id,解决发起的时候点在线编辑会生成多条草稿的问题 tempDraftId: '', // 临时草稿id,解决发起的时候点在线编辑会生成多条草稿的问题
onlySelectFromFlowStation: [EsChangeNodes.standardizationApproval.value] // 只能在标准与流程所里选人的节点 onlySelectFromFlowStation: [EsChangeNodes.standardizationApproval.value], // 只能在标准与流程所里选人的节点
isLook: false
} }
}, },
methods: { methods: {
@@ -260,6 +273,9 @@ export default {
if (type === 'todo') { if (type === 'todo') {
func = enStandardChangeGetDataById func = enStandardChangeGetDataById
params = param.taskId params = param.taskId
} else if (type === 'look') {
func = getLookData
params = param
} else { } else {
func = enStandardChangeGetDataDraft func = enStandardChangeGetDataDraft
params = param params = param
@@ -391,6 +407,60 @@ 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 baseInfoObj = Object.assign({}, baseInfo.formInline, { onEditFile: baseInfo.onEditFile, replaceFileId: baseInfo.replaceFileId })
if (baseInfo.dataSource) {
baseInfoObj.list = baseInfo.dataSource
}
const infoJsonStr = JSON.stringify({
basicProcessInfoDTO: processInfoForm,
basicTaskInfoDTO: approvalInfoForm,
data: baseInfoObj,
personnelObj: personnelObj
})
return infoJsonStr
},
// 保存快照
saveParamJsonStr (callback) {
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 人员信息的数据, 处理成对象
const personnelObj = this.$refs.personnelInfo.getDataObj()
// 业务基本信息
const baseInfo = this.$refs.baseInfoRef.getData()
const baseInfoObj = Object.assign({}, baseInfo.formInline, { onEditFile: baseInfo.onEditFile, replaceFileId: baseInfo.replaceFileId })
if (baseInfo.dataSource) {
baseInfoObj.list = baseInfo.dataSource
}
const params = { ...processInfoForm, ...approvalInfoForm }
params.infoJsonStr = JSON.stringify({
basicProcessInfoDTO: processInfoForm,
basicTaskInfoDTO: approvalInfoForm,
data: baseInfoObj,
personnelObj: personnelObj
})
params.taskId = this.$route.query.taskId
params.prcType = ProcessType.ES_CHANGE.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
// 节点一时候的提交 // 节点一时候的提交
handleStart () { handleStart () {
if (this.loading) return if (this.loading) return
@@ -428,16 +498,32 @@ export default {
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
} else { } else {
func = enStandardChangeApproval func = enStandardChangeApproval
// 快照JSON
param.common.infoJsonStr = this.getParamJsonStr()
}
if (this.$route.query.taskId) {
this.saveParamJsonStr(() => {
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
})
} else {
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} }
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
} }
@@ -483,14 +569,17 @@ 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
enStandardChangeAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardChangeAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
}) })
@@ -510,16 +599,19 @@ 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
enStandardChangeReject(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardChangeReject(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.loading = false
this.validatorRules.commitText.rules[0].required = false }
}).finally(() => {
this.validatorRules.commitText.rules[0].required = false
})
}) })
} }
}) })
@@ -12,7 +12,8 @@
<a-form-model-item class="item-model"> <a-form-model-item class="item-model">
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<p>{{ $t('enterpriseStandard') }}</p> <p>{{ $t('enterpriseStandard') }}</p>
<a-button type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button v-if="!disabled" type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
<a-button v-else type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -266,7 +267,7 @@ import JTable from '@/components/jero/JTable'
import UpdateListModal from './UpdateListModal' import UpdateListModal from './UpdateListModal'
import TextContentModal from '../../../businessSupport/askForAdvice/modules/TextContentModal' import TextContentModal from '../../../businessSupport/askForAdvice/modules/TextContentModal'
import { getEnterpriseStandardInfoById } from '../../../../api/enterpriseStandardLibraryApi' import { getEnterpriseStandardInfoById } from '../../../../api/enterpriseStandardLibraryApi'
import { onlineEditor } from '../../../../utils/onlyOfficeUtils' import { onlineEditor, onlineEditorView } from '../../../../utils/onlyOfficeUtils'
import { getOnlineFileIdByFileId, getStandardEditFileByNo } from '@/api/workCenter' import { getOnlineFileIdByFileId, getStandardEditFileByNo } from '@/api/workCenter'
export default { export default {
@@ -648,6 +649,15 @@ export default {
// false表示保存后不返回 // false表示保存后不返回
this.$emit('save', false) this.$emit('save', false)
} }
},
// 在线编辑的查看
onlineEditView () {
if (!this.onEditFile) {
this.$message.warning(this.$t('workCenter.enStandardRevision.noStandardTextLook'))
return
} else {
onlineEditorView(this.onEditFile)
}
} }
} }
} }
@@ -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') }}
@@ -21,7 +21,7 @@
<!-- 流程名称 --> <!-- 流程名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')" :colon="formItemColon"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')" :colon="formItemColon">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')" <a-input :placeholder="$t('pleaseEnter') + $t('processName')"
:disabled="disabled || processNameDisabled" :disabled="disabled || processNameDisabled || isLook"
:maxLength="50" :maxLength="50"
v-decorator="['prcName', validatorRules.prcName]" /> v-decorator="['prcName', validatorRules.prcName]" />
</a-form-item> </a-form-item>
@@ -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>
@@ -70,7 +70,7 @@
<!-- :triggerChange="false"--> <!-- :triggerChange="false"-->
<!-- dictCode="esp_application_category" />--> <!-- dictCode="esp_application_category" />-->
<a-select v-model="formInline.applicationCategory" <a-select v-model="formInline.applicationCategory"
:disabled="disabled || categoryTypeDisabled" :disabled="disabled || categoryTypeDisabled || isLook"
@change="applicationCategoryChange" @change="applicationCategoryChange"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')"> :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')">
<a-select-option :value="ApplicationCategory.INITIATION.value">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option> <a-select-option :value="ApplicationCategory.INITIATION.value">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
@@ -89,7 +89,7 @@
<a-form-model-item class="item-model" prop="projectType"> <a-form-model-item class="item-model" prop="projectType">
<a-select v-if="formInline.applicationCategory === ApplicationCategory.INITIATION.value" <a-select v-if="formInline.applicationCategory === ApplicationCategory.INITIATION.value"
v-model="formInline.projectType" v-model="formInline.projectType"
:disabled="disabled || categoryTypeDisabled" :disabled="disabled || categoryTypeDisabled || isLook"
@change="projectTypeChange" @change="projectTypeChange"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')"> :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
<a-select-option :value="ProjectType.ENACT.value">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option> <a-select-option :value="ProjectType.ENACT.value">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option>
@@ -97,7 +97,7 @@
</a-select> </a-select>
<a-select v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value" <a-select v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value"
v-model="formInline.projectType" v-model="formInline.projectType"
:disabled="disabled || categoryTypeDisabled" :disabled="disabled || categoryTypeDisabled || isLook"
@change="projectTypeChange" @change="projectTypeChange"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')"> :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
<a-select-option :value="ProjectType.COMPLETE_TIME_CHANGE.value">{{ $t('workCenter.enterpriseInitChangePlan.completionTimeChange') }}</a-select-option> <a-select-option :value="ProjectType.COMPLETE_TIME_CHANGE.value">{{ $t('workCenter.enterpriseInitChangePlan.completionTimeChange') }}</a-select-option>
@@ -118,7 +118,7 @@
<approval-base-info <approval-base-info
v-if="formInline.applicationCategory === ApplicationCategory.INITIATION.value" v-if="formInline.applicationCategory === ApplicationCategory.INITIATION.value"
ref="approvalBaseInfo" ref="approvalBaseInfo"
:disabled="disabled" :disabled="disabled || isLook"
:currentNode="currentNode" :currentNode="currentNode"
:isInitData="isInitData" :isInitData="isInitData"
@processNameChange="processNameChange" @processNameChange="processNameChange"
@@ -128,7 +128,7 @@
<finish-time-change-base-info <finish-time-change-base-info
v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value" v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value"
ref="changeBaseInfo" ref="changeBaseInfo"
:disabled="disabled" :disabled="disabled || isLook"
:currentNode="currentNode" :currentNode="currentNode"
:projectType="formInline.projectType" :projectType="formInline.projectType"
> >
@@ -137,7 +137,7 @@
<job-end-base-info <job-end-base-info
v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.WORK_TERMINATE.value" v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.WORK_TERMINATE.value"
ref="changeBaseInfo" ref="changeBaseInfo"
:disabled="disabled" :disabled="disabled || isLook"
:currentNode="currentNode" :currentNode="currentNode"
:projectType="formInline.projectType" :projectType="formInline.projectType"
> >
@@ -146,7 +146,8 @@
<duty-depart-change-base-info <duty-depart-change-base-info
v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value" v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value"
ref="changeBaseInfo" ref="changeBaseInfo"
:disabled="disabled" :disabled="disabled || isLook"
:isLook="isLook"
@processNameChange="processNameChange" @processNameChange="processNameChange"
:currentNode="currentNode" :currentNode="currentNode"
:projectType="formInline.projectType" :projectType="formInline.projectType"
@@ -156,7 +157,7 @@
<merge-base-info <merge-base-info
v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.MERGE.value" v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.MERGE.value"
ref="changeBaseInfo" ref="changeBaseInfo"
:disabled="disabled" :disabled="disabled || isLook"
:isInitData="isInitData" :isInitData="isInitData"
@processNameChange="processNameChange" @processNameChange="processNameChange"
:projectType="formInline.projectType" :projectType="formInline.projectType"
@@ -175,6 +176,7 @@
@nameChange="userSelectNameChange" @nameChange="userSelectNameChange"
filedName="newMainDraftUserLeader" filedName="newMainDraftUserLeader"
:nameStr="userFormModel.newMainDraftUserLeader_dictText" :nameStr="userFormModel.newMainDraftUserLeader_dictText"
:disabled="isLook"
input-type="textarea" /> input-type="textarea" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -187,6 +189,7 @@
@nameChange="userSelectNameChange" @nameChange="userSelectNameChange"
filedName="relatedUserList" filedName="relatedUserList"
:nameStr="userFormModel.relatedUserList_dictText" :nameStr="userFormModel.relatedUserList_dictText"
:disabled="isLook"
input-type="textarea" /> input-type="textarea" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -201,11 +204,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>
@@ -216,7 +220,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">
<!-- 保存 --> <!-- 保存 -->
@@ -267,7 +271,9 @@ import {
enterprisePlanApproval, enterprisePlanApproval,
getProcessDataById, getProcessDataById,
getProcessNodeList, getProcessNodeList,
getProcessDataDraft getProcessDataDraft,
saveSnapShot,
getLookData
} from '@/api/workCenter' } from '@/api/workCenter'
import ApprovalBaseInfo from './modules/ApprovalBaseInfo' import ApprovalBaseInfo from './modules/ApprovalBaseInfo'
import FinishTimeChangeBaseInfo from './modules/FinishTimeChangeBaseInfo' import FinishTimeChangeBaseInfo from './modules/FinishTimeChangeBaseInfo'
@@ -275,7 +281,7 @@ import ProcessDetailList from '@/components/ProcessDetailList'
import JobEndBaseInfo from './modules/JobEndBaseInfo' import JobEndBaseInfo from './modules/JobEndBaseInfo'
import DutyDepartChangeBaseInfo from './modules/DutyDepartChangeBaseInfo' import DutyDepartChangeBaseInfo from './modules/DutyDepartChangeBaseInfo'
import MergeBaseInfo from './modules/MergeBaseInfo' import MergeBaseInfo from './modules/MergeBaseInfo'
import { ProjectType, ApplicationCategory, ProcessKey, EsInitChangeNodes } from '@/enums/commonEnums' import { ProjectType, ApplicationCategory, ProcessKey, EsInitChangeNodes, ProcessType } from '@/enums/commonEnums'
import Vue from 'vue' import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types' import { USER_INFO } from '@/store/mutation-types'
import pick from 'lodash.pick' import pick from 'lodash.pick'
@@ -379,15 +385,24 @@ export default {
this.disabled = true this.disabled = true
} }
} }
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
// 待办进来的节点1说明是被驳回的,不可修改申请类型和项目类别 // 人员信息全部不可选
this.categoryTypeDisabled = true this.initPersonInfoData(false)
} // 查询数据
if (this.$route.query.draftId) { this.getProcessData('look', { snapshotId: this.$route.query.snapshotId })
// 有草稿id,说明是从流程中心-草稿来的,需要初始化数据 } else {
this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId }) if (this.$route.query.taskId && !this.$route.query.draftId) {
// 有流程id说明是从流程中心来的,需要初始化数据
this.getProcessData('todo', { taskId: this.$route.query.taskId })
// 待办进来的节点1说明是被驳回的,不可修改申请类型和项目类别
this.categoryTypeDisabled = true
}
if (this.$route.query.draftId) {
// 有草稿id,说明是从流程中心-草稿来的,需要初始化数据
this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId })
}
} }
}, },
data () { data () {
@@ -483,7 +498,8 @@ export default {
list: '' // 人员信息的右侧表格获取接口 list: '' // 人员信息的右侧表格获取接口
}, },
isInitData: false, // 是否正在初始化数据,正在初始化数据的时候不获取企标编号 isInitData: false, // 是否正在初始化数据,正在初始化数据的时候不获取企标编号
onlySelectFromFlowStation: [EsInitChangeNodes.standardizationApproval.value] // 只能在标准与流程所里选人的节点 onlySelectFromFlowStation: [EsInitChangeNodes.standardizationApproval.value], // 只能在标准与流程所里选人的节点
isLook: false
} }
}, },
methods: { methods: {
@@ -566,6 +582,9 @@ export default {
if (type === 'todo') { if (type === 'todo') {
func = getProcessDataById func = getProcessDataById
params = param.taskId params = param.taskId
} else if (type === 'look') {
func = getLookData
params = param
} else { } else {
func = getProcessDataDraft func = getProcessDataDraft
params = param params = param
@@ -872,6 +891,120 @@ export default {
} }
}) })
}, },
// 需要传给后端的快照用的json
getParamJsonStr () {
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 业务基本信息-申请类型和项目类别
const ruleForm = this.formInline
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 部分节点的选人表单
const userInfoForm = this.userForm.getFieldsValue()
// 人员信息的数据, 处理成对象
const personnelObj = this.$refs.personnelInfo.getDataObj()
// 业务基础信息组件中的数据
let arr = []
// 业务基本信息-立项表单
if (this.$refs.approvalBaseInfo) {
const approvalBaseInfo = Object.assign({}, this.$refs.approvalBaseInfo.formInline)
// 企标体系处理成逗号分隔
if (approvalBaseInfo.enStandardSystem && approvalBaseInfo.enStandardSystem.length > 0) {
approvalBaseInfo.enStandardSystem = approvalBaseInfo.enStandardSystem.map(item => item.value).join(',')
}
// 处理隶属工作组
if (approvalBaseInfo.workGroup) {
approvalBaseInfo.workGroup_dictText = approvalBaseInfo.workGroup.label
approvalBaseInfo.workGroup = approvalBaseInfo.workGroup.value
}
arr.push({ ...ruleForm, ...approvalBaseInfo })
} else if (this.formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value) {
// 业务基本信息-变更-完成时间变更
arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...ruleForm } })
} else if (this.formInline.projectType === ProjectType.WORK_TERMINATE.value) {
// 业务基本信息-变更-工作终止
arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...ruleForm } })
} else if (this.formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value) {
// 业务基本信息-变更-责任部门变更
const dutyDepartChangeForm = this.$refs.changeBaseInfo.formInline
arr.push({ ...ruleForm, ...dutyDepartChangeForm, ...userInfoForm })
} else if (this.formInline.projectType === ProjectType.MERGE.value) {
// 业务基本信息-变更-合并
const mergeForm = this.$refs.changeBaseInfo.formInline
arr.push({ ...ruleForm, ...mergeForm })
}
const infoJsonStr = JSON.stringify({
basicProcessInfoDTO: processInfoForm,
basicTaskInfoDTO: approvalInfoForm,
dataList: arr.map(item => {
return { ...item, ...this.userFormModel }
}),
personnelObj: personnelObj
})
return infoJsonStr
},
// 保存快照
saveParamJsonStr (callback) {
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 业务基本信息-申请类型和项目类别
const ruleForm = this.formInline
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 部分节点的选人表单
const userInfoForm = this.userForm.getFieldsValue()
// 人员信息的数据, 处理成对象
const personnelObj = this.$refs.personnelInfo.getDataObj()
// 业务基础信息组件中的数据
let arr = []
// 业务基本信息-立项表单
if (this.$refs.approvalBaseInfo) {
const approvalBaseInfo = Object.assign({}, this.$refs.approvalBaseInfo.formInline)
// 企标体系处理成逗号分隔
if (approvalBaseInfo.enStandardSystem && approvalBaseInfo.enStandardSystem.length > 0) {
approvalBaseInfo.enStandardSystem = approvalBaseInfo.enStandardSystem.map(item => item.value).join(',')
}
// 处理隶属工作组
if (approvalBaseInfo.workGroup) {
approvalBaseInfo.workGroup_dictText = approvalBaseInfo.workGroup.label
approvalBaseInfo.workGroup = approvalBaseInfo.workGroup.value
}
arr.push({ ...ruleForm, ...approvalBaseInfo })
} else if (this.formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value) {
// 业务基本信息-变更-完成时间变更
arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...ruleForm } })
} else if (this.formInline.projectType === ProjectType.WORK_TERMINATE.value) {
// 业务基本信息-变更-工作终止
arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...ruleForm } })
} else if (this.formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value) {
// 业务基本信息-变更-责任部门变更
const dutyDepartChangeForm = this.$refs.changeBaseInfo.formInline
arr.push({ ...ruleForm, ...dutyDepartChangeForm, ...userInfoForm })
} else if (this.formInline.projectType === ProjectType.MERGE.value) {
// 业务基本信息-变更-合并
const mergeForm = this.$refs.changeBaseInfo.formInline
arr.push({ ...ruleForm, ...mergeForm })
}
const params = { ...processInfoForm, ...approvalInfoForm }
params.infoJsonStr = JSON.stringify({
basicProcessInfoDTO: processInfoForm,
basicTaskInfoDTO: approvalInfoForm,
dataList: arr.map(item => {
return { ...item, ...this.userFormModel }
}),
personnelObj: personnelObj
})
params.taskId = this.$route.query.taskId
params.prcType = ProcessType.ES_INIT_CHANGE.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
// 节点一时候的提交,发起立项变更申请,有taskId就是驳回后的提交 // 节点一时候的提交,发起立项变更申请,有taskId就是驳回后的提交
handleStart () { handleStart () {
if (this.loading) return if (this.loading) return
@@ -972,33 +1105,66 @@ export default {
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
} else { } else {
func = enterprisePlanApproval func = enterprisePlanApproval
// 快照JSON
param.common.infoJsonStr = this.getParamJsonStr()
} }
func(param).then(async res => { if (this.$route.query.taskId) {
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) func(param).then(async res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
if (res.message === this.$t('workCenter.enterpriseInitChangePlan.existingNumber')) { this.$message.warning(res.message)
// 已经存在编号,重新生成 this.loading = false
if ([ProjectType.ENACT.value, ProjectType.MODIFY.value, ProjectType.MERGE.value].includes(this.formInline.projectType)) { if (res.message === this.$t('workCenter.enterpriseInitChangePlan.existingNumber')) {
// 是制定修订或者合并,重新获取企标编号 // 已经存在编号,重新生成
this.loading = true if ([ProjectType.ENACT.value, ProjectType.MODIFY.value, ProjectType.MERGE.value].includes(this.formInline.projectType)) {
if (this.$refs.approvalBaseInfo) { // 是制定修订或者合并,重新获取企标编号
await this.$refs.approvalBaseInfo.getEnStandardNo() this.loading = true
} else if (this.$refs.changeBaseInfo) { if (this.$refs.approvalBaseInfo) {
await this.$refs.changeBaseInfo.getEnStandardNo() await this.$refs.approvalBaseInfo.getEnStandardNo()
} else if (this.$refs.changeBaseInfo) {
await this.$refs.changeBaseInfo.getEnStandardNo()
}
setTimeout(() => {
this.loading = false
// 提示顺序号已重新生成
this.$message.success(this.$t('workCenter.enterpriseInitChangePlan.numberReset'))
}, 500)
}
}
}
})
})
} else {
func(param).then(async res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
if (res.message === this.$t('workCenter.enterpriseInitChangePlan.existingNumber')) {
// 已经存在编号,重新生成
if ([ProjectType.ENACT.value, ProjectType.MODIFY.value, ProjectType.MERGE.value].includes(this.formInline.projectType)) {
// 是制定修订或者合并,重新获取企标编号
this.loading = true
if (this.$refs.approvalBaseInfo) {
await this.$refs.approvalBaseInfo.getEnStandardNo()
} else if (this.$refs.changeBaseInfo) {
await this.$refs.changeBaseInfo.getEnStandardNo()
}
setTimeout(() => {
this.loading = false
// 提示顺序号已重新生成
this.$message.success(this.$t('workCenter.enterpriseInitChangePlan.numberReset'))
}, 500)
} }
setTimeout(() => {
this.loading = false
// 提示顺序号已重新生成
this.$message.success(this.$t('workCenter.enterpriseInitChangePlan.numberReset'))
}, 500)
} }
} }
} })
}) }
}) })
}) })
}) })
@@ -1014,14 +1180,17 @@ export default {
param.common = Object.assign({}, approvalValues) param.common = Object.assign({}, approvalValues)
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
param.flowUser = Object.assign({}, values) param.flowUser = Object.assign({}, values)
enterprisePlanApprovalAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enterprisePlanApprovalAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
@@ -1109,14 +1278,17 @@ export default {
return return
} }
this.loading = true this.loading = true
enterprisePlanApprovalAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enterprisePlanApprovalAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
}) })
}, },
@@ -1135,16 +1307,19 @@ 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
enterprisePlanApprovalReject(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enterprisePlanApprovalReject(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.loading = false
this.validatorRules.commitText.rules[0].required = false }
}).finally(() => {
this.validatorRules.commitText.rules[0].required = false
})
}) })
} }
}) })
@@ -1159,14 +1334,17 @@ 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
enterprisePlanApprovalAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enterprisePlanApprovalAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
}) })
@@ -94,7 +94,7 @@
<a-form-model-item class="item-model" prop="newMainDraftingUser"> <a-form-model-item class="item-model" prop="newMainDraftingUser">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.newPrincipalDrafter')" <user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.newPrincipalDrafter')"
v-model="formInline.newMainDraftingUser" v-model="formInline.newMainDraftingUser"
:disabled="disabled && !newMainDrafterCanUpdate && !onlyNewMainDrafterCanUpdate" :disabled="(disabled && !newMainDrafterCanUpdate && !onlyNewMainDrafterCanUpdate) || isLook"
filedName="newMainDraftingUser" filedName="newMainDraftingUser"
@nameChange="userSelectNameChange" @nameChange="userSelectNameChange"
:nameStr="formInline.newMainDraftingUser_dictText" :nameStr="formInline.newMainDraftingUser_dictText"
@@ -111,7 +111,7 @@
</div> </div>
<a-form-model-item class="item-model" prop="newMainDraftingUnit"> <a-form-model-item class="item-model" prop="newMainDraftingUnit">
<j-select-depart v-model="formInline.newMainDraftingUnit" <j-select-depart v-model="formInline.newMainDraftingUnit"
:disabled="disabled && !newMainDrafterCanUpdate" :disabled="(disabled && !newMainDrafterCanUpdate) || isLook"
:isSomeDisabled="true" :isSomeDisabled="true"
:backDepart="true" /> :backDepart="true" />
</a-form-model-item> </a-form-model-item>
@@ -127,7 +127,7 @@
<a-form-model-item class="item-model" prop="newMainDraftingUnitResponsiblePerson"> <a-form-model-item class="item-model" prop="newMainDraftingUnitResponsiblePerson">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.newHeadOfMainDraftingUnit')" <user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.newHeadOfMainDraftingUnit')"
v-model="formInline.newMainDraftingUnitResponsiblePerson" v-model="formInline.newMainDraftingUnitResponsiblePerson"
:disabled="disabled && !newMainDrafterCanUpdate" :disabled="(disabled && !newMainDrafterCanUpdate) || isLook"
filedName="newMainDraftingUnitResponsiblePerson" filedName="newMainDraftingUnitResponsiblePerson"
@nameChange="userSelectNameChange" @nameChange="userSelectNameChange"
:nameStr="formInline.newMainDraftingUnitResponsiblePerson_dictText" :nameStr="formInline.newMainDraftingUnitResponsiblePerson_dictText"
@@ -175,6 +175,11 @@ export default {
type: Number, type: Number,
required: false, required: false,
default: 1 default: 1
},
isLook: { // 是否是查看
type: Boolean,
required: false,
default: false
} }
}, },
mounted () { mounted () {
@@ -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' : ''"
@@ -54,7 +54,7 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<inspection-plan-table style="margin-bottom: 40px;" ref="inspectionPlanTable" :current-node="currentNode" :project-id="projectId"/> <inspection-plan-table style="margin-bottom: 40px;" ref="inspectionPlanTable" :current-node="currentNode" :project-id="projectId" :disabled="disabled"/>
<!-- 会签表单 --> <!-- 会签表单 -->
<a-form :form="countersignForm" v-if="currentNode === EsInspectionPlan.liaisonCollect.value"> <a-form :form="countersignForm" v-if="currentNode === EsInspectionPlan.liaisonCollect.value">
<div class="form-flex-box"> <div class="form-flex-box">
@@ -63,6 +63,7 @@
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.isCountersign')" <j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.isCountersign')"
type="radio" type="radio"
dictCode="yn" dictCode="yn"
:disabled="disabled"
@change="changeIsCountersign" @change="changeIsCountersign"
v-decorator="['countersignTag', validatorRules.isCountersign]" /> v-decorator="['countersignTag', validatorRules.isCountersign]" />
</a-form-item> </a-form-item>
@@ -71,6 +72,8 @@
<a-form-item v-if="isCountersign" :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.esInspectionPlan.countersignRelevantPersonnel')"> <a-form-item v-if="isCountersign" :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.esInspectionPlan.countersignRelevantPersonnel')">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.countersignRelevantPersonnel')" <user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.countersignRelevantPersonnel')"
type="checkbox" :nameStr="info.countersignDictText" type="checkbox" :nameStr="info.countersignDictText"
@nameChange="involveListNameChange"
:disabled="disabled"
v-decorator="['involveList', validatorRules.countersignRelevantPersonnel]" /> v-decorator="['involveList', validatorRules.countersignRelevantPersonnel]" />
</a-form-item> </a-form-item>
</div> </div>
@@ -84,11 +87,12 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')" <a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500" :maxLength="500"
:rows="4" :rows="4"
:disabled="disabled"
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']" :disabled="disabled" return-id multiple />
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
@@ -101,7 +105,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('transfer')" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button> <a-button v-if="btn.includes('transfer')" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!--保存--> <!--保存-->
@@ -126,12 +130,12 @@ import ProcessDetailList from '@comp/ProcessDetailList'
import InspectionPlanTable from '@views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable' import InspectionPlanTable from '@views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable'
import UserSelection from '@comp/selection/UserSelection' import UserSelection from '@comp/selection/UserSelection'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { ApprovalOpinions, EsInspectionPlan, ProcessKey } from '@/enums/commonEnums' import { ApprovalOpinions, EsInspectionPlan, ProcessKey, ProcessType } from '@/enums/commonEnums'
import { import {
approvalInspectPlan, approvalInspectPlan,
getInspectPlanDetail, getInspectPlanDetail,
getInspectPlanProjectId, rejectInspectPlan, getInspectPlanProjectId, getLookData, rejectInspectPlan,
saveInspectPlan, saveInspectPlan, saveSnapShot,
startInspectPlan, transferInspectPlan startInspectPlan, transferInspectPlan
} from '@api/workCenter' } from '@api/workCenter'
import UserSelectModal from '@comp/selection/UserSelectModal' import UserSelectModal from '@comp/selection/UserSelectModal'
@@ -145,7 +149,7 @@ export default {
return { return {
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 }
@@ -228,7 +232,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 || EsInspectionPlan.initiate.value this.currentNode = nodeId || EsInspectionPlan.initiate.value
this.currentNodeName = taskName || EsInspectionPlan.initiate.text this.currentNodeName = taskName || EsInspectionPlan.initiate.text
@@ -239,6 +244,11 @@ export default {
// 同意按钮 // 同意按钮
this.btn = ['agree'] this.btn = ['agree']
} }
// 快照回显
if (this.$route.query.snapshotId) {
this.loadSnapshotPage()
return
}
// 查询人员信息 // 查询人员信息
this.getPersonInfoStructure(this.processKey, () => { this.getPersonInfoStructure(this.processKey, () => {
this.initPersonInfoData(this.isInitiate) this.initPersonInfoData(this.isInitiate)
@@ -404,6 +414,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)
if (!personInfo) { if (!personInfo) {
@@ -428,9 +440,9 @@ export default {
} }
if (params.map.involveList && typeof params.map.involveList === 'string') { if (params.map.involveList && typeof params.map.involveList === 'string') {
params.countersign = params.map.involveList params.countersign = params.map.involveList
params.countersignDictText = this.info.countersignDictText
params.map.involveList = params.map.involveList.split(',') params.map.involveList = params.map.involveList.split(',')
} }
// 流程审批信息 // 流程审批信息
params.processApprovalRecord = Object.assign({}, this.info.processApprovalRecord, formDataList[2], { params.processApprovalRecord = Object.assign({}, this.info.processApprovalRecord, formDataList[2], {
projectId: this.projectId projectId: this.projectId
@@ -442,7 +454,9 @@ export default {
// 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了) // 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了)
personInfo: this.$refs.personnelInfo.getDataObj(), personInfo: this.$refs.personnelInfo.getDataObj(),
// 业务表格数据,用于强制撤回后回显 // 业务表格数据,用于强制撤回后回显
draftData: params.processEsInspectPlanList draftData: params.processEsInspectPlanList,
// 将流程数据保存json,后续进行快照回显
prcData: params
}) })
} }
@@ -452,6 +466,71 @@ 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.ES_INSPECTION_PLAN.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 || {}
const countersignForm = prcData.formDataList[1] || {}
this.info = prcData
this.$refs.inspectionPlanTable.setData(prcData.processEsInspectPlanList || [])
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.$nextTick(() => {
this.countersignForm && this.countersignForm.setFieldsValue({
countersignTag: countersignForm.countersignTag,
involveList: countersignForm.countersign
})
})
// 触发会签改变
this.changeIsCountersign(countersignForm.countersignTag)
}).finally(() => {
this.loading = false
})
},
/** /**
* 转办弹框 * 转办弹框
*/ */
@@ -549,25 +628,32 @@ 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 => {
// 节点三,pass决定是否跳过会签 // 节点三,pass决定是否跳过会签
if (this.currentNode === EsInspectionPlan.liaisonCollect.value) { if (this.currentNode === EsInspectionPlan.liaisonCollect.value) {
res.map.pass = this.convertPass(res.map.countersignTag) params.map.pass = this.convertPass(params.map.countersignTag)
} else { } else {
// 其他情况一直传true // 其他情况一直传true
res.map.pass = true params.map.pass = true
} }
// 不是提交按钮 // 不是提交按钮
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 approvalInspectPlan(res) // 保存快照,成功了就调接口,失败了就提示
}).then(res => { return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return approvalInspectPlan(params)
} else {
return res
}
})
}).then(async res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
this.goBack() this.goBack()
@@ -605,12 +691,19 @@ export default {
return return
} }
this.loading = true this.loading = true
this.getPageParams().then(res => { this.getPageParams().then(params => {
res.map.pass = false params.map.pass = false
// 审批意见 // 审批意见
res.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value params.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value
return rejectInspectPlan(res) // 保存快照,成功了就调接口,失败了就提示
}).then(res => { return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return rejectInspectPlan(params)
} else {
return res
}
})
}).then(async res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
this.goBack() this.goBack()
@@ -628,6 +721,10 @@ export default {
}, 1000) }, 1000)
}) })
}, },
// 会签人员名改变
involveListNameChange (name) {
this.info.countersignDictText = name
},
// 是否会签改变 // 是否会签改变
changeIsCountersign (val) { changeIsCountersign (val) {
if (val === '1') { if (val === '1') {
@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="table-operator" v-if="hasTableOperator"> <div class="table-operator" v-if="!disabled && hasTableOperator">
<!-- 新增 --> <!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button> <a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
<!-- 下载模板 --> <!-- 下载模板 -->
@@ -43,14 +43,14 @@
<template slot="action" slot-scope="{text, record, index}"> <template slot="action" slot-scope="{text, record, index}">
<!-- 编辑 and 删除:节点1 节点3 节点2且当前登录人是创建人 --> <!-- 编辑 and 删除:节点1 节点3 节点2且当前登录人是创建人 -->
<template v-if="isInitiateOrLiaisonCollect || (currentNode === EsInspectionPlan.fillInComments.value && currentUserName === record.createBy)"> <template v-if="isInitiateOrLiaisonCollect || (currentNode === EsInspectionPlan.fillInComments.value && currentUserName === record.createBy)">
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a> <a :disabled="disabled" @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDelete(index)" >{{ $t('delete') }}</a> <a :disabled="disabled" @click="handleDelete(index)" >{{ $t('delete') }}</a>
</template> </template>
<!-- 意见 or 填写意见节点2非自己创建的就是意见和填写意见 --> <!-- (被禁用只能查看意见)意见 or 填写意见节点2非自己创建的就是意见和填写意见 -->
<template v-else-if="currentNode === EsInspectionPlan.fillInComments.value"> <template v-else-if="currentNode === EsInspectionPlan.fillInComments.value">
<a v-if="isShowOpinion(record)" @click="handleWriteOpinion(record, index)" >{{ $t('workCenter.esInspectionPlan.opinion') }}</a> <a v-if="isShowOpinion(record)" @click="handleWriteOpinion(record, index)" >{{ $t('workCenter.esInspectionPlan.opinion') }}</a>
<a v-else @click="handleWriteOpinion(record, index)" >{{ $t('workCenter.esInspectionPlan.writeOpinion') }}</a> <a :disabled="disabled" v-else @click="handleWriteOpinion(record, index)" >{{ $t('workCenter.esInspectionPlan.writeOpinion') }}</a>
</template> </template>
</template> </template>
@@ -60,7 +60,7 @@
<!-- 新增/编辑稽查计划 --> <!-- 新增/编辑稽查计划 -->
<inspection-plan-drawer ref="modalForm" @ok="handleAddOrEditCallback" :project-id="projectId"/> <inspection-plan-drawer ref="modalForm" @ok="handleAddOrEditCallback" :project-id="projectId"/>
<!-- 节点2填写意见意见回显 --> <!-- 节点2填写意见意见回显 -->
<write-opinion-modal ref="writeOpinionModal" @ok="handleWriteOpinionCallback"/> <write-opinion-modal ref="writeOpinionModal" @ok="handleWriteOpinionCallback" :disabled="disabled"/>
<!-- 节点3所属部门意见-查看 --> <!-- 节点3所属部门意见-查看 -->
<show-opinion-modal ref="showOpinionModal"/> <show-opinion-modal ref="showOpinionModal"/>
</div> </div>
@@ -84,6 +84,12 @@ export default {
components: { ShowOpinionModal, WriteOpinionModal, InspectionPlanDrawer, JTable }, components: { ShowOpinionModal, WriteOpinionModal, InspectionPlanDrawer, JTable },
mixins: [JeroListMixin], mixins: [JeroListMixin],
props: { props: {
// 禁用
disabled: {
type: Boolean,
default: false,
required: false
},
// 当前节点 // 当前节点
currentNode: { currentNode: {
type: String, type: String,
@@ -5,6 +5,7 @@
:visible="visible" :visible="visible"
:confirmLoading="confirmLoading" :confirmLoading="confirmLoading"
switchFullscreen switchFullscreen
:footer="null"
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
:cancelText="$t('close')"> :cancelText="$t('close')">
@@ -5,7 +5,6 @@
:visible="visible" :visible="visible"
:confirmLoading="confirmLoading" :confirmLoading="confirmLoading"
switchFullscreen switchFullscreen
@ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
:cancelText="$t('close')"> :cancelText="$t('close')">
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
@@ -34,11 +33,21 @@
<a-form-model-item <a-form-model-item
prop="opinion" prop="opinion"
:label="$t('workCenter.esInspectionPlan.opinion')"> :label="$t('workCenter.esInspectionPlan.opinion')">
<a-textarea :max-length="500" :rows="4" <a-textarea :max-length="500" :rows="4" :disabled="disabled"
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionPlan.opinion')" v-model="formData.opinion"/> :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionPlan.opinion')" v-model="formData.opinion"/>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<!-- 操作按钮 -->
<template slot="footer">
<a-button :loading="confirmLoading" @click="handleCancel">
{{ $t('cancel') }}
</a-button>
<a-button v-if="!disabled" type="primary" :loading="confirmLoading" @click="handleOk">
{{ $t('submit') }}
</a-button>
</template>
</j-modal> </j-modal>
</template> </template>
@@ -49,6 +58,13 @@ import moment from 'moment'
export default { export default {
name: 'WriteOpinionModal', name: 'WriteOpinionModal',
components: { JTable }, components: { JTable },
props: {
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () { data () {
return { return {
title: this.$t('workCenter.esInspectionPlan.writeOpinion'), title: this.$t('workCenter.esInspectionPlan.writeOpinion'),
@@ -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' : ''"
@@ -55,7 +55,7 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 流程表格 --> <!-- 流程表格 -->
<inspection-process-table ref="inspectionProcessTable" :current-node="currentNode" :project-id="projectId"/> <inspection-process-table ref="inspectionProcessTable" :current-node="currentNode" :project-id="projectId" :disabled="disabled"/>
<!-- 流程审批信息 --> <!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -65,11 +65,12 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')" <a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500" :maxLength="500"
:rows="4" :rows="4"
:disabled="disabled"
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>
@@ -82,7 +83,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('transfer')" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button> <a-button v-if="btn.includes('transfer')" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!--保存--> <!--保存-->
@@ -107,12 +108,17 @@ import ProcessDetailList from '@comp/ProcessDetailList'
import InspectionProcessTable import InspectionProcessTable
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessTable' from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessTable'
import UserSelectModal from '@comp/selection/UserSelectModal' import UserSelectModal from '@comp/selection/UserSelectModal'
import { ApprovalOpinions, EsInspectionProcess, ProcessKey } from '@/enums/commonEnums' import { ApprovalOpinions, EsInspectionProcess, ProcessKey, ProcessType } from '@/enums/commonEnums'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { import {
approvalInspectProcess, approvalInspectProcess,
getInspectProcessDetail, getInspectProcessDetail,
getInspectProcessProjectId, rejectInspectProcess, saveInspectProcess, startInspectProcess, transferInspectProcess getInspectProcessProjectId, getLookData,
rejectInspectProcess,
saveInspectProcess,
saveSnapShot,
startInspectProcess,
transferInspectProcess
} from '@api/workCenter' } from '@api/workCenter'
const tabList = ['base', 'user'] const tabList = ['base', 'user']
@@ -124,7 +130,7 @@ export default {
return { return {
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 }
@@ -197,7 +203,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 || EsInspectionProcess.initiate.value this.currentNode = nodeId || EsInspectionProcess.initiate.value
this.currentNodeName = taskName || EsInspectionProcess.initiate.text this.currentNodeName = taskName || EsInspectionProcess.initiate.text
@@ -208,6 +215,11 @@ export default {
// 同意按钮 // 同意按钮
this.btn = ['agree'] this.btn = ['agree']
} }
// 快照回显
if (this.$route.query.snapshotId) {
this.loadSnapshotPage()
return
}
// 查询人员信息 // 查询人员信息
this.getPersonInfoStructure(this.processKey, () => { this.getPersonInfoStructure(this.processKey, () => {
this.initPersonInfoData(this.isInitiate) this.initPersonInfoData(this.isInitiate)
@@ -381,6 +393,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)
if (!personInfo) { if (!personInfo) {
@@ -410,7 +424,9 @@ export default {
// 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了) // 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了)
personInfo: this.$refs.personnelInfo.getDataObj(), personInfo: this.$refs.personnelInfo.getDataObj(),
// 业务表格数据,用于强制撤回后回显 // 业务表格数据,用于强制撤回后回显
draftData: params.processEsInspectList draftData: params.processEsInspectList,
// 将流程数据保存json,后续进行快照回显
prcData: params
}) })
} }
@@ -420,6 +436,61 @@ 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.ES_INSPECTION_PROCESS.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.$refs.inspectionProcessTable.setData(prcData.processEsInspectList || [])
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
})
}).finally(() => {
this.loading = false
})
},
/** /**
* 转办弹框 * 转办弹框
*/ */
@@ -526,19 +597,27 @@ 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
// 不是提交按钮 // 不是提交按钮
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 approvalInspectProcess(res) console.log(params)
// 保存快照,成功了就调接口,失败了就提示
return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return approvalInspectProcess(params)
} else {
return res
}
})
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -577,11 +656,18 @@ export default {
return return
} }
this.loading = true this.loading = true
this.getPageParams().then(res => { this.getPageParams().then(params => {
res.map.pass = false params.map.pass = false
// 审批意见 // 审批意见
res.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value params.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value
return rejectInspectProcess(res) // 保存快照,成功了就调接口,失败了就提示
return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return rejectInspectProcess(params)
} else {
return res
}
})
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="table-operator" v-if="isInitiate"> <div class="table-operator" v-if="isInitiate && !disabled">
<!-- 新增 --> <!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button> <a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
</div> </div>
@@ -33,6 +33,7 @@
<div class="table-form" v-if="isInputInspectionReport"> <div class="table-form" v-if="isInputInspectionReport">
<a-date-picker :placeholder="$t('pleaseSelect')+$t('date')" <a-date-picker :placeholder="$t('pleaseSelect')+$t('date')"
style="width: 100%" style="width: 100%"
:disabled="disabled"
value-format="YYYY-MM-DD hh:mm:ss" value-format="YYYY-MM-DD hh:mm:ss"
v-model="record.completeDate" /> v-model="record.completeDate" />
</div> </div>
@@ -52,6 +53,7 @@
<div class="table-form" v-if="isInputInspectionReport"> <div class="table-form" v-if="isInputInspectionReport">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionProcess.actualInspector')" :show-btn="false" <user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionProcess.actualInspector')" :show-btn="false"
type="radio" :nameStr="record.actualInspectUser_dictText" @nameChange="nameChange($event, record)" type="radio" :nameStr="record.actualInspectUser_dictText" @nameChange="nameChange($event, record)"
:disabled="disabled"
v-model="record.actualInspectUser" /> v-model="record.actualInspectUser" />
</div> </div>
<a-tooltip v-else overlay-class-name="tooltip-style"> <a-tooltip v-else overlay-class-name="tooltip-style">
@@ -67,7 +69,7 @@
<template v-if="isInitiate || isDirectorLeaderApprovalOne"> <template v-if="isInitiate || isDirectorLeaderApprovalOne">
<a @click="handleInspectionContent(record, index)" >{{ $t('workCenter.esInspectionProcess.inspectionContent') + `(${record.standardInspectContentCount || 0}${$t('strip')})` }}</a> <a @click="handleInspectionContent(record, index)" >{{ $t('workCenter.esInspectionProcess.inspectionContent') + `(${record.standardInspectContentCount || 0}${$t('strip')})` }}</a>
<a-divider v-if="isInitiate" type="vertical" /> <a-divider v-if="isInitiate" type="vertical" />
<a v-if="isInitiate" @click="handleDelete(index)" >{{ $t('delete') }}</a> <a v-if="isInitiate" @click="handleDelete(index)" :disabled="disabled">{{ $t('delete') }}</a>
</template> </template>
<!-- 后续节点都显示稽查报告和整改计划 --> <!-- 后续节点都显示稽查报告和整改计划 -->
<template v-else> <template v-else>
@@ -82,11 +84,11 @@
<!-- 添加稽查计划 --> <!-- 添加稽查计划 -->
<inspection-process-table-modal ref="inspectionProcessTableModal" @ok="handleAddPlanCallback" v-if="isInitiate"/> <inspection-process-table-modal ref="inspectionProcessTableModal" @ok="handleAddPlanCallback" v-if="isInitiate"/>
<!-- 稽查内容节点2只查看后续不显示 --> <!-- 稽查内容节点2只查看后续不显示 -->
<inspection-process-content ref="inspectionProcessContent" @ok="handleContentCallback" @delIds="addDelIds" :disabled="!isInitiate"/> <inspection-process-content ref="inspectionProcessContent" @ok="handleContentCallback" @delIds="addDelIds" :disabled="!isInitiate || disabled"/>
<!-- 稽查报告节点3填写后续只查看 --> <!-- 稽查报告节点3填写后续只查看 -->
<inspection-process-report ref="inspectionProcessReport" @ok="handleReportCallback" @delIds="addDelIds" :disabled="!isInputInspectionReport"/> <inspection-process-report ref="inspectionProcessReport" @ok="handleReportCallback" @delIds="addDelIds" :disabled="!isInputInspectionReport || disabled"/>
<!-- 整改计划节点3填写后续只查看 --> <!-- 整改计划节点3填写后续只查看 -->
<inspection-process-rectification-plan ref="inspectionProcessRectificationPlan" @ok="handleRectificationCallback" @delIds="addDelIds" :disabled="!isInputInspectionReport"/> <inspection-process-rectification-plan ref="inspectionProcessRectificationPlan" @ok="handleRectificationCallback" @delIds="addDelIds" :disabled="!isInputInspectionReport || disabled"/>
</div> </div>
</template> </template>
@@ -108,6 +110,12 @@ export default {
components: { UserSelection, InspectionProcessRectificationPlan, InspectionProcessReport, InspectionProcessContent, InspectionProcessTableModal, JTable }, components: { UserSelection, InspectionProcessRectificationPlan, InspectionProcessReport, InspectionProcessContent, InspectionProcessTableModal, JTable },
mixins: [JeroListMixin], mixins: [JeroListMixin],
props: { props: {
// 禁用
disabled: {
type: Boolean,
default: false,
required: false
},
// 当前节点 // 当前节点
currentNode: { currentNode: {
type: String, type: String,
@@ -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' : ''"
@@ -55,7 +55,7 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 基本信息 --> <!-- 基本信息 -->
<base-info-form ref="baseInfoForm" :disabled="processDisabled"/> <base-info-form ref="baseInfoForm" :disabled="disabled || processDisabled"/>
<!-- 流程审批信息 --> <!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -64,12 +64,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>
@@ -82,7 +83,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('transfer')" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button> <a-button v-if="btn.includes('transfer')" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!--保存--> <!--保存-->
@@ -108,10 +109,16 @@ import BaseInfoForm from '@views/workCenter/enterpriseStandardInspectionRectific
import UserSelectModal from '@comp/selection/UserSelectModal' import UserSelectModal from '@comp/selection/UserSelectModal'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { import {
approvalInspectRectify, getInspectRectifyDataById, approvalInspectRectify,
getInspectRectifyDetail, rejectInspectRectify, saveInspectRectify, startInspectRectify, transferInspectRectify getInspectRectifyDataById,
getInspectRectifyDetail, getLookData,
rejectInspectRectify,
saveInspectRectify,
saveSnapShot,
startInspectRectify,
transferInspectRectify
} from '@api/workCenter' } from '@api/workCenter'
import { ApprovalOpinions, EsInspectionRectification, ProcessKey } from '@/enums/commonEnums' import { ApprovalOpinions, EsInspectionRectification, ProcessKey, ProcessType } from '@/enums/commonEnums'
const tabList = ['base', 'user'] const tabList = ['base', 'user']
export default { export default {
@@ -197,7 +204,8 @@ export default {
} }
}, },
created () { created () {
const { projectId, nodeId, taskName } = this.$route.query const { projectId, nodeId, taskName, isLook } = this.$route.query
this.disabled = isLook === '1'
// 自动发起流程: 没有默认节点 // 自动发起流程: 没有默认节点
this.currentNode = nodeId || '' this.currentNode = nodeId || ''
this.currentNodeName = taskName || '' this.currentNodeName = taskName || ''
@@ -212,6 +220,11 @@ export default {
// 同意按钮 // 同意按钮
this.btn = ['agree'] this.btn = ['agree']
} }
// 快照回显
if (this.$route.query.snapshotId) {
this.loadSnapshotPage()
return
}
// 查询人员信息 // 查询人员信息
this.getPersonInfoStructure(this.processKey, () => { this.getPersonInfoStructure(this.processKey, () => {
this.personnelInfoData = this.personnelInfoData.map(item => { this.personnelInfoData = this.personnelInfoData.map(item => {
@@ -348,6 +361,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)
if (!personInfo) { if (!personInfo) {
@@ -389,7 +404,9 @@ export default {
// 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了) // 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了)
personInfo: this.$refs.personnelInfo.getDataObj(), personInfo: this.$refs.personnelInfo.getDataObj(),
// 业务表格数据,用于强制撤回后回显 // 业务表格数据,用于强制撤回后回显
draftData draftData,
// 将流程数据保存json,后续进行快照回显
prcData: params
}) })
} }
@@ -399,6 +416,63 @@ 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.ES_INSPECTION_RECTIFICATION.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.$nextTick(() => {
this.$refs.baseInfoForm.initData(prcData.processEsInspectRectify)
})
}).finally(() => {
this.loading = false
})
},
/** /**
* 转办弹框 * 转办弹框
*/ */
@@ -463,17 +537,24 @@ export default {
handleSubmit () { handleSubmit () {
if (this.loading) return if (this.loading) return
this.loading = true this.loading = true
this.getPageParams().then(res => { this.getPageParams().then(params => {
console.log(res) console.log(params)
res.map.pass = true params.map.pass = true
let fn = approvalInspectRectify let fn = approvalInspectRectify
// 是否强制撤回(强制撤回的话,就发起接口) // 是否强制撤回(强制撤回的话,就发起接口)
if (this.isForceRevoke) { if (this.isForceRevoke) {
fn = startInspectRectify fn = startInspectRectify
// 重新发起置空业务id // 重新发起置空业务id
delete res.processEsInspectRectify.id delete params.processEsInspectRectify.id
} }
return fn(res) // 保存快照,成功了就调接口,失败了就提示
return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return fn(params)
} else {
return res
}
})
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -499,19 +580,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
// 不是提交按钮 // 不是提交按钮
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 approvalInspectRectify(res) // 保存快照,成功了就调接口,失败了就提示
return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return approvalInspectRectify(params)
} else {
return res
}
})
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -550,11 +638,18 @@ export default {
return return
} }
this.loading = true this.loading = true
this.getPageParams().then(res => { this.getPageParams().then(params => {
res.map.pass = false params.map.pass = false
// 审批意见 // 审批意见
res.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value params.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value
return rejectInspectRectify(res) // 保存快照,成功了就调接口,失败了就提示
return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return rejectInspectRectify(params)
} else {
return res
}
})
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -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,14 +52,14 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 节点1是标准化发起 --> <!-- 节点1是标准化发起 -->
<standardization-init-base-info v-if="currentNode === 1" ref="baseInfoRef" @processNameChange="processNameChange"></standardization-init-base-info> <standardization-init-base-info v-if="currentNode === 1" ref="baseInfoRef" :disabled="isLook" @processNameChange="processNameChange"></standardization-init-base-info>
<!-- 节点2是联络人发起 --> <!-- 节点2是联络人发起 -->
<contact-init-base-info v-else-if="currentNode === 2" ref="baseInfoRef" @processNameChange="processNameChange"></contact-init-base-info> <contact-init-base-info v-else-if="currentNode === 2" ref="baseInfoRef" :disabled="isLook" @processNameChange="processNameChange"></contact-init-base-info>
<!-- 节点3起草人填写意见 --> <!-- 节点3起草人填写意见 -->
<drafter-enter-option-base-info v-else-if="currentNode === 3" ref="baseInfoRef"></drafter-enter-option-base-info> <drafter-enter-option-base-info v-else-if="currentNode === 3" ref="baseInfoRef" :disabled="isLook"></drafter-enter-option-base-info>
<!-- 节点4起草人部长审批 --> <!-- 节点4起草人部长审批 -->
<!-- 节点5标准化审批 --> <!-- 节点5标准化审批 -->
<recheck-approve-base-info v-else-if="currentNode === 4 || currentNode === 5" ref="baseInfoRef"></recheck-approve-base-info> <recheck-approve-base-info v-else-if="currentNode === 4 || currentNode === 5" ref="baseInfoRef" :disabled="isLook"></recheck-approve-base-info>
<!-- 流程审批信息 --> <!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -69,11 +69,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>
@@ -84,7 +85,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 || currentNode === 2"> <template v-if="currentNode === 1 || currentNode === 2">
<!-- 保存 --> <!-- 保存 -->
@@ -131,14 +132,16 @@ import {
enStandardRecheckTurnTo, enStandardRecheckTurnTo,
enStandardRecheckAgree, enStandardRecheckAgree,
enStandardRecheckReject, enStandardRecheckReject,
enStandardRecheckGetDataDraft enStandardRecheckGetDataDraft,
saveSnapShot,
getLookData
} from '@/api/workCenter' } from '@/api/workCenter'
import ContactInitBaseInfo from './modules/ContactInitBaseInfo' import ContactInitBaseInfo from './modules/ContactInitBaseInfo'
import StandardizationInitBaseInfo from './modules/StandardizationInitBaseInfo' 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, EsRecheckNodes } from '@/enums/commonEnums' import { ProcessKey, EsRecheckNodes, ProcessType } from '@/enums/commonEnums'
import Vue from 'vue' import Vue from 'vue'
import { USER_INFO } from '../../../store/mutation-types' import { USER_INFO } from '../../../store/mutation-types'
@@ -217,13 +220,22 @@ export default {
this.personnelInfoData[0].userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' this.personnelInfoData[0].userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
} }
}) })
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) {
// 说明是已发起流程 // 说明是已发起流程
@@ -286,7 +298,8 @@ export default {
url: { url: {
list: '' // 人员信息的右侧表格获取接口 list: '' // 人员信息的右侧表格获取接口
}, },
onlySelectFromFlowStation: [EsRecheckNodes.standardizationApproval.value] // 只能在标准与流程所里选人的节点 onlySelectFromFlowStation: [EsRecheckNodes.standardizationApproval.value], // 只能在标准与流程所里选人的节点
isLook: false
} }
}, },
methods: { methods: {
@@ -298,6 +311,9 @@ export default {
if (type === 'todo') { if (type === 'todo') {
func = enStandardRecheckGetDataById func = enStandardRecheckGetDataById
params = param.taskId params = param.taskId
} else if (type === 'look') {
func = getLookData
params = param
} else { } else {
func = enStandardRecheckGetDataDraft func = enStandardRecheckGetDataDraft
params = param params = param
@@ -417,6 +433,52 @@ 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 (callback) {
// 流程信息表单
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_RECHECK.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
// 节点一时候的提交 // 节点一时候的提交
handleStart () { handleStart () {
if (this.loading) return if (this.loading) return
@@ -448,16 +510,32 @@ export default {
paramObj.common.taskId = this.$route.query.taskId paramObj.common.taskId = this.$route.query.taskId
} else { } else {
func = enStandardRecheckApproval func = enStandardRecheckApproval
// 快照JSON
paramObj.common.infoJsonStr = this.getParamJsonStr()
}
if (this.$route.query.taskId) {
this.saveParamJsonStr(() => {
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
})
} else {
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} }
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
} }
@@ -502,14 +580,17 @@ export default {
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
param.data = Object.assign({}, data.formInline) param.data = Object.assign({}, data.formInline)
console.log(param) console.log(param)
enStandardRecheckAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardRecheckAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
@@ -529,14 +610,17 @@ 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
enStandardRecheckAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardRecheckAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
}) })
@@ -556,16 +640,19 @@ 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
enStandardRecheckReject(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardRecheckReject(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.loading = false
this.validatorRules.commitText.rules[0].required = false }
}).finally(() => {
this.validatorRules.commitText.rules[0].required = false
})
}) })
} }
}) })
@@ -117,7 +117,7 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="recheckAdvice"> <a-form-model-item class="item-model" prop="recheckAdvice">
<a-radio-group v-model="formInline.recheckAdvice"> <a-radio-group v-model="formInline.recheckAdvice" :disabled="disabled">
<!-- 继续有效 --> <!-- 继续有效 -->
<a-radio :value="Recheck.STAND_GOOD.value"> <a-radio :value="Recheck.STAND_GOOD.value">
{{ $t('workCenter.enStandardRecheck.standGood') }} {{ $t('workCenter.enStandardRecheck.standGood') }}
@@ -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' : ''"
@@ -33,7 +33,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>
@@ -44,7 +44,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>
@@ -54,41 +54,48 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 节点1主起草人起草分发 --> <!-- 节点1主起草人起草分发 -->
<main-drafter-sent-base-info v-if="currentNode === 1" :flowInitType="flowInitType" ref="baseInfoRef" @processNameChange="processNameChange" @save="handleSave"></main-drafter-sent-base-info> <main-drafter-sent-base-info
v-if="currentNode === 1" :flowInitType="flowInitType" ref="baseInfoRef" :disabled="isLook"
@processNameChange="processNameChange" @save="handleSave" @onlineEditView="onlineEditView"
></main-drafter-sent-base-info>
<!-- 节点2其他起草人上传企标 --> <!-- 节点2其他起草人上传企标 -->
<other-drafter-upload-standard-base-info v-if="currentNode === 2" ref="baseInfoRef" @onlineEditView="onlineEditView"></other-drafter-upload-standard-base-info> <other-drafter-upload-standard-base-info
v-if="currentNode === 2" ref="baseInfoRef" :disabled="isLook"
@onlineEditView="onlineEditView"></other-drafter-upload-standard-base-info>
<!-- 节点3主起草人汇总上传会议纪要 --> <!-- 节点3主起草人汇总上传会议纪要 -->
<main-drafter-collect-upload-minute-base-info v-if="currentNode === 3" ref="baseInfoRef" @save="handleSave"></main-drafter-collect-upload-minute-base-info> <main-drafter-collect-upload-minute-base-info
v-if="currentNode === 3" ref="baseInfoRef" :disabled="isLook"
@save="handleSave" @onlineEditView="onlineEditView"></main-drafter-collect-upload-minute-base-info>
<!-- 节点4标准化审核 --> <!-- 节点4标准化审核 -->
<standardization-audit-base-info <standardization-audit-base-info
v-if="currentNode === 4" ref="baseInfoRef" v-if="currentNode === 4" ref="baseInfoRef" :disabled="isLook"
@standardizationAuditIsMeeting="standardizationAuditIsMeeting" @standardizationAuditIsMeeting="standardizationAuditIsMeeting"
@onlineEditView="onlineEditView"></standardization-audit-base-info> @onlineEditView="onlineEditView"></standardization-audit-base-info>
<!-- 节点5评分人打分 --> <!-- 节点5评分人打分 -->
<scorer-mark-base-info v-if="currentNode === 5" ref="baseInfoRef" @onlineEditView="onlineEditView"></scorer-mark-base-info> <scorer-mark-base-info v-if="currentNode === 5" ref="baseInfoRef" :disabled="isLook" @onlineEditView="onlineEditView"></scorer-mark-base-info>
<!-- 节点6标准化确认是否开启征求意见 --> <!-- 节点6标准化确认是否开启征求意见 -->
<confirm-whether-comment-base-info v-if="currentNode === 6" ref="baseInfoRef" @onlineEditView="onlineEditView"></confirm-whether-comment-base-info> <confirm-whether-comment-base-info v-if="currentNode === 6" ref="baseInfoRef" :disabled="isLook" @onlineEditView="onlineEditView"></confirm-whether-comment-base-info>
<!-- 节点7部所联络人下发 --> <!-- 节点7部所联络人下发 -->
<depart-liaison-issue-base-info v-if="currentNode === 7" ref="baseInfoRef" @onlineEditView="onlineEditView"></depart-liaison-issue-base-info> <depart-liaison-issue-base-info v-if="currentNode === 7" ref="baseInfoRef" :disabled="isLook" @onlineEditView="onlineEditView"></depart-liaison-issue-base-info>
<!-- 节点8征求意见对象填写意见 --> <!-- 节点8征求意见对象填写意见 -->
<comment-object-enter-base-info v-if="currentNode === 8" ref="baseInfoRef" @onlineEditView="onlineEditView"></comment-object-enter-base-info> <comment-object-enter-base-info v-if="currentNode === 8" ref="baseInfoRef" :disabled="isLook" @onlineEditView="onlineEditView"></comment-object-enter-base-info>
<!-- 节点9部所联络人汇总数据 --> <!-- 节点9部所联络人汇总数据 -->
<depart-liaison-collect-base-info v-if="currentNode === 9" ref="baseInfoRef" @onlineEditView="onlineEditView"></depart-liaison-collect-base-info> <depart-liaison-collect-base-info v-if="currentNode === 9" ref="baseInfoRef" :disabled="isLook" @onlineEditView="onlineEditView"></depart-liaison-collect-base-info>
<!-- 节点10部所联络人主管级领导审批 --> <!-- 节点10部所联络人主管级领导审批 -->
<depart-liaison-leader-approve-base-info v-if="currentNode === 10" ref="baseInfoRef" @onlineEditView="onlineEditView"></depart-liaison-leader-approve-base-info> <depart-liaison-leader-approve-base-info v-if="currentNode === 10" ref="baseInfoRef" :disabled="isLook" @onlineEditView="onlineEditView"></depart-liaison-leader-approve-base-info>
<!-- 节点11主起草人汇总 --> <!-- 节点11主起草人汇总 -->
<main-drafter-collect-base-info v-if="currentNode === 11" ref="baseInfoRef" @save="handleSave"></main-drafter-collect-base-info> <main-drafter-collect-base-info v-if="currentNode === 11" ref="baseInfoRef" :disabled="isLook" @save="handleSave" @onlineEditView="onlineEditView"></main-drafter-collect-base-info>
<!-- 节点12主起草人上传会议纪要 --> <!-- 节点12主起草人上传会议纪要 -->
<main-drafter-upload-minute-base-info v-if="currentNode === 12" ref="baseInfoRef" @save="handleSave"></main-drafter-upload-minute-base-info> <main-drafter-upload-minute-base-info v-if="currentNode === 12" ref="baseInfoRef" :disabled="isLook" @save="handleSave" @onlineEditView="onlineEditView"></main-drafter-upload-minute-base-info>
<!-- 节点13其他起草人校对 --> <!-- 节点13其他起草人校对 -->
<!-- 节点14主管级领导审批 --> <!-- 节点14主管级领导审批 -->
<!-- 节点15标准化审批 --> <!-- 节点15标准化审批 -->
<!-- 节点16相关部门领导会签 --> <!-- 节点16相关部门领导会签 -->
<!-- 节点17总工程师审批 --> <!-- 节点17总工程师审批 -->
<!-- 只有标准文本 --> <!-- 只有标准文本 -->
<other-drafter-proofread-base-info v-if="[13, 14, 15, 16, 17].includes(currentNode)" ref="baseInfoRef" @onlineEditView="onlineEditView"></other-drafter-proofread-base-info> <other-drafter-proofread-base-info v-if="[13, 14, 15, 16, 17].includes(currentNode)" ref="baseInfoRef" :disabled="isLook" @onlineEditView="onlineEditView"></other-drafter-proofread-base-info>
<!-- 节点18主起草人发布 --> <!-- 节点18主起草人发布 -->
<main-drafter-publish-base-info v-if="currentNode === 18" ref="baseInfoRef" @save="handleSave"></main-drafter-publish-base-info> <main-drafter-publish-base-info v-if="currentNode === 18" ref="baseInfoRef" :disabled="isLook" @save="handleSave" @onlineEditView="onlineEditView"></main-drafter-publish-base-info>
<!-- 流程审批信息 --> <!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -98,11 +105,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>
@@ -115,7 +123,7 @@
</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">
<!-- 保存 --> <!-- 保存 -->
@@ -173,7 +181,7 @@ import MainDrafterCollectUploadMinuteBaseInfo from './modules/MainDrafterCollect
import MainDrafterUploadMinuteBaseInfo from './modules/MainDrafterUploadMinuteBaseInfo' import MainDrafterUploadMinuteBaseInfo from './modules/MainDrafterUploadMinuteBaseInfo'
import OtherDrafterProofreadBaseInfo from './modules/OtherDrafterProofreadBaseInfo' import OtherDrafterProofreadBaseInfo from './modules/OtherDrafterProofreadBaseInfo'
import MainDrafterPublishBaseInfo from './modules/MainDrafterPublishBaseInfo' import MainDrafterPublishBaseInfo from './modules/MainDrafterPublishBaseInfo'
import { ProcessKey, EsRevisionNodes } from '../../../enums/commonEnums' import { ProcessKey, EsRevisionNodes, ProcessType } from '../../../enums/commonEnums'
import { import {
enStandardEditAgree, enStandardEditAgree,
enStandardEditApproval, enStandardEditApproval,
@@ -182,10 +190,10 @@ import {
enStandardEditReject, enStandardEditReject,
enStandardEditSave, enStandardEditSave,
enStandardEditTurnTo, enStandardEditTurnTo,
queryFileInfoByEditId saveSnapShot,
getLookData
} from '@/api/workCenter' } from '@/api/workCenter'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { Base64 } from 'js-base64'
import { onlineEditorView } from '../../../utils/onlyOfficeUtils' import { onlineEditorView } from '../../../utils/onlyOfficeUtils'
export default { export default {
@@ -293,13 +301,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) {
// 说明是已发起流程 // 说明是已发起流程
@@ -371,7 +388,8 @@ export default {
rejectBtnDisabled: false, // 驳回按钮是否置灰 rejectBtnDisabled: false, // 驳回按钮是否置灰
agreeBtnDisabled: false, // 同意按钮是否置灰 agreeBtnDisabled: false, // 同意按钮是否置灰
tempDraftId: '', // 临时草稿id,解决发起的时候点在线编辑会生成多条草稿的问题 tempDraftId: '', // 临时草稿id,解决发起的时候点在线编辑会生成多条草稿的问题
onlySelectFromFlowStation: [EsRevisionNodes.standardizationAudit.value] // 只能在标准与流程所里选人的节点 onlySelectFromFlowStation: [EsRevisionNodes.standardizationAudit.value], // 只能在标准与流程所里选人的节点
isLook: false
} }
}, },
methods: { methods: {
@@ -382,6 +400,9 @@ export default {
if (type === 'todo') { if (type === 'todo') {
func = enStandardEditGetDataById func = enStandardEditGetDataById
params = param.taskId params = param.taskId
} else if (type === 'look') {
func = getLookData
params = param
} else { } else {
func = enStandardEditGetDataDraft func = enStandardEditGetDataDraft
params = param params = param
@@ -540,6 +561,52 @@ 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: Object.assign({}, baseInfo, { id: this.model.data ? this.model.data.id : '' }),
personnelObj: personnelObj
})
return infoJsonStr
},
// 保存快照
saveParamJsonStr (callback) {
// 流程信息表单
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: Object.assign({}, baseInfo, { id: this.model.data ? this.model.data.id : '' }),
personnelObj: personnelObj
})
params.taskId = this.$route.query.taskId
params.prcType = ProcessType.ES_EDIT.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
// 节点一时候的提交,发起变更 // 节点一时候的提交,发起变更
handleStart () { handleStart () {
if (this.loading) return if (this.loading) return
@@ -588,16 +655,32 @@ export default {
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
} else { } else {
func = enStandardEditApproval func = enStandardEditApproval
// 快照JSON
param.common.infoJsonStr = this.getParamJsonStr()
}
if (this.$route.query.taskId) {
this.saveParamJsonStr(() => {
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
})
} else {
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} }
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
} }
@@ -652,14 +735,17 @@ export default {
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
param.data = data param.data = data
this.loading = true this.loading = true
enStandardEditAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardEditAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
@@ -676,14 +762,17 @@ export default {
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
param.data = data param.data = data
this.loading = true this.loading = true
enStandardEditAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardEditAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
@@ -707,14 +796,17 @@ export default {
param.common = Object.assign({}, values) param.common = Object.assign({}, values)
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
param.data = data param.data = data
enStandardEditAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardEditAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
} else { } else {
@@ -723,14 +815,17 @@ 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
enStandardEditAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardEditAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
} }
@@ -751,16 +846,19 @@ 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
enStandardEditReject(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardEditReject(param).then(async res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.loading = false
this.validatorRules.commitText.rules[0].required = false }
}).finally(() => {
this.validatorRules.commitText.rules[0].required = false
})
}) })
} }
}) })
@@ -151,6 +151,8 @@ export default {
const data = {} const data = {}
data.advices = this.dataSource data.advices = this.dataSource
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData()) data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
// 在线编辑文件id
data.onEditFile = this.onEditFile
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -25,7 +25,7 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="adviceFlag"> <a-form-model-item class="item-model" prop="adviceFlag">
<a-radio-group v-model="formInline.adviceFlag"> <a-radio-group v-model="formInline.adviceFlag" :disabled="disabled">
<a-radio value="1"> <a-radio value="1">
{{ $t('yes') }} {{ $t('yes') }}
</a-radio> </a-radio>
@@ -132,6 +132,8 @@ export default {
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = Object.assign({}, this.formInline) const data = Object.assign({}, this.formInline)
// 在线编辑文件id
data.onEditFile = this.onEditFile
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -179,6 +179,8 @@ export default {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = Object.assign({}, this.formInline) const data = Object.assign({}, this.formInline)
data.advices = this.dataSource data.advices = this.dataSource
// 在线编辑文件id
data.onEditFile = this.onEditFile
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -116,6 +116,8 @@ export default {
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = Object.assign({}, this.formInline) const data = Object.assign({}, this.formInline)
// 在线编辑文件id
data.onEditFile = this.onEditFile
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -158,6 +158,8 @@ export default {
const data = {} const data = {}
data.advices = this.dataSource data.advices = this.dataSource
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData()) data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
// 在线编辑文件id
data.onEditFile = this.onEditFile
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -11,7 +11,8 @@
<a-form-model-item class="item-model"> <a-form-model-item class="item-model">
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<p>{{ $t('enterpriseStandard') }}</p> <p>{{ $t('enterpriseStandard') }}</p>
<a-button type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button v-if="!disabled" type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
<a-button v-else type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -128,7 +129,7 @@ export default {
slots: { title: 'customTitleHandlingSuggestion' }, slots: { title: 'customTitleHandlingSuggestion' },
customRender: (text, row, index) => { customRender: (text, row, index) => {
const obj = { const obj = {
children: <a-select v-model={row.handleAdvice} children: <a-select v-model={row.handleAdvice} disabled={this.disabled}
placeholder={this.$t('pleaseSelect')} class={'handle-suggest-select'} placeholder={this.$t('pleaseSelect')} class={'handle-suggest-select'}
options={this.handlingSuggestionOption} options={this.handlingSuggestionOption}
/>, />,
@@ -144,7 +145,7 @@ export default {
dataIndex: 'reason', dataIndex: 'reason',
customRender: (text, row, index) => { customRender: (text, row, index) => {
const obj = { const obj = {
children: <a-input v-model={row.reason} maxLength={50} children: <a-input v-model={row.reason} maxLength={50} disabled={this.disabled}
title={row.reason} placeholder={this.$t('pleaseEnter')} title={row.reason} placeholder={this.$t('pleaseEnter')}
onChange={ e => { onChange={ e => {
e.target.value = e.target.value.trim() e.target.value = e.target.value.trim()
@@ -292,6 +293,10 @@ export default {
} else { } else {
onlineEditor(params, this.onEditFile) onlineEditor(params, this.onEditFile)
} }
},
// 在线编辑的查看
onlineEditView () {
this.$emit('onlineEditView', this.onEditFile)
} }
} }
} }
@@ -38,7 +38,8 @@
<a-form-model-item class="item-model"> <a-form-model-item class="item-model">
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<p>{{ $t('enterpriseStandard') }}</p> <p>{{ $t('enterpriseStandard') }}</p>
<a-button type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button v-if="!disabled" type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
<a-button v-else type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -109,7 +110,7 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="inspectFlag"> <a-form-model-item class="item-model" prop="inspectFlag">
<a-radio-group v-model="formInline.inspectFlag"> <a-radio-group v-model="formInline.inspectFlag" :disabled="disabled">
<a-radio value="1"> <a-radio value="1">
{{ $t('yes') }} {{ $t('yes') }}
</a-radio> </a-radio>
@@ -321,8 +322,7 @@ export default {
width: 200, width: 200,
dataIndex: 'rectificationDepartment', dataIndex: 'rectificationDepartment',
customRender: (value, row, index) => { customRender: (value, row, index) => {
return <j-select-depart v-model={row.rectificationDepartment} return <j-select-depart v-model={row.rectificationDepartment} disabled={this.disabled} backDepart={true} />
backDepart={true} />
} }
}, },
{ {
@@ -541,6 +541,10 @@ export default {
} else { } else {
onlineEditor(params, this.onEditFile) onlineEditor(params, this.onEditFile)
} }
},
// 在线编辑的查看
onlineEditView () {
this.$emit('onlineEditView', this.onEditFile)
} }
} }
} }
@@ -48,7 +48,8 @@
<a-form-model-item class="item-model"> <a-form-model-item class="item-model">
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<p>{{ $t('enterpriseStandard') }}</p> <p>{{ $t('enterpriseStandard') }}</p>
<a-button type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button v-if="!disabled" type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
<a-button v-else type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -184,6 +185,10 @@ export default {
} else { } else {
onlineEditor(params, this.onEditFile) onlineEditor(params, this.onEditFile)
} }
},
// 在线编辑的查看
onlineEditView () {
this.$emit('onlineEditView', this.onEditFile)
} }
} }
} }
@@ -11,7 +11,8 @@
<a-form-model-item class="item-model"> <a-form-model-item class="item-model">
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<p>{{ $t('enterpriseStandard') }}</p> <p>{{ $t('enterpriseStandard') }}</p>
<a-button type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button v-if="!disabled" type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
<a-button v-else type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -242,6 +243,10 @@ export default {
// false表示保存后不返回 // false表示保存后不返回
this.$emit('save', false) this.$emit('save', false)
} }
},
// 在线编辑的查看
onlineEditView () {
this.$emit('onlineEditView', this.onEditFile)
} }
} }
} }
@@ -156,7 +156,8 @@
<a-form-model-item class="item-model"> <a-form-model-item class="item-model">
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<p>{{ $t('enterpriseStandard') }}</p> <p>{{ $t('enterpriseStandard') }}</p>
<a-button type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button v-if="!disabled" type="primary" @click="toOnlineEditor">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
<a-button v-else type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -392,6 +393,10 @@ export default {
} else { } else {
onlineEditor(params, this.onEditFile) onlineEditor(params, this.onEditFile)
} }
},
// 在线编辑的查看
onlineEditView () {
this.$emit('onlineEditView', this.onEditFile)
} }
} }
} }
@@ -46,6 +46,8 @@ export default {
getData () { getData () {
const data = {} const data = {}
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData()) data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
// 在线编辑文件id
data.onEditFile = this.onEditFile
return data return data
}, },
// 在线编辑的查看 // 在线编辑的查看
@@ -40,7 +40,6 @@
<a v-if="record.operateType !== '1'" <a v-if="record.operateType !== '1'"
@click="handleUploadStandard(record)" @click="handleUploadStandard(record)"
class="table-ope-btn" class="table-ope-btn"
:disabled="disabled"
> >
{{ $t('workCenter.enStandardRevision.uploadStandard') }} {{ $t('workCenter.enStandardRevision.uploadStandard') }}
</a> </a>
@@ -160,6 +159,8 @@ export default {
const data = {} const data = {}
data.otherDraftUserVOS = this.dataSource data.otherDraftUserVOS = this.dataSource
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData()) data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
// 在线编辑文件id
data.onEditFile = this.onEditFile
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -178,6 +178,13 @@ const fixDataSourse = [
export default { export default {
name: 'ScorerMarkBaseInfo', name: 'ScorerMarkBaseInfo',
components: { BaseInfoForm }, components: { BaseInfoForm },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () { data () {
return { return {
columns: [ columns: [
@@ -267,7 +274,7 @@ export default {
const obj = { const obj = {
children: <a-input-number v-model={this.dataSource[index].evaluateScore} children: <a-input-number v-model={this.dataSource[index].evaluateScore}
min={this.dataSource[index].min} max={this.dataSource[index].max} precision={0} min={this.dataSource[index].min} max={this.dataSource[index].max} precision={0}
title={this.dataSource[index].evaluateScore + ''} placeholder={'请输入'} title={this.dataSource[index].evaluateScore + ''} placeholder={'请输入'} disabled={this.disabled}
/>, />,
// children: <a-input v-model={this.dataSource[index].evaluateScore} maxLength={50} // children: <a-input v-model={this.dataSource[index].evaluateScore} maxLength={50}
// title={this.dataSource[index].evaluateScore} placeholder={'请输入'} // title={this.dataSource[index].evaluateScore} placeholder={'请输入'}
@@ -305,7 +312,7 @@ export default {
// } } // } }
// />, // />,
children: <a-textarea v-model={this.dataSource[index].deductionScoreReason} maxLength={500} children: <a-textarea v-model={this.dataSource[index].deductionScoreReason} maxLength={500}
title={this.dataSource[index].deductionScoreReason} placeholder={'请输入'} title={this.dataSource[index].deductionScoreReason} placeholder={'请输入'} disabled={this.disabled}
/>, />,
attrs: {} attrs: {}
} }
@@ -377,6 +384,8 @@ export default {
} }
data.reviewMeetingDetails = arr data.reviewMeetingDetails = arr
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData()) data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
// 在线编辑文件id
data.onEditFile = this.onEditFile
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -26,7 +26,7 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="reviewMeetingFlag"> <a-form-model-item class="item-model" prop="reviewMeetingFlag">
<a-radio-group v-model="formInline.reviewMeetingFlag" @change="reviewMeetingFlagChange" :defaultValue="1"> <a-radio-group v-model="formInline.reviewMeetingFlag" @change="reviewMeetingFlagChange" :defaultValue="1" :disabled="disabled">
<a-radio value="1"> <a-radio value="1">
{{ $t('yes') }} {{ $t('yes') }}
</a-radio> </a-radio>
@@ -195,6 +195,8 @@ export default {
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = Object.assign({}, this.formInline) const data = Object.assign({}, this.formInline)
// 在线编辑文件id
data.onEditFile = this.onEditFile
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -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,52 @@ 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 (callback) {
// 流程信息表单
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(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
// 节点一时候的提交 // 节点一时候的提交
handleStart () { handleStart () {
if (this.loading) return if (this.loading) return
@@ -393,16 +455,32 @@ 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()
}
if (this.$route.query.taskId) {
this.saveParamJsonStr(() => {
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
})
} else {
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} }
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
} }
@@ -448,14 +526,17 @@ 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 => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardSealSaveAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
}) })
@@ -475,16 +556,19 @@ 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 => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardSealSaveReject(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.loading = false
this.validatorRules.commitText.rules[0].required = false }
}).finally(() => {
this.validatorRules.commitText.rules[0].required = false
})
}) })
} }
}) })
@@ -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 {
enStandardStartUseApproval, enStandardStartUseApproval,
enStandardStartUseTurnTo, enStandardStartUseTurnTo,
enStandardStartUseAgree, enStandardStartUseAgree,
enStandardStartUseReject enStandardStartUseReject,
getLookData,
saveSnapShot
} 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, EsStartUseNodes } from '@/enums/commonEnums' import { ProcessKey, EsStartUseNodes, ProcessType } from '@/enums/commonEnums'
export default { export default {
name: 'EnterpriseStandardStartUseFlow', name: 'EnterpriseStandardStartUseFlow',
@@ -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: [EsStartUseNodes.standardizationApproval.value] // 只能在标准与流程所里选人的节点 onlySelectFromFlowStation: [EsStartUseNodes.standardizationApproval.value], // 只能在标准与流程所里选人的节点
isLook: false
} }
}, },
methods: { methods: {
@@ -250,6 +263,9 @@ export default {
if (type === 'todo') { if (type === 'todo') {
func = enStandardStartUseGetDataById func = enStandardStartUseGetDataById
params = param.taskId params = param.taskId
} else if (type === 'look') {
func = getLookData
params = param
} else { } else {
func = enStandardStartUseGetDataDraft func = enStandardStartUseGetDataDraft
params = param params = param
@@ -360,6 +376,52 @@ 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 (callback) {
// 流程信息表单
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_ENABLE.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
},
// 节点一时候的提交 // 节点一时候的提交
handleStart () { handleStart () {
if (this.loading) return if (this.loading) return
@@ -391,16 +453,33 @@ export default {
paramObj.common.taskId = this.$route.query.taskId paramObj.common.taskId = this.$route.query.taskId
} else { } else {
func = enStandardStartUseApproval func = enStandardStartUseApproval
// 快照JSON
paramObj.common.infoJsonStr = this.getParamJsonStr()
}
if (this.$route.query.taskId) {
// 先保存快照再提交
this.saveParamJsonStr(() => {
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
})
} else {
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} }
func(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.loading = false
}
})
} else { } else {
this.switchValue = 'base' this.switchValue = 'base'
} }
@@ -446,14 +525,17 @@ 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
enStandardStartUseAgree(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardStartUseAgree(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
this.loading = false
}
})
}) })
} }
}) })
@@ -473,16 +555,19 @@ 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
enStandardStartUseReject(param).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) enStandardStartUseReject(param).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.loading = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.loading = false
this.validatorRules.commitText.rules[0].required = false }
}).finally(() => {
this.validatorRules.commitText.rules[0].required = false
})
}) })
} }
}) })
@@ -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' : ''"
@@ -55,7 +55,7 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 流程表格 --> <!-- 流程表格 -->
<extension-request-table ref="extensionRequestTable" :current-node="currentNode" :project-id="projectId"/> <extension-request-table ref="extensionRequestTable" :current-node="currentNode" :project-id="projectId" :disabled="disabled"/>
<!-- 流程审批信息 --> <!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -65,11 +65,12 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')" <a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500" :maxLength="500"
:rows="4" :rows="4"
:disabled="disabled"
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>
@@ -82,7 +83,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('transfer')" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button> <a-button v-if="btn.includes('transfer')" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!--保存--> <!--保存-->
@@ -106,14 +107,14 @@ import PersonnelInfo from '@comp/PersonnelInfo'
import ProcessDetailList from '@comp/ProcessDetailList' import ProcessDetailList from '@comp/ProcessDetailList'
import ExtensionRequestTable from '@views/workCenter/inspectionExtensionRequestProcess/modules/ExtensionRequestTable' import ExtensionRequestTable from '@views/workCenter/inspectionExtensionRequestProcess/modules/ExtensionRequestTable'
import UserSelectModal from '@comp/selection/UserSelectModal' import UserSelectModal from '@comp/selection/UserSelectModal'
import { ApprovalOpinions, InspectionExtensionRequestProcess, ProcessKey } from '@/enums/commonEnums' import { ApprovalOpinions, InspectionExtensionRequestProcess, ProcessKey, ProcessType } from '@/enums/commonEnums'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { import {
approvalInspectExtension, approvalInspectExtension,
getInspectExtensionDetail, getInspectExtensionDetail,
getInspectExtensionProjectId, getInspectExtensionProjectId, getLookData,
rejectInspectExtension, rejectInspectExtension,
saveInspectExtension, saveInspectExtension, saveSnapShot,
startInspectExtension, startInspectExtension,
transferInspectExtension transferInspectExtension
} from '@api/workCenter' } from '@api/workCenter'
@@ -127,7 +128,7 @@ export default {
return { return {
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 }
@@ -195,7 +196,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 || InspectionExtensionRequestProcess.initiate.value this.currentNode = nodeId || InspectionExtensionRequestProcess.initiate.value
this.currentNodeName = taskName || InspectionExtensionRequestProcess.initiate.text this.currentNodeName = taskName || InspectionExtensionRequestProcess.initiate.text
@@ -206,6 +208,11 @@ export default {
// 同意按钮 // 同意按钮
this.btn = ['agree'] this.btn = ['agree']
} }
// 快照回显
if (this.$route.query.snapshotId) {
this.loadSnapshotPage()
return
}
// 查询人员信息 // 查询人员信息
this.getPersonInfoStructure(this.processKey, () => { this.getPersonInfoStructure(this.processKey, () => {
this.initPersonInfoData(this.isInitiate) this.initPersonInfoData(this.isInitiate)
@@ -339,6 +346,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)
if (!personInfo) { if (!personInfo) {
@@ -368,7 +377,9 @@ export default {
// 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了) // 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了)
personInfo: this.$refs.personnelInfo.getDataObj(), personInfo: this.$refs.personnelInfo.getDataObj(),
// 业务表格数据,用于强制撤回后回显 // 业务表格数据,用于强制撤回后回显
draftData: params.processEsInspectDelayApplyList draftData: params.processEsInspectDelayApplyList,
// 将流程数据保存json,后续进行快照回显
prcData: params
}) })
} }
@@ -378,6 +389,61 @@ 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.INSPECTION_EXTENSION_REQUEST_PROCESS.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.$refs.extensionRequestTable.setData(prcData.processEsInspectDelayApplyList || [])
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
})
}).finally(() => {
this.loading = false
})
},
/** /**
* 转办弹框 * 转办弹框
*/ */
@@ -487,19 +553,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
// 不是提交按钮 // 不是提交按钮
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 approvalInspectExtension(res) // 保存快照,成功了就调接口,失败了就提示
return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return approvalInspectExtension(params)
} else {
return res
}
})
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -538,11 +611,18 @@ export default {
return return
} }
this.loading = true this.loading = true
this.getPageParams().then(res => { this.getPageParams().then(params => {
res.map.pass = false params.map.pass = false
// 审批意见 // 审批意见
res.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value params.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value
return rejectInspectExtension(res) // 保存快照,成功了就调接口,失败了就提示
return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return rejectInspectExtension(params)
} else {
return res
}
})
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="table-operator" v-if="isInitiate"> <div class="table-operator" v-if="isInitiate && !disabled">
<!-- 新增 --> <!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button> <a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
</div> </div>
@@ -35,6 +35,7 @@
v-model="record.liaisons" v-model="record.liaisons"
:name-str="record.liaisons_dictText" :name-str="record.liaisons_dictText"
:showBtn="false" :showBtn="false"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.incExtensionRequest.inspectionContactPerson')" :placeholder="$t('pleaseSelect')+$t('workCenter.incExtensionRequest.inspectionContactPerson')"
@nameChange="nameChange($event, record)" /> @nameChange="nameChange($event, record)" />
</div> </div>
@@ -48,9 +49,9 @@
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="{text, record, index}"> <template slot="action" slot-scope="{text, record, index}">
<!-- 节点1显示申请延期和删除后续不显示操作列 --> <!-- 节点1显示申请延期和删除后续不显示操作列 -->
<a @click="handleRequestExtension(record, index)" >{{ $t('workCenter.incExtensionRequest.requestExtension') }}</a> <a @click="handleRequestExtension(record, index)" :disabled="disabled">{{ $t('workCenter.incExtensionRequest.requestExtension') }}</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDelete(index)" >{{ $t('delete') }}</a> <a @click="handleDelete(index)" :disabled="disabled">{{ $t('delete') }}</a>
</template> </template>
</j-table> </j-table>
</div> </div>
@@ -75,6 +76,12 @@ export default {
components: { UserSelectByContact, RequestExtensionModal, ExtensionRequestTableModal, JTable }, components: { UserSelectByContact, RequestExtensionModal, ExtensionRequestTableModal, JTable },
mixins: [JeroListMixin], mixins: [JeroListMixin],
props: { props: {
// 禁用
disabled: {
type: Boolean,
default: false,
required: false
},
// 当前节点 // 当前节点
currentNode: { currentNode: {
type: String, type: String,
@@ -1,7 +1,7 @@
<template> <template>
<internal-detail-page :content-padding="0" :title="pageTitle" :loading="loading"> <internal-detail-page :content-padding="0" :title="pageTitle" :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' : ''"
@@ -25,7 +25,7 @@
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')" <a-input :placeholder="$t('pleaseEnter') + $t('processName')"
:maxLength="50" :maxLength="50"
:disabled="disabledProcessInfo" :disabled="disabledProcessInfo || isLook"
v-decorator="['processName', validatorRules.processName]" /> v-decorator="['processName', validatorRules.processName]" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -38,7 +38,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['processDueDate']" v-decorator="['processDueDate']"
:disabled="disabledProcessInfo" :disabled="disabledProcessInfo || isLook"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -48,7 +48,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')" <a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:disabled="disabledProcessInfo" :disabled="disabledProcessInfo || isLook"
:rows="4" :rows="4"
v-decorator="['processDescription']" /> v-decorator="['processDescription']" />
</a-form-item> </a-form-item>
@@ -62,7 +62,7 @@
<div class="form-flex-item custom-flex-form-item"> <div class="form-flex-item custom-flex-form-item">
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')"> <a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')">
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')" <a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')"
:maxLength="50" :maxLength="50" :disabled="isLook"
v-decorator="['standardNumberOrName', validatorRules.standardNumberOrName]" /> v-decorator="['standardNumberOrName', validatorRules.standardNumberOrName]" />
</a-form-item> </a-form-item>
</div> </div>
@@ -73,6 +73,7 @@
v-decorator="['projectId']" v-decorator="['projectId']"
show-search show-search
allowClear allowClear
:disabled="isLook"
:filter-option="filterOption"> :filter-option="filterOption">
<a-select-option v-for="item in projectSelectOptions" :key="item.id">{{ item.projectName }}</a-select-option> <a-select-option v-for="item in projectSelectOptions" :key="item.id">{{ item.projectName }}</a-select-option>
</a-select> </a-select>
@@ -82,6 +83,7 @@
<div class="form-flex-item custom-flex-form-item"> <div class="form-flex-item custom-flex-form-item">
<a-form-item :label="$t('workCenter.standardConsultationProcess.designEngineer')"> <a-form-item :label="$t('workCenter.standardConsultationProcess.designEngineer')">
<user-selection v-decorator="['engineerId', validatorRules.engineerId]" <user-selection v-decorator="['engineerId', validatorRules.engineerId]"
:disabled="isLook"
:name-str="businessInfo.engineerId_dictText" :name-str="businessInfo.engineerId_dictText"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
@nameChange="handleDesignEngineerNameChange" /> @nameChange="handleDesignEngineerNameChange" />
@@ -89,7 +91,7 @@
</div> </div>
<!--按条件查询--> <!--按条件查询-->
<a-button type="primary" class="form-search-btn" @click="selectStandard"> <a-button type="primary" class="form-search-btn" @click="selectStandard" :disabled="isLook">
{{ $t('workCenter.noMatchTracking.queryByCondition') }} {{ $t('workCenter.noMatchTracking.queryByCondition') }}
</a-button> </a-button>
</div> </div>
@@ -104,7 +106,7 @@
:pagination="false" :pagination="false"
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
:extra-form="extraForm" :extra-form="extraForm"
:all-disabled="expandTableDisabled"> :all-disabled="expandTableDisabled || isLook">
<!--跳转标准详情--> <!--跳转标准详情-->
<template v-slot:detail="{text, record}"> <template v-slot:detail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style"> <a-tooltip overlay-class-name="tooltip-style">
@@ -124,11 +126,12 @@
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:rows="4" :rows="4"
:disabled="isLook"
v-decorator="['handleText', validatorRules.handleText]" /> v-decorator="['handleText', validatorRules.handleText]" />
</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="['handleFile']" return-id multiple /> <j-upload v-decorator="['handleFile']" return-id multiple :disabled="isLook" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
@@ -143,7 +146,7 @@
</div> </div>
<!--底部按钮--> <!--底部按钮-->
<div class="detail-page-bottom-operate-box"> <div v-if="!isLook" class="detail-page-bottom-operate-box">
<!--转办 审批节点存在--> <!--转办 审批节点存在-->
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo"> <a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo">
{{ $t('turnTo') }} {{ $t('turnTo') }}
@@ -178,7 +181,12 @@ import PersonnelInfo from '../../../components/PersonnelInfo'
import InternalDetailPage from '../../../components/InternalDetailPage' import InternalDetailPage from '../../../components/InternalDetailPage'
import ProcessDetailList from '../../../components/ProcessDetailList' import ProcessDetailList from '../../../components/ProcessDetailList'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin' import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import { ProcessKey, NoMatchTrackingNodes, StandardSource } from '../../../enums/commonEnums' import {
ProcessKey,
NoMatchTrackingNodes,
StandardSource,
ProcessType
} from '../../../enums/commonEnums'
import UserSelection from '../../../components/selection/UserSelection' import UserSelection from '../../../components/selection/UserSelection'
import NoMatchItemSelectDrawer from './modules/NoMatchItemSelectDrawer' import NoMatchItemSelectDrawer from './modules/NoMatchItemSelectDrawer'
import { getCarTypeProjectList } from '../../../api/projectLibraryApi' import { getCarTypeProjectList } from '../../../api/projectLibraryApi'
@@ -186,7 +194,12 @@ import {
saveNoMatchTrackingProcess, saveNoMatchTrackingProcess,
queryNoMatchTrackingProcess, queryNoMatchTrackingProcess,
initialNoMatchTrackingProcess, initialNoMatchTrackingProcess,
submitNoMatchTrackingProcess, processTransfer, agreeNoMatchTrackingProcess, rejectNoMatchTrackingProcess submitNoMatchTrackingProcess,
processTransfer,
agreeNoMatchTrackingProcess,
rejectNoMatchTrackingProcess,
saveSnapShot,
getLookData
} from '../../../api/workCenter' } from '../../../api/workCenter'
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
import UserSelectModal from '../../../components/selection/UserSelectModal' import UserSelectModal from '../../../components/selection/UserSelectModal'
@@ -348,7 +361,8 @@ export default {
] ]
}, },
projectSelectOptions: [], // 项目下拉数据 projectSelectOptions: [], // 项目下拉数据
disabledBtnClick: false disabledBtnClick: false,
isLook: false // 是否是查看
} }
}, },
computed: { computed: {
@@ -377,19 +391,30 @@ export default {
} }
}, },
created () { created () {
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value, () => { if (this.$route.query.isLook + '' === '1') {
this.initDict() // 是查看
if (this.$route.query.processInstanceId || this.$route.query.draftId) { this.isLook = true
this.currentNode = this.$route.query.nodeId || NoMatchTrackingNodes.initial.value // 设置当前节点
this.initPersonInfoData(this.currentNode === NoMatchTrackingNodes.initial.value) this.currentNode = this.$route.query.nodeId
this.initProcessInfo() // 人员信息全部不可选
} else { this.initPersonInfoData(false)
this.currentNode = NoMatchTrackingNodes.initial.value // 查询数据
this.initPersonInfoData(this.currentNode === NoMatchTrackingNodes.initial.value) this.initProcessInfo()
} } else {
// 如果节点不是固定节点,就默认显示审批节点的信息 this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value, () => {
this.btnList = NoMatchTrackingNodes.propertyOfValue('btn', this.currentNode) || NoMatchTrackingNodes.regulatoryEngineer.btn this.initDict()
}) if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || NoMatchTrackingNodes.initial.value
this.initPersonInfoData(this.currentNode === NoMatchTrackingNodes.initial.value)
this.initProcessInfo()
} else {
this.currentNode = NoMatchTrackingNodes.initial.value
this.initPersonInfoData(this.currentNode === NoMatchTrackingNodes.initial.value)
}
// 如果节点不是固定节点,就默认显示审批节点的信息
this.btnList = NoMatchTrackingNodes.propertyOfValue('btn', this.currentNode) || NoMatchTrackingNodes.regulatoryEngineer.btn
})
}
}, },
methods: { methods: {
/** /**
@@ -409,15 +434,23 @@ export default {
*/ */
initProcessInfo () { initProcessInfo () {
this.loading = true this.loading = true
const params = { let params = {}
taskId: this.$route.query.taskId let func
} if (this.isLook) {
if (this.$route.query.draftId) { params.snapshotId = this.$route.query.snapshotId
params.draftId = this.$route.query.draftId func = getLookData
} else { } else {
params.processInstanceId = this.$route.query.processInstanceId params = {
taskId: this.$route.query.taskId
}
if (this.$route.query.draftId) {
params.draftId = this.$route.query.draftId
} else {
params.processInstanceId = this.$route.query.processInstanceId
}
func = queryNoMatchTrackingProcess
} }
queryNoMatchTrackingProcess(params).then(res => { func(params).then(res => {
if (res.success) { if (res.success) {
const { result = {} } = res const { result = {} } = res
// 草稿从json里取得 // 草稿从json里取得
@@ -497,6 +530,26 @@ export default {
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
) )
}, },
// 保存快照
saveParamJsonStr (callback) {
// 流程信息表单
const processInfoForm = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
// 流程审批信息
const approvalInfoForm = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
const params = { ...processInfoForm, ...approvalInfoForm }
params.infoJsonStr = JSON.stringify(this.dealSaveJsonData())
params.taskId = this.$route.query.taskId
params.prcType = ProcessType.NO_MATCH_TRACKING.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
this.disabledBtnClick = false
}
})
},
/** /**
* 转办 * 转办
*/ */
@@ -654,17 +707,34 @@ export default {
} else { } else {
submitFunc = submitNoMatchTrackingProcess submitFunc = submitNoMatchTrackingProcess
} }
submitFunc(formData).then(res => { if (this.currentNode === NoMatchTrackingNodes.initial.value && (!this.$route.query.processInstanceId || this.$route.query.draftId)) {
if (res.success) { submitFunc(formData).then(res => {
this.$message.success(res.message) if (res.success) {
this.goBack() this.$message.success(res.message)
} else { this.goBack()
this.$message.warning(res.message) } else {
this.disabledBtnClick = false this.$message.warning(res.message)
} this.disabledBtnClick = false
}).finally(() => { }
this.loading = false }).finally(() => {
}) this.loading = false
})
} else {
// 保存快照后提交
this.saveParamJsonStr(() => {
submitFunc(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.disabledBtnClick = false
}
}).finally(() => {
this.loading = false
})
})
}
}, },
/** /**
* 同意 * 同意
@@ -684,16 +754,19 @@ export default {
return return
} }
this.loading = true this.loading = true
agreeNoMatchTrackingProcess(formData).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) agreeNoMatchTrackingProcess(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
/** /**
@@ -712,16 +785,19 @@ export default {
return return
} }
this.loading = true this.loading = true
rejectNoMatchTrackingProcess(formData).then(res => { // 保存快照
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) rejectNoMatchTrackingProcess(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
handleDesignEngineerNameChange (name) { handleDesignEngineerNameChange (name) {
@@ -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="!disabledAll">
<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' : ''"
@@ -25,7 +25,7 @@
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')" <a-input :placeholder="$t('pleaseEnter') + $t('processName')"
:maxLength="50" :maxLength="50"
:disabled="disabled || processDisabled" :disabled="disabled || processDisabled || disabledAll"
v-decorator="['prcName', validatorRules.processName]" /> v-decorator="['prcName', validatorRules.processName]" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -34,7 +34,7 @@
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')" <a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
style="width: 100%" style="width: 100%"
:disabled="disabled || processDisabled" :disabled="disabled || processDisabled || disabledAll"
value-format="YYYY-MM-DD hh:mm:ss" value-format="YYYY-MM-DD hh:mm:ss"
v-decorator="['dueTime']" /> v-decorator="['dueTime']" />
</a-form-item> </a-form-item>
@@ -45,7 +45,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 || processDisabled" :disabled="disabled || processDisabled || disabledAll"
v-decorator="['prcMes']" /> v-decorator="['prcMes']" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -56,7 +56,7 @@
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 标准表格 --> <!-- 标准表格 -->
<base-info-table v-if="isInitiate" ref="baseInfoTable" :info="info" style="margin-bottom: 40px;"></base-info-table> <base-info-table v-if="isInitiate" ref="baseInfoTable" :info="info" style="margin-bottom: 40px;" :disabled-all="disabledAll"></base-info-table>
<!-- 表单 --> <!-- 表单 -->
<a-form :form="baseInfoForm"> <a-form :form="baseInfoForm">
<a-row> <a-row>
@@ -66,7 +66,7 @@
<a-form-item :labelCol="labelColBaseInfo" :wrapperCol="wrapperColBaseInfo" :label="$t('workCenter.permissionApplicationProcess.applicant')"> <a-form-item :labelCol="labelColBaseInfo" :wrapperCol="wrapperColBaseInfo" :label="$t('workCenter.permissionApplicationProcess.applicant')">
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.permissionApplicationProcess.applicant')" <a-input :placeholder="$t('pleaseEnter') + $t('workCenter.permissionApplicationProcess.applicant')"
:maxLength="50" :maxLength="50"
:disabled="disabled" :disabled="disabled || disabledAll"
v-decorator="['userDictText', validatorRules.applicant]" /> v-decorator="['userDictText', validatorRules.applicant]" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -74,7 +74,7 @@
<a-col :span="24"> <a-col :span="24">
<!-- 申请权限 --> <!-- 申请权限 -->
<a-form-item :labelCol="longLabelColBaseInfo" :wrapperCol="longWrapperColBaseInfo" :label="$t('workCenter.permissionApplicationProcess.applyForPermission')"> <a-form-item :labelCol="longLabelColBaseInfo" :wrapperCol="longWrapperColBaseInfo" :label="$t('workCenter.permissionApplicationProcess.applyForPermission')">
<base-info-table v-if="!isInitiate" :disabled="!isInitiate" ref="applyPermissionTable"></base-info-table> <base-info-table v-if="!isInitiate" :disabled="!isInitiate" :disabled-all="disabledAll" ref="applyPermissionTable"></base-info-table>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -83,7 +83,7 @@
<a-col :span="12"> <a-col :span="12">
<!-- 授权到期日期 --> <!-- 授权到期日期 -->
<a-form-item :labelCol="labelColBaseInfo" :wrapperCol="wrapperColBaseInfo" :label="$t('workCenter.permissionApplicationProcess.authExpirationDate')"> <a-form-item :labelCol="labelColBaseInfo" :wrapperCol="wrapperColBaseInfo" :label="$t('workCenter.permissionApplicationProcess.authExpirationDate')">
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled" :disabled-date="expirationDisabledDate" <j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled || disabledAll" :disabled-date="expirationDisabledDate"
:placeholder="$t('pleaseSelect') + $t('workCenter.permissionApplicationProcess.authExpirationDate')" :placeholder="$t('pleaseSelect') + $t('workCenter.permissionApplicationProcess.authExpirationDate')"
v-decorator="['expirationDate', validatorRules.authExpirationDate]" /> v-decorator="['expirationDate', validatorRules.authExpirationDate]" />
</a-form-item> </a-form-item>
@@ -94,7 +94,7 @@
<a-textarea :placeholder="$t('pleaseSelect') + $t('workCenter.permissionApplicationProcess.applicationDescription')" <a-textarea :placeholder="$t('pleaseSelect') + $t('workCenter.permissionApplicationProcess.applicationDescription')"
:maxLength="500" :maxLength="500"
:rows="4" :rows="4"
:disabled="disabled" :disabled="disabled || disabledAll"
v-decorator="['applyDetail', validatorRules.applicationDescription]" /> v-decorator="['applyDetail', validatorRules.applicationDescription]" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -107,12 +107,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="disabledAll"
: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="disabledAll" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
@@ -126,7 +127,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="!disabledAll">
<!--转办--> <!--转办-->
<a-button v-if="btn.includes('transfer')" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button> <a-button v-if="btn.includes('transfer')" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!--保存--> <!--保存-->
@@ -152,12 +153,12 @@ import PersonnelInfo from '@comp/PersonnelInfo'
import BaseInfoTable from '@views/workCenter/permissionApplicationProcess/modules/BaseInfoTable' import BaseInfoTable from '@views/workCenter/permissionApplicationProcess/modules/BaseInfoTable'
import UserSelectModal from '@comp/selection/UserSelectModal' import UserSelectModal from '@comp/selection/UserSelectModal'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { ApprovalOpinions, PermissionApply, ProcessKey } from '@/enums/commonEnums' import { ApprovalOpinions, PermissionApply, ProcessKey, ProcessType } from '@/enums/commonEnums'
import { import {
approvalPermissionApply, checkPermissionApply, getPermissionApplyDataById, approvalPermissionApply, checkPermissionApply, getLookData, getPermissionApplyDataById,
getPermissionApplyDetail, getPermissionApplyDetail,
getPermissionApplyProjectId, rejectPermissionApply, getPermissionApplyProjectId, rejectPermissionApply,
savePermissionApply, startPermissionApply, savePermissionApply, saveSnapShot, startPermissionApply,
transferPermissionApply transferPermissionApply
} from '@api/workCenter' } from '@api/workCenter'
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
@@ -172,6 +173,7 @@ export default {
return { return {
loading: false, loading: false,
switchValue: 'base', switchValue: 'base',
disabledAll: false, // 禁用全部
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 4 } sm: { span: 4 }
@@ -271,7 +273,8 @@ export default {
// standardApproval // standardApproval
}, },
created () { created () {
const { projectId, nodeId, taskName } = this.$route.query const { projectId, nodeId, taskName, isLook } = this.$route.query
this.disabledAll = isLook === '1'
// 发起、草稿进来没有nodeId,就默认发起节点 // 发起、草稿进来没有nodeId,就默认发起节点
this.currentNode = nodeId || PermissionApply.initiate.value this.currentNode = nodeId || PermissionApply.initiate.value
this.currentNodeName = taskName || PermissionApply.initiate.text this.currentNodeName = taskName || PermissionApply.initiate.text
@@ -282,6 +285,11 @@ export default {
// 同意按钮 // 同意按钮
this.btn = ['agree'] this.btn = ['agree']
} }
// 快照回显
if (this.$route.query.snapshotId) {
this.loadSnapshotPage()
return
}
// 查询人员信息 // 查询人员信息
this.getPersonInfoStructure(this.processKey, () => { this.getPersonInfoStructure(this.processKey, () => {
this.initPersonInfoData(this.isInitiate) this.initPersonInfoData(this.isInitiate)
@@ -457,6 +465,12 @@ export default {
} }
} }
const params = {} const params = {}
if (this.$refs.baseInfoTable) {
params.lawsEnterpriseStandardList = this.$refs.baseInfoTable.dataSource || []
}
if (this.$refs.applyPermissionTable) {
params.lawsEnterpriseStandardList = this.$refs.applyPermissionTable.dataSource || []
}
// 收集所有表单信息 // 收集所有表单信息
let formDataList = [] let formDataList = []
if (isValidate) { if (isValidate) {
@@ -476,6 +490,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)
if (!personInfo) { if (!personInfo) {
@@ -518,7 +534,9 @@ export default {
// 业务数据,用于强制撤回后回显 // 业务数据,用于强制撤回后回显
draftData: Object.assign({}, params.processEsPermissionApply, { draftData: Object.assign({}, params.processEsPermissionApply, {
lawsEnterpriseStandardList: this.$refs.baseInfoTable.dataSource lawsEnterpriseStandardList: this.$refs.baseInfoTable.dataSource
}) }),
// 将流程数据保存json,后续进行快照回显
prcData: params
}) })
} }
@@ -528,6 +546,72 @@ 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.PERMISSION_APPLY.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.processEsPermissionApply || {}
this.$nextTick(() => {
// 发起节点的表格和审批节点的表格,哪个存在回显哪个的数据
this.$refs.baseInfoTable && this.$refs.baseInfoTable.setData(prcData.lawsEnterpriseStandardList)
this.$refs.applyPermissionTable && this.$refs.applyPermissionTable.setData(prcData.lawsEnterpriseStandardList)
this.baseInfoForm.setFieldsValue({
expirationDate: this.formInfo.expirationDate,
userDictText: this.formInfo.userDictText,
standardNumbers: this.formInfo.standardNumbers,
applyDetail: this.formInfo.applyDetail
})
})
}).finally(() => {
this.loading = false
})
},
/** /**
* 转办弹框 * 转办弹框
*/ */
@@ -626,19 +710,27 @@ 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
// 不是提交按钮 // 不是提交按钮
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 approvalPermissionApply(res) // 保存快照,成功了就调接口,失败了就提示
console.log(params)
return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return approvalPermissionApply(params)
} else {
return res
}
})
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -647,6 +739,7 @@ export default {
this.$message.warn(res.message) this.$message.warn(res.message)
} }
}).catch((err) => { }).catch((err) => {
console.log(err)
if (err && err.message && tabList.includes(err.message)) { if (err && err.message && tabList.includes(err.message)) {
this.switchChange(err.message) this.switchChange(err.message)
} }
@@ -677,11 +770,18 @@ export default {
return return
} }
this.loading = true this.loading = true
this.getPageParams().then(res => { this.getPageParams().then(params => {
res.map.pass = false params.map.pass = false
// 审批意见 // 审批意见
res.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value params.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value
return rejectPermissionApply(res) // 保存快照,成功了就调接口,失败了就提示
return this.saveSnapShotInfo(params).then(res => {
if (res.success) {
return rejectPermissionApply(params)
} else {
return res
}
})
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="table-operator" v-if="!disabled"> <div class="table-operator" v-if="!disabled && !disabledAll">
<!-- 新增 --> <!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button> <a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
</div> </div>
@@ -28,7 +28,7 @@
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="{text, record, index}"> <template slot="action" slot-scope="{text, record, index}">
<a @click="handleDelete(index)" >{{ $t('delete') }}</a> <a @click="handleDelete(index)" :disabled="disabledAll">{{ $t('delete') }}</a>
</template> </template>
</j-table> </j-table>
@@ -46,6 +46,10 @@ export default {
name: 'BaseInfoTable', name: 'BaseInfoTable',
components: { StandardSelection, JTable }, components: { StandardSelection, JTable },
props: { props: {
disabledAll: {
type: Boolean,
default: false
},
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false default: false
@@ -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)
@@ -1,6 +1,6 @@
<template> <template>
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading"> <internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
<process-detail-list :processKey="processKey" show-urge-button> <process-detail-list :processKey="processKey" show-urge-button nodeNameClick :detailFrom="$route.query.detailFrom">
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData"></personnel-info> <personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData"></personnel-info>
</process-detail-list> </process-detail-list>
</internal-detail-page> </internal-detail-page>
@@ -76,7 +76,7 @@
<script> <script>
import JTable from '@/components/jero/JTable' import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin' import { JeroListMixin } from '@/mixins/JeroListMixin'
import { ProcessType, ProcessKey } from '../../../../enums/commonEnums' import { ProcessType, ProcessKey, Process } from '../../../../enums/commonEnums'
import { getAction } from '../../../../api/manage' import { getAction } from '../../../../api/manage'
export default { export default {
@@ -309,7 +309,8 @@ export default {
query: { query: {
processKey: processKey, processKey: processKey,
processDefinitionId: record.processDefinitionId, processDefinitionId: record.processDefinitionId,
processInstanceId: record.processInstanceId processInstanceId: record.processInstanceId,
detailFrom: Process.DONE.value
} }
}) })
} }
@@ -82,7 +82,7 @@
import JTable from '@/components/jero/JTable' import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin' import { JeroListMixin } from '@/mixins/JeroListMixin'
import { compulsoryWithdrawal } from '@/api/workCenter' import { compulsoryWithdrawal } from '@/api/workCenter'
import { ProcessType, ProcessKey } from '@/enums/commonEnums' import { ProcessType, ProcessKey, Process } from '@/enums/commonEnums'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
@@ -291,7 +291,8 @@ export default {
processInstanceId: record.processInstanceId, processInstanceId: record.processInstanceId,
// //
source: 'monitorList', source: 'monitorList',
prcStatus: record.prcStatus prcStatus: record.prcStatus,
detailFrom: Process.MONITOR.value
} }
}) })
}, },
@@ -90,7 +90,7 @@
import JTable from '@/components/jero/JTable' import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin' import { JeroListMixin } from '@/mixins/JeroListMixin'
import { compulsoryWithdrawal } from '@/api/workCenter' import { compulsoryWithdrawal } from '@/api/workCenter'
import { ProcessType, ProcessKey } from '@/enums/commonEnums' import { ProcessType, ProcessKey, Process } from '@/enums/commonEnums'
export default { export default {
name: 'SentList', name: 'SentList',
@@ -289,7 +289,8 @@ export default {
query: { query: {
processKey: processKey, processKey: processKey,
processDefinitionId: record.processDefinitionId, processDefinitionId: record.processDefinitionId,
processInstanceId: record.processInstanceId processInstanceId: record.processInstanceId,
detailFrom: Process.SENT.value
} }
}) })
}, },
@@ -1,7 +1,7 @@
<template> <template>
<internal-detail-page :content-padding="0" :title="pageTitle" :loading="loading"> <internal-detail-page :content-padding="0" :title="pageTitle" :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' : ''"
@@ -31,7 +31,7 @@
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')" <a-input :placeholder="$t('pleaseEnter') + $t('processName')"
:maxLength="50" :maxLength="50"
:disabled="processInfoDisabled" :disabled="processInfoDisabled || isLook"
v-decorator="['processName', validatorRules.processName]" /> v-decorator="['processName', validatorRules.processName]" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -44,7 +44,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['processDueDate']" v-decorator="['processDueDate']"
:disabled="processInfoDisabled" :disabled="processInfoDisabled || isLook"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -83,7 +83,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')" <a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:disabled="processInfoDisabled" :disabled="processInfoDisabled || isLook"
:rows="4" :rows="4"
v-decorator="['processDescription']" /> v-decorator="['processDescription']" />
</a-form-item> </a-form-item>
@@ -95,6 +95,7 @@
v-if="comp" v-if="comp"
ref="projectStandardTable" ref="projectStandardTable"
:project-id="projectId" :project-id="projectId"
:disabled="isLook"
:echo-data-source="currentStep === 1 ? projectDataSource : standardDataSource" /> :echo-data-source="currentStep === 1 ? projectDataSource : standardDataSource" />
</keep-alive> </keep-alive>
@@ -103,11 +104,11 @@
<div class="process-part-title">{{ middlePartTitle }}</div> <div class="process-part-title">{{ middlePartTitle }}</div>
<div class="table-operator" v-if="!showExpandTable"> <div class="table-operator" v-if="!showExpandTable">
<!--批量选择人员--> <!--批量选择人员-->
<a-button type="primary" ghost @click="batchSelector"> <a-button type="primary" ghost @click="batchSelector" :disabled="isLook">
{{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }} {{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }}
</a-button> </a-button>
<!--批量删除--> <!--批量删除-->
<a-button type="primary" icon="delete" ghost @click="batchDel" v-if="isInit"> <a-button type="primary" icon="delete" ghost @click="batchDel" v-if="isInit" :disabled="isLook">
{{ $t('batchDelete') }} {{ $t('batchDelete') }}
</a-button> </a-button>
</div> </div>
@@ -145,6 +146,7 @@
:value="record.responsibleUnitLeaders" :value="record.responsibleUnitLeaders"
:placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.responsibleUnitHead')" :placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.responsibleUnitHead')"
type="checkbox" type="checkbox"
:disabled="isLook"
@listChange="value => handleUserChange(value, record, index, 'responsibleUnitLeaders')" /> @listChange="value => handleUserChange(value, record, index, 'responsibleUnitLeaders')" />
<div class="table-text" v-else>{{ global.emptyLine }}</div> <div class="table-text" v-else>{{ global.emptyLine }}</div>
</template> </template>
@@ -162,6 +164,7 @@
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.moduleOwner')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.moduleOwner')"
type="checkbox" type="checkbox"
v-if="!record.notInvolved && record.canAssignFlag + '' === '1'" v-if="!record.notInvolved && record.canAssignFlag + '' === '1'"
:disabled="isLook"
@listChange="value => handleUserChange(value, record, index, 'moduleOwners')" /> @listChange="value => handleUserChange(value, record, index, 'moduleOwners')" />
<div v-else>{{ global.emptyLine }}</div> <div v-else>{{ global.emptyLine }}</div>
</template> </template>
@@ -179,18 +182,19 @@
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
type="radio" type="radio"
v-if="!record.notInvolved && record.canAssignFlag + '' === '1'" v-if="!record.notInvolved && record.canAssignFlag + '' === '1'"
:disabled="isLook"
@listChange="value => handleUserChange(value, record, index, 'designEngineers')" /> @listChange="value => handleUserChange(value, record, index, 'designEngineers')" />
<div v-else>{{ global.emptyLine }}</div> <div v-else>{{ global.emptyLine }}</div>
</template> </template>
<!--操作删除--> <!--操作删除-->
<template v-slot:action="{text, record}"> <template v-slot:action="{text, record}">
<a @click="handleDelete(record.tableRowKey)">{{ $t('delete') }}</a> <a @click="handleDelete(record.tableRowKey)" :disabled="isLook">{{ $t('delete') }}</a>
</template> </template>
<!--操作不涉及/不涉及原因--> <!--操作不涉及/不涉及原因-->
<template v-slot:notInvolved="{text, record}"> <template v-slot:notInvolved="{text, record}">
<a @click="handleUninvolved(record)" :disabled="record.canAssignFlag + '' !== '1'"> <a @click="handleUninvolved(record)" :disabled="record.canAssignFlag + '' !== '1' || isLook">
{{ {{
!record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved') !record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
}} }}
@@ -204,7 +208,7 @@
:columns="columns" :columns="columns"
:data-source="dataSource" :data-source="dataSource"
:pagination="ipagination" :pagination="ipagination"
:all-disabled="expandTableDisabled" :all-disabled="expandTableDisabled || isLook"
form-is-depend="evaluationFeedback" form-is-depend="evaluationFeedback"
:extra-form="extraForm" :extra-form="extraForm"
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
@@ -232,7 +236,7 @@
:placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.evaluationFeedback')" :placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.evaluationFeedback')"
:value="record.evaluationFeedback" :value="record.evaluationFeedback"
dict-code="assess_results" dict-code="assess_results"
:disabled="!!record.notInvolved" :disabled="!!record.notInvolved || isLook"
@change="value => handleEvaluationFeedBackChange(value, record, index)" /> @change="value => handleEvaluationFeedBackChange(value, record, index)" />
<template v-else> <template v-else>
@@ -255,6 +259,7 @@
:label="$t('workCenter.projectComplianceEvaluationProcess.ccPerson')"> :label="$t('workCenter.projectComplianceEvaluationProcess.ccPerson')">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.ccPerson')" <user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.ccPerson')"
type="checkbox" type="checkbox"
:disabled="isLook"
:name-str="dispatchInfo.carbonCopyPersonnels_dictText" :name-str="dispatchInfo.carbonCopyPersonnels_dictText"
v-decorator="['carbonCopyPersonnels', validatorRules.carbonCopyPersonnels]" v-decorator="['carbonCopyPersonnels', validatorRules.carbonCopyPersonnels]"
@nameChange="handleCarbonCopyNameChange" /> @nameChange="handleCarbonCopyNameChange" />
@@ -274,11 +279,12 @@
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:rows="4" :rows="4"
:disabled="isLook"
v-decorator="['handleText', validatorRules.handleText]" /> v-decorator="['handleText', validatorRules.handleText]" />
</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="['handleFile']" return-id multiple /> <j-upload v-decorator="['handleFile']" return-id multiple :disabled="isLook" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
@@ -294,7 +300,7 @@
</div> </div>
<!--底部按钮--> <!--底部按钮-->
<div class="detail-page-bottom-operate-box"> <div v-if="!isLook" class="detail-page-bottom-operate-box">
<!--转办--> <!--转办-->
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo"> <a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo">
{{ $t('turnTo') }} {{ $t('turnTo') }}
@@ -324,6 +330,16 @@
{{ $t('reject') }} {{ $t('reject') }}
</a-button> </a-button>
</div> </div>
<div v-else class="detail-page-bottom-operate-box">
<!--上一步-->
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('pre')" @click="handleLastStep">
{{ $t('workCenter.projectComplianceEvaluationProcess.lastStep') }}
</a-button>
<!--下一步-->
<a-button type="primary" :loading="loading" icon="arrow-down" v-if="btnList.includes('next')" @click="handleNextStep">
{{ $t('workCenter.projectComplianceEvaluationProcess.nextStep') }}
</a-button>
</div>
<!--选人--> <!--选人-->
<user-select-modal :type="userSelectType" ref="userSelectModal" @listChange="handleBatchSelectorOk" @change="continueTransfer" /> <user-select-modal :type="userSelectType" ref="userSelectModal" @listChange="handleBatchSelectorOk" @change="continueTransfer" />
@@ -344,7 +360,8 @@ import {
EvaluationResultType, EvaluationResultType,
ProcessKey, ProcessKey,
ProjectComplianceEvaluationProcessNode, ProjectComplianceEvaluationProcessNode,
StandardSource StandardSource,
ProcessType
} from '../../../enums/commonEnums' } from '../../../enums/commonEnums'
import JTable from '../../../components/jero/JTable' import JTable from '../../../components/jero/JTable'
import ProjectTable from './components/ProjectTable' import ProjectTable from './components/ProjectTable'
@@ -360,7 +377,9 @@ import {
queryProjectComplianceEvaluation, queryProjectComplianceEvaluation,
processTransfer, processTransfer,
agreeProjectComplianceEvaluation, agreeProjectComplianceEvaluation,
rejectProjectComplianceEvaluation rejectProjectComplianceEvaluation,
saveSnapShot,
getLookData
} from '../../../api/workCenter' } from '../../../api/workCenter'
import SplitClauseDetail from '../../documentTool/documentSplit/modules/SplitClauseDetail' import SplitClauseDetail from '../../documentTool/documentSplit/modules/SplitClauseDetail'
import moment from 'moment' import moment from 'moment'
@@ -640,7 +659,8 @@ export default {
}, },
businessId: null, businessId: null,
isTransfer: false, // isTransfer: false, //
tableLoading: false tableLoading: false,
isLook: false //
} }
}, },
computed: { computed: {
@@ -897,28 +917,47 @@ export default {
} }
}, },
created () { created () {
if (this.$route.query.processInstanceId || this.$route.query.draftId) { if (this.$route.query.isLook + '' === '1') {
this.currentNode = this.$route.query.nodeId || ProjectComplianceEvaluationProcessNode.initiate.value //
this.isLook = true
//
this.currentNode = this.$route.query.nodeId
//
this.initPersonInfoData(false)
//
this.initProcessInfo() this.initProcessInfo()
} else { } else {
this.currentNode = ProjectComplianceEvaluationProcessNode.initiate.value if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || ProjectComplianceEvaluationProcessNode.initiate.value
this.initProcessInfo()
} else {
this.currentNode = ProjectComplianceEvaluationProcessNode.initiate.value
}
this.getPersonInfoStructure(ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value, () => {
this.initPersonInfoData(this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value)
})
} }
this.getPersonInfoStructure(ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value, () => {
this.initPersonInfoData(this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value)
})
}, },
methods: { methods: {
/** /**
* 获取流程数据 * 获取流程数据
*/ */
initProcessInfo () { initProcessInfo () {
const params = { let params = {}
draftId: this.$route.query.draftId, let func
processInstanceId: this.$route.query.draftId ? null : this.$route.query.processInstanceId, if (this.isLook) {
taskId: this.$route.query.taskId params.snapshotId = this.$route.query.snapshotId
func = getLookData
} else {
params = {
draftId: this.$route.query.draftId,
processInstanceId: this.$route.query.draftId ? null : this.$route.query.processInstanceId,
taskId: this.$route.query.taskId
}
func = queryProjectComplianceEvaluation
} }
this.loading = true this.loading = true
queryProjectComplianceEvaluation(params).then(res => { func(params).then(res => {
if (res.success) { if (res.success) {
const { result = {} } = res const { result = {} } = res
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO) this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO)
@@ -1399,6 +1438,26 @@ export default {
this.loading = false this.loading = false
}) })
}, },
//
saveParamJsonStr (callback) {
//
const processInfoForm = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
//
const approvalInfoForm = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
const params = { ...processInfoForm, ...approvalInfoForm }
params.infoJsonStr = JSON.stringify(this.dealSaveJsonData())
params.taskId = this.$route.query.taskId
params.prcType = ProcessType.PROJECT_COMPLIANCE_EVALUATION.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
this.disabledBtnClick = false
}
})
},
/** /**
* 提交 * 提交
*/ */
@@ -1422,20 +1481,34 @@ export default {
formData.infoJsonStr = JSON.stringify(saveJsonObj) formData.infoJsonStr = JSON.stringify(saveJsonObj)
} }
submitFunc = initiateProjectComplianceEvaluation submitFunc = initiateProjectComplianceEvaluation
submitFunc(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.disabledBtnClick = false
}
}).finally(() => {
this.loading = false
})
} else { } else {
submitFunc = submitProjectComplianceEvaluation submitFunc = submitProjectComplianceEvaluation
//
this.saveParamJsonStr(() => {
submitFunc(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.disabledBtnClick = false
}
}).finally(() => {
this.loading = false
})
})
} }
submitFunc(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.disabledBtnClick = false
}
}).finally(() => {
this.loading = false
})
}, },
/** /**
* 转办 * 转办
@@ -1487,16 +1560,19 @@ export default {
return return
} }
this.loading = true this.loading = true
agreeProjectComplianceEvaluation(formData).then(res => { //
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) agreeProjectComplianceEvaluation(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
/** /**
@@ -1514,16 +1590,19 @@ export default {
return return
} }
this.loading = true this.loading = true
rejectProjectComplianceEvaluation(formData).then(res => { //
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) rejectProjectComplianceEvaluation(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
handleTableChange (pagination) { handleTableChange (pagination) {
@@ -3,9 +3,9 @@
<div class="process-part-title">{{ $t('project') }}</div> <div class="process-part-title">{{ $t('project') }}</div>
<div class="table-operator"> <div class="table-operator">
<!-- 新增--> <!-- 新增-->
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button> <a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">{{ $t('newlyAdded') }}</a-button>
<!-- 批量删除--> <!-- 批量删除-->
<a-button type="primary" icon="delete" ghost @click="batchDel">{{ $t('delete') }}</a-button> <a-button type="primary" icon="delete" ghost @click="batchDel" :disabled="disabled">{{ $t('delete') }}</a-button>
</div> </div>
<div> <div>
<j-table <j-table
@@ -41,6 +41,11 @@ export default {
default: () => { default: () => {
return [] return []
} }
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
data () { data () {
@@ -122,4 +127,4 @@ export default {
.process-part-title:first-child { .process-part-title:first-child {
margin-top: 32px; margin-top: 32px;
} }
</style> </style>
@@ -3,9 +3,9 @@
<div class="process-part-title">{{ $t('workCenter.projectComplianceEvaluationProcess.rDComplianceList') }}</div> <div class="process-part-title">{{ $t('workCenter.projectComplianceEvaluationProcess.rDComplianceList') }}</div>
<div class="table-operator"> <div class="table-operator">
<!-- 新增--> <!-- 新增-->
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button> <a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">{{ $t('newlyAdded') }}</a-button>
<!-- 批量删除--> <!-- 批量删除-->
<a-button type="primary" icon="delete" ghost @click="batchDel">{{ $t('delete') }}</a-button> <a-button type="primary" icon="delete" ghost @click="batchDel" :disabled="disabled">{{ $t('delete') }}</a-button>
</div> </div>
<div> <div>
<j-table <j-table
@@ -25,6 +25,7 @@
<a-select :placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.salvageListSource')" <a-select :placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.salvageListSource')"
:value="record.decompositionOrderSource" :value="record.decompositionOrderSource"
style="width: 100%" style="width: 100%"
:disabled="disabled"
@change="value => handleSourceChange(value, record, index)"> @change="value => handleSourceChange(value, record, index)">
<a-select-option v-for="item in record.dictOptions" :key="item.value" :value="item.value" :disabled="item.disabled"> <a-select-option v-for="item in record.dictOptions" :key="item.value" :value="item.value" :disabled="item.disabled">
{{ item.text }} {{ item.text }}
@@ -60,6 +61,11 @@ export default {
default: () => { default: () => {
return [] return []
} }
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
data () { data () {
@@ -1,7 +1,7 @@
<template> <template>
<internal-detail-page :content-padding="0" :title="pageTitle" :loading="loading"> <internal-detail-page :content-padding="0" :title="pageTitle" :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' : ''"
@@ -38,7 +38,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['processDueDate']" v-decorator="['processDueDate']"
:disabled="!isInitial" :disabled="!isInitial || isLook"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -48,7 +48,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')" <a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:disabled="!isInitial" :disabled="!isInitial || isLook"
:rows="4" :rows="4"
v-decorator="['processDescription']" /> v-decorator="['processDescription']" />
</a-form-item> </a-form-item>
@@ -69,37 +69,40 @@
<initial-basic-service-info ref="standardList" <initial-basic-service-info ref="standardList"
:selected-standard="selectedStandard" :selected-standard="selectedStandard"
@source:change="handleSourceChange" @source:change="handleSourceChange"
@standard:change="handleStandardChange" /> @standard:change="handleStandardChange"
:disabled="isLook"/>
<!--业务分派信息--> <!--业务分派信息-->
<initial-assign-table ref="termList" <initial-assign-table ref="termList"
:selected-spilt-info-id="selectedSpiltInfoId" :selected-spilt-info-id="selectedSpiltInfoId"
:selected-standard="selectedStandard" :selected-standard="selectedStandard"
:display-data-source="dispatchDataSource" /> :display-data-source="dispatchDataSource"
:disabled="isLook"/>
</template> </template>
<!--部所主管级领导下发--> <!--部所主管级领导下发-->
<depart-leader-issue-table v-if="isDepartLeaderIssue" ref="termList" :display-data-source="dispatchDataSource" /> <depart-leader-issue-table v-if="isDepartLeaderIssue" ref="termList" :display-data-source="dispatchDataSource" :disabled="isLook" />
<!--模块责任人分发--> <!--模块责任人分发-->
<module-owner-issue-table v-if="isModuleOwnerIssue" ref="termList" :display-data-source="dispatchDataSource" /> <module-owner-issue-table v-if="isModuleOwnerIssue" ref="termList" :display-data-source="dispatchDataSource" :disabled="isLook" />
<!--设计工程师评估--> <!--设计工程师评估-->
<design-engineer-assess v-if="isDesignEngineerAssess" <design-engineer-assess v-if="isDesignEngineerAssess"
ref="asyncTermList" ref="asyncTermList"
:display-data-source="dispatchDataSource" :display-data-source="dispatchDataSource"
:pre-node-user="preNodeUser" /> :pre-node-user="preNodeUser"
:disabled="isLook"/>
<!--模块负责人评审--> <!--模块负责人评审-->
<module-owner-approve-table v-if="isModuleOwnerApprove" ref="termList" :display-data-source="dispatchDataSource" /> <module-owner-approve-table v-if="isModuleOwnerApprove" ref="termList" :display-data-source="dispatchDataSource" />
<!--部所主管级领导审批--> <!--部所主管级领导审批-->
<depart-leader-approve-table v-if="isDepartLeaderApprove" ref="termList" :display-data-source="dispatchDataSource" /> <depart-leader-approve-table v-if="isDepartLeaderApprove" ref="termList" :display-data-source="dispatchDataSource" :disabled="isLook" />
<!--法规工程师审批--> <!--法规工程师审批-->
<regulatory-engineer-approval v-if="isRegulatoryEngineerApproval" ref="termList" :display-data-source="dispatchDataSource" /> <regulatory-engineer-approval v-if="isRegulatoryEngineerApproval" ref="termList" :display-data-source="dispatchDataSource" :disabled="isLook" />
<!--设计工程师补充立项项目号--> <!--设计工程师补充立项项目号-->
<design-engineer-write-project v-if="isDesignEngineerWriteProject" ref="termList" :display-data-source="dispatchDataSource" /> <design-engineer-write-project v-if="isDesignEngineerWriteProject" ref="termList" :display-data-source="dispatchDataSource" :disabled="isLook" />
<!--流程审批信息--> <!--流程审批信息-->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -110,11 +113,12 @@
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:rows="4" :rows="4"
:disabled="isLook"
v-decorator="['handleText', validatorRules.handleText]" /> v-decorator="['handleText', validatorRules.handleText]" />
</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="['handleFile']" return-id multiple /> <j-upload v-decorator="['handleFile']" return-id multiple :disabled="isLook" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
@@ -132,7 +136,7 @@
</div> </div>
<!--底部按钮--> <!--底部按钮-->
<div class="detail-page-bottom-operate-box"> <div v-if="!isLook" class="detail-page-bottom-operate-box">
<!--转办 审批节点存在--> <!--转办 审批节点存在-->
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo"> <a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo">
{{ $t('turnTo') }} {{ $t('turnTo') }}
@@ -165,7 +169,7 @@ import PersonnelInfo from '../../../components/PersonnelInfo'
import InternalDetailPage from '../../../components/InternalDetailPage' import InternalDetailPage from '../../../components/InternalDetailPage'
import ProcessDetailList from '../../../components/ProcessDetailList' import ProcessDetailList from '../../../components/ProcessDetailList'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin' import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import { ProcessKey, StandardComplianceNodes, StandardSource } from '../../../enums/commonEnums' import { ProcessKey, StandardComplianceNodes, StandardSource, ProcessType } from '../../../enums/commonEnums'
import InitialBasicServiceInfo from './components/InitialBasicServiceInfo' import InitialBasicServiceInfo from './components/InitialBasicServiceInfo'
import InitialAssignTable from './components/InitialAssignTable' import InitialAssignTable from './components/InitialAssignTable'
import DepartLeaderIssueTable from './components/DepartLeaderIssueTable' import DepartLeaderIssueTable from './components/DepartLeaderIssueTable'
@@ -182,7 +186,9 @@ import {
queryStandardCompliance, queryStandardCompliance,
processTransfer, processTransfer,
agreeStandardCompliance, agreeStandardCompliance,
rejectStandardCompliance rejectStandardCompliance,
saveSnapShot,
getLookData
} from '../../../api/workCenter' } from '../../../api/workCenter'
import UserSelectModal from '../../../components/selection/UserSelectModal' import UserSelectModal from '../../../components/selection/UserSelectModal'
@@ -245,7 +251,8 @@ export default {
dispatchDataSource: [], // dispatchDataSource: [], //
currentNodePrefix: null, // currentNodePrefix: null, //
preNodeUser: null, // preNodeUser: null, //
disabledBtnClick: false disabledBtnClick: false,
isLook: false //
} }
}, },
computed: { computed: {
@@ -287,29 +294,48 @@ export default {
} }
}, },
created () { created () {
this.getPersonInfoStructure(ProcessKey.REGULATORY_COMPLIANCE_ASSESSMENT.value, () => { if (this.$route.query.isLook + '' === '1') {
if (this.$route.query.processInstanceId || this.$route.query.draftId) { //
this.currentNode = this.$route.query.nodeId || StandardComplianceNodes.initial.value this.isLook = true
this.initProcessData() //
this.currentNode = this.$route.query.nodeId
//
this.initPersonInfoData(false)
//
this.initProcessData()
} else {
this.getPersonInfoStructure(ProcessKey.REGULATORY_COMPLIANCE_ASSESSMENT.value, () => {
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || StandardComplianceNodes.initial.value
this.initProcessData()
} else { } else {
this.currentNode = StandardComplianceNodes.initial.value this.currentNode = StandardComplianceNodes.initial.value
} }
const key = StandardComplianceNodes.keyOfValueByLike(this.currentNode) const key = StandardComplianceNodes.keyOfValueByLike(this.currentNode)
this.btnList = StandardComplianceNodes[key].btn || [] this.btnList = StandardComplianceNodes[key].btn || []
this.currentNodePrefix = StandardComplianceNodes[key].value this.currentNodePrefix = StandardComplianceNodes[key].value
this.initPersonInfoData() this.initPersonInfoData()
}) })
}
}, },
methods: { methods: {
initProcessData () { initProcessData () {
this.loading = true this.loading = true
const params = { let params = {}
taskId: this.$route.query.taskId, let func
processInstanceId: this.$route.query.processInstanceId, if (this.isLook) {
draftId: this.$route.query.draftId params.snapshotId = this.$route.query.snapshotId
func = getLookData
} else {
params = {
taskId: this.$route.query.taskId,
processInstanceId: this.$route.query.processInstanceId,
draftId: this.$route.query.draftId
}
func = queryStandardCompliance
} }
queryStandardCompliance(params).then(res => { func(params).then(res => {
if (res.success) { if (res.success) {
let { result = {} } = res let { result = {} } = res
if (result.infoJsonStr) { if (result.infoJsonStr) {
@@ -507,6 +533,27 @@ export default {
this.loading = false this.loading = false
}) })
}, },
//
async saveParamJsonStr (callback) {
//
const processInfoForm = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
//
const approvalInfoForm = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
const params = { ...processInfoForm, ...approvalInfoForm }
const saveForm = await this.dealSaveFormData()
params.infoJsonStr = JSON.stringify(saveForm)
params.taskId = this.$route.query.taskId
params.prcType = ProcessType.REGULATORY_COMPLIANCE_ASSESSMENT.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
this.disabledBtnClick = false
}
})
},
/** /**
* 提交 * 提交
*/ */
@@ -531,17 +578,34 @@ export default {
submitFunc = submitStandardCompliance submitFunc = submitStandardCompliance
} }
this.loading = true this.loading = true
submitFunc(formData).then(res => { if (this.currentNode.indexOf(StandardComplianceNodes.initial.value) === 0) {
if (res.success) { submitFunc(formData).then(res => {
this.$message.success(res.message) if (res.success) {
this.goBack() this.$message.success(res.message)
} else { this.goBack()
this.$message.warning(res.message) } else {
this.disabledBtnClick = false this.$message.warning(res.message)
} this.disabledBtnClick = false
}).finally(() => { }
this.loading = false }).finally(() => {
}) this.loading = false
})
} else {
//
this.saveParamJsonStr(() => {
submitFunc(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.disabledBtnClick = false
}
}).finally(() => {
this.loading = false
})
})
}
}, },
/** /**
* 同意 * 同意
@@ -562,16 +626,19 @@ export default {
return return
} }
this.loading = true this.loading = true
agreeStandardCompliance(formData).then(res => { //
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) agreeStandardCompliance(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
/** /**
@@ -590,16 +657,19 @@ export default {
return return
} }
this.loading = true this.loading = true
rejectStandardCompliance(formData).then(res => { //
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) rejectStandardCompliance(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
toStandardDetail () { toStandardDetail () {
@@ -15,7 +15,7 @@
<!--是否立项--> <!--是否立项-->
<template v-slot:projectApprovalFlag="{text,record,index}"> <template v-slot:projectApprovalFlag="{text,record,index}">
<j-dict-select-tag v-model="record.projectApprovalFlag" dict-code="yn" style="width: 100%" /> <j-dict-select-tag v-model="record.projectApprovalFlag" dict-code="yn" :disabled="disabled" style="width: 100%" />
</template> </template>
<!--条文内容--> <!--条文内容-->
@@ -54,6 +54,11 @@ export default {
default: () => { default: () => {
return [] return []
} }
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
data () { data () {
@@ -4,7 +4,7 @@
<div class="process-part-title">{{ $t('workCenter.dispatchInformation') }}</div> <div class="process-part-title">{{ $t('workCenter.dispatchInformation') }}</div>
<div class="table-operator"> <div class="table-operator">
<!--批量选择人员--> <!--批量选择人员-->
<a-button type="primary" @click="handleSelectPerson"> <a-button type="primary" @click="handleSelectPerson" :disabled="disabled">
{{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }} {{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }}
</a-button> </a-button>
</div> </div>
@@ -31,6 +31,7 @@
v-model="record.moduleOwner" v-model="record.moduleOwner"
:name-str="record.moduleOwner_dictText" :name-str="record.moduleOwner_dictText"
v-if="!record.notInvolved" v-if="!record.notInvolved"
:disabled="disabled"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.moduleOwner')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.moduleOwner')"
@nameChange="nameStr => record.moduleOwner_dictText = nameStr" /> @nameChange="nameStr => record.moduleOwner_dictText = nameStr" />
<div v-else>{{ global.emptyLine }}</div> <div v-else>{{ global.emptyLine }}</div>
@@ -47,7 +48,7 @@
<!--操作--> <!--操作-->
<template v-slot:action="{text,record,index}"> <template v-slot:action="{text,record,index}">
<div class="action-span-cell"> <div class="action-span-cell">
<a @click="handleUninvolved(record, index)"> <a :disabled="disabled" @click="handleUninvolved(record, index)">
{{ {{
!record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved') !record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
}} }}
@@ -84,6 +85,11 @@ export default {
default: () => { default: () => {
return [] return []
} }
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
data () { data () {
@@ -47,6 +47,7 @@
:options="resultOptions" :options="resultOptions"
style="width: 100%" style="width: 100%"
:value="record.assessResults" :value="record.assessResults"
:disabled="disabled"
@change="value => handleEvaluationResultChange(value, record, record.dataSourceIndex)" /> @change="value => handleEvaluationResultChange(value, record, record.dataSourceIndex)" />
</template> </template>
@@ -62,6 +63,7 @@
prop="isRelate"> prop="isRelate">
<j-dict-select-tag v-model="record.isRelate" <j-dict-select-tag v-model="record.isRelate"
dict-code="yn" dict-code="yn"
:disabled="disabled"
type="radio" /> type="radio" />
</a-form-model-item> </a-form-model-item>
<!--不符合车型系列--> <!--不符合车型系列-->
@@ -71,6 +73,7 @@
prop="modelSeries" prop="modelSeries"
v-if="record.isRelate === yesValue"> v-if="record.isRelate === yesValue">
<j-multi-select-tag v-model="record.modelSeries" <j-multi-select-tag v-model="record.modelSeries"
:disabled="disabled"
dict-code="model_series" /> dict-code="model_series" />
</a-form-model-item> </a-form-model-item>
</template> </template>
@@ -80,7 +83,7 @@
:labelCol="{span: 4}" :labelCol="{span: 4}"
:wrapperCol="{span: 18}" :wrapperCol="{span: 18}"
prop="description"> prop="description">
<a-input type="textarea" :maxLength="500" v-model="record.description" /> <a-input type="textarea" :maxLength="500" :disabled="disabled" v-model="record.description" />
</a-form-model-item> </a-form-model-item>
<!--佐证材料--> <!--佐证材料-->
<a-form-model-item :label="$t('projectLibrary.specialProjectLibrary.supportingMaterial')" <a-form-model-item :label="$t('projectLibrary.specialProjectLibrary.supportingMaterial')"
@@ -90,6 +93,7 @@
<j-upload return-id <j-upload return-id
multiple multiple
v-model="record.fileId" v-model="record.fileId"
:disabled="disabled"
file-type="pdf,doc,docx,pptx,ppt,jpg,jpeg,png,xls,xlsx,bmp" /> file-type="pdf,doc,docx,pptx,ppt,jpg,jpeg,png,xls,xlsx,bmp" />
</a-form-model-item> </a-form-model-item>
</template> </template>
@@ -127,6 +131,11 @@ export default {
type: String, type: String,
required: false, required: false,
default: '' default: ''
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
data () { data () {
@@ -15,7 +15,7 @@
<!--操作--> <!--操作-->
<template v-slot:action="{text, record, index}"> <template v-slot:action="{text, record, index}">
<a @click="handleEdit(record)">{{ $t('edit') }}</a> <a @click="handleEdit(record)" :disabled="disabled">{{ $t('edit') }}</a>
</template> </template>
</j-table> </j-table>
</div> </div>
@@ -42,6 +42,11 @@ export default {
default: () => { default: () => {
return [] return []
} }
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
data () { data () {
@@ -4,11 +4,11 @@
<div class="process-part-title">{{ $t('workCenter.dispatchInformation') }}</div> <div class="process-part-title">{{ $t('workCenter.dispatchInformation') }}</div>
<div class="table-operator"> <div class="table-operator">
<!--批量选择人员--> <!--批量选择人员-->
<a-button type="primary" @click="handleSelectPerson"> <a-button type="primary" @click="handleSelectPerson" :disabled="disabled">
{{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }} {{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }}
</a-button> </a-button>
<!--批量删除--> <!--批量删除-->
<a-button type="primary" ghost @click="batchDelete"> <a-button type="primary" ghost @click="batchDelete" :disabled="disabled">
{{ $t('batchDelete') }} {{ $t('batchDelete') }}
</a-button> </a-button>
</div> </div>
@@ -37,6 +37,7 @@
v-model="record.responsibleUnitLeader" v-model="record.responsibleUnitLeader"
:name-str="record.responsibleUnitLeader_dictText" :name-str="record.responsibleUnitLeader_dictText"
type="checkbox" type="checkbox"
:disabled="disabled"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.responsibleUnitContactPerson')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.responsibleUnitContactPerson')"
@nameChange="nameStr => record.responsibleUnitLeader_dictText = nameStr" /> @nameChange="nameStr => record.responsibleUnitLeader_dictText = nameStr" />
</template> </template>
@@ -52,7 +53,7 @@
<!--操作--> <!--操作-->
<template v-slot:action="{text,record,index}"> <template v-slot:action="{text,record,index}">
<div class="action-span-cell"> <div class="action-span-cell">
<a :disabled="index === 0 && dataSource.length === 1" @click="handleDelete(record.rowKey)">{{ $t('delete') }}</a> <a :disabled="index === 0 && dataSource.length === 1 || disabled" @click="handleDelete(record.rowKey)">{{ $t('delete') }}</a>
</div> </div>
</template> </template>
</j-table> </j-table>
@@ -97,6 +98,11 @@ export default {
default: () => { default: () => {
return [] return []
} }
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
watch: { watch: {
@@ -4,11 +4,11 @@
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<div class="table-operator"> <div class="table-operator">
<!--添加标准--> <!--添加标准-->
<a-button type="primary" @click="handleAdd"> <a-button type="primary" @click="handleAdd" :disabled="disabled">
{{ $t('workCenter.standardCompliance.addStandard') }} {{ $t('workCenter.standardCompliance.addStandard') }}
</a-button> </a-button>
<!--删除--> <!--删除-->
<a-button type="primary" ghost @click="handleDelete"> <a-button type="primary" ghost @click="handleDelete" :disabled="disabled">
{{ $t('delete') }} {{ $t('delete') }}
</a-button> </a-button>
</div> </div>
@@ -36,6 +36,7 @@
v-model="record.decompositionOrderSource" v-model="record.decompositionOrderSource"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
style="width: 100%" style="width: 100%"
:disabled="disabled"
@change="value => handleSourceChange(value, record)"> @change="value => handleSourceChange(value, record)">
<a-select-option v-for="item in record.decompositionOrderSourceVOList" <a-select-option v-for="item in record.decompositionOrderSourceVOList"
:key="item.value" :key="item.value"
@@ -71,6 +72,11 @@ export default {
default: () => { default: () => {
return {} return {}
} }
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
watch: { watch: {
@@ -4,7 +4,7 @@
<div class="process-part-title">{{ $t('workCenter.dispatchInformation') }}</div> <div class="process-part-title">{{ $t('workCenter.dispatchInformation') }}</div>
<div class="table-operator"> <div class="table-operator">
<!--批量选择人员--> <!--批量选择人员-->
<a-button type="primary" @click="handleSelectPerson"> <a-button type="primary" @click="handleSelectPerson" :disabled="disabled">
{{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }} {{ $t('workCenter.projectComplianceEvaluationProcess.batchSelector') }}
</a-button> </a-button>
</div> </div>
@@ -32,6 +32,7 @@
:name-str="record.designEngineer_dictText" :name-str="record.designEngineer_dictText"
v-if="!record.notInvolved" v-if="!record.notInvolved"
type="checkbox" type="checkbox"
:disabled="disabled"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
@nameChange="nameStr => record.designEngineer_dictText = nameStr" /> @nameChange="nameStr => record.designEngineer_dictText = nameStr" />
<div v-else>{{ global.emptyLine }}</div> <div v-else>{{ global.emptyLine }}</div>
@@ -48,7 +49,7 @@
<!--操作--> <!--操作-->
<template v-slot:action="{text,record}"> <template v-slot:action="{text,record}">
<div class="action-span-cell"> <div class="action-span-cell">
<a @click="handleUninvolved(record)">{{ <a :disabled="disabled" @click="handleUninvolved(record)">{{
!record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved') !record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
}}</a> }}</a>
</div> </div>
@@ -83,6 +84,11 @@ export default {
default: () => { default: () => {
return [] return []
} }
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
data () { data () {
@@ -5,11 +5,11 @@
<div> <div>
<div class="table-operator"> <div class="table-operator">
<!--批量选择设计工程师--> <!--批量选择设计工程师-->
<a-button type="primary" @click="handleSelectPerson('designEngineer')"> <a-button type="primary" @click="handleSelectPerson('designEngineer')" :disabled="disabled">
{{ $t('workCenter.standardCompliance.batchSelectDesignEngineer') }} {{ $t('workCenter.standardCompliance.batchSelectDesignEngineer') }}
</a-button> </a-button>
<!--批量选择抄送人员--> <!--批量选择抄送人员-->
<a-button type="primary" @click="handleSelectPerson('carbonCopyPersonnels')"> <a-button type="primary" @click="handleSelectPerson('carbonCopyPersonnels')" :disabled="disabled">
{{ $t('workCenter.standardCompliance.batchSelectCCPersonnel') }} {{ $t('workCenter.standardCompliance.batchSelectCCPersonnel') }}
</a-button> </a-button>
</div> </div>
@@ -45,7 +45,7 @@
<!--是否立项--> <!--是否立项-->
<template v-slot:projectApprovalFlag="{text,record}"> <template v-slot:projectApprovalFlag="{text,record}">
<j-dict-select-tag v-model="record.projectApprovalFlag" dict-code="yn" style="width: 100%" /> <j-dict-select-tag v-model="record.projectApprovalFlag" dict-code="yn" :disabled="disabled" style="width: 100%" />
</template> </template>
<!--设计工程师--> <!--设计工程师-->
@@ -58,6 +58,7 @@
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
style="width: 100%" style="width: 100%"
type="radio" type="radio"
:disabled="disabled"
@nameChange="nameStr => record.designEngineer_dictText = nameStr" /> @nameChange="nameStr => record.designEngineer_dictText = nameStr" />
<div v-else>{{ global.emptyLine }}</div> <div v-else>{{ global.emptyLine }}</div>
</template> </template>
@@ -70,6 +71,7 @@
:placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.ccPerson')" :placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.ccPerson')"
style="width: 100%" style="width: 100%"
type="checkbox" type="checkbox"
:disabled="disabled"
@nameChange="nameStr => record.carbonCopyPersonnels_dictText = nameStr" /> @nameChange="nameStr => record.carbonCopyPersonnels_dictText = nameStr" />
<!--<div>{{ global.emptyLine }}</div>--> <!--<div>{{ global.emptyLine }}</div>-->
</template> </template>
@@ -127,6 +129,11 @@ export default {
default: () => { default: () => {
return [] return []
} }
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
data () { data () {
@@ -1,7 +1,7 @@
<template> <template>
<internal-detail-page :content-padding="0" :title="pageTitle" :loading="loading"> <internal-detail-page :content-padding="0" :title="pageTitle" :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' : ''"
@@ -38,7 +38,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['processDueDate']" v-decorator="['processDueDate']"
:disabled="processInfoDisabled" :disabled="processInfoDisabled || isLook"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -48,7 +48,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')" <a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:disabled="processInfoDisabled" :disabled="processInfoDisabled || isLook"
:rows="4" :rows="4"
v-decorator="['processDescription']" /> v-decorator="['processDescription']" />
</a-form-item> </a-form-item>
@@ -62,7 +62,7 @@
<!--标准编号--> <!--标准编号-->
<a-form-item :label="$t('standardNumber')"> <a-form-item :label="$t('standardNumber')">
<standard-selection v-decorator="['standardNumber', validatorRules.standardNumber]" <standard-selection v-decorator="['standardNumber', validatorRules.standardNumber]"
:disabled="basicServiceInfoDisabled" :disabled="basicServiceInfoDisabled || isLook"
:placeholder="$t('pleaseSelect') + $t('standardNumber')" :placeholder="$t('pleaseSelect') + $t('standardNumber')"
:can-selected-source="[StandardSource.DOMESTIC.value]" :can-selected-source="[StandardSource.DOMESTIC.value]"
type="radio" type="radio"
@@ -82,7 +82,7 @@
<!--标准文本--> <!--标准文本-->
<a-form-item :label="$t('workCenter.standardConsultationProcess.standardText')" <a-form-item :label="$t('workCenter.standardConsultationProcess.standardText')"
:class="{'add-required': basicServiceInfoDisabled}"> :class="{'add-required': basicServiceInfoDisabled}">
<div class="box-title-text" v-if="!basicServiceInfoDisabled"> <div class="box-title-text" v-if="!basicServiceInfoDisabled && !isLook">
<a-input class="box-input disabled-white-input" <a-input class="box-input disabled-white-input"
v-decorator="['standardTextFileName', validatorRules.standardText]" v-decorator="['standardTextFileName', validatorRules.standardText]"
readonly readonly
@@ -99,7 +99,7 @@
<div class="form-flex-item custom-flex-form-item"> <div class="form-flex-item custom-flex-form-item">
<!--相关文件--> <!--相关文件-->
<a-form-item :label="$t('workCenter.standardConsultationProcess.relevantDocument')"> <a-form-item :label="$t('workCenter.standardConsultationProcess.relevantDocument')">
<j-upload multiple return-id v-decorator="['relatedFile', validatorRules.relatedFile]" :disabled="basicServiceInfoDisabled" /> <j-upload multiple return-id v-decorator="['relatedFile', validatorRules.relatedFile]" :disabled="basicServiceInfoDisabled || isLook" />
</a-form-item> </a-form-item>
</div> </div>
<div class="form-flex-item custom-flex-form-item"> <div class="form-flex-item custom-flex-form-item">
@@ -108,7 +108,7 @@
<j-date show-type="day" <j-date show-type="day"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.endDate')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.endDate')"
v-decorator="['consultationDueDate', validatorRules.consultationDueDate]" v-decorator="['consultationDueDate', validatorRules.consultationDueDate]"
:disabled="basicServiceInfoDisabled" :disabled="basicServiceInfoDisabled || isLook"
:disabled-date="consultationDueDateDisabledDate" /> :disabled-date="consultationDueDateDisabledDate" />
</a-form-item> </a-form-item>
</div> </div>
@@ -128,6 +128,7 @@
type="select" type="select"
dict-code="sender_type" dict-code="sender_type"
:triggerChange="false" :triggerChange="false"
:disabled="isLook"
@change="handleSenderTypeChange" /> @change="handleSenderTypeChange" />
</a-form-item> </a-form-item>
</div> </div>
@@ -139,6 +140,7 @@
<user-selection v-decorator="['moduleOwnerId', validatorRules.moduleOwnerId]" <user-selection v-decorator="['moduleOwnerId', validatorRules.moduleOwnerId]"
:name-str="dispatchInfo.moduleOwnerId_dictText" :name-str="dispatchInfo.moduleOwnerId_dictText"
type="checkbox" type="checkbox"
:disabled="isLook"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.moduleOwner')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.moduleOwner')"
@nameChange="handleModuleOwnerNameChange" /> @nameChange="handleModuleOwnerNameChange" />
</a-form-item> </a-form-item>
@@ -151,6 +153,7 @@
<user-selection v-decorator="['designEngineerId', validatorRules.designEngineerId]" <user-selection v-decorator="['designEngineerId', validatorRules.designEngineerId]"
:name-str="dispatchInfo.designEngineerId_dictText" :name-str="dispatchInfo.designEngineerId_dictText"
type="checkbox" type="checkbox"
:disabled="isLook"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
@nameChange="handleDesignEngineerNameChange" /> @nameChange="handleDesignEngineerNameChange" />
</a-form-item> </a-form-item>
@@ -166,9 +169,9 @@
<template v-if="currentNode.indexOf(ConsultationProcess.designEngineerFillIn.value) === 0"> <template v-if="currentNode.indexOf(ConsultationProcess.designEngineerFillIn.value) === 0">
<div class="table-operator"> <div class="table-operator">
<!-- 新增--> <!-- 新增-->
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button> <a-button icon="plus" type="primary" :disabled="isLook" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
<!-- 批量删除--> <!-- 批量删除-->
<a-button type="primary" icon="delete" ghost @click="batchDel">{{ $t('delete') }}</a-button> <a-button type="primary" icon="delete" ghost :disabled="isLook" @click="batchDel">{{ $t('delete') }}</a-button>
</div> </div>
<div> <div>
<j-table <j-table
@@ -190,7 +193,7 @@
<!-- 操作栏 --> <!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell"> <div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn">{{ $t('edit') }}</a> <a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="isLook">{{ $t('edit') }}</a>
</div> </div>
</j-table> </j-table>
@@ -201,7 +204,7 @@
<template v-if="showAuditTable"> <template v-if="showAuditTable">
<div class="table-operator"> <div class="table-operator">
<!--批量操作汇总节点才有的按钮--> <!--批量操作汇总节点才有的按钮-->
<a-button type="primary" icon="delete" ghost @click="batchOperate" v-if="isSummaryNode"> <a-button type="primary" icon="delete" ghost @click="batchOperate" v-if="isSummaryNode" :disabled="isLook">
{{ $t('batchOperation') }} {{ $t('batchOperation') }}
</a-button> </a-button>
</div> </div>
@@ -215,7 +218,7 @@
:locale="tableLocale" :locale="tableLocale"
:class="{'empty-no-opinion': tableEmptyShowNoOpinion}" :class="{'empty-no-opinion': tableEmptyShowNoOpinion}"
:extra-form="collectExtraForm" :extra-form="collectExtraForm"
:all-disabled="disabledConsultationList" :all-disabled="disabledConsultationList || isLook"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
<!--表头插槽 start--> <!--表头插槽 start-->
@@ -238,6 +241,7 @@
:triggerChange="false" :triggerChange="false"
class="opinion-select" class="opinion-select"
dict-code="consultation_opinion" dict-code="consultation_opinion"
:disabled="isLook"
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.opinion')" :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.opinion')"
@change="value => {handleOpinionChange(value, index, record)}" /> @change="value => {handleOpinionChange(value, index, record)}" />
</template> </template>
@@ -254,11 +258,12 @@
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:rows="4" :rows="4"
:disabled="isLook"
v-decorator="['handleText', validatorRules.handleText]" /> v-decorator="['handleText', validatorRules.handleText]" />
</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="['handleFile']" return-id multiple /> <j-upload v-decorator="['handleFile']" return-id multiple :disabled="isLook" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
@@ -275,7 +280,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">
<!--转办 审批节点存在--> <!--转办 审批节点存在-->
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo"> <a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo">
{{ $t('turnTo') }} {{ $t('turnTo') }}
@@ -314,7 +319,7 @@
<script> <script>
import InternalDetailPage from '../../../components/InternalDetailPage.vue' import InternalDetailPage from '../../../components/InternalDetailPage.vue'
import StandardSelection from '../../../components/selection/StandardSelection.vue' import StandardSelection from '../../../components/selection/StandardSelection.vue'
import { ConsultationProcess, SenderType, ProcessKey, StandardSource } from '../../../enums/commonEnums' import { ConsultationProcess, SenderType, ProcessKey, StandardSource, ProcessType } from '../../../enums/commonEnums'
import UserSelection from '../../../components/selection/UserSelection' import UserSelection from '../../../components/selection/UserSelection'
import JTable from '../../../components/jero/JTable' import JTable from '../../../components/jero/JTable'
import ConsultationModal from './modules/ConsultationModal' import ConsultationModal from './modules/ConsultationModal'
@@ -332,7 +337,9 @@ import {
submitConsultationProcess, submitConsultationProcess,
transferConsultationProcess, transferConsultationProcess,
agreeConsultationProcess, agreeConsultationProcess,
rejectConsultationProcess rejectConsultationProcess,
saveSnapShot,
getLookData
} from '../../../api/workCenter' } from '../../../api/workCenter'
import UserSelectModal from '../../../components/selection/UserSelectModal' import UserSelectModal from '../../../components/selection/UserSelectModal'
import { getFileInfo } from '../../../api/api' import { getFileInfo } from '../../../api/api'
@@ -755,7 +762,8 @@ export default {
tableEmptyShowNoOpinion: false, // tableEmptyShowNoOpinion: false, //
tableLocale: { tableLocale: {
emptyText: <a-empty image={Empty.PRESENTED_IMAGE_SIMPLE}><span slot="description"> {this.$t('noData')} </span></a-empty> emptyText: <a-empty image={Empty.PRESENTED_IMAGE_SIMPLE}><span slot="description"> {this.$t('noData')} </span></a-empty>
} },
isLook: false //
} }
}, },
computed: { computed: {
@@ -831,36 +839,55 @@ export default {
} }
}, },
created () { created () {
// if (this.$route.query.isLook + '' === '1') {
this.getPersonInfoStructure(this.processKey, () => { //
// id稿id this.isLook = true
if (this.$route.query.processInstanceId || this.$route.query.draftId) { //
this.currentNode = this.$route.query.nodeId || ConsultationProcess.initiate.value this.currentNode = this.$route.query.nodeId
this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0) //
this.initProcessDetailData() this.initPersonInfoData(false)
} else { //
this.currentNode = ConsultationProcess.initiate.value this.initProcessDetailData()
this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0) } else {
} //
// 使 this.getPersonInfoStructure(this.processKey, () => {
this.nodeEnumsKey = this.currentNode ? ConsultationProcess.keyOfValueByLike(this.currentNode) || 'regulatoryEngineerApproval' : 'initiate' // id稿id
this.currentNodePrefix = ConsultationProcess[this.nodeEnumsKey].value if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.btnList = ConsultationProcess[this.nodeEnumsKey].btn this.currentNode = this.$route.query.nodeId || ConsultationProcess.initiate.value
}) this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0)
this.initProcessDetailData()
} else {
this.currentNode = ConsultationProcess.initiate.value
this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0)
}
// 使
this.nodeEnumsKey = this.currentNode ? ConsultationProcess.keyOfValueByLike(this.currentNode) || 'regulatoryEngineerApproval' : 'initiate'
this.currentNodePrefix = ConsultationProcess[this.nodeEnumsKey].value
this.btnList = ConsultationProcess[this.nodeEnumsKey].btn
})
}
}, },
methods: { methods: {
initProcessDetailData () { initProcessDetailData () {
this.loading = true this.loading = true
const params = { let params = {}
taskId: this.$route.query.taskId, let func
projectId: this.$route.query.projectId if (this.isLook) {
} params.snapshotId = this.$route.query.snapshotId
if (this.$route.query.draftId) { func = getLookData
params.draftId = this.$route.query.draftId
} else { } else {
params.processInstanceId = this.$route.query.processInstanceId params = {
taskId: this.$route.query.taskId,
projectId: this.$route.query.projectId
}
if (this.$route.query.draftId) {
params.draftId = this.$route.query.draftId
} else {
params.processInstanceId = this.$route.query.processInstanceId
}
func = queryConsultationProcessDetail
} }
queryConsultationProcessDetail(params).then(async res => { func(params).then(async res => {
if (res.success) { if (res.success) {
let result = res.result || {} let result = res.result || {}
// 稿稿 // 稿稿
@@ -1193,6 +1220,27 @@ export default {
this.loading = false this.loading = false
}) })
}, },
//
async saveParamJsonStr (callback) {
//
const processInfoForm = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
//
const approvalInfoForm = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
const params = { ...processInfoForm, ...approvalInfoForm }
const saveForm = await this.dealFormData(true)
params.infoJsonStr = JSON.stringify(saveForm)
params.taskId = this.$route.query.taskId
params.prcType = ProcessType.CONSULTATION.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
this.disabledBtnClick = false
}
})
},
/** /**
* 提交 * 提交
*/ */
@@ -1214,20 +1262,34 @@ export default {
if (saveForm) { if (saveForm) {
formData.infoJsonStr = JSON.stringify(saveForm) formData.infoJsonStr = JSON.stringify(saveForm)
} }
func(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.disabledBtnClick = false
}
}).finally(() => {
this.loading = false
})
} else { } else {
func = submitConsultationProcess func = submitConsultationProcess
//
this.saveParamJsonStr(() => {
func(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.disabledBtnClick = false
}
}).finally(() => {
this.loading = false
})
})
} }
func(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.disabledBtnClick = false
}
}).finally(() => {
this.loading = false
})
}, },
/** /**
* 同意 * 同意
@@ -1248,16 +1310,19 @@ export default {
} }
this.loading = true this.loading = true
formData.basicTaskInfoDTO.commitFlag = 1 // 12 formData.basicTaskInfoDTO.commitFlag = 1 // 12
agreeConsultationProcess(formData).then(res => { //
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) agreeConsultationProcess(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
/** /**
@@ -1276,16 +1341,19 @@ export default {
} }
this.loading = true this.loading = true
formData.basicTaskInfoDTO.commitFlag = 2 // 12 formData.basicTaskInfoDTO.commitFlag = 2 // 12
rejectConsultationProcess(formData).then(res => { //
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) rejectConsultationProcess(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
/** /**
@@ -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' : ''"
@@ -37,7 +37,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['processDueDate']" v-decorator="['processDueDate']"
:disabled="disabled" :disabled="disabled || isLook"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -47,7 +47,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')" <a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:disabled="disabled" :disabled="disabled || isLook"
:rows="4" :rows="4"
v-decorator="['processDescription']" /> v-decorator="['processDescription']" />
</a-form-item> </a-form-item>
@@ -78,7 +78,7 @@
<a-form-model-item class="item-model" prop="source"> <a-form-model-item class="item-model" prop="source">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
v-model="formInline.source" v-model="formInline.source"
:disabled="disabled || disabledFieldList.includes('source') || isFromList" :disabled="disabled || disabledFieldList.includes('source') || isFromList || isLook"
:placeholder="$t('pleaseSelect')+$t('standardSelect.source')" :placeholder="$t('pleaseSelect')+$t('standardSelect.source')"
:type="'select'" :type="'select'"
:triggerChange="false" :triggerChange="false"
@@ -95,7 +95,7 @@
<a-form-model-item class="item-model" prop="operateType"> <a-form-model-item class="item-model" prop="operateType">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
v-model="formInline.operateType" v-model="formInline.operateType"
:disabled="disabled || disabledFieldList.includes('operateType') || isFromList" :disabled="disabled || disabledFieldList.includes('operateType') || isFromList || isLook"
:placeholder="$t('pleaseSelect')+$t('log.operationType')" :placeholder="$t('pleaseSelect')+$t('log.operationType')"
:type="'select'" :type="'select'"
:triggerChange="false" :triggerChange="false"
@@ -123,7 +123,7 @@
:name-str="formInline.standard_number_temp" :name-str="formInline.standard_number_temp"
:source="formInline.source" :source="formInline.source"
:disabledSourceSearch="true" :disabledSourceSearch="true"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
type="radio" type="radio"
select-only select-only
:placeholder="$t('pleaseEnter')+item.dbFieldTxt" :placeholder="$t('pleaseEnter')+item.dbFieldTxt"
@@ -132,7 +132,7 @@
<!--文本框--> <!--文本框-->
<a-input v-else <a-input v-else
class="box-input" class="box-input"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:maxLength="50" :maxLength="50"
:placeholder="specialPlaceholder[item.dbFieldName] || $t('pleaseEnter')+item.dbFieldTxt" /> :placeholder="specialPlaceholder[item.dbFieldName] || $t('pleaseEnter')+item.dbFieldTxt" />
@@ -146,7 +146,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
style="width: 100%" /> style="width: 100%" />
<!-- 2, 单选用户 --> <!-- 2, 单选用户 -->
<user-selection v-else-if="item.fieldShowType === FieldType.USER_SINGLE.value" <user-selection v-else-if="item.fieldShowType === FieldType.USER_SINGLE.value"
@@ -156,22 +156,22 @@
@nameChange="userSelectNameChange" @nameChange="userSelectNameChange"
:nameStr="formInline[item.dbFieldName + '_dictText']" :nameStr="formInline[item.dbFieldName + '_dictText']"
type="radio" type="radio"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" /> :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook" />
<!-- 3, 单选组织机构 --> <!-- 3, 单选组织机构 -->
<j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_SINGLE.value" <j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_SINGLE.value"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
:backDepart="true" /> :backDepart="true" />
<!-- 4, 日期多选 --> <!-- 4, 日期多选 -->
<j-multiple-date-picker v-else-if="item.fieldShowType === FieldType.DATE_MORE.value" <j-multiple-date-picker v-else-if="item.fieldShowType === FieldType.DATE_MORE.value"
class="box-input" class="box-input"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:fieldName="item.dbFieldName" :fieldName="item.dbFieldName"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" /> :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook" />
<!-- 5, 多行文本 --> <!-- 5, 多行文本 -->
<a-textarea v-else-if="item.fieldShowType === FieldType.TEXTAREA.value" <a-textarea v-else-if="item.fieldShowType === FieldType.TEXTAREA.value"
:placeholder="$t('pleaseEnter')+item.dbFieldTxt" :placeholder="$t('pleaseEnter')+item.dbFieldTxt"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
:maxLength="500" :maxLength="500"
v-model="formInline[item.dbFieldName]" :rows="4" /> v-model="formInline[item.dbFieldName]" :rows="4" />
<!-- 6, 标准多选 --> <!-- 6, 标准多选 -->
@@ -179,13 +179,13 @@
:placeholder="specialPlaceholder[item.dbFieldName] || $t('pleaseSelectStandard')" :placeholder="specialPlaceholder[item.dbFieldName] || $t('pleaseSelectStandard')"
:source="getStandardSource(item)" :source="getStandardSource(item)"
:disabledSourceSearch="true" :disabledSourceSearch="true"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
:exclude-standard-numbers="excludeStandardFields.includes(item.dbFieldName) ? excludeStandardNumbers : null" :exclude-standard-numbers="excludeStandardFields.includes(item.dbFieldName) ? excludeStandardNumbers : null"
v-model="formInline[item.dbFieldName]" /> v-model="formInline[item.dbFieldName]" />
<!-- 7, 多选组织机构 --> <!-- 7, 多选组织机构 -->
<j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_MORE.value" <j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_MORE.value"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
:multi="true" :multi="true"
:backDepart="true" :backDepart="true"
:treeOpera="true" /> :treeOpera="true" />
@@ -206,7 +206,7 @@
<!-- 9, 文本框 --> <!-- 9, 文本框 -->
<a-input v-else-if="item.fieldShowType === FieldType.TEXT_BOX.value" <a-input v-else-if="item.fieldShowType === FieldType.TEXT_BOX.value"
class="box-input" class="box-input"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:maxLength="item.dbLength" :maxLength="item.dbLength"
:placeholder="specialPlaceholder[item.dbFieldName] || $t('pleaseEnter')+item.dbFieldTxt" /> :placeholder="specialPlaceholder[item.dbFieldName] || $t('pleaseEnter')+item.dbFieldTxt" />
@@ -214,7 +214,7 @@
<j-dict-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_SINGLE.value" <j-dict-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_SINGLE.value"
class="box-input" class="box-input"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" :placeholder="$t('pleaseSelect')+item.dbFieldTxt"
:type="'select'" :type="'select'"
:triggerChange="false" :triggerChange="false"
@@ -224,7 +224,7 @@
<j-multi-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_MORE.value" <j-multi-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_MORE.value"
class="box-input" class="box-input"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" :placeholder="$t('pleaseSelect')+item.dbFieldTxt"
:type="'select'" :type="'select'"
:triggerChange="false" :triggerChange="false"
@@ -233,7 +233,7 @@
<s-tree-select <s-tree-select
v-else-if="item.fieldShowType === FieldType.TREE.value" v-else-if="item.fieldShowType === FieldType.TREE.value"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
:tree-data="optionsData[item.dbFieldName]" :tree-data="optionsData[item.dbFieldName]"
tree-checkable tree-checkable
treeCheckStrictly treeCheckStrictly
@@ -242,7 +242,7 @@
<!-- 14, 年份选择 --> <!-- 14, 年份选择 -->
<j-date v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value" <j-date v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value"
show-type="year" show-type="year"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:default-value="defaultValue[item.dbFieldName]" :default-value="defaultValue[item.dbFieldName]"
date-format="YYYY" date-format="YYYY"
@@ -250,7 +250,7 @@
<!-- 15, 树选择单选 --> <!-- 15, 树选择单选 -->
<s-tree-select v-else-if="item.fieldShowType === FieldType.TREE_SINGLE.value" <s-tree-select v-else-if="item.fieldShowType === FieldType.TREE_SINGLE.value"
v-model="formInline[item.dbFieldName]" v-model="formInline[item.dbFieldName]"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook"
:tree-data="optionsData[item.dbFieldName]" :tree-data="optionsData[item.dbFieldName]"
:label-in-value="false" :label-in-value="false"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" /> :placeholder="$t('pleaseSelect')+item.dbFieldTxt" />
@@ -264,7 +264,7 @@
:options-href="item.fieldHref" :options-href="item.fieldHref"
:nameStr="formInline[item.dbFieldName + '_dictText']" :nameStr="formInline[item.dbFieldName + '_dictText']"
:dict-id="item.dictId" :dict-id="item.dictId"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" /> :disabled="disabled || disabledFieldList.includes(item.dbFieldName) || isLook" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</template> </template>
@@ -282,11 +282,12 @@
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:rows="4" :rows="4"
:disabled="isLook"
v-decorator="['handleText', validatorRules.handleText]" /> v-decorator="['handleText', validatorRules.handleText]" />
</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="['handleFile']" return-id multiple /> <j-upload v-decorator="['handleFile']" return-id multiple :disabled="isLook" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
@@ -298,7 +299,7 @@
</template> </template>
</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">
<!--转办 审批节点存在--> <!--转办 审批节点存在-->
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo"> <a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo">
{{ $t('turnTo') }} {{ $t('turnTo') }}
@@ -321,7 +322,7 @@
</a-button> </a-button>
</div> </div>
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled" /> <upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled || isLook" />
<!--转办选人--> <!--转办选人-->
<user-select-modal ref="userSelectModal" check-required @change="continueTurnTo" /> <user-select-modal ref="userSelectModal" check-required @change="continueTurnTo" />
@@ -337,7 +338,8 @@ import {
StandardProperty, StandardProperty,
ProcessKey, ProcessKey,
FGEntryChangeProcessNode, FGEntryChangeProcessNode,
StandardStatus StandardStatus,
ProcessType
} from '../../../enums/commonEnums.js' } from '../../../enums/commonEnums.js'
import { import {
getDomesticStandardDocumentInfo, getDomesticStandardDocumentInfo,
@@ -360,7 +362,10 @@ import {
saveStandardECProcess, saveStandardECProcess,
queryStandardECProcessData, queryStandardECProcessData,
turnToStandardECProcess, turnToStandardECProcess,
agreeStandardECProcess, rejectStandardECProcess agreeStandardECProcess,
rejectStandardECProcess,
saveSnapShot,
getLookData, queryProcurementProcessInfo
} from '../../../api/workCenter' } from '../../../api/workCenter'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin' import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import STreeSelect from '../../../components/STreeSelect' import STreeSelect from '../../../components/STreeSelect'
@@ -443,7 +448,8 @@ export default {
}, },
businessId: null, businessId: null,
standardGetState: null, // standardGetState: null, //
disabledBtnClick: false // disabledBtnClick: false, //
isLook: false //
} }
}, },
computed: { computed: {
@@ -523,53 +529,64 @@ export default {
} }
}, },
created () { created () {
// if (this.$route.query.isLook + '' === '1') {
this.getPersonInfoStructure(this.processKey, () => { //
if (this.$route.query.processInstanceId || this.$route.query.draftId) { this.isLook = true
this.currentNode = this.$route.query.nodeId || FGEntryChangeProcessNode.initiate.value //
this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value) this.currentNode = this.$route.query.nodeId
this.initProcessData() //
} else { this.initPersonInfoData(false)
this.currentNode = FGEntryChangeProcessNode.initiate.value //
this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value) this.initProcessData()
// /, } else {
if (this.$route.query.source && this.$route.query.operateType) { //
this.formInline = { this.getPersonInfoStructure(this.processKey, () => {
source: this.$route.query.source, if (this.$route.query.processInstanceId || this.$route.query.draftId) {
operateType: this.$route.query.operateType this.currentNode = this.$route.query.nodeId || FGEntryChangeProcessNode.initiate.value
} this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value)
switch (this.$route.query.source) { this.initProcessData()
//
case StandardSource.DOMESTIC.value:
this.initDomesticStandardForm()
if (this.$route.query.standardId) {
this.initDomesticFormData(this.$route.query.standardId)
}
break
//
case StandardSource.OVERSEAS.value:
this.initOverseasStandardForm()
if (this.$route.query.standardId) {
this.initOverseasFormData(this.$route.query.standardId)
}
break
default:
break
}
} else { } else {
// this.currentNode = FGEntryChangeProcessNode.initiate.value
this.initDomesticStandardForm() this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value)
// /,
if (this.$route.query.source && this.$route.query.operateType) {
this.formInline = {
source: this.$route.query.source,
operateType: this.$route.query.operateType
}
switch (this.$route.query.source) {
//
case StandardSource.DOMESTIC.value:
this.initDomesticStandardForm()
if (this.$route.query.standardId) {
this.initDomesticFormData(this.$route.query.standardId)
}
break
//
case StandardSource.OVERSEAS.value:
this.initOverseasStandardForm()
if (this.$route.query.standardId) {
this.initOverseasFormData(this.$route.query.standardId)
}
break
default:
break
}
} else {
//
this.initDomesticStandardForm()
}
} }
} //
// const btnList = FGEntryChangeProcessNode.propertyOfValue('btn', this.currentNode)
const btnList = FGEntryChangeProcessNode.propertyOfValue('btn', this.currentNode) if (btnList && btnList.length > 0) {
if (btnList && btnList.length > 0) { this.btnList = btnList
this.btnList = btnList } else {
} else { this.btnList = FGEntryChangeProcessNode.approve.btn
this.btnList = FGEntryChangeProcessNode.approve.btn }
} this.disabled = FGEntryChangeProcessNode.propertyOfValue('disabled', this.currentNode) || false
this.disabled = FGEntryChangeProcessNode.propertyOfValue('disabled', this.currentNode) || false })
}) }
this.getSourceOptions() this.getSourceOptions()
}, },
methods: { methods: {
@@ -598,7 +615,18 @@ export default {
initProcessData () { initProcessData () {
this.loading = true this.loading = true
const { processInstanceId, draftId, taskId, projectId } = this.$route.query const { processInstanceId, draftId, taskId, projectId } = this.$route.query
queryStandardECProcessData({ processInstanceId, draftId, taskId, projectId }).then(async res => { let params = {}
let func
if (this.isLook) {
params.snapshotId = this.$route.query.snapshotId
func = getLookData
} else {
params = {
processInstanceId, draftId, taskId, projectId
}
func = queryStandardECProcessData
}
func(params).then(async res => {
if (res.success) { if (res.success) {
let result = res.result || {} let result = res.result || {}
// 稿稿 // 稿稿
@@ -613,9 +641,9 @@ export default {
// //
await this.handleSourceChange() await this.handleSourceChange()
// //
this.processInfo = Object.assign({}, res.result.basicProcessInfoDTO || {}) this.processInfo = Object.assign({}, res.result.basicProcessInfoDTO || result.basicProcessInfoDTO || {})
// //
this.approvalInfo = Object.assign({}, res.result.basicTaskInfoDTO || {}) this.approvalInfo = Object.assign({}, res.result.basicTaskInfoDTO || result.basicTaskInfoDTO || {})
this.$nextTick(() => { this.$nextTick(() => {
// //
this.processInfoForm.setFieldsValue(this.processInfo) this.processInfoForm.setFieldsValue(this.processInfo)
@@ -990,6 +1018,26 @@ export default {
this.loading = false this.loading = false
}) })
}, },
//
saveParamJsonStr (callback) {
//
const processInfoForm = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
//
const approvalInfoForm = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
const params = { ...processInfoForm, ...approvalInfoForm }
params.infoJsonStr = JSON.stringify(this.dealSaveJsonData())
params.taskId = this.$route.query.taskId
params.prcType = ProcessType.FB_ENTRY_CHANGE.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
this.disabledBtnClick = false
}
})
},
/** /**
* 提交发起 * 提交发起
*/ */
@@ -1014,17 +1062,34 @@ export default {
} else { } else {
submitFunc = agreeStandardECProcess submitFunc = agreeStandardECProcess
} }
submitFunc(formData).then(res => { if (this.currentNode === FGEntryChangeProcessNode.initiate.value && (!this.$route.query.processInstanceId || this.$route.query.draftId)) {
if (res.success) { submitFunc(formData).then(res => {
this.$message.success(res.message) if (res.success) {
this.goBack() this.$message.success(res.message)
} else { this.goBack()
this.$message.warning(res.message) } else {
this.disabledBtnClick = false this.$message.warning(res.message)
} this.disabledBtnClick = false
}).finally(() => { }
this.loading = false }).finally(() => {
}) this.loading = false
})
} else {
//
this.saveParamJsonStr(() => {
submitFunc(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.disabledBtnClick = false
}
}).finally(() => {
this.loading = false
})
})
}
}, },
/** /**
* 同意 * 同意
@@ -1045,16 +1110,19 @@ export default {
} }
formData.basicTaskInfoDTO.commitFlag = 1 // 12 formData.basicTaskInfoDTO.commitFlag = 1 // 12
this.loading = true this.loading = true
agreeStandardECProcess(formData).then(res => { //
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) agreeStandardECProcess(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
/** /**
@@ -1073,16 +1141,19 @@ export default {
} }
formData.basicTaskInfoDTO.commitFlag = 2 // 12 formData.basicTaskInfoDTO.commitFlag = 2 // 12
this.loading = true this.loading = true
rejectStandardECProcess(formData).then(res => { //
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) rejectStandardECProcess(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
/** /**
@@ -1,7 +1,7 @@
<template> <template>
<internal-detail-page :content-padding="0" :title="pageTitle" :loading="loading"> <internal-detail-page :content-padding="0" :title="pageTitle" :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' : ''"
@@ -25,7 +25,7 @@
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')" <a-input :placeholder="$t('pleaseEnter') + $t('processName')"
:maxLength="50" :maxLength="50"
:disabled="processInfoDisabled" :disabled="processInfoDisabled || isLook"
v-decorator="['processName', validatorRules.processName]" /> v-decorator="['processName', validatorRules.processName]" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -38,7 +38,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['processDueDate']" v-decorator="['processDueDate']"
:disabled="processInfoDisabled" :disabled="processInfoDisabled || isLook"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -48,7 +48,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')" <a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:disabled="processInfoDisabled" :disabled="processInfoDisabled || isLook"
:rows="4" :rows="4"
v-decorator="['processDescription']" /> v-decorator="['processDescription']" />
</a-form-item> </a-form-item>
@@ -58,9 +58,9 @@
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<div class="table-operator"> <div class="table-operator">
<!-- 新增--> <!-- 新增-->
<a-button icon="plus" type="primary" @click="handleAdd" v-if="canTableOperate">{{ $t('newlyAdded') }}</a-button> <a-button icon="plus" type="primary" @click="handleAdd" v-if="canTableOperate && !isLook">{{ $t('newlyAdded') }}</a-button>
<!-- 批量删除--> <!-- 批量删除-->
<a-button type="primary" icon="delete" ghost @click="batchDel" v-if="canTableOperate">{{ $t('batchDelete') }}</a-button> <a-button type="primary" icon="delete" ghost @click="batchDel" v-if="canTableOperate && !isLook">{{ $t('batchDelete') }}</a-button>
<a-button icon="upload" type="primary" ghost @click="handleExportXls" v-if="!canTableOperate"> <a-button icon="upload" type="primary" ghost @click="handleExportXls" v-if="!canTableOperate">
{{ $t('export') }} {{ $t('export') }}
</a-button> </a-button>
@@ -77,9 +77,9 @@
:loading="loading"> :loading="loading">
<template v-slot:action="{text, record, index}"> <template v-slot:action="{text, record, index}">
<a @click="handleEdit(record, index)">{{ $t('edit') }}</a> <a @click="handleEdit(record, index)" :disabled="isLook">{{ $t('edit') }}</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDelete(index)">{{ $t('delete') }}</a> <a @click="handleDelete(index)" :disabled="isLook">{{ $t('delete') }}</a>
</template> </template>
</j-table> </j-table>
@@ -95,6 +95,7 @@
type="radio" type="radio"
v-decorator="['confirmEngineer', validatorRules.confirmEngineer]" v-decorator="['confirmEngineer', validatorRules.confirmEngineer]"
@nameChange="userSelectNameChange" @nameChange="userSelectNameChange"
:disabled="isLook"
filedName="confirmEngineer" filedName="confirmEngineer"
:nameStr="businessFormData.confirmEngineer_dictText" /> :nameStr="businessFormData.confirmEngineer_dictText" />
</a-form-item> </a-form-item>
@@ -110,11 +111,12 @@
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:rows="4" :rows="4"
:disabled="isLook"
v-decorator="['handleText', validatorRules.handleText]" /> v-decorator="['handleText', validatorRules.handleText]" />
</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="['handleFile']" return-id multiple /> <j-upload v-decorator="['handleFile']" return-id multiple :disabled="isLook" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
@@ -129,7 +131,7 @@
</div> </div>
<!--底部按钮--> <!--底部按钮-->
<div class="detail-page-bottom-operate-box"> <div v-if="!isLook" class="detail-page-bottom-operate-box">
<!--转办 审批节点存在--> <!--转办 审批节点存在-->
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo"> <a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo">
{{ $t('turnTo') }} {{ $t('turnTo') }}
@@ -172,7 +174,7 @@ import InternalDetailPage from '../../../components/InternalDetailPage'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin' import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import PersonnelInfo from '../../../components/PersonnelInfo' import PersonnelInfo from '../../../components/PersonnelInfo'
import ProcessDetailList from '../../../components/ProcessDetailList' import ProcessDetailList from '../../../components/ProcessDetailList'
import { ProcessKey, ProcurementProcessNodes } from '../../../enums/commonEnums' import { ProcessKey, ProcurementProcessNodes, ProcessType } from '../../../enums/commonEnums'
import JTable from '../../../components/jero/JTable' import JTable from '../../../components/jero/JTable'
import TableFormModal from './modules/TableFormModal' import TableFormModal from './modules/TableFormModal'
import { import {
@@ -182,7 +184,9 @@ import {
agreeProcurementProcess, agreeProcurementProcess,
rejectProcurementProcess, rejectProcurementProcess,
transferProcurementProcess, transferProcurementProcess,
carbonCopyProcurementProcess carbonCopyProcurementProcess,
saveSnapShot,
getLookData
} from '../../../api/workCenter' } from '../../../api/workCenter'
import UserSelection from '../../../components/selection/UserSelection' import UserSelection from '../../../components/selection/UserSelection'
import UserSelectModal from '../../../components/selection/UserSelectModal' import UserSelectModal from '../../../components/selection/UserSelectModal'
@@ -271,7 +275,8 @@ export default {
isTransfer: true, // isTransfer: true, //
businessId: null, businessId: null,
carbonCopyPersonIds: null, // id carbonCopyPersonIds: null, // id
disabledBtnClick: false disabledBtnClick: false,
isLook: false //
} }
}, },
computed: { computed: {
@@ -305,20 +310,31 @@ export default {
} }
}, },
created () { created () {
this.getPersonInfoStructure(this.processKey, () => { if (this.$route.query.isLook + '' === '1') {
if (this.$route.query.processInstanceId || this.$route.query.draftId) { //
this.currentNode = this.$route.query.nodeId || ProcurementProcessNodes.initiate.value this.isLook = true
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value) //
this.initProcessInfo() this.currentNode = this.$route.query.nodeId
} else { //
this.currentNode = ProcurementProcessNodes.initiate.value this.initPersonInfoData(false)
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value) //
} this.initProcessInfo()
if (this.currentNode === ProcurementProcessNodes.initiate.value) { } else {
this.columns.push(this.operateColumn) this.getPersonInfoStructure(this.processKey, () => {
} if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode) this.currentNode = this.$route.query.nodeId || ProcurementProcessNodes.initiate.value
}) this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value)
this.initProcessInfo()
} else {
this.currentNode = ProcurementProcessNodes.initiate.value
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value)
}
if (this.currentNode === ProcurementProcessNodes.initiate.value) {
this.columns.push(this.operateColumn)
}
this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode)
})
}
}, },
methods: { methods: {
// //
@@ -371,20 +387,28 @@ export default {
}, },
initProcessInfo () { initProcessInfo () {
this.loading = true this.loading = true
const params = { let params = {}
processInstanceId: this.$route.query.processInstanceId, let func
draftId: this.$route.query.draftId, if (this.isLook) {
taskId: this.$route.query.taskId, params.snapshotId = this.$route.query.snapshotId
projectId: this.$route.query.projectId func = getLookData
} else {
params = {
processInstanceId: this.$route.query.processInstanceId,
draftId: this.$route.query.draftId,
taskId: this.$route.query.taskId,
projectId: this.$route.query.projectId
}
func = queryProcurementProcessInfo
} }
queryProcurementProcessInfo(params).then(res => { func(params).then(res => {
if (res.success) { if (res.success) {
let result = res.result || {} let result = res.result || {}
if (result.infoJsonStr) { if (result.infoJsonStr) {
result = JSON.parse(result.infoJsonStr) result = JSON.parse(result.infoJsonStr)
this.draftInitPersonInfo(result.userInfoMap) this.draftInitPersonInfo(result.userInfoMap)
} }
this.businessId = result.businessId this.businessId = result.businessId || result.businessInfoDTO[0].businessId
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {}) this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
this.dataSource = result.businessInfoDTO || [] this.dataSource = result.businessInfoDTO || []
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {}) this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {})
@@ -480,6 +504,26 @@ export default {
} }
return !flag ? flag : formData return !flag ? flag : formData
}, },
//
saveParamJsonStr (callback) {
//
const processInfoForm = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
//
const approvalInfoForm = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
const params = { ...processInfoForm, ...approvalInfoForm }
params.infoJsonStr = JSON.stringify(this.dealFormData(true))
params.taskId = this.$route.query.taskId
params.prcType = ProcessType.LEGAL_PROCUREMENT.value
saveSnapShot(params).then(async res => {
if (res.success) {
callback && await callback()
} else {
this.$message.warning(res.message)
this.loading = false
this.disabledBtnClick = false
}
})
},
/** /**
* 转办 * 转办
*/ */
@@ -587,17 +631,34 @@ export default {
submitFunc = agreeProcurementProcess submitFunc = agreeProcurementProcess
} }
this.loading = true this.loading = true
submitFunc(formData).then(res => { if (this.currentNode === ProcurementProcessNodes.initiate.value && (!this.$route.query.processInstanceId || this.$route.query.draftId)) {
if (res.success) { submitFunc(formData).then(res => {
this.$message.success(res.message) if (res.success) {
this.goBack() this.$message.success(res.message)
} else { this.goBack()
this.$message.warning(res.message) } else {
this.disabledBtnClick = false this.$message.warning(res.message)
} this.disabledBtnClick = false
}).finally(() => { }
this.loading = false }).finally(() => {
}) this.loading = false
})
} else {
//
this.saveParamJsonStr(() => {
submitFunc(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
this.disabledBtnClick = false
}
}).finally(() => {
this.loading = false
})
})
}
}, },
/** /**
* 同意 * 同意
@@ -618,16 +679,19 @@ export default {
} }
formData.basicTaskInfoDTO.commitFlag = 1 // 12 formData.basicTaskInfoDTO.commitFlag = 1 // 12
this.loading = true this.loading = true
agreeProcurementProcess(formData).then(res => { //
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) agreeProcurementProcess(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
/** /**
@@ -646,16 +710,19 @@ export default {
} }
formData.basicTaskInfoDTO.commitFlag = 2 // 12 formData.basicTaskInfoDTO.commitFlag = 2 // 12
this.loading = true this.loading = true
rejectProcurementProcess(formData).then(res => { //
if (res.success) { this.saveParamJsonStr(() => {
this.$message.success(res.message) rejectProcurementProcess(formData).then(res => {
this.goBack() if (res.success) {
} else { this.$message.success(res.message)
this.$message.warning(res.message) this.goBack()
this.disabledBtnClick = false } else {
} this.$message.warning(res.message)
}).finally(() => { this.disabledBtnClick = false
this.loading = false }
}).finally(() => {
this.loading = false
})
}) })
}, },
handleExportXls () { handleExportXls () {
@@ -11,7 +11,7 @@
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')" <a-input :placeholder="$t('pleaseEnter') + $t('processName')"
:maxLength="50" :maxLength="50"
:disabled="disabled || processDisabled" :disabled="disabled || processDisabled || disabledAll"
v-decorator="['prcName', validatorRules.processName]" /> v-decorator="['prcName', validatorRules.processName]" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -20,7 +20,7 @@
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')" <a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
style="width: 100%" style="width: 100%"
:disabled="disabled || processDisabled" :disabled="disabled || processDisabled || disabledAll"
value-format="YYYY-MM-DD hh:mm:ss" value-format="YYYY-MM-DD hh:mm:ss"
v-decorator="['dueTime']" /> v-decorator="['dueTime']" />
</a-form-item> </a-form-item>
@@ -31,7 +31,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 || processDisabled" :disabled="disabled || processDisabled || disabledAll"
v-decorator="['prcMes']" /> v-decorator="['prcMes']" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -40,7 +40,7 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<base-info-form :disabled="disabled" ref="baseInfoForm"/> <base-info-form :disabled="disabled" :disabled-all="disabledAll" ref="baseInfoForm"/>
<!-- 流程审批信息 --> <!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -50,16 +50,17 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')" <a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500" :maxLength="500"
:rows="4" :rows="4"
:disabled="disabledAll"
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="disabledAll" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
<div class="detail-page-bottom-operate-box"> <div class="detail-page-bottom-operate-box" v-if="!disabledAll">
<!--取消--> <!--取消-->
<a-button v-if="btn.includes('cancel')" type="primary" :loading="loading" ghost @click="handleCancel">{{ $t('cancel') }}</a-button> <a-button v-if="btn.includes('cancel')" type="primary" :loading="loading" ghost @click="handleCancel">{{ $t('cancel') }}</a-button>
<!--保存--> <!--保存-->
@@ -76,6 +77,7 @@ import InternalDetailPage from '@comp/InternalDetailPage'
import BaseInfoForm from '@views/workCenter/standardPromotionProcess/modules/BaseInfoForm' import BaseInfoForm from '@views/workCenter/standardPromotionProcess/modules/BaseInfoForm'
import { ProcessKey, StandardPromotion } from '@/enums/commonEnums' import { ProcessKey, StandardPromotion } from '@/enums/commonEnums'
import { import {
getLookData,
getStandardPromotionDataById, getStandardPromotionDetail, getStandardPromotionDataById, getStandardPromotionDetail,
getStandardPromotionProjectId, getStandardPromotionProjectId,
saveStandardPromotion, saveStandardPromotion,
@@ -89,6 +91,7 @@ export default {
return { return {
loading: false, loading: false,
switchValue: 'base', switchValue: 'base',
disabledAll: false, //
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 4 } sm: { span: 4 }
@@ -169,7 +172,8 @@ export default {
// standardApproval // standardApproval
}, },
created () { created () {
const { projectId, nodeId, taskName } = this.$route.query const { projectId, nodeId, taskName, isLook } = this.$route.query
this.disabledAll = isLook === '1'
// 稿nodeId // 稿nodeId
this.currentNode = nodeId || StandardPromotion.initiate.value this.currentNode = nodeId || StandardPromotion.initiate.value
this.currentNodeName = taskName || StandardPromotion.initiate.text this.currentNodeName = taskName || StandardPromotion.initiate.text
@@ -180,6 +184,11 @@ export default {
// //
this.btn = ['submit'] this.btn = ['submit']
} }
//
if (this.$route.query.snapshotId) {
this.loadSnapshotPage()
return
}
// //
if (this.$route.query.projectId) { if (this.$route.query.projectId) {
this.loadPage() this.loadPage()
@@ -273,6 +282,8 @@ export default {
this.$refs.baseInfoForm.getData() this.$refs.baseInfoForm.getData()
] ]
} }
//
params.formDataList = formDataList
// //
// //
@@ -298,8 +309,47 @@ export default {
projectId: this.projectId, projectId: this.projectId,
id: this.formInfo.id id: this.formInfo.id
}) })
// 稿
if (this.isInitiate) {
params.infoJsonStr = JSON.stringify({
// json
prcData: params
})
}
return params return 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.formInfo = prcData.processEsDeclare
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(prcData.processEsDeclare)
})
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
})
}).finally(() => {
this.loading = false
})
},
/** /**
* 保存 * 保存
*/ */
@@ -11,7 +11,7 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="emergencyDegree"> <a-form-model-item class="item-model" prop="emergencyDegree">
<j-dict-select-tag :disabled="disabled" <j-dict-select-tag :disabled="disabled || disabledAll"
v-model="formInline.emergencyDegree" v-model="formInline.emergencyDegree"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.urgency')" :placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.urgency')"
:triggerChange="false" :triggerChange="false"
@@ -30,7 +30,7 @@
<a-form-model-item class="item-model" prop="standardNo"> <a-form-model-item class="item-model" prop="standardNo">
<standard-selection :source="StandardSource.ENTERPRISE.value" type="radio" <standard-selection :source="StandardSource.ENTERPRISE.value" type="radio"
:disabledSourceSearch="true" :disabledSourceSearch="true"
:disabled="disabled" :disabled="disabled || disabledAll"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.esNumber')" :placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.esNumber')"
@nameChange="changeStandardName" @nameChange="changeStandardName"
v-model="formInline.standardNo" /> v-model="formInline.standardNo" />
@@ -61,8 +61,9 @@
<a-form-model-item class="item-model" prop="declareUser"> <a-form-model-item class="item-model" prop="declareUser">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.promoter')" <user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.promoter')"
v-model="formInline.declareUser" v-model="formInline.declareUser"
@nameChange="(name) => nameChange('declareUserDictText', name)"
:name-str="formInline.declareUserDictText" :name-str="formInline.declareUserDictText"
:disabled="disabled" :disabled="disabled || disabledAll"
type="radio" /> type="radio" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -78,6 +79,7 @@
<a-input v-model="formInline.mainDepart" <a-input v-model="formInline.mainDepart"
@change="event => formInline.mainDepart = event.target.value" @change="event => formInline.mainDepart = event.target.value"
:maxLength="50" :maxLength="50"
:disabled="disabledAll"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.mainDeliveryDepart')" /> :placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.mainDeliveryDepart')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -93,6 +95,7 @@
<a-input v-model="formInline.declareTopic" <a-input v-model="formInline.declareTopic"
@change="event => formInline.declareTopic = event.target.value" @change="event => formInline.declareTopic = event.target.value"
:maxLength="50" :maxLength="50"
:disabled="disabledAll"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.subject')" /> :placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.subject')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -105,7 +108,7 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="declareDate"> <a-form-model-item class="item-model" prop="declareDate">
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled" <j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled || disabledAll"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardPromotionProcess.promotionDate')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardPromotionProcess.promotionDate')"
v-model="formInline.declareDate" /> v-model="formInline.declareDate" />
</a-form-model-item> </a-form-model-item>
@@ -120,7 +123,7 @@
</div> </div>
<a-form-model-item class="item-model" prop="attendUnit"> <a-form-model-item class="item-model" prop="attendUnit">
<j-select-depart <j-select-depart
:disabled="disabled" :disabled="disabled || disabledAll"
v-model="formInline.attendUnit" v-model="formInline.attendUnit"
:multi="true" :multi="true"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardPromotionProcess.participatingUnits')" :placeholder="$t('pleaseSelect') + $t('workCenter.standardPromotionProcess.participatingUnits')"
@@ -140,7 +143,9 @@
</div> </div>
<a-form-model-item class="item-model" prop="initiator"> <a-form-model-item class="item-model" prop="initiator">
<user-selection :placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.contactPerson')" <user-selection :placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.contactPerson')"
type="checkbox" :nameStr="initiatorName" @nameChange="(name) => nameChange('initiatorDictText', name)"
type="checkbox" :nameStr="formInline.initiatorDictText"
:disabled="disabledAll"
v-model="formInline.initiator" /> v-model="formInline.initiator" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -156,6 +161,7 @@
<a-textarea :maxLength="500" <a-textarea :maxLength="500"
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.content')" :placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.content')"
:rows="4" :rows="4"
:disabled="disabledAll"
v-model="formInline.declareContent" /> v-model="formInline.declareContent" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -179,7 +185,7 @@
</div> </div>
</div> </div>
<!-- 上传 --> <!-- 上传 -->
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file> <upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled || disabledAll"></upload-file>
</a-form-model> </a-form-model>
</template> </template>
@@ -197,6 +203,12 @@ export default {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false
},
//
disabledAll: {
type: Boolean,
required: false,
default: false
} }
}, },
data () { data () {
@@ -207,8 +219,6 @@ export default {
model: {}, model: {},
// //
operationType: null, operationType: null,
//
initiatorName: '',
// //
disabledInitiator: true, disabledInitiator: true,
rules: { rules: {
@@ -303,7 +313,6 @@ export default {
this.formInline = { this.formInline = {
...data ...data
} }
this.initiatorName = data.initiatorDictText
}, },
// //
getData () { getData () {
@@ -352,7 +361,7 @@ export default {
const names = data.map(item => item.contactIdDictText).join(',') const names = data.map(item => item.contactIdDictText).join(',')
// //
this.disabledInitiator = val ? !!ids : true this.disabledInitiator = val ? !!ids : true
this.initiatorName = names this.formInline.initiatorDictText = names
this.$set(this.formInline, 'initiator', ids) this.$set(this.formInline, 'initiator', ids)
// , // ,
if (ids) { if (ids) {
@@ -360,6 +369,9 @@ export default {
} }
} }
}) })
},
nameChange (field, name) {
this.formInline[field] = name
} }
} }
} }