提交 24684bca 编写于 作者: tony001's avatar tony001

适配搜索表单数据对象方式新建、更新默认值

上级 1aaecde4
......@@ -298,9 +298,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
public createDefault(){
<#list ctrl.getAllPSDEFormDetails() as formdetail><#t>
<#if formdetail.getCreateDV?? && formdetail.getCreateDV()??><#t>
<#if !(formdetail.getCreateDV() == '') || formdetail.getCreateDVT() == 'CURTIME'><#t>
<#if formdetail.getCreateDV?? && formdetail.getCreateDV()?? && formdetail.getCreateDV() !=""><#t>
if (this.data.hasOwnProperty('${formdetail.getCodeName()?lower_case}')) {
<#if !(formdetail.getCreateDVT() == '')><#t>
<#-- 网页请求 -->
<#if formdetail.getCreateDVT() == 'CONTEXT'>
this.data['${formdetail.getCodeName()?lower_case}'] = this.viewparams['${formdetail.getCreateDV()}'];
......@@ -319,13 +319,13 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
<#-- 当前时间 -->
<#elseif formdetail.getCreateDVT() == 'CURTIME'>
this.data['${formdetail.getCodeName()?lower_case}'] = this.$util.dateFormat(new Date());
<#else>
<#-- 默认值 -->
<#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>;
</#if>
<#else>
<#-- 默认值 -->
<#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>;
</#if>
}
</#if>
</#if>
</#list>
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册