提交 9c94fbdb 编写于 作者: tony001's avatar tony001

调整表单手动修改数据主键的情况

上级 b31b1df0
...@@ -156,15 +156,6 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi ...@@ -156,15 +156,6 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
}); });
}); });
} }
<#assign has_keyfield = false />
<#list ctrl.getPSDEFormItems() as formitem>
<#if formitem.getPSAppDEField?? && formitem.getPSAppDEField()??>
<#if !formitem.isHidden() && formitem.getPSAppDEField().isKeyField()>
<#assign has_keyfield = true />
</#if>
</#if>
</#list>
/** /**
* 添加数据 * 添加数据
...@@ -179,9 +170,15 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi ...@@ -179,9 +170,15 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
@Errorlog @Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
<#if has_keyfield> <!-- 手动修改数据主键的情况start -->
Object.assign(Data,{${appde.getKeyPSAppDEField().getCodeName()?lower_case}: data.${appde.getKeyPSAppDEField().getCodeName()?lower_case}, srffrontuf: '1'}); <#list ctrl.getPSDEFormItems() as formitem>
</#if> <#if formitem.getPSAppDEField?? && formitem.getPSAppDEField()??>
<#if !formitem.isHidden() && formitem.getPSAppDEField().isKeyField()>
Object.assign(Data,{${appde.getKeyPSAppDEField().getCodeName()?lower_case}: data.${formitem.getName()}, srffrontuf: '1'});
</#if>
</#if>
</#list>
<!-- 手动修改数据主键的情况end -->
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册