提交 9f0fe044 编写于 作者: KK's avatar KK

优化 新建默认值在配置当前用户&当前时间&当前用户id时不需要配置值 fix1

上级 4c8de60d
...@@ -1417,9 +1417,19 @@ import { Util } from '@/ibiz-core/utils'; ...@@ -1417,9 +1417,19 @@ import { Util } from '@/ibiz-core/utils';
*/ */
public createDefault(){ public createDefault(){
<#list ctrl.getAllPSDEFormDetails() as formdetail><#t> <#list ctrl.getAllPSDEFormDetails() as formdetail><#t>
<#if formdetail.getCreateDV?? && formdetail.getCreateDV()??><#t> <#if formdetail.getCreateDVT?? && formdetail.getCreateDVT()?? && formdetail.getCreateDVT() != ''>
<#if !(formdetail.getCreateDV() == '') || formdetail.getCreateDVT() == 'CURTIME'><#t>
if (this.data.hasOwnProperty('${formdetail.getCodeName()?lower_case}')) { if (this.data.hasOwnProperty('${formdetail.getCodeName()?lower_case}')) {
<#-- 当前操作用户(名称) -->
<#if formdetail.getCreateDVT() == 'OPERATORNAME'>
this.data['${formdetail.getCodeName()?lower_case}'] = this.context['srfusername'];
<#-- 当前操作用户(编号) -->
<#elseif formdetail.getCreateDVT() == 'OPERATOR'>
this.data['${formdetail.getCodeName()?lower_case}'] = this.context['srfuserid'];
<#-- 当前时间 -->
<#elseif formdetail.getCreateDVT() == 'CURTIME'>
this.data['${formdetail.getCodeName()?lower_case}'] = this.$util.dateFormat(new Date());
</#if>
<#if formdetail.getCreateDV?? && formdetail.getCreateDV()??><#t>
<#-- 网页请求 --> <#-- 网页请求 -->
<#if formdetail.getCreateDVT() == 'CONTEXT'> <#if formdetail.getCreateDVT() == 'CONTEXT'>
this.data['${formdetail.getCodeName()?lower_case}'] = this.viewparams['${formdetail.getCreateDV()}']; this.data['${formdetail.getCodeName()?lower_case}'] = this.viewparams['${formdetail.getCreateDV()}'];
...@@ -1433,22 +1443,9 @@ import { Util } from '@/ibiz-core/utils'; ...@@ -1433,22 +1443,9 @@ import { Util } from '@/ibiz-core/utils';
<#-- 默认值 --> <#-- 默认值 -->
<#assign datatype=srfjavatype(formdetail.getStdDataType())> <#assign datatype=srfjavatype(formdetail.getStdDataType())>
this.data['${formdetail.getCodeName()?lower_case}'] = <#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>${formdetail.getCreateDV()}<#else>'${formdetail.getCreateDV()}'</#if>; this.data['${formdetail.getCodeName()?lower_case}'] = <#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>${formdetail.getCreateDV()}<#else>'${formdetail.getCreateDV()}'</#if>;
</#if>
}
</#if>
<#else>
<#if formdetail.getCreateDVT?? && formdetail.getCreateDVT()?? && formdetail.getCreateDVT() != ''>
<#-- 当前操作用户(名称) -->
<#if formdetail.getCreateDVT() == 'OPERATORNAME'>
this.data['${formdetail.getCodeName()?lower_case}'] = this.context['srfusername'];
<#-- 当前操作用户(编号) -->
<#elseif formdetail.getCreateDVT() == 'OPERATOR'>
this.data['${formdetail.getCodeName()?lower_case}'] = this.context['srfuserid'];
<#-- 当前时间 -->
<#elseif formdetail.getCreateDVT() == 'CURTIME'>
this.data['${formdetail.getCodeName()?lower_case}'] = this.$util.dateFormat(new Date());
</#if> </#if>
</#if> </#if>
}
</#if> </#if>
</#list> </#list>
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册