[add] 延期申请流程、稽查整改流程部分完成
This commit is contained in:
+28
-1
@@ -142,6 +142,24 @@ const approvalInspectProcess = (params) => postAction('/esinspect/esInspectFlowC
|
|||||||
// 转办
|
// 转办
|
||||||
const transferInspectProcess = (params) => getAction('/esinspect/esInspectFlowController/flowTransfer', params)
|
const transferInspectProcess = (params) => getAction('/esinspect/esInspectFlowController/flowTransfer', params)
|
||||||
|
|
||||||
|
/* 稽查延期申请 */
|
||||||
|
// 详情信息
|
||||||
|
const getInspectExtensionDetail = (params) => getAction('/process/esInspectDelayApplyFlow/queryDetailByProjectId', params)
|
||||||
|
// 审批(通过、驳回)
|
||||||
|
const approvalInspectExtension = (params) => postAction('/process/esInspectDelayApplyFlow/flowApproval', params)
|
||||||
|
// 转办
|
||||||
|
const transferInspectExtension = (params) => getAction('/process/esInspectDelayApplyFlow/flowTransfer', params)
|
||||||
|
|
||||||
|
/* 企标稽查整改 */
|
||||||
|
// 详情信息
|
||||||
|
const getInspectRectifyDetail = (params) => getAction('/process/esInspectRectifyFlow/queryDetailByProjectId', params)
|
||||||
|
// 审批(通过、驳回)
|
||||||
|
const approvalInspectRectify = (params) => postAction('/process/esInspectRectifyFlow/flowApproval', params)
|
||||||
|
// 转办
|
||||||
|
const transferInspectRectify = (params) => getAction('/process/esInspectRectifyFlow/flowTransfer', params)
|
||||||
|
// 企标稽查整改业务数据
|
||||||
|
const getInspectRectifyDataById = (params) => getAction('/esinspectreport/processEsInspectRectify/queryByProjectId', params)
|
||||||
|
|
||||||
export {
|
export {
|
||||||
queryPermissionsByUser,
|
queryPermissionsByUser,
|
||||||
getFormDictTreeList,
|
getFormDictTreeList,
|
||||||
@@ -205,5 +223,14 @@ export {
|
|||||||
|
|
||||||
getInspectProcessDetail,
|
getInspectProcessDetail,
|
||||||
approvalInspectProcess,
|
approvalInspectProcess,
|
||||||
transferInspectProcess
|
transferInspectProcess,
|
||||||
|
|
||||||
|
getInspectExtensionDetail,
|
||||||
|
approvalInspectExtension,
|
||||||
|
transferInspectExtension,
|
||||||
|
|
||||||
|
getInspectRectifyDetail,
|
||||||
|
approvalInspectRectify,
|
||||||
|
transferInspectRectify,
|
||||||
|
getInspectRectifyDataById
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,4 +204,28 @@ module.exports = {
|
|||||||
rectificationRealityDoneDate: '整改实际完成日期',
|
rectificationRealityDoneDate: '整改实际完成日期',
|
||||||
rectificationStatus: '整改状态'
|
rectificationStatus: '整改状态'
|
||||||
},
|
},
|
||||||
|
// 稽查延期申请流程
|
||||||
|
incExtensionRequest: {
|
||||||
|
state: '状态',
|
||||||
|
requestExtension: '申请延期',
|
||||||
|
requestExtensionDate: '申请延期日期',
|
||||||
|
extensionDescription: '延期说明',
|
||||||
|
inspectionContactPerson: '稽查联络人'
|
||||||
|
},
|
||||||
|
// 企标稽查整改
|
||||||
|
esInspectionRectification: {
|
||||||
|
inspectionBasis: '稽查依据',
|
||||||
|
accordingToTerms: '依据条款',
|
||||||
|
standardContentOrDemand: '标准内容或要求',
|
||||||
|
rectificationUnit: '整改单位',
|
||||||
|
nonCompliantDescription: '不符合项描述',
|
||||||
|
rectificationMeasures: '整改措施',
|
||||||
|
rectificationDirector: '整改负责人',
|
||||||
|
planDoneDate: '计划完成日期',
|
||||||
|
operationType: '操作类型',
|
||||||
|
rectificationResults: '整改结果',
|
||||||
|
file: '附件',
|
||||||
|
requestExtensionDate: '申请延期日期',
|
||||||
|
extensionDescription: '延期说明'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -211,4 +211,28 @@ module.exports = {
|
|||||||
rectificationRealityDoneDate: '整改实际完成日期',
|
rectificationRealityDoneDate: '整改实际完成日期',
|
||||||
rectificationStatus: '整改状态'
|
rectificationStatus: '整改状态'
|
||||||
},
|
},
|
||||||
|
// 稽查延期申请流程
|
||||||
|
incExtensionRequest: {
|
||||||
|
state: '状态',
|
||||||
|
requestExtension: '申请延期',
|
||||||
|
requestExtensionDate: '申请延期日期',
|
||||||
|
extensionDescription: '延期说明',
|
||||||
|
inspectionContactPerson: '稽查联络人'
|
||||||
|
},
|
||||||
|
// 企标稽查整改
|
||||||
|
esInspectionRectification: {
|
||||||
|
inspectionBasis: '稽查依据',
|
||||||
|
accordingToTerms: '依据条款',
|
||||||
|
standardContentOrDemand: '标准内容或要求',
|
||||||
|
rectificationUnit: '整改单位',
|
||||||
|
nonCompliantDescription: '不符合项描述',
|
||||||
|
rectificationMeasures: '整改措施',
|
||||||
|
rectificationDirector: '整改负责人',
|
||||||
|
planDoneDate: '计划完成日期',
|
||||||
|
operationType: '操作类型',
|
||||||
|
rectificationResults: '整改结果',
|
||||||
|
file: '附件',
|
||||||
|
requestExtensionDate: '申请延期日期',
|
||||||
|
extensionDescription: '延期说明'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,9 @@ export const ProcessKey = {
|
|||||||
// 稽查延期申请流程
|
// 稽查延期申请流程
|
||||||
INSPECTION_EXTENSION_REQUEST_PROCESS: { text: 'inspect_delay_apply_process', value: 'inspect_delay_apply_process' },
|
INSPECTION_EXTENSION_REQUEST_PROCESS: { text: 'inspect_delay_apply_process', value: 'inspect_delay_apply_process' },
|
||||||
// 企标稽查整改
|
// 企标稽查整改
|
||||||
ES_INSPECTION_RECTIFICATION: { text: 'inspect_plan', value: 'inspect_process' }
|
ES_INSPECTION_RECTIFICATION: { text: 'inspect_rectify', value: 'inspect_rectify' },
|
||||||
|
// 权限申请流程
|
||||||
|
PERMISSION_APPLY: { text: 'permission_apply_process', value: 'permission_apply_process' }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 企标计划立项/变更流程-申请类型
|
// 企标计划立项/变更流程-申请类型
|
||||||
@@ -127,6 +129,21 @@ export const EsInspectionProcess = new EsEnums({
|
|||||||
relevantPersonnelCountersign: { text: '相关人员会签', value: 'involve_countersign', isMobile: true }
|
relevantPersonnelCountersign: { text: '相关人员会签', value: 'involve_countersign', isMobile: true }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 稽查延期申请流程
|
||||||
|
export const InspectionExtensionRequestProcess = new EsEnums({
|
||||||
|
initiate: { text: '稽查负责人申请延期', value: 'responsible_start' },
|
||||||
|
directorLeaderApproval: { text: '负责人主管级领导审批', value: 'leader_approval', isMobile: true },
|
||||||
|
contactEvaluation: { text: '稽查联络人评估', value: 'liaisons_assess', isMobile: true },
|
||||||
|
directorSuperiorLeaderApproval: { text: '负责人主管级上一级领导审批', value: 'leader_up_level', isMobile: true }
|
||||||
|
})
|
||||||
|
|
||||||
|
// 企标稽查整改
|
||||||
|
export const EsInspectionRectification = new EsEnums({
|
||||||
|
uploadRectificationResult: { text: '整改负责人上传整改结果', value: 'responsible_start' },
|
||||||
|
directorLeaderApproval: { text: '负责人主管级领导审批', value: 'leader_approval', isMobile: true },
|
||||||
|
directorToExamine: { text: '稽查负责人审核', value: 'responsible_approval', isMobile: true }
|
||||||
|
})
|
||||||
|
|
||||||
// 标准征求意见流程
|
// 标准征求意见流程
|
||||||
export const ConsultationProcess = new EsEnums({
|
export const ConsultationProcess = new EsEnums({
|
||||||
initiate: { text: '法规工程师发起', value: 'engineer_start', btn: ['save', 'submit'] },
|
initiate: { text: '法规工程师发起', value: 'engineer_start', btn: ['save', 'submit'] },
|
||||||
|
|||||||
@@ -89,5 +89,25 @@ export default [
|
|||||||
hasBack: true
|
hasBack: true
|
||||||
},
|
},
|
||||||
component: () => import('@/views/workCenter/enterpriseStandardInspectionProcess/EenterpriseStandardInspectionProcess')
|
component: () => import('@/views/workCenter/enterpriseStandardInspectionProcess/EenterpriseStandardInspectionProcess')
|
||||||
|
},
|
||||||
|
// 延期申请流程
|
||||||
|
{
|
||||||
|
path: '/workCenter/InspectionExtensionRequestProcess',
|
||||||
|
name: 'InspectionExtensionRequestProcess',
|
||||||
|
meta: {
|
||||||
|
hasNavBar: true,
|
||||||
|
hasBack: true
|
||||||
|
},
|
||||||
|
component: () => import('@/views/workCenter/inspectionExtensionRequestProcess/InspectionExtensionRequestProcess')
|
||||||
|
},
|
||||||
|
// 稽查整改流程
|
||||||
|
{
|
||||||
|
path: '/workCenter/EnterpriseStandardInspectionRectification',
|
||||||
|
name: 'EnterpriseStandardInspectionRectification',
|
||||||
|
meta: {
|
||||||
|
hasNavBar: true,
|
||||||
|
hasBack: true
|
||||||
|
},
|
||||||
|
component: () => import('@/views/workCenter/enterpriseStandardInspectionRectification/EnterpriseStandardInspectionRectification')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
+308
@@ -0,0 +1,308 @@
|
|||||||
|
<template>
|
||||||
|
<process-common-layout class="page-box" :process-key="processKey" :loading="loading">
|
||||||
|
<template v-slot:process>
|
||||||
|
<!-- 流程信息 -->
|
||||||
|
<div class="process-part">
|
||||||
|
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
||||||
|
<van-form
|
||||||
|
ref="form"
|
||||||
|
input-align="right"
|
||||||
|
error-message-align="right">
|
||||||
|
<!-- 流程名称 -->
|
||||||
|
<van-field
|
||||||
|
:label="$t('processName')"
|
||||||
|
:placeholder="$t('pleaseEnter') + $t('processName')"
|
||||||
|
readonly
|
||||||
|
type="textarea"
|
||||||
|
rows="1"
|
||||||
|
autosize
|
||||||
|
:rules="rules.prcName"
|
||||||
|
v-model="processInfoForm.prcName"/>
|
||||||
|
<!-- 截止日期 -->
|
||||||
|
<calendar-field
|
||||||
|
:label="$t('expirationDate')"
|
||||||
|
v-model="processInfoForm.dueTime"
|
||||||
|
readonly
|
||||||
|
type="date"/>
|
||||||
|
<!-- 流程说明 -->
|
||||||
|
<van-field
|
||||||
|
v-model="processInfoForm.prcMes"
|
||||||
|
:label="$t('processExplain')"
|
||||||
|
type="textarea"
|
||||||
|
autosize
|
||||||
|
disabled
|
||||||
|
rows="2"
|
||||||
|
:placeholder="$t('pleaseEnter')+$t('processExplain')"
|
||||||
|
:border="false"
|
||||||
|
input-align="left"
|
||||||
|
class="vertical-form-item"/>
|
||||||
|
</van-form>
|
||||||
|
</div>
|
||||||
|
<!-- 业务信息 -->
|
||||||
|
<div class="process-part">
|
||||||
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- 流程审批信息 -->
|
||||||
|
<div class="process-part">
|
||||||
|
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||||
|
<van-form
|
||||||
|
ref="approvalInfoForm"
|
||||||
|
input-align="right"
|
||||||
|
error-message-align="right">
|
||||||
|
<!-- 备注 -->
|
||||||
|
<van-field
|
||||||
|
v-model="approvalInfoForm.commitText"
|
||||||
|
:label="$t('remark')"
|
||||||
|
:rules="rules.commitText"
|
||||||
|
name="commitText"
|
||||||
|
type="textarea"
|
||||||
|
autosize
|
||||||
|
rows="2"
|
||||||
|
:placeholder="$t('pleaseEnter')+$t('remark')"
|
||||||
|
:border="false"
|
||||||
|
input-align="left"
|
||||||
|
class="vertical-form-item"/>
|
||||||
|
<!--附件-->
|
||||||
|
<z-upload v-model="approvalInfoForm.commitFile" />
|
||||||
|
</van-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-slot:operation>
|
||||||
|
<!-- 转办 -->
|
||||||
|
<van-button class="operation-common-btn" @click="handleTurnTo">
|
||||||
|
<template #icon>
|
||||||
|
<van-icon class="iconfont" class-prefix="icon" name="xunhuan" />
|
||||||
|
</template>
|
||||||
|
{{ $t('turnTo') }}
|
||||||
|
</van-button>
|
||||||
|
<!-- 同意 -->
|
||||||
|
<van-button class="operation-common-btn" type="primary" @click="handleAgree">
|
||||||
|
<template #icon>
|
||||||
|
<van-icon class="iconfont" class-prefix="icon" name="check" />
|
||||||
|
</template>
|
||||||
|
{{ $t('agree') }}
|
||||||
|
</van-button>
|
||||||
|
<!-- 驳回 -->
|
||||||
|
<van-button class="operation-common-btn light-color-button" @click="handleReject">
|
||||||
|
<template #icon>
|
||||||
|
<van-icon class="iconfont" class-prefix="icon" name="close" />
|
||||||
|
</template>
|
||||||
|
{{ $t('reject') }}
|
||||||
|
</van-button>
|
||||||
|
</template>
|
||||||
|
<select-user ref="selectUserRef" @selected-change="selectUserChange"></select-user>
|
||||||
|
</process-common-layout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ProcessCommonLayout from '@/components/ProcessCommonLayout'
|
||||||
|
import { EsInspectionRectification, ProcessKey } from '@/enums/commonEnums'
|
||||||
|
import SelectUser from '@/components/SelectUser'
|
||||||
|
import CalendarField from '@/components/CalendarField'
|
||||||
|
import ZUpload from '@/components/ZUpload'
|
||||||
|
import {
|
||||||
|
approvalInspectRectify,
|
||||||
|
getInspectRectifyDataById,
|
||||||
|
getInspectRectifyDetail,
|
||||||
|
transferInspectRectify
|
||||||
|
} from '@/api/api'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'EnterpriseStandardInspectionRectification',
|
||||||
|
components: { ZUpload, CalendarField, SelectUser, ProcessCommonLayout },
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// 流程加载
|
||||||
|
loading: false,
|
||||||
|
// 表格加载
|
||||||
|
tableLoading: false,
|
||||||
|
processKey: ProcessKey.ES_INSPECTION_RECTIFICATION.value,
|
||||||
|
rules: {
|
||||||
|
// 备注
|
||||||
|
commitText: [
|
||||||
|
{ required: false, message: this.$t('pleaseEnter') + this.$t('remark') }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 获取到的流程信息
|
||||||
|
info: {},
|
||||||
|
// 流程信息
|
||||||
|
processInfoForm: {},
|
||||||
|
// 审批意见信息
|
||||||
|
approvalInfoForm: {},
|
||||||
|
// 业务信息
|
||||||
|
baseInfoForm: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 当前项目id
|
||||||
|
projectId () {
|
||||||
|
return this.$route.query.projectId
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 组件内路由拦截
|
||||||
|
beforeRouteEnter (to, from, next) {
|
||||||
|
// 如果不是移动端支持的节点,就跳转NoMobile
|
||||||
|
if (!EsInspectionRectification.propertyOfValue('isMobile', to.query.nodeId)) {
|
||||||
|
next({ path: '/noMobile' })
|
||||||
|
}
|
||||||
|
next()
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.loadPage()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 加载页面数据
|
||||||
|
loadPage () {
|
||||||
|
this.loading = true
|
||||||
|
const { projectId, taskId } = this.$route.query
|
||||||
|
Promise.all([
|
||||||
|
// 获取业务数据
|
||||||
|
getInspectRectifyDataById({ projectId }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.baseInfoForm = res.result || {}
|
||||||
|
}
|
||||||
|
}).finally(() => {}),
|
||||||
|
|
||||||
|
// 获取流程数据
|
||||||
|
getInspectRectifyDetail({ projectId, taskId }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
const data = res.result || {}
|
||||||
|
this.info = data
|
||||||
|
const processAll = data.processAll || {}
|
||||||
|
const processApprovalRecord = data.processApprovalRecord || {}
|
||||||
|
// 回显流程信息
|
||||||
|
this.processInfoForm = {
|
||||||
|
prcName: processAll.prcName,
|
||||||
|
dueTime: processAll.dueTime,
|
||||||
|
prcMes: processAll.prcMes
|
||||||
|
}
|
||||||
|
// 回显审批信息
|
||||||
|
this.approvalInfoForm = {
|
||||||
|
commitText: processApprovalRecord.commitText,
|
||||||
|
commitFile: processApprovalRecord.commitFile
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).finally(() => {})
|
||||||
|
]).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 转办
|
||||||
|
handleTurnTo () {
|
||||||
|
if (this.loading) return
|
||||||
|
// 点击显示选人组件
|
||||||
|
this.$refs.selectUserRef.open()
|
||||||
|
},
|
||||||
|
// 转办选完人的回调
|
||||||
|
selectUserChange (userIds) {
|
||||||
|
this.loading = true
|
||||||
|
const param = {}
|
||||||
|
param.userId = userIds
|
||||||
|
param.taskId = this.$route.query.taskId
|
||||||
|
transferInspectRectify(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.fail(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取页面参数
|
||||||
|
async getPageParams () {
|
||||||
|
const params = {}
|
||||||
|
let validateError = null
|
||||||
|
|
||||||
|
// 流程信息
|
||||||
|
params.processAll = Object.assign({}, this.info.processAll, {
|
||||||
|
projectId: this.projectId,
|
||||||
|
taskId: this.$route.query.taskId
|
||||||
|
})
|
||||||
|
|
||||||
|
// 审批意见
|
||||||
|
await this.$refs.approvalInfoForm.validate().then(() => {
|
||||||
|
params.processApprovalRecord = Object.assign({}, this.info.processApprovalRecord, this.approvalInfoForm, {
|
||||||
|
projectId: this.projectId
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
// 验证失败滚动到验证失败的位置
|
||||||
|
console.log(err)
|
||||||
|
validateError = err
|
||||||
|
this.$refs.approvalInfoForm.scrollToField(err[0].name)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 验证失败就返回一个错误
|
||||||
|
if (validateError) {
|
||||||
|
throw new Error(validateError)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 其他参数
|
||||||
|
params.map = {}
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
// 同意
|
||||||
|
handleAgree () {
|
||||||
|
if (this.loading) return
|
||||||
|
this.loading = true
|
||||||
|
this.rules.commitText[0].required = false
|
||||||
|
this.getPageParams().then(params => {
|
||||||
|
params.map.pass = true
|
||||||
|
// 如果没有填写注释,就默认同意
|
||||||
|
if (!params.processApprovalRecord.commitText) {
|
||||||
|
params.processApprovalRecord.commitText = '同意'
|
||||||
|
}
|
||||||
|
console.log(params)
|
||||||
|
return approvalInspectRectify(params)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.fail(res.message)
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 驳回
|
||||||
|
handleReject () {
|
||||||
|
if (this.loading) return
|
||||||
|
this.rules.commitText[0].required = true
|
||||||
|
// 驳回需要填写备注
|
||||||
|
if (!this.approvalInfoForm.commitText) {
|
||||||
|
this.$message.fail(this.$t('pleaseEnterRemarks'))
|
||||||
|
}
|
||||||
|
this.getPageParams().then(params => {
|
||||||
|
params.map.pass = false
|
||||||
|
console.log(params)
|
||||||
|
return approvalInspectRectify(params)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.fail(res.message)
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
this.rules.commitText[0].required = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goBack () {
|
||||||
|
// this.$router.go(-1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
@import '~@/assets/less/common.less';
|
||||||
|
|
||||||
|
</style>
|
||||||
+373
@@ -0,0 +1,373 @@
|
|||||||
|
<template>
|
||||||
|
<process-common-layout class="page-box" :process-key="processKey" :loading="loading">
|
||||||
|
<template v-slot:process>
|
||||||
|
<!-- 流程信息 -->
|
||||||
|
<div class="process-part">
|
||||||
|
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
||||||
|
<van-form
|
||||||
|
ref="form"
|
||||||
|
input-align="right"
|
||||||
|
error-message-align="right">
|
||||||
|
<!-- 流程名称 -->
|
||||||
|
<van-field
|
||||||
|
:label="$t('processName')"
|
||||||
|
:placeholder="$t('pleaseEnter') + $t('processName')"
|
||||||
|
readonly
|
||||||
|
type="textarea"
|
||||||
|
rows="1"
|
||||||
|
autosize
|
||||||
|
:rules="rules.prcName"
|
||||||
|
v-model="processInfoForm.prcName"/>
|
||||||
|
<!-- 截止日期 -->
|
||||||
|
<calendar-field
|
||||||
|
:label="$t('expirationDate')"
|
||||||
|
v-model="processInfoForm.dueTime"
|
||||||
|
readonly
|
||||||
|
type="date"/>
|
||||||
|
<!-- 流程说明 -->
|
||||||
|
<van-field
|
||||||
|
v-model="processInfoForm.prcMes"
|
||||||
|
:label="$t('processExplain')"
|
||||||
|
type="textarea"
|
||||||
|
autosize
|
||||||
|
disabled
|
||||||
|
rows="2"
|
||||||
|
:placeholder="$t('pleaseEnter')+$t('processExplain')"
|
||||||
|
:border="false"
|
||||||
|
input-align="left"
|
||||||
|
class="vertical-form-item"/>
|
||||||
|
</van-form>
|
||||||
|
</div>
|
||||||
|
<!-- 业务信息 -->
|
||||||
|
<div class="process-part">
|
||||||
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||||
|
<a-table
|
||||||
|
bordered
|
||||||
|
row-key="id"
|
||||||
|
:scroll="{x:'100%', y: '50vh'}"
|
||||||
|
:columns="columns"
|
||||||
|
:data-source="dataSource"
|
||||||
|
:loading="tableLoading"
|
||||||
|
:pagination="false"/>
|
||||||
|
</div>
|
||||||
|
<!-- 流程审批信息 -->
|
||||||
|
<div class="process-part">
|
||||||
|
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||||
|
<van-form
|
||||||
|
ref="approvalInfoForm"
|
||||||
|
input-align="right"
|
||||||
|
error-message-align="right">
|
||||||
|
<!-- 备注 -->
|
||||||
|
<van-field
|
||||||
|
v-model="approvalInfoForm.commitText"
|
||||||
|
:label="$t('remark')"
|
||||||
|
:rules="rules.commitText"
|
||||||
|
name="commitText"
|
||||||
|
type="textarea"
|
||||||
|
autosize
|
||||||
|
rows="2"
|
||||||
|
:placeholder="$t('pleaseEnter')+$t('remark')"
|
||||||
|
:border="false"
|
||||||
|
input-align="left"
|
||||||
|
class="vertical-form-item"/>
|
||||||
|
<!--附件-->
|
||||||
|
<z-upload v-model="approvalInfoForm.commitFile" />
|
||||||
|
</van-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-slot:operation>
|
||||||
|
<!-- 转办 -->
|
||||||
|
<van-button class="operation-common-btn" @click="handleTurnTo">
|
||||||
|
<template #icon>
|
||||||
|
<van-icon class="iconfont" class-prefix="icon" name="xunhuan" />
|
||||||
|
</template>
|
||||||
|
{{ $t('turnTo') }}
|
||||||
|
</van-button>
|
||||||
|
<!-- 同意 -->
|
||||||
|
<van-button class="operation-common-btn" type="primary" @click="handleAgree">
|
||||||
|
<template #icon>
|
||||||
|
<van-icon class="iconfont" class-prefix="icon" name="check" />
|
||||||
|
</template>
|
||||||
|
{{ $t('agree') }}
|
||||||
|
</van-button>
|
||||||
|
<!-- 驳回 -->
|
||||||
|
<van-button class="operation-common-btn light-color-button" @click="handleReject">
|
||||||
|
<template #icon>
|
||||||
|
<van-icon class="iconfont" class-prefix="icon" name="close" />
|
||||||
|
</template>
|
||||||
|
{{ $t('reject') }}
|
||||||
|
</van-button>
|
||||||
|
</template>
|
||||||
|
<select-user ref="selectUserRef" @selected-change="selectUserChange"></select-user>
|
||||||
|
</process-common-layout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ProcessCommonLayout from '@/components/ProcessCommonLayout'
|
||||||
|
import { InspectionExtensionRequestProcess, ProcessKey } from '@/enums/commonEnums'
|
||||||
|
import SelectUser from '@/components/SelectUser'
|
||||||
|
import CalendarField from '@/components/CalendarField'
|
||||||
|
import ZUpload from '@/components/ZUpload'
|
||||||
|
import { getAction } from '@/api/manage'
|
||||||
|
import { approvalInspectExtension, getInspectExtensionDetail, transferInspectExtension } from '@/api/api'
|
||||||
|
export default {
|
||||||
|
name: 'InspectionExtensionRequestProcess',
|
||||||
|
components: { ZUpload, CalendarField, SelectUser, ProcessCommonLayout },
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// 流程加载
|
||||||
|
loading: false,
|
||||||
|
// 表格加载
|
||||||
|
tableLoading: false,
|
||||||
|
processKey: ProcessKey.INSPECTION_EXTENSION_REQUEST_PROCESS.value,
|
||||||
|
rules: {
|
||||||
|
// 备注
|
||||||
|
commitText: [
|
||||||
|
{ required: false, message: this.$t('pleaseEnter') + this.$t('remark') }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 获取到的流程信息
|
||||||
|
info: {},
|
||||||
|
// 流程信息
|
||||||
|
processInfoForm: {},
|
||||||
|
// 审批意见信息
|
||||||
|
approvalInfoForm: {},
|
||||||
|
// 业务表相关
|
||||||
|
url: {
|
||||||
|
list: '/esinspectdelayapply/processEsInspectDelayApply/queryByList'
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: this.$t('serialNumber'),
|
||||||
|
dataIndex: '',
|
||||||
|
key: 'rowIndex',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
customRender: function (t, r, index) {
|
||||||
|
return parseInt(index) + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ // 稽查依据标准号
|
||||||
|
title: this.$t('esInspectionPlan.inspectionBasisStandardNumber'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'inspectNo'
|
||||||
|
},
|
||||||
|
{ // 稽查依据标准名称
|
||||||
|
title: this.$t('esInspectionPlan.inspectionBasisStandardName'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'inspectName'
|
||||||
|
},
|
||||||
|
{ // 计划稽查对象
|
||||||
|
title: this.$t('esInspectionPlan.planInspectionObjects'),
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
dataIndex: 'planInspectObject_dictText'
|
||||||
|
},
|
||||||
|
{ // 计划稽查日期
|
||||||
|
title: this.$t('esInspectionPlan.planInspectionDate'),
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
dataIndex: 'planInspectDate'
|
||||||
|
},
|
||||||
|
{ // 稽查负责人
|
||||||
|
title: this.$t('esInspectionPlan.inspectionDirector'),
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
dataIndex: 'inspectUserDictText'
|
||||||
|
},
|
||||||
|
{ // 状态
|
||||||
|
title: this.$t('incExtensionRequest.state'),
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
dataIndex: 'inspectStatus_dictText'
|
||||||
|
},
|
||||||
|
{ // 申请延期日期
|
||||||
|
title: this.$t('incExtensionRequest.requestExtensionDate'),
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
dataIndex: 'requestDelayDate'
|
||||||
|
},
|
||||||
|
{ // 延期说明
|
||||||
|
title: this.$t('incExtensionRequest.extensionDescription'),
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
dataIndex: 'delayDescription'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dataSource: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 当前项目id
|
||||||
|
projectId () {
|
||||||
|
return this.$route.query.projectId
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 组件内路由拦截
|
||||||
|
beforeRouteEnter (to, from, next) {
|
||||||
|
// 如果不是移动端支持的节点,就跳转NoMobile
|
||||||
|
if (!InspectionExtensionRequestProcess.propertyOfValue('isMobile', to.query.nodeId)) {
|
||||||
|
next({ path: '/noMobile' })
|
||||||
|
}
|
||||||
|
next()
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.loadPage()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 加载页面数据
|
||||||
|
loadPage () {
|
||||||
|
this.loading = true
|
||||||
|
const { projectId, taskId } = this.$route.query
|
||||||
|
Promise.all([
|
||||||
|
// 获取业务数据
|
||||||
|
getAction(this.url.list, { projectId }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataSource = res.result || []
|
||||||
|
}
|
||||||
|
}).finally(() => {}),
|
||||||
|
|
||||||
|
// 获取流程数据
|
||||||
|
getInspectExtensionDetail({ projectId, taskId }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
const data = res.result || {}
|
||||||
|
this.info = data
|
||||||
|
const processAll = data.processAll || {}
|
||||||
|
const processApprovalRecord = data.processApprovalRecord || {}
|
||||||
|
// 回显流程信息
|
||||||
|
this.processInfoForm = {
|
||||||
|
prcName: processAll.prcName,
|
||||||
|
dueTime: processAll.dueTime,
|
||||||
|
prcMes: processAll.prcMes
|
||||||
|
}
|
||||||
|
// 回显审批信息
|
||||||
|
this.approvalInfoForm = {
|
||||||
|
commitText: processApprovalRecord.commitText,
|
||||||
|
commitFile: processApprovalRecord.commitFile
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).finally(() => {})
|
||||||
|
]).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 转办
|
||||||
|
handleTurnTo () {
|
||||||
|
if (this.loading) return
|
||||||
|
// 点击显示选人组件
|
||||||
|
this.$refs.selectUserRef.open()
|
||||||
|
},
|
||||||
|
// 转办选完人的回调
|
||||||
|
selectUserChange (userIds) {
|
||||||
|
this.loading = true
|
||||||
|
const param = {}
|
||||||
|
param.userId = userIds
|
||||||
|
param.taskId = this.$route.query.taskId
|
||||||
|
transferInspectExtension(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.fail(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取页面参数
|
||||||
|
async getPageParams () {
|
||||||
|
const params = {}
|
||||||
|
let validateError = null
|
||||||
|
|
||||||
|
// 流程信息
|
||||||
|
params.processAll = Object.assign({}, this.info.processAll, {
|
||||||
|
projectId: this.projectId,
|
||||||
|
taskId: this.$route.query.taskId
|
||||||
|
})
|
||||||
|
|
||||||
|
// 审批意见
|
||||||
|
await this.$refs.approvalInfoForm.validate().then(() => {
|
||||||
|
params.processApprovalRecord = Object.assign({}, this.info.processApprovalRecord, this.approvalInfoForm, {
|
||||||
|
projectId: this.projectId
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
// 验证失败滚动到验证失败的位置
|
||||||
|
console.log(err)
|
||||||
|
validateError = err
|
||||||
|
this.$refs.approvalInfoForm.scrollToField(err[0].name)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 验证失败就返回一个错误
|
||||||
|
if (validateError) {
|
||||||
|
throw new Error(validateError)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 其他参数
|
||||||
|
params.map = {}
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
// 同意
|
||||||
|
handleAgree () {
|
||||||
|
if (this.loading) return
|
||||||
|
this.loading = true
|
||||||
|
this.rules.commitText[0].required = false
|
||||||
|
this.getPageParams().then(params => {
|
||||||
|
params.map.pass = true
|
||||||
|
// 如果没有填写注释,就默认同意
|
||||||
|
if (!params.processApprovalRecord.commitText) {
|
||||||
|
params.processApprovalRecord.commitText = '同意'
|
||||||
|
}
|
||||||
|
console.log(params)
|
||||||
|
return approvalInspectExtension(params)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.fail(res.message)
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 驳回
|
||||||
|
handleReject () {
|
||||||
|
if (this.loading) return
|
||||||
|
this.rules.commitText[0].required = true
|
||||||
|
// 驳回需要填写备注
|
||||||
|
if (!this.approvalInfoForm.commitText) {
|
||||||
|
this.$message.fail(this.$t('pleaseEnterRemarks'))
|
||||||
|
}
|
||||||
|
this.getPageParams().then(params => {
|
||||||
|
params.map.pass = false
|
||||||
|
console.log(params)
|
||||||
|
return approvalInspectExtension(params)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.fail(res.message)
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
this.rules.commitText[0].required = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goBack () {
|
||||||
|
// this.$router.go(-1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
@import '~@/assets/less/common.less';
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user