update 标准征求意见流程
This commit is contained in:
@@ -226,12 +226,12 @@ export const FGEntryChangeProcessNode = new EsEnums({
|
||||
export const ConsultationProcess = new EsEnums({
|
||||
initiate: { text: '法规工程师发起', value: 'engineer_start', btn: ['save', 'submit'] },
|
||||
distribute: { text: '各部所主管级领导分发', value: 'depart_leader_start', btn: ['return', 'save', 'submit'] },
|
||||
moduleOwnerDistribution: { text: '模块负责人分发', value: '1', btn: ['return', 'save', 'submit'] },
|
||||
designEngineerFillIn: { text: '设计工程师填写', value: '2', btn: ['return', 'save', 'submit'] },
|
||||
moduleOwnerSummary: { text: '模块负责人汇总', value: '4', btn: ['return', 'save', 'submit'] },
|
||||
leaderApproval: { text: '各部所主管级领导审批', value: '5', btn: ['return', 'save', 'agree', 'reject'] },
|
||||
leaderSummary: { text: '各部所主管级领导汇总', value: '6', btn: ['return', 'save', 'submit'] },
|
||||
regulatoryEngineerApproval: { text: '法规工程师审批', value: '7', btn: ['return', 'save', 'agree', 'reject'] },
|
||||
moduleOwnerDistribution: { text: '模块负责人分发', value: 'module_owner_start', btn: ['return', 'save', 'submit'] },
|
||||
designEngineerFillIn: { text: '设计工程师填写', value: 'design_engineer', btn: ['return', 'save', 'submit'] },
|
||||
moduleOwnerSummary: { text: '模块负责人汇总', value: 'module_owner_end', btn: ['return', 'save', 'submit'] },
|
||||
leaderApproval: { text: '各部所主管级领导审批', value: 'depart_leader_end', btn: ['return', 'save', 'agree', 'reject'] },
|
||||
leaderSummary: { text: '各部所主管级领导汇总', value: 'depart_leader_collect', btn: ['return', 'save', 'submit'] },
|
||||
regulatoryEngineerApproval: { text: '法规工程师审批', value: 'engineer_start_end', btn: ['return', 'save', 'agree', 'reject'] },
|
||||
})
|
||||
|
||||
// 下发人员类型
|
||||
|
||||
@@ -144,6 +144,10 @@ export default {
|
||||
case '1':
|
||||
path = '/workCenter/StandardEntryOrChangeProcess'
|
||||
break
|
||||
// 标准征求意见流程
|
||||
case '2':
|
||||
path = '/workCenter/StandardConsultationProcess'
|
||||
break
|
||||
// 企标立项、变更计划
|
||||
case '7':
|
||||
path = '/workCenter/enterpriseStandardInitChange/planApprovalChangeFlow'
|
||||
|
||||
@@ -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
|
||||
},
|
||||
/**
|
||||
* 修改意见
|
||||
|
||||
+1
-1
@@ -60,7 +60,6 @@ export default {
|
||||
this.confirmLoading = true
|
||||
querySpitFileByStandardNumber({ standardNumber }).then(res => {
|
||||
if (res.success) {
|
||||
console.log(res.reuslt)
|
||||
this.optionList = res.result || []
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({ fileType: selectedValue })
|
||||
@@ -77,6 +76,7 @@ export default {
|
||||
if (!errors) {
|
||||
this.$emit('ok', values.fileType)
|
||||
const item = values.fileType ? this.optionList.find(tt => tt.publishBeforeId === values.fileType) : {}
|
||||
console.log(item)
|
||||
this.$emit('okItem', item)
|
||||
}
|
||||
this.close()
|
||||
|
||||
Reference in New Issue
Block a user