[update 标准解读流程] 完善
This commit is contained in:
+63
-43
@@ -69,7 +69,7 @@
|
||||
:current-node-id="currentNodeId"
|
||||
:disabled="disabled" ref="businessComp"/>
|
||||
<!-- 主解读人分发 -->
|
||||
<interpretation-main-interpreter-distribute v-else-if="[StandardInterpretationNodes.standardInterpreterDistribution.value, StandardInterpretationNodes.standardInterpreterReDistribution.value].includes(currentNodeId)"
|
||||
<interpretation-main-interpreter-distribute v-else-if="mainInterpreterDistributeNodes.includes(currentNodeId)"
|
||||
:current-node-id="currentNodeId"
|
||||
:disabled="disabled" ref="businessComp"/>
|
||||
<!-- 解读人填写解读信息 -->
|
||||
@@ -131,7 +131,12 @@ import {
|
||||
} from '@/enums/commonEnums'
|
||||
import {
|
||||
interpretGetProjectId,
|
||||
interpretGetDetail, interpretFlowStart, interpretFlowApproval
|
||||
interpretGetDetail,
|
||||
interpretFlowStart,
|
||||
interpretFlowApproval,
|
||||
interpretFlowSave,
|
||||
interpretFlowReject,
|
||||
interpretFlowTransfer
|
||||
} from '@api/workCenter'
|
||||
import InterpretationInitiate from '@views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate'
|
||||
import UserSelectModal from '@comp/selection/UserSelectModal'
|
||||
@@ -149,6 +154,11 @@ export default {
|
||||
mixins: [WorkCenterMixin],
|
||||
data () {
|
||||
return {
|
||||
// 主解读人分发节点
|
||||
mainInterpreterDistributeNodes: [
|
||||
StandardInterpretationNodes.standardInterpreterDistribution.value,
|
||||
StandardInterpretationNodes.standardInterpreterReDistribution.value
|
||||
],
|
||||
StandardInterpretationNodes,
|
||||
EN: 'en-us',
|
||||
processKey: ProcessKey.STANDARD_INTERPRETATION_PROCESS.value,
|
||||
@@ -378,23 +388,29 @@ export default {
|
||||
standardId: compData.standardData[0] && compData.standardData[0].id,
|
||||
projectId: this.projectId
|
||||
})
|
||||
// 条款列表
|
||||
params.data.processStandardInterpretClauseList = compData.clauseData
|
||||
} else if (this.currentNodeId === StandardInterpretationNodes.controlDepartLiaisonDistribution.value) {
|
||||
// 联络人分发节点
|
||||
params.data.processStandardInterpret = Object.assign({}, this.info.data.processStandardInterpret, compData.formData, {
|
||||
projectId: this.projectId
|
||||
})
|
||||
// 条款列表
|
||||
params.data.processStandardInterpretClauseList = compData.clauseData
|
||||
} else if (this.currentNodeId === StandardInterpretationNodes.standardInterpreterDistribution.value) {
|
||||
} else if (this.mainInterpreterDistributeNodes.includes(this.currentNodeId)) {
|
||||
// 标准主解读人分发节点
|
||||
// 联络人分发节点
|
||||
params.data.processStandardInterpret = Object.assign({}, this.info.data.processStandardInterpret, compData.formData, {
|
||||
projectId: this.projectId
|
||||
})
|
||||
// 条款列表
|
||||
params.data.processStandardInterpretClauseList = compData.clauseData
|
||||
// 条款列表(分发和不分发传入的字段不一样)
|
||||
if (compData.isDistribute) {
|
||||
params.data.processStandardInterpretClauseList = compData.clauseData
|
||||
} else {
|
||||
// 将条款的表格复制到完整的条款解读表,id需要处理
|
||||
params.data.processStandardInterpretClauseSublistList = compData.clauseData.map(item => {
|
||||
item.standardInterpretClauseId = item.id
|
||||
delete item.id
|
||||
return item
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// 解读人填写节点 及 后续节点
|
||||
params.data.processStandardInterpret = Object.assign({}, this.info.data.processStandardInterpret, compData.formData, {
|
||||
@@ -418,26 +434,26 @@ export default {
|
||||
},
|
||||
// 转办
|
||||
continueTurnTo (userId) {
|
||||
// if (this.loading) return
|
||||
// this.loading = true
|
||||
// const params = {
|
||||
// taskId: this.$route.query.taskId,
|
||||
// userId
|
||||
// }
|
||||
// transferInspectPlan(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)
|
||||
// })
|
||||
if (this.loading) return
|
||||
this.loading = true
|
||||
const params = {
|
||||
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)
|
||||
})
|
||||
},
|
||||
// 保存
|
||||
handleSave () {
|
||||
@@ -447,14 +463,14 @@ export default {
|
||||
// 1待办 2草稿
|
||||
res.saveSource = (this.$route.query.draftId || !this.$route.query.projectId) ? 2 : 1
|
||||
console.log(res)
|
||||
// return saveInspectPlan(res)
|
||||
return interpretFlowSave(res)
|
||||
}).then(res => {
|
||||
// if (res.success) {
|
||||
// this.$message.success(res.message)
|
||||
// this.goBack()
|
||||
// } else {
|
||||
// this.$message.warn(res.message)
|
||||
// }
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
this.loading = false
|
||||
@@ -547,18 +563,22 @@ export default {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
this.getPageParams(false).then(res => {
|
||||
res.map.pass = false
|
||||
// 解读人分发节点点击驳回特殊处理
|
||||
if (this.mainInterpreterDistributeNodes.includes(this.currentNodeId)) {
|
||||
res.map.passFirst = 0
|
||||
}
|
||||
// 审批意见
|
||||
res.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value
|
||||
// return rejectInspectPlan(res)
|
||||
return interpretFlowReject(res)
|
||||
}).then(res => {
|
||||
// if (res.success) {
|
||||
// this.$message.success(res.message)
|
||||
// this.goBack()
|
||||
// } else {
|
||||
// this.$message.warn(res.message)
|
||||
// }
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).catch((err) => {
|
||||
if (err && err.message && tabList.includes(err.message)) {
|
||||
this.switchChange(err.message)
|
||||
|
||||
Reference in New Issue
Block a user