[update] 修改企标流程bug

This commit is contained in:
lideqin
2023-11-27 12:04:10 +08:00
parent 770c9a4970
commit da73b49cbf
4 changed files with 51 additions and 34 deletions
@@ -167,10 +167,13 @@
<!-- 所长,节点6需要选所长 -->
<a-col :span="12" v-if="currentNode === 7">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enterpriseInitChangePlan.superintendent')">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.enterpriseInitChangePlan.superintendent')"
type="radio"
v-decorator="['newMainDraftUserLeader', validatorRules.newMainDraftUserLeader]"
input-type="textarea" />
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.enterpriseInitChangePlan.superintendent')"
type="radio"
v-decorator="['newMainDraftUserLeader', validatorRules.newMainDraftUserLeader]"
@nameChange="userSelectNameChange"
fieldName="newMainDraftUserLeader"
:nameStr="userFormModel.newMainDraftUserLeader_dictText"
input-type="textarea" />
</a-form-item>
</a-col>
<!-- 相关人员,节点7需要选相关人员 -->
@@ -179,6 +182,9 @@
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.enterpriseInitChangePlan.relatedPersonnel')"
type="checkbox"
v-decorator="['relatedUser', validatorRules.relatedUser]"
@nameChange="userSelectNameChange"
fieldName="relatedUser"
:nameStr="userFormModel.relatedUser_dictText"
input-type="textarea" />
</a-form-item>
</a-col>
@@ -343,7 +349,7 @@ export default {
this.disabled = true
}
}
if (this.$route.query.taskId) {
if (this.$route.query.taskId && !this.$route.query.draftId) {
// 有流程id说明是从流程中心来的,需要初始化数据
this.getProcessData('todo', { taskId: this.$route.query.taskId })
}
@@ -448,6 +454,7 @@ export default {
]
},
userForm: this.$form.createForm(this), // 部分节点需要选人的表单
userFormModel: {},
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
personnelInfoDataAll: [], // 整体人员信息
personnelInfoData: [], // 传给人员信息组件的人员信息
@@ -516,14 +523,15 @@ export default {
func(params).then(res => {
if (res.success) {
this.model = res.result
this.$nextTick(() => {
// 初始化流程信息
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
// 初始化流程审批信息,草稿进来的才回显审批信息
if (type === 'draft') {
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
}
})
// 初始化流程信息
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
// 初始化流程审批信息,草稿进来的才回显审批信息
if (type === 'draft') {
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
}
// this.$nextTick(() => {
//
// })
// 初始化业务基本信息的申请类型和项目类别,分开赋值是因为项目类别会没有下拉数据无法回显
const baseInfoForm = {}
baseInfoForm.applicationCategory = this.model.dataList[0].applicationCategory
@@ -581,6 +589,9 @@ export default {
}
this.$refs.changeBaseInfo.formInline = param
})
// 回显部分节点选人
this.userFormModel = Object.assign({}, this.model.dataList[0])
this.userForm.setFieldsValue(pick(this.model.dataList[0], 'newMainDraftUserLeader', 'relatedUser'))
})
}
} else {
@@ -620,6 +631,10 @@ export default {
}
}
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.userFormModel[fieldName + '_dictText'] = value
},
// 业务基本信息组件中获取到流程名称改变后的值
processNameChange (value) {
const param = { prcName: value }
@@ -688,7 +703,7 @@ export default {
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
arr.push({ ...ruleForm, ...dutyDepartChangeForm })
arr.push({ ...ruleForm, ...dutyDepartChangeForm, ...userInfoForm })
} else if (this.formInline.projectType === ProjectType.MERGE.value) {
// 业务基本信息-变更-合并
const mergeForm = this.$refs.changeBaseInfo.formInline