提交 bbd5d28d 编写于 作者: WodahsOrez's avatar WodahsOrez

lxm--表格新建默认值--fix1

上级 30008942
...@@ -1733,29 +1733,29 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1733,29 +1733,29 @@ import { FormItemModel } from '@/model/form-detail';
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public createDefault(row: any){ public createDefault(row: any){
<#list ctrl.getAllPSDEFormDetails() as formdetail><#t> <#list ctrl.getPSDEGridEditItems() as editItem><#t>
<#if formdetail.getCreateDV?? && formdetail.getCreateDV()??><#t> <#if editItem.getCreateDV?? && editItem.getCreateDV()??><#t>
<#if !(formdetail.getCreateDV() == '')><#t> <#if !(editItem.getCreateDV() == '')><#t>
if (row.hasOwnProperty('${formdetail.getCodeName()?lower_case}')) { if (row.hasOwnProperty('${editItem.getCodeName()?lower_case}')) {
<#-- 网页请求 --> <#-- 网页请求 -->
<#if formdetail.getCreateDVT() == 'CONTEXT'> <#if editItem.getCreateDVT() == 'CONTEXT'>
row['${formdetail.getCodeName()?lower_case}'] = this.viewparams['${formdetail.getCreateDV()}']; row['${editItem.getCodeName()?lower_case}'] = this.viewparams['${editItem.getCreateDV()}'];
<#-- 用户全局对象 --> <#-- 用户全局对象 -->
<#elseif formdetail.getCreateDVT() == 'SESSION'> <#elseif editItem.getCreateDVT() == 'SESSION'>
row['${formdetail.getCodeName()?lower_case}'] = this.context['${formdetail.getCreateDV()}']; row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getCreateDV()}'];
<#-- 当前应用数据 --> <#-- 当前应用数据 -->
<#elseif formdetail.getCreateDVT() == 'APPDATA'> <#elseif editItem.getCreateDVT() == 'APPDATA'>
row['${formdetail.getCodeName()?lower_case}'] = this.context['${formdetail.getCreateDV()}']; row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getCreateDV()}'];
<#-- 当前操作用户(名称) --> <#-- 当前操作用户(名称) -->
<#elseif formdetail.getCreateDVT() == 'OPERATORNAME'> <#elseif editItem.getCreateDVT() == 'OPERATORNAME'>
row['${formdetail.getCodeName()?lower_case}'] = this.context['srfusername']; row['${editItem.getCodeName()?lower_case}'] = this.context['srfusername'];
<#-- 当前操作用户(编号) --> <#-- 当前操作用户(编号) -->
<#elseif formdetail.getCreateDVT() == 'OPERATOR'> <#elseif editItem.getCreateDVT() == 'OPERATOR'>
row['${formdetail.getCodeName()?lower_case}'] = this.context['srfuserid']; row['${editItem.getCodeName()?lower_case}'] = this.context['srfuserid'];
<#else> <#else>
<#-- 默认值 --> <#-- 默认值 -->
<#assign datatype=srfjavatype(formdetail.getStdDataType())> <#assign datatype=srfjavatype(editItem.getPSAppDEField().getStdDataType())>
row['${formdetail.getCodeName()?lower_case}'] = <#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>${formdetail.getCreateDV()}<#else>'${formdetail.getCreateDV()}'</#if>; row['${editItem.getCodeName()?lower_case}'] = <#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>${editItem.getCreateDV()}<#else>'${editItem.getCreateDV()}'</#if>;
</#if> </#if>
} }
</#if> </#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册