提交 014e7bf1 编写于 作者: tony001's avatar tony001

修复表格行编辑可设置数据主键和清空仿真主键问题

上级 1bdc31b9
......@@ -149,6 +149,15 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
<#-- 手动修改数据主键的情况start -->
<#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getPSAppDEField()?? && editItem.getPSAppDEField().isKeyField()>
Object.assign(Data,{${appde.getKeyPSAppDEField().getCodeName()?lower_case}: data.${editItem.getName()}, srffrontuf: '1'});
</#if>
</#list>
</#if>
<#-- 手动修改数据主键的情况end -->
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
......@@ -320,7 +329,19 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
if(response.data){
Object.assign(response.data,{srfuf:'0'});
//仿真主键数据
<#-- 手动修改数据主键的情况start -->
<#assign hasKeyFieldwithEditable = false/>
<#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getPSAppDEField()?? && editItem.getPSAppDEField().isKeyField()>
<#assign hasKeyFieldwithEditable>true</#assign>
</#if>
</#list>
</#if>
<#-- 手动修改数据主键的情况end -->
<#if !hasKeyFieldwithEditable>
response.data.${appde.getKeyPSAppDEField().getCodeName()?lower_case} = Util.createUUID();
</#if>
}
this.handleResponse(action, response, true);
resolve(response);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册