diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue
index dad99a8e..36c0a9ff 100644
--- a/src/components/customField/AddForm.vue
+++ b/src/components/customField/AddForm.vue
@@ -10,7 +10,7 @@
:class="{'form-flex-item-line': item.fieldShowType === FieldType.STANDARD_MORE.value}"
v-if="!hiddenFieldList.includes(item.dbFieldName)">
- *
+ *
{{ item.dbFieldTxt }}
@@ -85,7 +85,7 @@
item.level + '' === '1').deptIds
+ this.formInline = JSON.parse(JSON.stringify(this.formInline))
if (this.innerDisabledField.includes('auth_dept')) {
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'auth_dept')
}
} else if (val === StandardGradeClassify.TWO_LEVEL.value) {
// 选的是2级
this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '2').deptIds
+ this.formInline = JSON.parse(JSON.stringify(this.formInline))
if (this.innerDisabledField.includes('auth_dept')) {
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'auth_dept')
}
@@ -329,6 +331,29 @@ export default {
}
}
}
+ },
+ // 企标是否试行改变,标准状态需要跟着变,试行周期必填校验也跟着变
+ 'formInline.try_flag' (val) {
+ if (val && this.flag === '3') {
+ if (val === IsTrial.YES.value) {
+ // 试行,标准状态改为试运行,
+ this.formInline.standard_state = EnterpriseStandardStatus.TRIAL_OPERATION.value
+ this.formInline = JSON.parse(JSON.stringify(this.formInline))
+ // 试行,标准状态不可修改
+ if (!this.innerDisabledField.includes('standard_state')) {
+ this.innerDisabledField.push('standard_state')
+ }
+ // 试行,试行周期必填
+ this.rules.trial_period[0].required = true
+ } else {
+ // 不试行,标准状态可修改
+ if (this.innerDisabledField.includes('standard_state')) {
+ this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'standard_state')
+ }
+ // 不试行,试行周期非必填
+ this.rules.trial_period[0].required = false
+ }
+ }
}
},
methods: {
@@ -420,16 +445,23 @@ export default {
message: res.dbFieldTxt + this.$t('cannotEmpty'),
trigger: 'blur'
})
- } else if (res.fieldShowType === FieldType.DATE_SINGLE.value) {
- // 解决第一次校验不消失的问题
+ } else {
rule.push({
required: true,
message: res.dbFieldTxt + this.$t('cannotEmpty'),
trigger: 'change'
})
+ }
+ } else {
+ if ([FieldType.TEXT_BOX.value, FieldType.TEXTAREA.value].includes(res.fieldShowType)) {
+ rule.push({
+ required: false,
+ message: res.dbFieldTxt + this.$t('cannotEmpty'),
+ trigger: 'blur'
+ })
} else {
rule.push({
- required: true,
+ required: false,
message: res.dbFieldTxt + this.$t('cannotEmpty'),
trigger: 'change'
})
@@ -439,6 +471,7 @@ export default {
rules[res.dbFieldName] = rule
}
})
+ console.log(rules)
this.rules = rules
this.isFormInline = true
this.confirmLoading = false
diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js
index 85ca643a..dcc4ae65 100644
--- a/src/enums/commonEnums.js
+++ b/src/enums/commonEnums.js
@@ -127,6 +127,26 @@ export const StandardGradeClassify = {
THREE_LEVEL: { text: '3级', value: '4' }
}
+// 是否试行
+export const IsTrial = {
+ YES: { text: '是', value: '1' },
+ NO: { text: '否', value: '0' }
+}
+
+// 企标状态
+export const EnterpriseStandardStatus = {
+ DRAFT: { text: '起草', value: '1' },
+ SEEK_FOR_OPTIONS: { text: '征求意见', value: '2' },
+ EXAMINE: { text: '审查', value: '3' },
+ APPROVAL: { text: '报批', value: '4' },
+ PRE_RELEASE: { text: '预发布', value: '5' },
+ RELEASE: { text: '发布', value: '6' },
+ TRIAL_OPERATION: { text: '试运行', value: '7' },
+ CURRENTLY_EFFECTIVE: { text: '现行有效', value: '8' },
+ ABOLISH: { text: '废止', value: '9' },
+ ARCHIVE: { text: '封存', value: '10' }
+}
+
// 流程key,获取人员信息前需要获取流程定义id,传这里的名字到WorkCenterMixin的getFlowDefinition方法中
export const ProcessKey = {
// 企标立项/变更计划
diff --git a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue
index c44017b5..b2e2f3ac 100644
--- a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue
+++ b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue
@@ -108,17 +108,32 @@
-
-
-
-
-
-
-
-
- {{ operation.text }}
-
-
+
+
+
+
+
+
+
+
+
+
+ {{ operation.text }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ operation.text }}
+
+
+