screen.availWidth - nWidth)/2; var nTop = _nTop || (window.screen.availHeight - nHeight)/2; //2.Construct parameters for dialog var sFeatures = "dialogHeight: "+nHeight+"px; dialogWidth: "+nWidth+"px; " + "dialogTop: "+nTop+"; dialogLeft: "+nLeft+"; " + "center: Yes; scroll:Yes;help: No; resizable: No; status: No;"; //3.display Dialog var sDialogUrl = TRSAction_ROOT_PATH + "/include/dialog_window.html"; var sURL = this.getActionURL(); var arArgs = new Array(); arArgs[0] = sURL; arArgs[1] = window.location.href; arArgs[2] = _oArgs; try{ var sResult = window.showModalDialog(sDialogUrl, arArgs, sFeatures); return sResult; }catch(e){ alert("鎮殑IE鎻掍欢宸茬粡灏嗗璇濇鎷埅锛乗n" + "璇?#28751;?#37815;埅鍘绘帀-->鐐瑰嚮閫鍑?->鍏抽棴IE锛岀劧鍚庨噸鏂版墦寮IE鐧诲綍鍗冲彲锛乗n" + "缁?#37806;?#38315;犳垚涓嶄究锛孴RS鑷翠互姝夋剰锛?); return true; } } /** * 鍙?#37713;?#29999;?#37832;夋?#27692;姩鏉潪妯佸璇濇浜?#27996;殑璇?#23033;? * @param {int} _nWidth 瀵?#29831;濇?#21975;搴? * @param {int} _nHeight 瀵?#29831;濇?#21979;珮搴? * @param {object} _oArgs 浼?#37711;?#28725;?#29831;濇?#21977;殑鍙傛暟锛堝彲?#20114;涓int string array htmlelement锛?#37711;?#28729;?#38007;?#28729;氫箟瀵硅薄涓嶈锛? * @throws 濡傛灉娴忚?#22557;?#32515;?#27996;?#37815;埅锛?#28028;?#23534;瑰嚭瑙櫎鎷埅鎻愮 * @return {object} 杩斿洖鍊? */ function CTRSAction_doModelessDialogAction(_nWidth, _nHeight, _oArgs, _nTop, _nLeft){ //1.verify parameters if(!this.validateActionURL()) return; var nWidth = _nWidth || 200; var nHeight = _nHeight || 200; var nLeft = _nLeft || (window.screen.availWidth - nWidth)/2; var nTop = _nTop || (window.screen.availHeight - nHeight)/2; //2.Construct parameters for dialog var sFeatures = "dialogHeight: "+nHeight+"px; dialogWidth: "+nWidth+"px; " + "dialogTop: "+nTop+"; dialogLeft: "+nLeft+"; " + "center: Yes; scroll:Yes;help: No; resizable: No; status: No;"; //3.display Dialog var sDialogUrl = TRSAction_ROOT_PATH + "/include/dialog_window.html"; var sURL = this.getActionURL(); var arArgs = new Array(); arArgs[0] = sURL; arArgs[1] = window.location.href; arArgs[2] = _oArgs; try{ var sResult = window.showModelessDialog(sDialogUrl, arArgs, sFeatures); return sResult; }catch(e){ alert("鎮殑IE鎻掍欢宸茬粡灏嗗璇濇鎷埅锛乗n" + "璇?#28751;?#37815;埅鍘绘帀-->鐐瑰嚮閫鍑?->鍏抽棴IE锛岀劧鍚庨噸鏂版墦寮IE鐧诲綍鍗冲彲锛乗n" + "缁?#37806;?#38315;犳垚涓嶄究锛孴RS鑷翠互姝夋剰锛?); return true; } } /**@private*/ var m_oXMLHttpTemp = null; var INTERVAL_CHECK_XMLHTTP_STATE = 1000; /**@private*/ function CTRSAction_checkXMLHttpStatus(){ if(m_oXMLHttpTemp == null || m_oXMLHttpTemp.readyState == 4){ if(RunningProcessBar){ RunningProcessBar.close(); } if(m_oXMLHttpTemp.status != 200){ switch(m_oXMLHttpTemp.status){ case 401: //CTRSAction_alert("鎮?#37927;诲綍?#31220;鏃?#38171;?#29831;烽噸鏂?#37927;诲綍锛?); window.top.location.href = "../include/not_login.htm"; return null; default: CTRSAction_displyInfo(600, 600, m_oXMLHttpTemp.responseText); return null; } } m_oXMLHttpTemp = null; return; } setTimeout("CTRSAction_checkXMLHttpStatus();", INTERVAL_CHECK_XMLHTTP_STATE); } /** * 鍙?#37713;XMLHttp璇?#23033;? * @param {string} _sPostData 浼?#38315;佺殑鏁版嵁 * @param {boolean} _bAsync 鏄?#37722;?#28051;洪潪鍚?#23005;?#37826;瑰紡 * @param {boolean} _bStartingProcessBar ?#28522;鍚?#23005;?#37826;瑰紡?#27537;鏃?#37706;欐槸鍚?#37828;?#32448;?#26473;?#25652;?#37833;? */ function CTRSAction_doXMLHttpAction(_sPostData, _bAsync, _bStartingProcessBar){ //1.verify parameters if(!this.validateActionURL()) return; var bAsync = false; if(_bAsync)bAsync = true; var oXMLHttp = new ActiveXObject("Microsoft.XMLHTTP"); //寤虹珛XMLHTTP瀵硅薄 if(_bStartingProcessBar){ if(!RunningProcessBar){ CTRSAction_alert("Pleas include [../js/CRunningProcessBar.js]"); return; } RunningProcessBar.start(); try{ oXMLHttp.open("POST", this.getActionURL(), bAsync); oXMLHttp.send(_sPostData); }catch(e){ if(e == "[object Error]"){ alert("绯?#32513;?#23480;茬粡鍏抽棴锛?#29831;?#38315;鍑?#38171;?); window.top.window.close(); return null; } } m_oXMLHttpTemp = oXMLHttp; setTimeout("CTRSAction_checkXMLHttpStatus();", INTERVAL_CHECK_XMLHTTP_STATE); return; } oXMLHttp.open("POST", this.getActionURL(), bAsync); try{ oXMLHttp.send(_sPostData); if(oXMLHttp.status != 200){ switch(oXMLHttp.status){ case 401: //alert("鎮?#37927;诲綍?#31220;鏃?#38171;?#29831;烽噸鏂?#37927;诲綍锛?); //CTRSAction_displyInfo(600, 600, oXMLHttp.responseText); window.top.location.href = "../include/not_login.htm"; return null; default: CTRSAction_displyInfo(600, 600, oXMLHttp.responseText); return null; } } }catch(e){ if(e == "[object Error]"){ alert("绯?#32513;?#23480;茬粡鍏抽棴锛?#29831;?#38315;鍑?#38171;?); window.top.window.close(); return null; } } delete oXMLHttp; return oXMLHttp.responseText; } /** * 鍙?#37713;?#23534;瑰嚭绐?#37721;殑浜?#27996;?#29831;?#23033;? * @param {int} _nWidth 瀵?#29831;濇?#21975;搴? * @param {int} _nHeight 瀵?#29831;濇?#21979;珮搴? */ function CTRSAction_doOpenWinActionX(_sName, _bReplaced, _nWidth, _nHeight){ if(!this.validateActionURL()) return; var nWidth = _nWidth || (window.screen.availWidth - 20); var nHeight = _nHeight || (window.screen.availHeight - 40); var nLeft =(window.screen.availWidth - nWidth-10)/2; var nTop = (window.screen.availHeight - nHeight-20)/2; var sName = _sName || ""; var oWin = window.open(this.getActionURL(), sName, "top="+nTop+",left="+nLeft+",fullscreen =true,menubar =no,toolbar =no,width="+nWidth+",height="+nHeight+",scrollbars=yes,location =no,titlebar=no", _bReplaced); if(oWin == null){ alert("鎮殑IE鎻掍欢宸茬粡灏嗙獥鍙?#37815;埅锛乗n" + "璇?#28751;?#37815;埅鍘绘帀-->鐐瑰嚮閫鍑?->鍏抽棴IE锛岀劧鍚庨噸鏂版墦寮IE鐧诲綍鍗冲彲锛乗n" + "缁?#37806;?#38315;犳垚涓嶄究锛孴RS鑷翠互姝夋剰锛?); window.close(); }else{ oWin.opener = window; oWin.focus(); } //window.showModalDialog('../include/open_win.jsp', args,'dialogWidth:1px;dialogHeight:1px;dialogTop:1;dialogLeft:1;'); } function CTRSAction_doOpenWinAction(_nWidth, _nHeight){ this.doOpenWinActionX("", false, _nWidth, _nHeight); } /** * 鍙?#37713;?#28051;?#29999;?#23114;氬姩鏉?#28725;?#29831;濇浜?#27996;殑璇?#23033;? * @param {int} _nWidth 瀵?#29831;濇?#21975;搴? * @param {int} _nHeight 瀵?#29831;濇?#21979;珮搴? * @param {object} _oArgs 浼?#37711;?#28725;?#29831;濇?#21977;殑鍙傛暟锛堝彲?#20114;涓int string array htmlelement锛?#37711;?#28729;?#38007;?#28729;氫箟瀵硅薄涓嶈锛? * @throws 濡傛灉娴忚?#22557;?#32515;?#27996;?#37815;埅锛?#28028;?#23534;瑰嚭瑙櫎鎷埅鎻愮 * @return {object} 杩斿洖鍊? */ function CTRSAction_doNoScrollDialogAction(_nWidth, _nHeight, _oArgs){ //1.verify parameters if(!this.validateActionURL()) return; var nWidth = _nWidth || 200; var nHeight = _nHeight || 200; var nLeft = (window.screen.availWidth - nWidth)/2; var nTop = (window.screen.availHeight - nHeight)/2; //2.Construct parameters for dialog var sFeatures = "dialogHeight: "+nHeight+"px; dialogWidth: "+nWidth+"px; " + "dialogTop: "+nTop+"; dialogLeft: "+nLeft+"; " + "center: Yes; scroll:No;help: No; resizable: No; status: No;"; //3.display Dialog var sDialogUrl = TRSAction_ROOT_PATH + "/include/dialog_window.html"; var sURL = this.getActionURL(); var arArgs = new Array(); arArgs[0] = sURL; arArgs[1] = window.location.href; arArgs[2] = _oArgs; try{ var sResult = window.showModalDialog(sDialogUrl, arArgs, sFeatures); return sResult; }catch(e){ alert("鎮殑IE鎻掍欢宸茬粡灏嗗璇濇鎷埅锛乗n" + "璇?#28751;?#37815;埅鍘绘帀-->鐐瑰嚮閫鍑?->鍏抽棴IE锛岀劧鍚庨噸鏂版墦寮IE鐧诲綍鍗冲彲锛乗n" + "缁?#37806;?#38315;犳垚涓嶄究锛孴RS鑷翠互姝夋剰锛?); return true; } } /**@private*/ function CTRSAction_inheritParameters(){ this.oActionParam.setAllParameters(TRSRequestParam); } //Self Action 1----refreshMe /** * 鍒?#37826;?#35120;撳墠?#27537;椤?#38344;? */ function CTRSAction_refreshMe(){ var oTRSAction = new CTRSAction(); oTRSAction.doAction(); } //Self Action 2----gotoPage /** * 鍦?#37714;?#29723;?#26916;?#38344;?#28051;?#28729;氫?#23941;?#29256;寚瀹氬?#21979; * @param {int} _nPageIndex 椤?#38344;?#25652;?#37721;?#38171;?#28000;?寮濮? */ function CTRSAction_gotoPage(_nPageIndex){ var oTRSAction = new CTRSAction(); oTRSAction.setParameter("PageIndex", _nPageIndex); oTRSAction.doAction(); } //Self Action 3----doSearch /** * 鎸夌収Form涓殑鏁版嵁瀵瑰?#25779;墠椤?#38344;?#26473;?#29723;屾绱?#38171;?#28051;鑸?#25652;?#37922;?#37734;?#37714;?#29723;?#26916;?#38344;? * @param {Form} _oForm 妫绱?#37825;版嵁?#27537;Form瀵硅薄 */ function CTRSAction_doSearch(_oForm){ var oForm = _oForm; if(_oForm == null) oForm = document.frmSearch; var oTRSAction = new CTRSAction(); var arEls = oForm.elements;//get All data from the form for(var i = 0;i 200){ CTRSAction_displyReports(300, 200, "瀵?#28051;嶈v锛?#37806;緭鍏殑妫绱唴瀹硅繃闀?#38171;岃秴鍑?#37832;澶?#38336;?#25652;[200]锛?#29831;烽噸鏂緭鍏?#38171;?); return; } */ oTRSAction.setParameter(arEls[i].name, sValue); } //oTRSAction.setParameter("SearchKey", oForm.SearchKey.value); //oTRSAction.setParameter("SearchValue", oForm.SearchValue.value); oTRSAction.setParameter("PageIndex", 1); oTRSAction.doAction(); } //Self Action 4----doOrderBy /** * 鎸夌収?#23514;瀹殑鏂瑰紡瀵?#26916;?#38344;?#26473;?#29723;屾搴?#38171;?#25652;?#37922;?#37734;?#37714;?#29723;?#26916;?#38344;?#28051;? * @param {String} _sOrderField 鎺?#25652;忓?#26945; ƽʿ