[update 查看详情] 企标稽查流程
This commit is contained in:
+10
-2
@@ -5,8 +5,6 @@
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
:okButtonProps="{ props: { disabled } }"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:cancelText="$t('close')">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
@@ -40,6 +38,16 @@
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
|
||||
+105
-19
@@ -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>
|
||||
<!-- 流程表格 -->
|
||||
<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>
|
||||
@@ -65,11 +65,12 @@
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
:disabled="disabled"
|
||||
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>
|
||||
<!--保存-->
|
||||
@@ -107,12 +108,17 @@ import ProcessDetailList from '@comp/ProcessDetailList'
|
||||
import InspectionProcessTable
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessTable'
|
||||
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 {
|
||||
approvalInspectProcess,
|
||||
getInspectProcessDetail,
|
||||
getInspectProcessProjectId, rejectInspectProcess, saveInspectProcess, startInspectProcess, transferInspectProcess
|
||||
getInspectProcessProjectId, getLookData,
|
||||
rejectInspectProcess,
|
||||
saveInspectProcess,
|
||||
saveSnapShot,
|
||||
startInspectProcess,
|
||||
transferInspectProcess
|
||||
} from '@api/workCenter'
|
||||
|
||||
const tabList = ['base', 'user']
|
||||
@@ -124,7 +130,7 @@ export default {
|
||||
return {
|
||||
loading: false,
|
||||
switchValue: 'base',
|
||||
disabled: false,
|
||||
disabled: false, // 全部禁用
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 }
|
||||
@@ -197,7 +203,8 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
const { projectId, nodeId, taskName } = this.$route.query
|
||||
const { projectId, nodeId, taskName, isLook } = this.$route.query
|
||||
this.disabled = isLook === '1'
|
||||
// 发起、草稿进来没有nodeId,就默认发起节点
|
||||
this.currentNode = nodeId || EsInspectionProcess.initiate.value
|
||||
this.currentNodeName = taskName || EsInspectionProcess.initiate.text
|
||||
@@ -212,6 +219,11 @@ export default {
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.isInitiate)
|
||||
})
|
||||
// 快照回显
|
||||
if (this.$route.query.snapshotId) {
|
||||
this.loadSnapshotPage()
|
||||
return
|
||||
}
|
||||
// 如果是待办或草稿进来,就获取详情数据
|
||||
if (this.$route.query.projectId) {
|
||||
this.loadPage()
|
||||
@@ -381,6 +393,8 @@ export default {
|
||||
// 保存清空校验
|
||||
this.approvalInfoForm.validateFields(['commitText'], { force: true }, () => {})
|
||||
}
|
||||
// 保存一下所有表单收集的数据用于快照回显
|
||||
params.formDataList = formDataList
|
||||
// 收集人员信息
|
||||
const personInfo = this.getPersonInfo(isValidate && !flag)
|
||||
if (!personInfo) {
|
||||
@@ -410,7 +424,9 @@ export default {
|
||||
// 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了)
|
||||
personInfo: this.$refs.personnelInfo.getDataObj(),
|
||||
// 业务表格数据,用于强制撤回后回显
|
||||
draftData: params.processEsInspectList
|
||||
draftData: params.processEsInspectList,
|
||||
// 将流程数据保存json,后续进行快照回显
|
||||
prcData: params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -420,6 +436,61 @@ export default {
|
||||
}
|
||||
return params
|
||||
},
|
||||
/**
|
||||
* 保存快照信息
|
||||
*/
|
||||
saveSnapShotInfo (prcParams) {
|
||||
// 没有taskId就不保存
|
||||
if (!this.$route.query.taskId) {
|
||||
return Promise.resolve()
|
||||
}
|
||||
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) {
|
||||
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 approvalInspectProcess(res)
|
||||
console.log(params)
|
||||
// 保存快照,成功了就调接口,失败了就提示
|
||||
return this.saveSnapShotInfo(params).then(res => {
|
||||
if (res.success) {
|
||||
return approvalInspectProcess(params)
|
||||
} else {
|
||||
return res
|
||||
}
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -577,11 +656,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 rejectInspectProcess(res)
|
||||
params.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value
|
||||
// 保存快照,成功了就调接口,失败了就提示
|
||||
return this.saveSnapShotInfo(params).then(res => {
|
||||
if (res.success) {
|
||||
return rejectInspectProcess(params)
|
||||
} else {
|
||||
return res
|
||||
}
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
+14
-6
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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>
|
||||
</div>
|
||||
@@ -33,6 +33,7 @@
|
||||
<div class="table-form" v-if="isInputInspectionReport">
|
||||
<a-date-picker :placeholder="$t('pleaseSelect')+$t('date')"
|
||||
style="width: 100%"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
v-model="record.completeDate" />
|
||||
</div>
|
||||
@@ -52,6 +53,7 @@
|
||||
<div class="table-form" v-if="isInputInspectionReport">
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionProcess.actualInspector')" :show-btn="false"
|
||||
type="radio" :nameStr="record.actualInspectUser_dictText" @nameChange="nameChange($event, record)"
|
||||
:disabled="disabled"
|
||||
v-model="record.actualInspectUser" />
|
||||
</div>
|
||||
<a-tooltip v-else overlay-class-name="tooltip-style">
|
||||
@@ -66,8 +68,8 @@
|
||||
<!-- 节点1显示稽查内容和删除、节点2显示稽查内容(只读) -->
|
||||
<template v-if="isInitiate || isDirectorLeaderApprovalOne">
|
||||
<a @click="handleInspectionContent(record, index)" >{{ $t('workCenter.esInspectionProcess.inspectionContent') + `(${record.standardInspectContentCount || 0}${$t('strip')})` }}</a>
|
||||
<a-divider v-if="isInitiate" type="vertical" />
|
||||
<a v-if="isInitiate" @click="handleDelete(index)" >{{ $t('delete') }}</a>
|
||||
<a-divider v-if="isInitiate && !disabled" type="vertical" />
|
||||
<a v-if="isInitiate && !disabled" @click="handleDelete(index)" >{{ $t('delete') }}</a>
|
||||
</template>
|
||||
<!-- 后续节点都显示稽查报告和整改计划 -->
|
||||
<template v-else>
|
||||
@@ -82,11 +84,11 @@
|
||||
<!-- 添加稽查计划 -->
|
||||
<inspection-process-table-modal ref="inspectionProcessTableModal" @ok="handleAddPlanCallback" v-if="isInitiate"/>
|
||||
<!-- 稽查内容:节点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填写,后续只查看 -->
|
||||
<inspection-process-report ref="inspectionProcessReport" @ok="handleReportCallback" @delIds="addDelIds" :disabled="!isInputInspectionReport"/>
|
||||
<inspection-process-report ref="inspectionProcessReport" @ok="handleReportCallback" @delIds="addDelIds" :disabled="!isInputInspectionReport || disabled"/>
|
||||
<!-- 整改计划:节点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>
|
||||
</template>
|
||||
|
||||
@@ -108,6 +110,12 @@ export default {
|
||||
components: { UserSelection, InspectionProcessRectificationPlan, InspectionProcessReport, InspectionProcessContent, InspectionProcessTableModal, JTable },
|
||||
mixins: [JeroListMixin],
|
||||
props: {
|
||||
// 禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
// 当前节点
|
||||
currentNode: {
|
||||
type: String,
|
||||
|
||||
Reference in New Issue
Block a user