[add] 企标稽查流程

This commit is contained in:
danshihao
2023-12-08 10:59:03 +08:00
parent 511e629195
commit bd634078e4
7 changed files with 538 additions and 3 deletions
+13 -1
View File
@@ -134,6 +134,14 @@ const transferInspectPlan = (params) => getAction('/process/esInspectPlanFlow/fl
// 审批(通过、驳回)
const approvalInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowApproval', params)
/* 企标稽查流程 */
// 详情信息
const getInspectProcessDetail = (params) => getAction('/esinspect/esInspectFlowController/queryDetailByProjectId', params)
// 审批(通过、驳回)
const approvalInspectProcess = (params) => postAction('/esinspect/esInspectFlowController/flowApproval', params)
// 转办
const transferInspectProcess = (params) => getAction('/esinspect/esInspectFlowController/flowTransfer', params)
export {
queryPermissionsByUser,
getFormDictTreeList,
@@ -193,5 +201,9 @@ export {
getInspectPlanDetail,
transferInspectPlan,
approvalInspectPlan
approvalInspectPlan,
getInspectProcessDetail,
approvalInspectProcess,
transferInspectProcess
}
+33 -1
View File
@@ -7,6 +7,7 @@ module.exports = {
english: 'english',
noMobile: '当前节点不支持手机端操作',
toPc: '请前往PC端进行操作',
toPcLook: '请前往PC端查看',
basicInformation: '基础信息',
personalInformation: '人员信息',
processInformation: '流程信息',
@@ -37,6 +38,8 @@ module.exports = {
pleaseEnterRemarks: '请填写备注',
dispatchInformation: '业务分派信息',
clickToUpload: '点击上传',
operation: 'Operation',
strip: 'Items',
// 标准法规入库/变更流程
standardEntryOrChange: {
source: '来源',
@@ -171,5 +174,34 @@ module.exports = {
solicitOpinionObject: '征求意见对象',
isCountersign: '是否会签',
countersignRelevantPersonnel: '会签相关人员'
}
},
// 企标稽查流程
esInspectionProcess: {
inspectionPlanEs: '稽查计划企标',
esNumber: '企标编号',
esName: '企标名称',
inspectionContent: '稽查内容',
accordingToTerms: '依据条款',
standardContentOrDemand: '标准内容或要求',
opinion: '意见',
sectionNumber: '章节编号',
inspectionReport: '稽查报告',
rectificationPlan: '整改计划',
actualInspectionCompletionDate: '实际稽查完成日期',
actualInspector: '实际稽查人',
implementation: '执行情况',
file: '附件',
score: '评分',
enterpriseStandard: '企标:',
sectionClause: '章节条款',
isNeedRectification: '是否需要整改',
nonCompliantDescription: '不符合项描述',
rectificationMeasures: '整改措施',
rectificationUnit: '整改单位',
rectificationDirector: '整改负责人',
planDoneDate: '计划完成日期',
rectificationPlanDoneDate: '整改计划完成日期',
rectificationRealityDoneDate: '整改实际完成日期',
rectificationStatus: '整改状态'
},
}
+33 -1
View File
@@ -7,6 +7,7 @@ module.exports = {
english: '英',
noMobile: '当前节点不支持手机端操作',
toPc: '请前往PC端进行操作',
toPcLook: '请前往PC端查看',
basicInformation: '基础信息',
personalInformation: '人员信息',
processInformation: '流程信息',
@@ -37,6 +38,8 @@ module.exports = {
pleaseEnterRemarks: '请填写备注',
dispatchInformation: '业务分派信息',
clickToUpload: '点击上传',
operation: '操作',
strip: '条',
// 标准法规入库/变更流程
standardEntryOrChange: {
source: '来源',
@@ -178,5 +181,34 @@ module.exports = {
solicitOpinionObject: '征求意见对象',
isCountersign: '是否会签',
countersignRelevantPersonnel: '会签相关人员'
}
},
// 企标稽查流程
esInspectionProcess: {
inspectionPlanEs: '稽查计划企标',
esNumber: '企标编号',
esName: '企标名称',
inspectionContent: '稽查内容',
accordingToTerms: '依据条款',
standardContentOrDemand: '标准内容或要求',
opinion: '意见',
sectionNumber: '章节编号',
inspectionReport: '稽查报告',
rectificationPlan: '整改计划',
actualInspectionCompletionDate: '实际稽查完成日期',
actualInspector: '实际稽查人',
implementation: '执行情况',
file: '附件',
score: '评分',
enterpriseStandard: '企标:',
sectionClause: '章节条款',
isNeedRectification: '是否需要整改',
nonCompliantDescription: '不符合项描述',
rectificationMeasures: '整改措施',
rectificationUnit: '整改单位',
rectificationDirector: '整改负责人',
planDoneDate: '计划完成日期',
rectificationPlanDoneDate: '整改计划完成日期',
rectificationRealityDoneDate: '整改实际完成日期',
rectificationStatus: '整改状态'
},
}
+9
View File
@@ -118,6 +118,15 @@ export const EsInspectionPlan = new EsEnums({
liaisonLeaderApproval: { text: '联络人主管级领导批准', value: 'leader_approval', isMobile: true }
})
// 企标稽查流程
export const EsInspectionProcess = new EsEnums({
initiate: { text: '稽查负责人发起', value: 'responsible_start' },
directorLeaderApprovalOne: { text: '负责人主管级领导审批', value: 'leader_approval', isMobile: true },
inputInspectionReport: { text: '稽查负责人上传稽查报告和整改计划', value: 'responsible_upload' },
directorLeaderApprovalTwo: { text: '负责人主管级领导审批', value: 'leader_approval_again', isMobile: true },
relevantPersonnelCountersign: { text: '相关人员会签', value: 'involve_countersign', isMobile: true }
})
// 标准征求意见流程
export const ConsultationProcess = new EsEnums({
initiate: { text: '法规工程师发起', value: 'engineer_start', btn: ['save', 'submit'] },
+10
View File
@@ -79,5 +79,15 @@ export default [
hasBack: true
},
component: () => import('@/views/workCenter/enterpriseStandardInspectionPlan/EnterpriseStandardInspectionPlanFlow')
},
// 企标稽查流程
{
path: '/workCenter/EnterpriseStandardInspectionProcess',
name: 'EnterpriseStandardInspectionProcess',
meta: {
hasNavBar: true,
hasBack: true
},
component: () => import('@/views/workCenter/enterpriseStandardInspectionProcess/EenterpriseStandardInspectionProcess')
}
]
@@ -40,7 +40,9 @@
</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"
@@ -0,0 +1,438 @@
<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"
:pagination="false">
<!-- 操作 -->
<template slot="action" slot-scope="text, record">
<!-- 节点2显示稽查内容 -->
<template v-if="isDirectorLeaderApprovalOne">
<a @click="handleGoPC(record)" >{{ $t('esInspectionProcess.inspectionContent') + `(${record.standardInspectContentCount || 0}${$t('strip')})` }}</a>
</template>
<!-- 节点45显示稽查报告和整改计划 -->
<template v-else-if="isDirectorLeaderApprovalTwo || isRelevantPersonnelCountersign">
<a @click="handleGoPC(record)" >{{ $t('esInspectionProcess.inspectionReport') }}</a>
<br>
<a @click="handleGoPC(record)" >{{ $t('esInspectionProcess.rectificationPlan') }}</a>
</template>
</template>
</a-table>
</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 { EsInspectionProcess, ProcessKey } from '@/enums/commonEnums'
import ProcessCommonLayout from '@/components/ProcessCommonLayout'
import SelectUser from '@/components/SelectUser'
import CalendarField from '@/components/CalendarField'
import ZUpload from '@/components/ZUpload'
import { getAction } from '@/api/manage'
import { approvalInspectProcess, getInspectProcessDetail, transferInspectProcess } from '@/api/api'
export default {
name: 'EenterpriseStandardInspectionProcess',
components: { ZUpload, CalendarField, SelectUser, ProcessCommonLayout },
data () {
return {
// 流程加载
loading: false,
processKey: ProcessKey.ES_INSPECTION_PROCESS.value,
rules: {
// 备注
commitText: [
{ required: false, message: this.$t('pleaseEnter') + this.$t('remark') }
]
},
// 获取到的流程信息
info: {},
// 流程信息
processInfoForm: {},
// 审批意见信息
approvalInfoForm: {},
// 业务表相关
url: {
list: '/esinspect/processEsInspect/queryByList'
},
allColumns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 50,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 稽查依据标准号
title: this.$t('esInspectionPlan.inspectionBasisStandardNumber'),
align: 'center',
width: 150,
dataIndex: 'inspectNo'
},
{ // 稽查依据标准名称
title: this.$t('esInspectionPlan.inspectionBasisStandardName'),
align: 'center',
width: 150,
dataIndex: 'inspectName'
},
{ // 计划稽查对象
title: this.$t('esInspectionPlan.planInspectionObjects'),
align: 'center',
width: 120,
dataIndex: 'planInspectObject_dictText'
},
{ // 主责标准化工作组
title: this.$t('esInspectionPlan.mainDutyStandardizationGroup'),
align: 'center',
width: 150,
dataIndex: 'standardizationWorkGroup'
},
{ // 所属部门
title: this.$t('esInspectionPlan.department'),
align: 'center',
width: 120,
dataIndex: 'belongDept_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('esInspectionProcess.actualInspectionCompletionDate'),
align: 'center',
width: 200,
dataIndex: 'completeDate',
showCodeList: [
EsInspectionProcess.inputInspectionReport.value,
EsInspectionProcess.directorLeaderApprovalTwo.value,
EsInspectionProcess.relevantPersonnelCountersign.value
],
scopedSlots: { customRender: 'actualInspectionCompletionDate' }
},
{ // 实际稽查人
title: this.$t('esInspectionProcess.actualInspector'),
align: 'center',
width: 200,
dataIndex: 'actualInspectUser_dictText',
showCodeList: [
EsInspectionProcess.inputInspectionReport.value,
EsInspectionProcess.directorLeaderApprovalTwo.value,
EsInspectionProcess.relevantPersonnelCountersign.value
],
scopedSlots: { customRender: 'actualInspector' }
},
{
// 操作
title: this.$t('operation'),
// dataIndex: 'action',
align: 'center',
width: 100,
scopedSlots: { customRender: 'action' }
}
],
dataSource: []
}
},
computed: {
// 当前节点
currentNode () {
return this.$route.query.nodeId
},
// 是否第二个节点
isDirectorLeaderApprovalOne () {
return this.currentNode === EsInspectionProcess.directorLeaderApprovalOne.value
},
// 是否第四个节点
isDirectorLeaderApprovalTwo () {
return this.currentNode === EsInspectionProcess.directorLeaderApprovalTwo.value
},
// 是否第五个节点
isRelevantPersonnelCountersign () {
return this.currentNode === EsInspectionProcess.relevantPersonnelCountersign.value
},
// 按节点进行过滤
columns () {
return this.allColumns.filter(item => {
// 没有这个属性,就默认显示
if (!item.showCodeList) {
return true
}
// 如果有,就根据当前节点显示
return item.showCodeList.includes(this.currentNode)
})
}
},
// 组件内路由拦截
beforeRouteEnter (to, from, next) {
// 如果不是移动端支持的节点,就跳转NoMobile
if (!EsInspectionProcess.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(() => {}),
// 获取流程数据
getInspectProcessDetail({ 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
transferInspectProcess(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 approvalInspectProcess(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 approvalInspectProcess(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
})
},
// 去PC端查看
handleGoPC () {
this.$message(this.$t('toPcLook'))
},
goBack () {
// this.$router.go(-1)
}
}
}
</script>
<style scoped lang="less">
@import '~@/assets/less/common.less';
</style>