整体思想:获取当前url地址,替换其中字符串至想要跳转的位置
#1.获取当前url
var url = window.location.href;
#2.替换url地址
var index=url.indexOf("?")
var newurl = url.substring(0,index);
var reditUrl = "/order/ordlistbycondition";
var newurlreplace=newurl.replace("/order/toMakeBillNow", reditUrl);
#3.拼接跳转地址并且执行跳转
window.location.href =newurlreplace+"?cmakedate=&agentErpCode="+agentErpCode+"&pname=";
#4.实际效果