Commit 03b716e9 authored by chase's avatar chase

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents 113c6969 6a08a26c
......@@ -73,8 +73,12 @@ public class POIUtil {
if (null != cell.getCellComment()) {
targetCell.setCellComment(cell.getCellComment());
}
if (null != cell.getCellStyle()) {
targetCell.getCellStyle().cloneStyleFrom(cell.getCellStyle());
if (null != cell.getCellStyle() && targetCell.getCellStyle() != null ) {
try{
targetCell.getCellStyle().cloneStyleFrom(cell.getCellStyle());
}catch (Exception e){
//e.printStackTrace();
}
}
if (null != cell.getHyperlink()) {
targetCell.setHyperlink(cell.getHyperlink());
......
......@@ -2933,15 +2933,16 @@
});
//上传模板
$scope.upload = function (file) {
var _file = $scope.importExcelFile;
if(file == null)
return
frontImport(file);
frontImport(_file);
var token = $('input[name="__RequestVerificationToken"]').val();
var url = apiInterceptor.vatWebApiHostUrl + '/templateGroup/ebitTemplateImport';
Upload.upload(
{
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: {
'Access-Control-Allow-Origin': '*',
Authorization: apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()
......@@ -2968,10 +2969,6 @@
//前端导入
var frontImport = function(file){
alert(typeof file);
if(typeof file != Blob){
file = new Blob(file);
}
if($scope.spread != undefined && $scope.spread){
var excelIo = new GC.Spread.Excel.IO();
excelIo.open(file, function (json) {
......
......@@ -22,7 +22,7 @@
</div>
</div>
<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>
<span ng-click="saveAndRefresh()"><i class="fa fa-refresh"></i>&nbsp;{{'saveAndRefresh' | translate}}</span>
<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