[update 标准解读流程] 审核

This commit is contained in:
danshihao
2024-07-10 10:32:35 +08:00
parent b44dda2d1c
commit 8663a09f7d
4 changed files with 497 additions and 16 deletions
@@ -3,10 +3,14 @@
<a-spin :spinning="loading">
<div class="process-part-title">{{ $t('dispatchInformation') }}</div>
<div v-if="!disabled" class="table-operator">
<!-- 批量编辑 -->
<a-button type="primary" ghost @click="handleBatchEdit">
<!-- 批量编辑(解读人填写信息节点) -->
<a-button type="primary" ghost @click="handleBatchEdit" v-if="isInterpreterFillInfo">
{{$t('workCenter.standardInterpretationProcess.batchEdit')}}
</a-button>
<!-- 导出(标准主解读人汇总节点) -->
<a-button type="primary" ghost @click="handleExport" v-if="isStandardInterpreterSummary">
{{$t('export')}}
</a-button>
</div>
<div class="table-container mb-20">
<j-table
@@ -14,10 +18,10 @@
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="columns"
:columns="showColumns"
:dataSource="dataSource"
:pagination="ipagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:row-selection="isCheckNode ? null : { selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange">
<!--条文内容-->
<template slot="item_content" slot-scope="{text, record}">
@@ -31,6 +35,43 @@
</template>
</j-table>
</div>
<a-form :form="form" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="isStandardInterpreterSummary">
<a-row>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<!--会签人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.countersigningPerson')"
v-decorator="['countersignPersonIds', validatorRules.countersignPersonIds]"
:disabled="disabled"
filedName="countersignPersonIds"
@nameChange="userSelectNameChange"
:nameStr="formInline.countersignPersonIds_dictText" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<!--审核人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.reviewersPerson')"
v-decorator="['uploader', validatorRules.uploader]"
:disabled="disabled"
filedName="uploader"
@nameChange="userSelectNameChange"
:nameStr="formInline.uploader_dictText" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<!--批准人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.approvedPerson')"
v-decorator="['approvePersonId', validatorRules.approvePersonId]"
:disabled="disabled"
filedName="approvePersonId"
@nameChange="userSelectNameChange"
:nameStr="formInline.approvePersonId_dictText" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
<!-- 条款解读表单 -->
<terms-interpret-modal ref="termsInterpretModal" @ok="handleEditCallback"/>
@@ -44,6 +85,7 @@ import TermsInterpretModal from '@views/workCenter/standardInterpretationProcess
import UserSelection from '@comp/selection/UserSelection'
import SplitClauseDetail from '@views/documentTool/documentSplit/modules/SplitClauseDetail'
import { filterObj } from '@/utils/util'
import { StandardInterpretationNodes } from '@/enums/commonEnums'
export default {
name: 'InterpretationInterpreterFillInfo',
components: { SplitClauseDetail, UserSelection, TermsInterpretModal },
@@ -52,10 +94,56 @@ export default {
type: Boolean,
required: false,
default: false
},
// 当前节点id
currentNodeId: {
type: String,
required: true
}
},
computed: {
// 解读人填写信息节点
isInterpreterFillInfo () {
return this.currentNodeId === StandardInterpretationNodes.interpreterFillInfo.value
},
// 是否解读人汇总
isStandardInterpreterSummary () {
return this.currentNodeId === StandardInterpretationNodes.standardInterpreterSummary.value
},
// 是否审核节点
isCheckNode () {
const checkNodeArr = [
StandardInterpretationNodes.mainInterpreterSingleLineReview.value, // 标准主解读人单线审核
StandardInterpretationNodes.countersignOne.value, // 会签
StandardInterpretationNodes.countersignTwo.value, // 会签
StandardInterpretationNodes.departManagerReviewOne.value, // 各涉及部门科室经理审核
StandardInterpretationNodes.departManagerReviewTwo.value, // 各涉及部门科室经理审核
StandardInterpretationNodes.manageOrTechnicalOfficerApprovalOne.value, // 主控部门高级经理/法规认证技术官批准
StandardInterpretationNodes.manageOrTechnicalOfficerApprovalTwo.value // 主控部门高级经理/法规认证技术官批准
]
return checkNodeArr.includes(this.currentNodeId)
},
// 最终显示的表头
showColumns () {
// 审批节点不显示操作列
if (this.isCheckNode) {
return this.columns.slice(0, this.columns.length - 1)
}
return this.columns
},
},
data () {
return {
StandardInterpretationNodes,
form: this.$form.createForm(this),
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
loading: false,
// 条款解读表格
columns: [
@@ -314,6 +402,30 @@ export default {
},
selectedRowKeys: [],
selectedRows: [],
formInline: {},
validatorRules: {
// 会签人员
countersignPersonIds: {
rules: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.countersigningPerson') }
],
validateTrigger: 'change'
},
// 审核人员
uploader: {
rules: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.reviewersPerson') }
],
validateTrigger: 'change'
},
// 批准人员
approvePersonId: {
rules: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.approvedPerson') }
],
validateTrigger: 'change'
}
},
}
},
methods: {
@@ -321,9 +433,21 @@ export default {
* 获取组件内的数据
* @param isValidate - 是否需要校验
*/
getData (isValidate) {
async getData (isValidate) {
const obj = {}
if (isValidate) {
// 汇总节点,处理表单
if (this.isStandardInterpreterSummary) {
obj.formData = await new Promise((resolve) => {
this.form.validateFields((err, values) => {
if (err) { obj._flag = true }
// 校验成功失败都返回表单数据
resolve(values)
})
})
}
} else {
obj.formData = this.form.getFieldsValue()
}
obj.clauseInterpretData = this.dataSource
return obj
@@ -331,6 +455,11 @@ export default {
// 更新组件内的数据
setData (data) {
console.log(data)
// 汇总节点,回显表单
if (this.isStandardInterpreterSummary) {
this.formInline = data.data.processStandardInterpret
this.form.setFieldsValue(this.formInline)
}
this.dataSource = data.data.processStandardInterpretClauseSublistList || []
},
handleEdit (record) {
@@ -379,6 +508,14 @@ export default {
this.selectedRowKeys = value
this.selectedRows = row
},
// 导出
handleExport () {
},
// 选择用户回显用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
}
}
</script>