[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: {
|
||||
|
||||
@@ -133,6 +133,17 @@ export const IsTrial = {
|
||||
NO: { text: '否', value: '0' }
|
||||
}
|
||||
|
||||
// 国内标准状态
|
||||
export const StandardStatus = {
|
||||
DRAFT: { text: '起草', value: '1' },
|
||||
SEEK_FOR_OPTIONS: { text: '征求意见', value: '2' },
|
||||
APPROVAL: { text: '报批', value: '3' },
|
||||
RELEASE: { text: '发布', value: '4' },
|
||||
BE_IMPLEMENTED_SOON: { text: '即将实施', value: '5' },
|
||||
CURRENTLY_EFFECTIVE: { text: '现行有效', value: '6' },
|
||||
ABOLISH: { text: '废止', value: '7' }
|
||||
}
|
||||
|
||||
// 企标状态
|
||||
export const EnterpriseStandardStatus = {
|
||||
DRAFT: { text: '起草', value: '1' },
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="custom-drawer-style-scroll">
|
||||
<a-spin :spinning="confirmLoading" style="width: 100%;height:100%">
|
||||
<add-form ref="addForm"
|
||||
flag="3"
|
||||
:flag="StandardSource.ENTERPRISE.value"
|
||||
:defaultValue="{year_number: new Date().getFullYear() + '', try_flag: '0'}"
|
||||
:disabledFieldList="['standard_number', 'replaced_by_standard_number', 'referenced_standard']"
|
||||
:hiddenFieldList="hiddenFieldList"
|
||||
@@ -66,6 +66,7 @@ import AddForm from '@/components/customField/AddForm'
|
||||
import { getEnterpriseStandardAddForm, getEnterpriseStandardInfoById } from '@/api/enterpriseStandardLibraryApi'
|
||||
import { postAction } from '@/api/manage'
|
||||
import CheckContentModal from './CheckContentModal'
|
||||
import { StandardSource } from '@/enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'EnterpriseStandardModal',
|
||||
@@ -77,6 +78,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
StandardSource,
|
||||
visible: false,
|
||||
title: '',
|
||||
width: 800,
|
||||
|
||||
Reference in New Issue
Block a user