提交 90bdbd31 编写于 作者: KK's avatar KK

新增值规则多语言

上级 41b2b40c
...@@ -264,8 +264,8 @@ import { Util } from '@/ibiz-core/utils'; ...@@ -264,8 +264,8 @@ import { Util } from '@/ibiz-core/utils';
<#if itemRuleCount gt 0 || formdetail.isAllowEmpty() == false> <#if itemRuleCount gt 0 || formdetail.isAllowEmpty() == false>
${formdetail.getName()}: [ ${formdetail.getName()}: [
<#if formdetail.isAllowEmpty() == false> <#if formdetail.isAllowEmpty() == false>
{ required: true, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值不能为空', trigger: 'change' }, { required: true, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: 'required', trigger: 'change' },
{ required: true, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: '${formdetail.getCaption()} 值不能为空', trigger: 'blur' }, { required: true, type: '<#assign datatype=srfjavatype(formdetail.getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>string</#if>', message: 'required', trigger: 'blur' },
</#if> </#if>
<#if formdetail.getEditorType?? && formdetail.getEditorType()?? && formdetail.isAllowEmpty?? && formdetail.isAllowEmpty()??> <#if formdetail.getEditorType?? && formdetail.getEditorType()?? && formdetail.isAllowEmpty?? && formdetail.isAllowEmpty()??>
<#if formdetail.getEditorType() == 'CHECKBOX' && !formdetail.isAllowEmpty()> <#if formdetail.getEditorType() == 'CHECKBOX' && !formdetail.isAllowEmpty()>
...@@ -520,7 +520,9 @@ import { Util } from '@/ibiz-core/utils'; ...@@ -520,7 +520,9 @@ import { Util } from '@/ibiz-core/utils';
this.detailsModel[property].setError(""); this.detailsModel[property].setError("");
resolve(true); resolve(true);
}).catch(({ errors, fields }) => { }).catch(({ errors, fields }) => {
this.detailsModel[property].setError(this.errorCache[property]?this.errorCache[property]:errors[0].message); const {field , message } = errors[0];
let _message :any = (this.$t(`project.mobnewform_form.details.${field}`) as string) +' '+ this.$t(`app.form.rules.${message}`);
this.detailsModel[property].setError(this.errorCache[property]?this.errorCache[property]: _message);
resolve(false); resolve(false);
}); });
}); });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册