From 578a5667138bfe2fd3741034827dd7d3d4eb3eb0 Mon Sep 17 00:00:00 2001 From: yuekuo Date: Wed, 29 Mar 2023 14:15:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/upgradetargetmodel.vue | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) 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