怎么从一个frm报表把值传到另一个frm

sku加了编辑后事件,会判断重复,重复后,怎么把SKU值传递到弹出的窗体,我用的js弹窗

js:

var ch = this.getValue();

//获取当前控件值

var patrn = FR.remoteEvaluate('=SQL("FRDemo","'+"select count(*) from 库存盘点 where sku= '"+ch+"'"+'",1,1)');

if (patrn>0) {

FR.mobilePopup({

target: "template",//设置跟随弹窗

parameters: {},

setting: {

templatePath: "/重复更改.frm",//设置子模板地址

border: {

type: 0,

color: "rgb(0,0,0)",

borderRadius: 4.0

},

background: {

color: "rgb(255,255,255)"

},

mobileRegular: {

type: "custom" || "auto_height",

heightPercent: 95.0,

widthPercent: 95.0

},

padRegular: {

type: "custom" || "auto_height",

heightPercent: 95.0,

widthPercent: 95.0

}//设置弹窗大小格式

}

})

//如果不满足规则弹出提示

this.setValue("");

//清空输入值

}

image.pngimage.pngimage.png

FineReport 15900334107 发布于 2021-9-30 14:18
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共3回答
最佳回答
0
snrtuemcLv8专家互助
发布于2022-4-1 20:31

你这个是移动端,和pc端有点不一样

安装[通用]移动端弹窗插件-https://help.fanruan.com/finereport10.0/doc-view-3202.html

或者

[通用]JS通过按钮控件开关对话框-https://help.fanruan.com/finereport10.0/doc-view-3461.html

最佳回答
0
Z4u3z1Lv6专家互助
发布于2021-9-30 14:22

三、表单

1.参数面板获取参数面板控件:this.options.form.getWidgetByName("a");

2.参数面板获取组件控件:_g().getWidgetByName("a");

3.组件获取参数面板控件:_g().parameterEl.getWidgetByName("a");

4.组件获取组件控件:_g().getWidgetByName("a");

5.报表块获取组件控件:window.form=this.options.form; window.form.getWidgetByName("report0");

最佳回答
0
luojian0323Lv7资深互助
发布于2021-9-30 14:25

先在主窗口添加按钮,按钮打开对话框,例如:

window.form = this.options.form; //当前的form赋值给全局变量

var $iframe = $("<iframe id='inp' name='inp' width='100%' height='100%' scrolling='no' frameborder='0'>"); // iframe参数的命名及宽高等

$iframe.attr("src", "${servletURL}?formlet=弹窗.frm"); //childtest.cpt为点击查询时,对话框中显示的子报表

var o = {

title : "筛选所需数据并返回",

width : 600,//调整对话框宽度

height: 300//调整对话框高度

};

FR.showDialog(o.title, o.width, o.height, $iframe,o); //弹出对话框

然后在子窗口的按钮点击事件中添加数据回填:

var val=this.options.form.getWidgetByName("dateEditor0").getValue()

var Widget = parent.form.getWidgetByName('text');

var text= parent._g().parameterEl.getWidgetByName('text2');

Widget.setValue(val);

text.setValue(val)

window.parent.FR.closeDialog();

window.parent.FR.destroyDialog();

  • 3关注人数
  • 366浏览人数
  • 最后回答于:2022-4-1 20:31
    请选择关闭问题的原因
    确定 取消
    返回顶部