<button class="btn btn-success " id="downloadExl">{$Think.lang.m242}</button>
<a href="" download="excel.xlsx" id="hf_active"></a>
$("#downloadExl").on("click", function () {
var data = {};
var begindate = $("#begindate").val();
var enddate = $("#enddate").val();
if (begindate != '') {
data.begindate = begindate;
}
if (enddate != '') {
data.enddate = enddate;
}
if (enddate == '' || begindate == '') {
alert('请同时选择导出开始时间和结束时间!');
} else {
$.ajax({
type: "post",
url: "",
data: data,
dataType: 'json',
success: function (res) {
if (res.code == 200) {
var jsono = res.data;
var tmpDown;
downloadExl(jsono, 'xlsx&#