[update] 修改bug79820

This commit is contained in:
lideqin
2024-01-10 17:30:44 +08:00
parent 59b012988a
commit 181380af98
2 changed files with 17 additions and 7 deletions
+3 -1
View File
@@ -88,7 +88,9 @@ module.exports = {
pleaseSelectLeastTwoExpert: '请至少选择两位专家',
newPrincipalDrafter: '新主起草人',
newMainDraftUnit: '新主起草单位',
newHeadOfMainDraftingUnit: '新起草单位负责人'
newHeadOfMainDraftingUnit: '新起草单位负责人',
existingNumber: '企标编号已存在,需等待重新生成顺序号',
numberReset: '顺序号已重新生成'
},
// 年度制修订计划
revisionPlanActivelyReport: {
@@ -807,11 +807,6 @@ export default {
this.switchValue = 'user'
return
}
// 专家审批至少需要选两个专家 todo: 后端选多人流程进行不下去,暂时不限制传多人
// if (personnelObj.standardExpert.split(',').length < 2) {
// this.$message.warning(this.$t('workCenter.enterpriseInitChangePlan.pleaseSelectLeastTwoExpert'))
// return
// }
console.log(this.formInline)
this.processInfoForm.validateFields((err, values) => {
this.$refs.ruleForm.validate(valid => {
@@ -898,12 +893,25 @@ export default {
} else {
func = enterprisePlanApproval
}
func(param).then(res => {
func(param).then(async res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
if (res.message === this.$t('workCenter.enterpriseInitChangePlan.existingNumber')) {
// 已经存在编号,重新生成
if ([ProjectType.ENACT.value, ProjectType.MODIFY.value, ProjectType.MERGE.value].includes(this.formInline.projectType)) {
// 是制定修订或者合并,重新获取企标编号
this.loading = true
await this.$refs.approvalBaseInfo.getEnStandardNo()
setTimeout(() => {
this.loading = false
// 提示顺序号已重新生成
this.$message.success(this.$t('workCenter.enterpriseInitChangePlan.numberReset'))
}, 500)
}
}
}
}).finally(() => {
this.loading = false