Commit f017d515 authored by neo's avatar neo

[Bugfix] fixed export excell with loading bar

parent 2e790698
......@@ -987,6 +987,7 @@
$q.all(promiss).then(function () {
//重新排序报表
$('#busy-indicator-container').show();
exportReportData = _.sortBy(exportReportData, function (item) {
return item.orderIndex;
});
......@@ -1020,6 +1021,7 @@
function exportSpread(exportReportData) {
$scope.exportReportData = exportReportData;
$timeout(function () {
$('#busy-indicator-container').show();
var mainSpread = new GC.Spread.Sheets.Workbook(document.getElementById("export"), {sheetCount: 1});
mainSpread.isPaintSuspended(true);
mainSpread.sheets.pop();
......@@ -1037,12 +1039,15 @@
mainSpread.sheets.push(currentSheet);
}
var excelIo = new GC.Spread.Excel.IO();
// here is excel IO API
excelIo.save(mainSpread.toJSON(), function (blob) {
saveAs(blob, vatSessionService.project.name+'-'+vatSessionService.month+'-纳税申报.xlsx');
$('#busy-indicator-container').hide();
}, function (e) {
alert(e);
$('#busy-indicator-container').hide();
});
// vatExportService.exportReport(content).success(function (data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment