[update] 企标新增设置标准等级分类为1,2,3级,授权部门带出的是当前标准的主起草单位,主起草单位修改后会修改授权部门

This commit is contained in:
lideqin
2023-12-13 11:46:59 +08:00
parent 052e0448c6
commit 48750d465d
+27 -6
View File
@@ -332,8 +332,10 @@ export default {
}
} else if (val === StandardGradeClassify.ONE_LEVEL.value) {
// 选的是1级
// 带出3级的部门:起草部门
this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
// // 带出3级的部门:起草部门
// this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
// 带出主起草单位
this.formInline.auth_dept = this.formInline.main_drafting_unit
// 设置可选择项
this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '1').deptIds.split(',')
this.formInline = JSON.parse(JSON.stringify(this.formInline))
@@ -343,8 +345,10 @@ export default {
}
} else if (val === StandardGradeClassify.TWO_LEVEL.value) {
// 选的是2级
// 带出3级的部门:起草部门
this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
// // 带出3级的部门:起草部门
// this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
// 带出主起草单位
this.formInline.auth_dept = this.formInline.main_drafting_unit
// 设置可选择项
this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '2').deptIds.split(',')
this.formInline = JSON.parse(JSON.stringify(this.formInline))
@@ -353,8 +357,10 @@ export default {
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'auth_dept')
}
} else if (val === StandardGradeClassify.THREE_LEVEL.value) {
// 选的是3级,授权部门带出不可编辑
this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
// // 选的是3级,授权部门带出不可编辑
// this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
// 选的是3级,带出主起草单位
this.formInline.auth_dept = this.formInline.main_drafting_unit
if (!this.innerDisabledField.includes('auth_dept')) {
this.innerDisabledField.push('auth_dept')
}
@@ -389,6 +395,21 @@ export default {
}
}
},
// 主起草单位改变后,需要将选中的主起草单位增加到授权部门
'formInline.main_drafting_unit' (val) {
if (val) {
if (this.formInline.grade_classification === StandardGradeClassify.ONE_LEVEL.value ||
this.formInline.grade_classification === StandardGradeClassify.TWO_LEVEL.value) {
// 标准等级分类是1级或者2级需要,把主起草单位追加到授权部门
const authDeptArr = (this.formInline.auth_dept || '').split(',')
authDeptArr.push(val)
this.formInline.auth_dept = authDeptArr.join(',')
} else if (this.formInline.grade_classification === StandardGradeClassify.THREE_LEVEL.value) {
// 标准等级分类是3级,把授权部门替换成主起草单位
this.formInline.auth_dept = val
}
}
},
// 企标是否试行改变,标准状态需要跟着变,试行周期必填校验也跟着变
'formInline.try_flag' (val) {
if (val && this.flag === StandardSource.ENTERPRISE.value) {