[update 标准解读流程] 完善

This commit is contained in:
danshihao
2024-07-15 17:33:12 +08:00
parent 12b169eb2d
commit 177c28861b
8 changed files with 42 additions and 33 deletions
@@ -149,7 +149,7 @@ import {
interpretFlowSave,
interpretFlowReject,
interpretFlowTransfer,
getLookData
getLookData, interpretFlowCountersign
} from '@api/workCenter'
import InterpretationInitiate from '@views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate'
import UserSelectModal from '@comp/selection/UserSelectModal'
@@ -495,7 +495,7 @@ export default {
userSelectCallback (userId) {
switch (this.selectUserType) {
case '1':
this.countersignCallback()
this.countersignCallback(userId)
break
case '2':
this.continueTurnToCallback(userId)
@@ -506,23 +506,23 @@ export default {
if (this.loading) return
this.loading = true
const params = {
projectId: this.projectId,
taskId: this.$route.query.taskId,
userId
}
// interpretFlowTransfer(params).then(res => {
// if (res.success) {
// this.$message.success(res.message)
// this.goBack()
// } else {
// this.$message.warn(res.message)
// }
// }).catch(() => {
// this.loading = false
// }).finally(() => {
// setTimeout(() => {
// this.loading = false
// }, 1000)
// })
interpretFlowCountersign(params).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warn(res.message)
}
}).catch(() => {
this.loading = false
}).finally(() => {
setTimeout(() => {
this.loading = false
}, 1000)
})
},
// 转办
continueTurnToCallback (userId) {
@@ -12,7 +12,7 @@
:disabled="disabledImport"
name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importUrl"
@change="handleImport">
<a-button type="primary" icon="download" ghost>{{ $t('import') }}</a-button>
<a-button type="primary" icon="download" :disabled="disabledImport" ghost>{{ $t('import') }}</a-button>
</a-upload>
<!-- 批量编辑解读人填写 -->
<a-button type="primary" ghost @click="handleBatchEdit" v-if="showBatchEditBtn">
@@ -174,10 +174,10 @@ export default {
},
// 解读人回显列(解读人填写信息之后的节点显示)
interpretingPeopleDictColumn: {
title: this.$t('workCenter.standardInterpretationProcess.departInterpretingPeople'),
title: this.$t('workCenter.standardInterpretationProcess.interpreter'),
align: 'center',
width: 180,
dataIndex: 'interpretPersonIds_dictText',
dataIndex: 'interpretPersonId_dictText',
scopedSlots: { customRender: 'text' }
},
// 解读的其他字段(拆分表的字段)
@@ -445,8 +445,7 @@ export default {
]
// 显示解读其他信息的节点(填写完解读信息及后的节点都显示)
const showExtendNodeId = [
StandardInterpretationNodes.interpreterFillInfoOne.value, // 解读人填写信息
StandardInterpretationNodes.interpreterFillInfoTwo.value, // 解读人填写信息
StandardInterpretationNodes.interpreterFillInfo.value, // 解读人填写信息
...showInterpreterNodes // 填写解读信息之后的节点
]
// 是否回显解读人
@@ -494,8 +493,7 @@ export default {
// 显示批量编辑按钮
showBatchEditBtn () {
return [
StandardInterpretationNodes.interpreterFillInfoOne.value, // 解读人填写信息
StandardInterpretationNodes.interpreterFillInfoTwo.value // 解读人填写信息
StandardInterpretationNodes.interpreterFillInfo.value // 解读人填写信息
].includes(this.currentNodeId)
},
// 是否显示编辑按钮
@@ -505,8 +503,7 @@ export default {
return true
}
return [
StandardInterpretationNodes.interpreterFillInfoOne.value, // 解读人填写信息
StandardInterpretationNodes.interpreterFillInfoTwo.value, // 解读人填写信息
StandardInterpretationNodes.interpreterFillInfo.value, // 解读人填写信息
StandardInterpretationNodes.standardInterpreterSummary.value // 标准主解读人汇总
].includes(this.currentNodeId)
},
@@ -173,8 +173,8 @@ export default {
this.$message.warn(this.$t('workCenter.standardInterpretationProcess.pleaseSelectClause'))
obj._flag = true
}
// 来源选择其他,没有条款数据提示至少一条数据
if (!isNoInput && isClauseNotData) {
// 选择条款后来源选择其他,没有条款数据提示至少一条数据
if (this.showClauseTable && !isNoInput && isClauseNotData) {
this.$message.warn(this.$t('addAtLeastOneRowOfData'))
// 校验失败就标记true
obj._flag = true
@@ -265,7 +265,7 @@ export default {
} else {
// 只要下一步了,对新增的部分进行校验
obj.clauseData = this.$refs.interpretationClauseTable.getData()
// 至少一条条款数据
// 至少一条条款数据(重新分发节点可以删了代表不分发)
if (!obj.clauseData.length) {
this.$message.warn(this.$t('addAtLeastOneRowOfData'))
obj._flag = true
@@ -311,8 +311,12 @@ export default {
this.isDistribute = true
this.clauseDataSource = data.data.processStandardInterpretClauseList
} else if (info.distribute === IsDistribute.NOT_DISTRIBUTE.value) {
// 不下发回显
this.isDistribute = false
this.clauseDataSource = data.data.processStandardInterpretClauseSublistList
this.$nextTick(() => {
this.userForm.setFieldsValue(this.formInline)
})
// 如果分解单来源是不带入,就禁用导入
if (info.decompositionSource === DecompositionSource.NO_INPUT.value) {
this.disabledImport = true
@@ -331,6 +335,10 @@ export default {
handleNextStep () {
this.form.validateFields((err, values) => {
if (!err) {
// 不带入就禁用导入
if (this.formInline.decompositionSource === DecompositionSource.NO_INPUT.value) {
this.disabledImport = true
}
this.isDistribute = values.distribute === IsDistribute.DISTRIBUTE.value
this.isNextStep = true
this.$nextTick(() => {