下载文件流
作者:chrispy
//GET 下载
function dayDataDetailedDownloadExcel() {
var url = '/black/queryRecord/dayDataDetailedDownloadExcel';
var obj = {};
obj.companyId = '1'; //企业名称
obj.dateStart = '2'; //开始时间
obj.dateEnd = '3'; //结束时间
obj.y = '4'; //近1个月 ,近2个月 ,近3个月
var objVal = '?dateStart=' + obj.dateStart + '&dateEnd=' + obj.dateEnd + '&companyId=' + obj.companyId + '&y='+ obj.y +'';
window.open(url + objVal);
}
//POST 下载
function downloadExcel() {
var clientEvolve = $('#clientEvolve').attr('value'); //委托端进展
var agentEvolve = $('#agentEvolve').attr('value'); //催收端进展
var clientCompanyId = $('#clientCompanyId').attr('value'); //案件委托公司
var agentCompanyId = $('#agentCompanyId').attr('value'); //案件催收公司
var billDateStart = $('#billDateStart').html(); //账单周期开始
var billDateEnd = $('#billDateEnd').html(); //账单周期结束
var temp_form = document.createElement("form");
temp_form.action = "/case_center/acrSettlement/downloadExcel";
temp_form.target = "_blank";
temp_form.method = "post";
temp_form.style.display = "none";
var opt_1 = document.createElement("textarea");
opt_1.name = "clientEvolve";//委托端进展
opt_1.value = clientEvolve;
temp_form.appendChild(opt_1);
var opt_2 = document.createElement("textarea");
opt_2.name = "agentEvolve";//催收端进展
opt_2.value = agentEvolve;
temp_form.appendChild(opt_2);
var opt_3 = document.createElement("textarea");
opt_3.name = "clientCompanyId";//案件委托公司
opt_3.value = clientCompanyId;
temp_form.appendChild(opt_3);
var opt_4 = document.createElement("textarea");
opt_4.name = "agentCompanyId";//案件催收公司
opt_4.value = agentCompanyId;
temp_form.appendChild(opt_4);
var opt_5 = document.createElement("textarea");
opt_5.name = "billDateStart";//账单周期开始
opt_5.value = billDateStart;
temp_form.appendChild(opt_5);
var opt_6 = document.createElement("textarea");
opt_6.name = "billDateEnd";//账单周期结束
opt_6.value = billDateEnd;
temp_form.appendChild(opt_6);
document.body.appendChild(temp_form);
temp_form.submit();
}