update 标准征求意见流程
This commit is contained in:
@@ -94,7 +94,7 @@
|
||||
<a-button type="primary" class="button-box" @click="chooseStandardText" v-if="!basicServiceInfoDisabled">
|
||||
{{ this.$t('workCenter.standardConsultationProcess.selectText') }}
|
||||
</a-button>
|
||||
<file-echo :file-ids="basicServiceInfo.standardText" v-if="basicServiceInfoDisabled" />
|
||||
<file-echo :file-ids="basicServiceInfo.standardTextFileId" v-if="basicServiceInfoDisabled" />
|
||||
</div>
|
||||
</a-form-item>
|
||||
</div>
|
||||
@@ -723,7 +723,7 @@ export default {
|
||||
},
|
||||
// 业务基本信息禁用,非发起节点都禁用
|
||||
basicServiceInfoDisabled () {
|
||||
return this.currentNode && this.currentNode.indexOf(ConsultationProcess.initiate.value) === -1
|
||||
return !!this.currentNode && this.currentNode.indexOf(ConsultationProcess.initiate.value) === -1
|
||||
},
|
||||
// 展示征求意见列表(设计工程师填写征求意见、模块负责人/各部所主管级领导汇总、各部所主管级领导/法规工程师审批)
|
||||
showConsultationList () {
|
||||
@@ -761,16 +761,49 @@ export default {
|
||||
created () {
|
||||
// 有流程id或者草稿id点进来的
|
||||
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||
|
||||
} else {
|
||||
// 找不到这个节点默认使用审批节点页面及按钮,发起除外
|
||||
this.nodeEnumsKey = this.currentNode ? ConsultationProcess.keyOfValue(this.currentNode) || 'regulatoryEngineerApproval' : 'initiate'
|
||||
this.btnList = ConsultationProcess[this.nodeEnumsKey].btn
|
||||
this.currentNode = this.$route.query.nodeId
|
||||
this.initProcessDetailData()
|
||||
}
|
||||
// 找不到这个节点默认使用审批节点页面及按钮,发起除外
|
||||
this.nodeEnumsKey = this.currentNode ? ConsultationProcess.keyOfValue(this.currentNode) || 'regulatoryEngineerApproval' : 'initiate'
|
||||
this.btnList = ConsultationProcess[this.nodeEnumsKey].btn
|
||||
// 获取人员信息数据
|
||||
this.getPersonInfoStructure(ProcessKey.CONSULTATION.value)
|
||||
},
|
||||
methods: {
|
||||
initProcessDetailData () {
|
||||
this.loading = true
|
||||
const params = {
|
||||
processInstanceId: this.$route.query.processInstanceId,
|
||||
draftId: this.$route.query.draftId
|
||||
}
|
||||
queryConsultationProcessDetail(params).then(res => {
|
||||
if (res.success) {
|
||||
const { result } = res
|
||||
// 处理流程信息
|
||||
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
|
||||
// 流程审批信息
|
||||
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {})
|
||||
// 业务基本信息
|
||||
this.basicServiceInfo = Object.assign({}, result.businessInfoDTO.processFbStandardConsultation || {})
|
||||
// 业务分派信息
|
||||
this.dispatchInfo = Object.assign({}, result.businessInfoDTO.processFbConsultationUserLink || {})
|
||||
// 征求意见列表
|
||||
this.dataSource = result.businessInfoDTO.processFbConsultationLists || []
|
||||
// 统一处理表单回显
|
||||
this.$nextTick(() => {
|
||||
this.processInfoForm.setFieldsValue(this.processInfo)
|
||||
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
|
||||
this.basicServiceInfoForm.setFieldsValue(this.basicServiceInfo)
|
||||
this.dispatchInfoForm.setFieldsValue(this.dispatchInfo)
|
||||
})
|
||||
} else {
|
||||
this.$messagee.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
switchChange (value) {
|
||||
this.switchValue = value
|
||||
},
|
||||
@@ -781,6 +814,7 @@ export default {
|
||||
handleStandardChange (name) {
|
||||
this.basicServiceInfoForm.setFieldsValue({ standardName: name, standardTextFileName: null })
|
||||
delete this.basicServiceInfo.standardText
|
||||
delete this.basicServiceInfo.standardTextFileId
|
||||
},
|
||||
/**
|
||||
* 选择标准文本
|
||||
@@ -845,7 +879,7 @@ export default {
|
||||
dealFormData (isSave) {
|
||||
// 提交的表单数据,流程信息,流程审批信息,征求意见列表,业务分派信息,业务基本信息
|
||||
let formData = {}, processInfo = {}, approvalInfo = {}, consultationListData = [], dispatchInfo = {}, basicServiceInfo = {},
|
||||
flag = true
|
||||
userInfoMap = {}, flag = true
|
||||
// 保存,只需要有填写内容即可
|
||||
if (isSave) {
|
||||
// 流程信息
|
||||
@@ -858,7 +892,9 @@ export default {
|
||||
if (this.showDispatchInformation) {
|
||||
dispatchInfo = Object.assign(this.dispatchInfo, this.dispatchInfoForm.getFieldsValue())
|
||||
}
|
||||
const saveCheckObj = { ...processInfo, ...basicServiceInfo, ...approvalInfo, ...dispatchInfo }
|
||||
// 用户信息
|
||||
userInfoMap = this.$refs.personnelInfo.getDataObj()
|
||||
const saveCheckObj = { ...processInfo, ...basicServiceInfo, ...approvalInfo, ...dispatchInfo, ...userInfoMap }
|
||||
// 征求意见列表
|
||||
consultationListData = this.dataSource || []
|
||||
if (!(Object.values(saveCheckObj).some(tt => !!tt || tt === 0) || consultationListData.length > 0)) {
|
||||
@@ -907,6 +943,13 @@ export default {
|
||||
if (this.showConsultationList && this.currentNode === ConsultationProcess.moduleOwnerSummary.value && !this.$refs.expandTable.submit()) {
|
||||
flag = false
|
||||
}
|
||||
// 用户信息
|
||||
const userInfo = this.$refs.personnelInfo.getDataObjVerify()
|
||||
if (!userInfo) {
|
||||
flag = false
|
||||
} else {
|
||||
userInfoMap = userInfo
|
||||
}
|
||||
consultationListData = this.dataSource || []
|
||||
}
|
||||
if (!flag) {
|
||||
@@ -919,7 +962,8 @@ export default {
|
||||
processFbStandardConsultation: basicServiceInfo,
|
||||
processFbConsultationUserLink: dispatchInfo,
|
||||
processFbConsultationLists: this.dataSource
|
||||
}
|
||||
},
|
||||
userInfoMap
|
||||
}
|
||||
return formData
|
||||
},
|
||||
@@ -975,7 +1019,8 @@ export default {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
submitConsultationProcess(formData).then(res => {
|
||||
const func = !!this.currentNode ? submitConsultationProcess : initiateConsultationProcess
|
||||
func(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
@@ -1046,8 +1091,10 @@ export default {
|
||||
* @param item
|
||||
*/
|
||||
handleSelectedFile (item) {
|
||||
console.log(item)
|
||||
this.basicServiceInfoForm.setFieldsValue({ standardTextFileName: item.fileName })
|
||||
this.basicServiceInfo.standardText = item.publishBeforeId
|
||||
this.basicServiceInfo.standardTextFileId = item.fileId
|
||||
},
|
||||
/**
|
||||
* 修改意见
|
||||
|
||||
Reference in New Issue
Block a user