Index: ssts-web/src/main/webapp/js/common.js =================================================================== diff -u -r27391 -r27402 --- ssts-web/src/main/webapp/js/common.js (.../common.js) (revision 27391) +++ ssts-web/src/main/webapp/js/common.js (.../common.js) (revision 27402) @@ -99,55 +99,16 @@ /* *报表查询封装函数 */ -function seachReport(url,params,successCallback,errorCallback){ - var goodsName = params.goodsName || ''; - var goodsSearch = params.goodsSearch || ''; - - if(goodsName !== ''){ - var length = params.goodsName.split('%23').length; - - if(length > 1){ - var s1 = params.goodsName.split('%23')[0]; - var s2 = params.goodsName.split('%23')[1]; - params.goodsName = s1+'#'+s2; - } - } - - if(goodsSearch !== ''){ - var length = params.goodsSearch.split('%23').length; - - if(length > 1){ - var s1 = params.goodsSearch.split('%23')[0]; - var s2 = params.goodsSearch.split('%23')[1]; - params.goodsSearch = s1+'#'+s2; - } - } - - var str = ''; - +function seachReport(url,params){ + var html = ''; - window.open(encodeURI(url+'?'+str),'thisIframe','_self'); - /* - Ext.Ajax.request({ - url : url, - params : params, - method: 'GET', - success : function(response, options) { - console.log(response) - if(response.statusText == 'OK'){ - successCallback(response.responseText); - }else { - errorCallback('查询失败,请稍后再查!'); - } - }, - failure : function(response, options) { - console.log(response) - errorCallback('查询失败,请稍后再查!'); - } - });*/ + document.getElementById('thisIframe').contentWindow.document.body.innerHTML = html; + document.getElementById('thisIframe').contentWindow.document.getElementById("reportHiddenForm").action = url; + document.getElementById('thisIframe').contentWindow.document.getElementById("reportHiddenForm").submit(); } /**