Authored by unknown

联盟报表提供导出全部功能

... ... @@ -11,31 +11,33 @@
<script>
document.write(addHead('市场报表管理', '联盟订单管理'));
</script>
<form id="searchForm" method="post" accept-charset="utf-8">
<div style="margin-left: 10px;margin-top: 10px">
<label>开始时间:</label>
<input class="easyui-datetimebox" id="beginTime">
<input class="easyui-datetimebox" id="beginTime" name="beginTime">
</input>
<label>结束时间:</label>
<input class="easyui-datetimebox" id="endTime" >
<input class="easyui-datetimebox" id="endTime" name="endTime">
</input>
<label>订单号:</label>
<input class="easyui-textbox" id="orderCode">
<input class="easyui-textbox" id="orderCode" name="orderCode">
</input>
<label>联盟用户ID:</label>
<input class="easyui-textbox" id="unionId">
<input class="easyui-textbox" id="unionId" name="unionId">
</input>
<label>渠道:</label>
<input class="easyui-textbox" id="unionType">
<input class="easyui-textbox" id="unionType" name="unionType">
</input>
<a id="searchBtn" style="margin-left: 20px" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-more'">查询</a>
<a id="exportButton" style="margin-left: 20px" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-more'">导出</a>
<!--<a id="exportAllButton" style="margin-left: 20px" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-more'">全部导出</a>-->
<a id="exportAllButton" style="margin-left: 20px" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-more'">全部导出</a>
</div>
</form>
</div>
<div region="center">
<div style="margin-left: 30px;margin-top: 20px; height: 500px;">
... ... @@ -247,6 +249,30 @@
}
});
$("#exportAllButton").linkbutton({
onClick : function() {
window.open(contextPath + "/batch/export.do?type=userOrdersServiceImpl&queryConf=" + JSON.stringify(getParams()));
}
});
function getParams() {
var paramsArray = $("#searchForm").serializeArray();
var params = {};
var orderCode = "";
for (var i = 0; i < paramsArray.length; i++ ) {
if (paramsArray[i].name == "orderCode") {
orderCode += paramsArray[i].value + ",";
} else {
params[paramsArray[i].name] = paramsArray[i].value;
}
}
if (orderCode.length != 0) {
params["orderCode"] = orderCode.substring(0, orderCode.length -1);
}
return params;
}
});
... ...