分页报表js
首页js
var wid_page=contentPane.parameterEl.getWidgetByName("page");var page=wid_page.getValue();if(page==1){ alert("已经是首页"); return false; } else{ setTimeout("contentPane.toolbar.options.items.fireEvent('click');",100); wid_page.setValue(1); _g().parameterCommit(); }
上一页js
var wid_page=contentPane.parameterEl.getWidgetByName("page");var page=wid_page.getValue();if(page==1){ alert("已经是首页"); return false; }else{ setTimeout("contentPane.toolbar.options.items.fireEvent('click');",100); wid_page.setValue(page-1) _g().parameterCommit(); }
当前页js
var page = contentPane.parameterEl.getWidgetByName("page").getValue();var number = contentPane.parameterEl.getWidgetByName("number").getValue();var str = "当前第";str = str + page;str = str + "/";str = str + number;str = str + "页";this.setValue(str);
下一页js
var totalpage= contentPane.curLGP.getCellValue("B1");var wid_page=contentPane.parameterEl.getWidgetByName("page");var page=wid_page.getValue();if(page>=totalpage){ alert("已经到末页"); return false; }else{ setTimeout("contentPane.toolbar.options.items.fireEvent('click');",100); wid_page.setValue(page+1) _g().parameterCommit(); }
末页js
var totalpage= contentPane.curLGP.getCellValue("B1");var wid_page=contentPane.parameterEl.getWidgetByName("page");var page=wid_page.getValue();if(page==totalpage){ alert("已经是末页"); return false; }else{ setTimeout("contentPane.toolbar.options.items.fireEvent('click');",100); wid_page.setValue(totalpage); _g().parameterCommit();}
编辑于 2020-9-2 17:27