Commit 104bdb39 authored by kevin's avatar kevin

fix

parent 99ae35cf
...@@ -73,8 +73,12 @@ public class POIUtil { ...@@ -73,8 +73,12 @@ public class POIUtil {
if (null != cell.getCellComment()) { if (null != cell.getCellComment()) {
targetCell.setCellComment(cell.getCellComment()); targetCell.setCellComment(cell.getCellComment());
} }
if (null != cell.getCellStyle()) { if (null != cell.getCellStyle() && targetCell.getCellStyle() != null ) {
targetCell.getCellStyle().cloneStyleFrom(cell.getCellStyle()); try{
targetCell.getCellStyle().cloneStyleFrom(cell.getCellStyle());
}catch (Exception e){
//e.printStackTrace();
}
} }
if (null != cell.getHyperlink()) { if (null != cell.getHyperlink()) {
targetCell.setHyperlink(cell.getHyperlink()); targetCell.setHyperlink(cell.getHyperlink());
......
...@@ -2933,15 +2933,16 @@ ...@@ -2933,15 +2933,16 @@
}); });
//上传模板 //上传模板
$scope.upload = function (file) { $scope.upload = function (file) {
var _file = $scope.importExcelFile;
if(file == null) if(file == null)
return return
frontImport(file); frontImport(_file);
var token = $('input[name="__RequestVerificationToken"]').val(); var token = $('input[name="__RequestVerificationToken"]').val();
var url = apiInterceptor.vatWebApiHostUrl + '/templateGroup/ebitTemplateImport'; var url = apiInterceptor.vatWebApiHostUrl + '/templateGroup/ebitTemplateImport';
Upload.upload( Upload.upload(
{ {
url: url, url: url,
data: {orgId : $scope.relation.orgId, period : $scope.relation.period}, file: file, data: {orgId : $scope.relation.orgId, period : $scope.relation.period}, file: _file,
headers: { headers: {
'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Origin': '*',
Authorization: apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken() Authorization: apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()
...@@ -2968,10 +2969,6 @@ ...@@ -2968,10 +2969,6 @@
//前端导入 //前端导入
var frontImport = function(file){ var frontImport = function(file){
alert(typeof file);
if(typeof file != Blob){
file = new Blob(file);
}
if($scope.spread != undefined && $scope.spread){ if($scope.spread != undefined && $scope.spread){
var excelIo = new GC.Spread.Excel.IO(); var excelIo = new GC.Spread.Excel.IO();
excelIo.open(file, function (json) { excelIo.open(file, function (json) {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</div> </div>
</div> </div>
<div class="col-sm-5" class="bar-export" style=" margin-top: 20px;width: 39%; float: right;"> <div class="col-sm-5" class="bar-export" style=" margin-top: 20px;width: 39%; float: right;">
<span ngf-select="" type="file" ng-model="importExcelFile" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false" <span ngf-select="" type="file" ng-model="importExcelFile" ngf-change="upload($files)" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false"
ngf-allow-dir="false" class="btn btn-vat-third" ><i class="fa fa-file">&nbsp;{{'uploadProfileTable' | translate}}</i></span> ngf-allow-dir="false" class="btn btn-vat-third" ><i class="fa fa-file">&nbsp;{{'uploadProfileTable' | translate}}</i></span>
<span ng-click="saveAndRefresh()"><i class="fa fa-refresh"></i>&nbsp;{{'saveAndRefresh' | translate}}</span> <span ng-click="saveAndRefresh()"><i class="fa fa-refresh"></i>&nbsp;{{'saveAndRefresh' | translate}}</span>
<span ng-click="singleExport()"><i <span ng-click="singleExport()"><i
......
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