在建模查询表中,点击自定义按钮,弹出自定义对话框,对话框的保存按钮调用建模表单代码块中的卡片保存函数
点击自定义按钮,弹出自定义对话框


链接目标方式选择手动输入,用于写JS代码
function onUrl1(id,lastname){
var urll = '/spa/cube/index.html#/main/cube/card?type=1&modeId=140741&formId=-644&resourceid='+id+'&resourcename='+lastname;
tck(urll); //调用查询列表中的代码块中的自定义函数
}

在查询列表中的代码块中编辑如下代码
function clo(){
ModeList.closeCustomDialog(); //关闭自定义对话框
}
function tck(urll){
let buttons=[
{btnname:'保存', callfun:'savee'},
//保存按钮,调用建模表单代码块中的自定义函数
{btnname:'关闭',callfun:'base.clo'} ];
//关闭按钮 调用上边的函数
let style={width:1000,height:500};
let prop={title:'',url:urll,style:style};
ModeList.openCustomDialog(prop,buttons); //弹出自定义对话框
}
在建模表单代码块中编辑如下代码

function savee(){
ModeForm.showConfirm("是否确认提交?", function(){
//弹出确认框,确认,则执行如下代码
ModeForm.doCardSubmit('163094','1','',false,function(billid)
{ //调用卡片提交保存接口
alert("提交成功");
parent.ModeForm.closeCustomDialog();
//点击保存后,关闭自定义对话框
});
});
}
效果

