[update] 修改bug78253
This commit is contained in:
@@ -160,7 +160,15 @@ import JMultiSelectTag from '../dict/JMultiSelectTag'
|
||||
import UploadFile from '../UploadFile'
|
||||
// 选择标准选择器
|
||||
import StandardSelection from '../selection/StandardSelection'
|
||||
import { FieldType, StandardGradeClassify, StandardProperty, IsTrial, EnterpriseStandardStatus } from '../../enums/commonEnums'
|
||||
import {
|
||||
FieldType,
|
||||
StandardGradeClassify,
|
||||
StandardProperty,
|
||||
IsTrial,
|
||||
EnterpriseStandardStatus,
|
||||
StandardSource,
|
||||
StandardStatus
|
||||
} from '../../enums/commonEnums'
|
||||
import JMultipleDatePicker from '../JMultipleDatePicker'
|
||||
import UserSelection from '../selection/UserSelection'
|
||||
import { getAction } from '../../api/manage.js'
|
||||
@@ -282,7 +290,7 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
// 如果是企标就获取企标级别映射数据
|
||||
if (this.flag === '3') {
|
||||
if (this.flag === StandardSource.ENTERPRISE.value) {
|
||||
getStandardGradeClassification().then(res => {
|
||||
if (res.success) {
|
||||
this.standardGradeClassification = res.result
|
||||
@@ -293,6 +301,7 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
FieldType,
|
||||
StandardSource,
|
||||
loading: false,
|
||||
formInline: {},
|
||||
isFormInline: false,
|
||||
@@ -317,7 +326,7 @@ export default {
|
||||
},
|
||||
// 标准等级分类改变后授权部门需要自动带出
|
||||
'formInline.grade_classification' (val) {
|
||||
if (val && this.flag === '3' && !this.isEditSetData) {
|
||||
if (val && this.flag === StandardSource.ENTERPRISE.value && !this.isEditSetData) {
|
||||
if (val === StandardGradeClassify.ZERO_LEVEL.value) {
|
||||
// 选的是0级,授权部门带出不可编辑
|
||||
this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '0').deptIds
|
||||
@@ -353,7 +362,7 @@ export default {
|
||||
this.innerDisabledField.push('auth_dept')
|
||||
}
|
||||
}
|
||||
} else if (val && this.flag === '3' && this.isEditSetData) {
|
||||
} else if (val && this.flag === StandardSource.ENTERPRISE.value && this.isEditSetData) {
|
||||
if (val === StandardGradeClassify.ZERO_LEVEL.value) {
|
||||
// 选的是0级,授权部门带出不可编辑
|
||||
if (!this.innerDisabledField.includes('auth_dept')) {
|
||||
@@ -385,7 +394,7 @@ export default {
|
||||
},
|
||||
// 企标是否试行改变,标准状态需要跟着变,试行周期必填校验也跟着变
|
||||
'formInline.try_flag' (val) {
|
||||
if (val && this.flag === '3') {
|
||||
if (val && this.flag === StandardSource.ENTERPRISE.value) {
|
||||
if (val === IsTrial.YES.value) {
|
||||
// 试行,标准状态改为试运行,
|
||||
this.formInline.standard_state = EnterpriseStandardStatus.TRIAL_OPERATION.value
|
||||
@@ -409,6 +418,23 @@ export default {
|
||||
this.rules.trial_period[0].required = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 编辑回显标准状态是废止,标准状态不可更改
|
||||
'formInline.standard_state' (val) {
|
||||
if (val && this.isEditSetData && (
|
||||
(this.flag === StandardSource.ENTERPRISE.value && val === EnterpriseStandardStatus.ABOLISH.value) ||
|
||||
(this.flag === StandardSource.DOMESTIC.value && val === StandardStatus.ABOLISH.value) ||
|
||||
(this.flag === StandardSource.OVERSEAS.value && val === StandardStatus.ABOLISH.value))) {
|
||||
// 状态是废止
|
||||
if (!this.innerDisabledField.includes('standard_state')) {
|
||||
this.innerDisabledField.push('standard_state')
|
||||
}
|
||||
} else {
|
||||
// 状态不是废止
|
||||
if (this.innerDisabledField.includes('standard_state')) {
|
||||
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'standard_state')
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user