|
楼主 |
发表于 2017-4-27 10:10:32
|
显示全部楼层
已解决,请结帖
主面向报表传参Model.prototype.button4Click = function(event){
var grid = this.comp("grid1");
var rowIDs = grid.getCheckeds();//获取多选选中行的id.返回的是list数组
if(rowIDs.length !==0){
this.comp("windowDialog2").open({params:{data:{"rows":rowIDs}}});
}else{
justep.Util.hint("请先选择要打印的行!");
}
报表向action传参
Model.prototype.modelParamsReceive = function(event){
var rows=event.params.data.rows;
alert(rows);
var str="";
for (var i=0;i<rows.length;i++){
if(i<1){
str += " id= '" + rows + "'";
}else{
str += " or id= '" + rows + "'";
}
}
this.comp("report1").refresh;
};
接收端
public static Table jj(Map<String, String> sql,String dataModel,String str){
String mssql = " SELECT * FROM sfc310 ";
if (str !=null){
mssql += " WHERE ";
mssql += str ;
}
System.out.print(mssql);
HashMap<String,String> sqlMap = new HashMap<String,String>();
sqlMap.put(SQL.DEFAULT_DB_NAME,mssql);
return SQL.select(sqlMap,null,"/erp/cggl/data");
}
|
|