[update 查看详情] 稽查整改流程
This commit is contained in:
+5
-5
@@ -244,15 +244,15 @@ export default {
|
||||
// 同意按钮
|
||||
this.btn = ['agree']
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.isInitiate)
|
||||
})
|
||||
// 快照回显
|
||||
if (this.$route.query.snapshotId) {
|
||||
this.loadSnapshotPage()
|
||||
return
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.isInitiate)
|
||||
})
|
||||
// 如果是待办或草稿进来,就获取详情数据
|
||||
if (this.$route.query.projectId) {
|
||||
this.loadPage()
|
||||
@@ -472,7 +472,7 @@ export default {
|
||||
saveSnapShotInfo (prcParams) {
|
||||
// 没有taskId就不保存
|
||||
if (!this.$route.query.taskId) {
|
||||
return Promise.resolve()
|
||||
return Promise.resolve({ success: true })
|
||||
}
|
||||
const { processAll = {}, processApprovalRecord = {} } = prcParams
|
||||
const params = Object.assign({}, {
|
||||
|
||||
+5
-5
@@ -215,15 +215,15 @@ export default {
|
||||
// 同意按钮
|
||||
this.btn = ['agree']
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.isInitiate)
|
||||
})
|
||||
// 快照回显
|
||||
if (this.$route.query.snapshotId) {
|
||||
this.loadSnapshotPage()
|
||||
return
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.isInitiate)
|
||||
})
|
||||
// 如果是待办或草稿进来,就获取详情数据
|
||||
if (this.$route.query.projectId) {
|
||||
this.loadPage()
|
||||
@@ -442,7 +442,7 @@ export default {
|
||||
saveSnapShotInfo (prcParams) {
|
||||
// 没有taskId就不保存
|
||||
if (!this.$route.query.taskId) {
|
||||
return Promise.resolve()
|
||||
return Promise.resolve({ success: true })
|
||||
}
|
||||
const { processAll = {}, processApprovalRecord = {} } = prcParams
|
||||
const params = Object.assign({}, {
|
||||
|
||||
+119
-24
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
|
||||
<!-- 标题右侧tab -->
|
||||
<template v-slot:titleRightCustom>
|
||||
<template v-slot:titleRightCustom v-if="!disabled">
|
||||
<div class="table-operator-tab">
|
||||
<!-- 基础信息 -->
|
||||
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
|
||||
@@ -55,7 +55,7 @@
|
||||
<!-- 业务基本信息 -->
|
||||
<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>
|
||||
@@ -64,12 +64,13 @@
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||
:maxLength="500"
|
||||
:disabled="disabled"
|
||||
:rows="4"
|
||||
v-decorator="['commitText', validatorRules.remarks]" />
|
||||
</a-form-item>
|
||||
<!--附件-->
|
||||
<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>
|
||||
</div>
|
||||
@@ -82,7 +83,7 @@
|
||||
</process-detail-list>
|
||||
</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>
|
||||
<!--保存-->
|
||||
@@ -108,10 +109,16 @@ import BaseInfoForm from '@views/workCenter/enterpriseStandardInspectionRectific
|
||||
import UserSelectModal from '@comp/selection/UserSelectModal'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
import {
|
||||
approvalInspectRectify, getInspectRectifyDataById,
|
||||
getInspectRectifyDetail, rejectInspectRectify, saveInspectRectify, startInspectRectify, transferInspectRectify
|
||||
approvalInspectRectify,
|
||||
getInspectRectifyDataById,
|
||||
getInspectRectifyDetail, getLookData,
|
||||
rejectInspectRectify,
|
||||
saveInspectRectify,
|
||||
saveSnapShot,
|
||||
startInspectRectify,
|
||||
transferInspectRectify
|
||||
} from '@api/workCenter'
|
||||
import { ApprovalOpinions, EsInspectionRectification, ProcessKey } from '@/enums/commonEnums'
|
||||
import { ApprovalOpinions, EsInspectionRectification, ProcessKey, ProcessType } from '@/enums/commonEnums'
|
||||
|
||||
const tabList = ['base', 'user']
|
||||
export default {
|
||||
@@ -197,7 +204,8 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
const { projectId, nodeId, taskName } = this.$route.query
|
||||
const { projectId, nodeId, taskName, isLook } = this.$route.query
|
||||
this.disabled = isLook === '1'
|
||||
// 自动发起流程: 没有默认节点
|
||||
this.currentNode = nodeId || ''
|
||||
this.currentNodeName = taskName || ''
|
||||
@@ -212,6 +220,11 @@ export default {
|
||||
// 同意按钮
|
||||
this.btn = ['agree']
|
||||
}
|
||||
// 快照回显
|
||||
if (this.$route.query.snapshotId) {
|
||||
this.loadSnapshotPage()
|
||||
return
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.personnelInfoData = this.personnelInfoData.map(item => {
|
||||
@@ -348,6 +361,8 @@ export default {
|
||||
// 保存清空校验
|
||||
this.approvalInfoForm.validateFields(['commitText'], { force: true }, () => {})
|
||||
}
|
||||
// 保存一下所有表单收集的数据用于快照回显
|
||||
params.formDataList = formDataList
|
||||
// 收集人员信息
|
||||
const personInfo = this.getPersonInfo(isValidate && !flag)
|
||||
if (!personInfo) {
|
||||
@@ -389,7 +404,9 @@ export default {
|
||||
// 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了)
|
||||
personInfo: this.$refs.personnelInfo.getDataObj(),
|
||||
// 业务表格数据,用于强制撤回后回显
|
||||
draftData
|
||||
draftData,
|
||||
// 将流程数据保存json,后续进行快照回显
|
||||
prcData: params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -399,6 +416,63 @@ export default {
|
||||
}
|
||||
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 () {
|
||||
if (this.loading) return
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
console.log(res)
|
||||
res.map.pass = true
|
||||
this.getPageParams().then(params => {
|
||||
console.log(params)
|
||||
params.map.pass = true
|
||||
let fn = approvalInspectRectify
|
||||
// 是否强制撤回(强制撤回的话,就发起接口)
|
||||
if (this.isForceRevoke) {
|
||||
fn = startInspectRectify
|
||||
// 重新发起置空业务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 => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -499,19 +580,26 @@ export default {
|
||||
handleAgree (isSubmitBtn) {
|
||||
if (this.loading) return
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
this.getPageParams().then(params => {
|
||||
// 同意和提交一直传true
|
||||
res.map.pass = true
|
||||
params.map.pass = true
|
||||
// 不是提交按钮
|
||||
if (isSubmitBtn !== true) {
|
||||
// 没有填写注释,就默认同意
|
||||
if (!res.processApprovalRecord.commitText) {
|
||||
res.processApprovalRecord.commitText = '同意'
|
||||
if (!params.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 => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -550,11 +638,18 @@ export default {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
res.map.pass = false
|
||||
this.getPageParams().then(params => {
|
||||
params.map.pass = false
|
||||
// 审批意见
|
||||
res.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value
|
||||
return rejectInspectRectify(res)
|
||||
params.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value
|
||||
// 保存快照,成功了就调接口,失败了就提示
|
||||
return this.saveSnapShotInfo(params).then(res => {
|
||||
if (res.success) {
|
||||
return rejectInspectRectify(params)
|
||||
} else {
|
||||
return res
|
||||
}
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
+5
-5
@@ -208,15 +208,15 @@ export default {
|
||||
// 同意按钮
|
||||
this.btn = ['agree']
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.isInitiate)
|
||||
})
|
||||
// 快照回显
|
||||
if (this.$route.query.snapshotId) {
|
||||
this.loadSnapshotPage()
|
||||
return
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.isInitiate)
|
||||
})
|
||||
// 如果是待办或草稿进来,就获取详情数据
|
||||
if (this.$route.query.projectId) {
|
||||
this.loadPage()
|
||||
@@ -395,7 +395,7 @@ export default {
|
||||
saveSnapShotInfo (prcParams) {
|
||||
// 没有taskId就不保存
|
||||
if (!this.$route.query.taskId) {
|
||||
return Promise.resolve()
|
||||
return Promise.resolve({ success: true })
|
||||
}
|
||||
const { processAll = {}, processApprovalRecord = {} } = prcParams
|
||||
const params = Object.assign({}, {
|
||||
|
||||
Reference in New Issue
Block a user