diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue index 80899ab2f..ef5d10f6f 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue @@ -12,7 +12,7 @@ - +
@@ -37,11 +37,14 @@
+ * {{$t('upgraderecordnumber')}}
-
+
- + + +
@@ -60,9 +63,10 @@
+ * {{$t('Modelandfunctionrecord')}}
- + {{ item.ggpc }} @@ -174,6 +178,14 @@ import ImportFile from '@/components/ImportFileData/index' projectNameList2:[], selectListPc:[], selectListMb:[], + rules:{ + babh:[ + { required:true,message:this.$t('upgraderecordnumber')+this.$t('cannotEmpty'),trigger:'blur'} + ], + bapc:[ + { required:true,message:this.$t('Modelandfunctionrecord')+this.$t('cannotEmpty'),trigger:'change'} + ] + } } }, mounted() { @@ -230,17 +242,27 @@ import ImportFile from '@/components/ImportFileData/index' if(otaId==null){ otaId='' } - postAction('/ota/otaBaSjSjmbcx/add',{otaId:otaId,...this.form}).then(res=>{ + this.$refs.ruleForm.validate(valid=>{ + if(valid){ + postAction('/ota/otaBaSjSjmbcx/add',{otaId:otaId,...this.form}).then(res=>{ if(res.code==200){ localStorage.setItem('otaId', res.result.otaId) this.$message.success(this.$t('SavedSuccessfully')) this.getData() } }) + } + }) + }, next(){ this.save() - this.$emit('basicInformationForm') + this.$refs.ruleForm.validate(valid=>{ + if(valid){ + this.$emit('basicInformationForm') + }}) + + }, getSelect(){ getAction('/ota/otaBaCxList/list').then(res=>{ @@ -368,4 +390,8 @@ import ImportFile from '@/components/ImportFileData/index' margin-top: 5px; line-height: 1.4 !important; } + .Required { + color: red; + margin-right: 3px; +} \ No newline at end of file