update 项目合规流程-各部门主管级领导下发

This commit is contained in:
赵霄
2023-12-15 13:49:05 +08:00
parent db05934417
commit 031528b4aa
3 changed files with 63 additions and 43 deletions
+2 -1
View File
@@ -381,7 +381,8 @@ module.exports = {
ccPerson: '抄送人员',
pleaseSelectResponsibleUnit: '请选择责任单位',
pleaseSelectResponsibleUnitLeader: '请选择责任单位负责人',
aUnitOnlyALeader: '一个责任单位只能选择一个责任单位负责人,请检查'
aUnitOnlyALeader: '一个责任单位只能选择一个责任单位负责人,请检查',
pleaseSelectModuleOwner: '请选择模块负责人'
},
// 未符合项跟踪流程
noMatchTracking: {
@@ -154,13 +154,13 @@
<!--模块负责人-->
<template v-slot:moduleOwner="{text, record, index}">
<!--不涉及不需要选模块负责人需要填写不涉及理由-->
<user-selection :name-str="record.moduleOwner_dictText"
<user-selection :name-str="record.moduleOwners_dictText"
:show-btn="false"
:value="record.moduleOwner"
:value="record.moduleOwners"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.moduleOwner')"
type="checkbox"
v-if="!record.uninvolved"
@listChange="value => handleUserChange(value, record, index, 'moduleOwner')" />
v-if="!record.notInvolved && record.canAssignFlag + '' === '1'"
@listChange="value => handleUserChange(value, record, index, 'moduleOwners')" />
<div v-else>{{ global.emptyLine }}</div>
</template>
@@ -172,7 +172,7 @@
:value="record.designEngineer"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
type="checkbox"
v-if="!record.uninvolved"
v-if="!record.notInvolved"
@listChange="value => handleUserChange(value, record, index, 'designEngineer')" />
<div v-else>{{ global.emptyLine }}</div>
</template>
@@ -183,10 +183,10 @@
</template>
<!--操作不涉及/不涉及原因-->
<template v-slot:uninvolved="{text, record, index}">
<a @click="handleUninvolved(record, index)">
<template v-slot:notInvolved="{text, record}">
<a @click="handleUninvolved(record)">
{{
!record.uninvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
!record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
}}
</a>
</template>
@@ -576,12 +576,13 @@ export default {
]
}
},
echoDataSource: [] // 发起节点,保存第二、三步回显的表格数据
businessId: null
}
},
computed: {
pageTitle () {
return `${this.$t('flowCenter')}${this.$route.meta.title}`
const subTitle = this.$route.query.taskName || ProjectComplianceEvaluationProcessNode.initiate.text
return `${this.$t('flowCenter')}${this.$route.meta.title}${subTitle}`
},
// 流程信息禁用
processInfoDisabled () {
@@ -687,7 +688,7 @@ export default {
// 模块负责人
{
title: this.$t('workCenter.standardConsultationProcess.moduleOwner'),
dataIndex: 'moduleOwner',
dataIndex: 'moduleOwners',
width: 150,
scopedSlots: { customRender: 'moduleOwner' }
},
@@ -696,7 +697,7 @@ export default {
title: this.$t('operation'),
fixed: 'right',
width: 120,
scopedSlots: { customRender: 'uninvolved' }
scopedSlots: { customRender: 'notInvolved' }
}
])
}
@@ -715,7 +716,7 @@ export default {
title: this.$t('operation'),
fixed: 'right',
width: 120,
scopedSlots: { customRender: 'uninvolved' }
scopedSlots: { customRender: 'notInvolved' }
}
])
}
@@ -780,34 +781,40 @@ export default {
initProcessInfo () {
const params = {
draftId: this.$route.query.draftId,
processInstanceId: this.$route.query.draftId ? null : this.$route.query.processInstanceId
processInstanceId: this.$route.query.draftId ? null : this.$route.query.processInstanceId,
taskId: this.$route.query.taskId
}
this.loading = true
queryProjectComplianceEvaluation(params).then(res => {
if (res.success) {
const { result = {} } = res
const draftResult = JSON.parse(result.infoJsonStr)
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO)
// 如果是草稿,会从json里取数据
if (this.$route.query.draftId) {
const draftResult = JSON.parse(result.infoJsonStr)
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
// 步骤条回显
this.currentStep = draftResult.currentStep
// 项目信息
this.projectDataSource = draftResult.projectList
// 标准信息
this.standardDataSource = draftResult.standardList
// 业务分派信息
this.dataSource = draftResult.dispatchList
}
// 流程审批信息
this.approvalInfo = Object.assign({}, draftResult.approvalInfo)
} else if (this.currentNode === ProjectComplianceEvaluationProcessNode.departLeaderIssued.value) {
const dataList = result.businessInfoDTO.processProjectAssessTermList || []
this.dataSource = dataList.map((item, index) => {
item.tableRowKey = index
return item
})
}
// 流程信息
this.processInfo = Object.assign({}, result.basicProcessInfoDTO)
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
// 步骤条回显
this.currentStep = draftResult.currentStep
// 项目信息
this.projectDataSource = draftResult.projectList
// 标准信息
this.standardDataSource = draftResult.standardList
// 业务分派信息
this.dataSource = draftResult.dispatchList
}
// 流程审批信息
this.approvalInfo = Object.assign({}, draftResult.approvalInfo)
this.businessId = result.businessId
this.$nextTick(() => {
if (this.currentStep === 1) {
this.echoDataSource = this.projectDataSource
}
if (this.currentStep === 2) {
this.echoDataSource = this.standardDataSource
}
if (this.processInfoForm) {
this.processInfoForm.setFieldsValue(this.processInfo)
}
@@ -951,7 +958,7 @@ export default {
break
// 各部门主管级领导下发,批量选择的是模块负责人
case ProjectComplianceEvaluationProcessNode.departLeaderIssued.value:
fieldName = 'moduleOwner'
fieldName = 'moduleOwners'
break
// 模块负责人分发,批量选择的是设计工程师
case ProjectComplianceEvaluationProcessNode.moduleOwnerIssued.value:
@@ -1017,10 +1024,9 @@ export default {
/**
* 不涉及
* @param record
* @param index
*/
handleUninvolved (record, index) {
this.$refs.uninvolvedModal.open(record, index)
handleUninvolved (record) {
this.$refs.uninvolvedModal.open(record, record.tableRowKey)
},
handleUninvolvedOk (record, index) {
this.$set(this.dataSource, index, record)
@@ -1072,17 +1078,30 @@ export default {
formData.businessInfoDTO = {
processProjectAssess, processProjectAssessLinkList, processProjectAssessTermList
}
} else {
const data = JSON.parse(JSON.stringify(this.dataSource))
formData.businessInfoDTO = {
processProjectAssessTermList: data
}
// 各部门主管级领导下发,校验模块负责人必填
if (this.currentNode === ProjectComplianceEvaluationProcessNode.departLeaderIssued.value) {
if (data.some(tt => !tt.moduleOwners && !tt.notInvolved)) {
this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.pleaseSelectModuleOwner'))
flag = false
}
}
}
// 流程审批意见数据
this.approvalInfoForm.validateFields((errors, values) => {
if (!errors) {
basicTaskInfoDTO = Object.assign(this.approvalInfo, values)
basicTaskInfoDTO.taskId = basicTaskInfoDTO.taskId || this.$route.query.taskId
} else {
flag = false
}
})
formData.basicTaskInfoDTO = basicTaskInfoDTO
console.log(formData)
formData.businessId = this.businessId
if (!flag) {
return false
}
@@ -17,7 +17,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')"
type="textarea"
:maxLength="500"
v-decorator="['uninvolved', validatorRules.uninvolved]" />
v-decorator="['notInvolved', validatorRules.notInvolved]" />
</a-form-item>
</a-form>
@@ -49,7 +49,7 @@ export default {
},
validatorRules: {
// 不涉及原因
uninvolved: {
notInvolved: {
rules: [{
required: true,
message: this.$t('pleaseEnter') + this.$t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
@@ -71,9 +71,9 @@ export default {
})
},
handleOk (flag) {
this.validatorRules.uninvolved.rules[0].required = flag
this.validatorRules.notInvolved.rules[0].required = flag
if (!flag) {
this.form.setFieldsValue({ uninvolved: null })
this.form.setFieldsValue({ notInvolved: null })
}
this.form.validateFields((errors, values) => {
if (!errors) {