diff --git a/jero-web/src/components/libraryAddForm/index.vue b/jero-web/src/components/libraryAddForm/index.vue index fbb84fbc9..4fed77af8 100644 --- a/jero-web/src/components/libraryAddForm/index.vue +++ b/jero-web/src/components/libraryAddForm/index.vue @@ -258,7 +258,6 @@ - +
{{$t('Statutenumberclause')}}
- + @@ -313,7 +313,7 @@
{{$t('remarks')}}
- + @@ -325,13 +325,12 @@ {{ $t('cancel') }} - + {{ $t('determine') }} - +
{{$t('Statutenumberclause')}}
- + @@ -386,7 +386,7 @@
{{$t('remarks')}}
- + @@ -398,7 +398,7 @@ {{ $t('cancel') }} - + {{ $t('determine') }} @@ -447,6 +447,24 @@ dataGradto: [], isFormInline: false, rules: {}, + tablerules: { + standNumberOrClause: [ + { + // required: true, + max: 10, + message: this.$t('Statutenumberclause') + this.$t('cannotExceed') + 10 + this.$t('Characters'), + trigger: 'blur' + } + ], + remarks: [ + { + // required: true, + max: 1000, + message: this.$t('remarks') + this.$t('cannotExceed') + 1000 + this.$t('Characters'), + trigger: 'blur' + } + ] + }, labelCol: { xs: { span: 24 }, sm: { span: 6 } @@ -519,11 +537,15 @@ }, methods: { - tablehandleCancel(){ - this.tablevisibleGrad = false - console.log(this.tabledataGrad) - this.dataGradto[this.tabledataIndex] = this.tabledataGrad - this.dataGradto= [... this.dataGradto] + tablehandleSubmit(){ + this.$refs.tableruleFormedit.validate((valid) => { + if(valid){ + this.tablevisibleGrad = false + console.log(this.tabledataGrad) + this.dataGradto[this.tabledataIndex] = this.tabledataGrad + this.dataGradto= [... this.dataGradto] + } + }) }, deleteLib(val,index) { let _this = this @@ -544,9 +566,13 @@ this.tabledataIndex = index this.tabledataGrad = JSON.parse(JSON.stringify(result)) }, - handleCancel(){ - this.dataGradto.push(this.tabledataGrad) - this.visibleGrad = false + handleSubmit(){ + this.$refs.tableruleForm.validate(valid => { + if (valid){ + this.dataGradto.push(this.tabledataGrad) + this.visibleGrad = false + } + }) }, disabledDate(current) { return current && current < moment().subtract(1, 'day')