Commit bf9b83cb authored by chase's avatar chase

修改档案管理公司展示 excel预览

parent ca45bee9
......@@ -129,6 +129,10 @@ public class TaxDocumentServiceImpl {
criteria.andBusinessLineEqualTo(taxDocumentDto.getBusinessLine());
}
//公司名称 companyName
if (StringUtils.isNotBlank(taxDocumentDto.getCompanyId())) {
criteria.andCompanyIdEqualTo(taxDocumentDto.getCompanyId());
}
//公司名称 companyName
if (StringUtils.isNotBlank(taxDocumentDto.getCompanyName())) {
criteria.andCompanyNameEqualTo(taxDocumentDto.getCompanyName());
}
......
......@@ -478,16 +478,18 @@
<span translate="CorporationName"></span>
</div>
<div class="TDL-query-val">
<select ng-model="queryFieldModel.companyName" class="form-control radius3"
title="{{queryFieldModel.companyName}}" required
ng-change="matchCompanyId(queryFieldModel,companyNameOptionsMap)"
placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-slected="queryFieldModel.companyName == companyName"
value="{{companyName}}">{{companyName}}
</option>
</select>
<div dx-select-box="queryOrgOptions"></div>
<!--<select ng-model="queryFieldModel.companyName" class="form-control radius3"-->
<!--title="{{queryFieldModel.companyName}}" required-->
<!--ng-change="matchCompanyId(queryFieldModel,companyNameOptionsMap)"-->
<!--placeholder="{{'PleaseSelected' | translate}}">-->
<!--<option value=""></option>-->
<!--<option ng-repeat="(key,companyName) in companyNameOptionsMap"-->
<!--ng-slected="queryFieldModel.companyName == companyName"-->
<!--value="{{companyName}}">{{companyName}}-->
<!--</option>-->
<!--</select>-->
</div>
</div>
<div class="TDL-query-block">
......@@ -744,16 +746,18 @@
{{'CorporationName' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%" id="companyNameOptionsMap">
<select ng-model="editFieldModel.companyName" class="form-control"
title="{{editFieldModel.companyName}}" required
ng-change="matchCompanyId(editFieldModel,companyNameOptionsMap)"
placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-selected="(editFieldModel.companyName == companyName)"
value="{{companyName}}">{{companyName}}
</option>
</select>
<div dx-select-box="editOrgOptions"></div>
<!--<select ng-model="editFieldModel.companyName" class="form-control"-->
<!--title="{{editFieldModel.companyName}}" required-->
<!--ng-change="matchCompanyId(editFieldModel,companyNameOptionsMap)"-->
<!--placeholder="{{'PleaseSelected' | translate}}">-->
<!--<option value=""></option>-->
<!--<option ng-repeat="(key,companyName) in companyNameOptionsMap"-->
<!--ng-selected="(editFieldModel.companyName == companyName)"-->
<!--value="{{companyName}}">{{companyName}}-->
<!--</option>-->
<!--</select>-->
</div>
</div>
<div class="col-sm-6 form-group">
......@@ -986,17 +990,19 @@
{{'CorporationName' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<select ng-model="editFieldItem.companyName" class="form-control"
title="{{editFieldItem.companyName}}"
ng-class="{'upload-fail-mark':!editFieldItem.companyName}"
ng-change="matchCompanyId(editFieldItem,companyNameOptionsMap)"
placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-selected="(editFieldItem.companyName == companyName)"
value="{{companyName}}">{{companyName}}
</option>
</select>
<div dx-select-box="editFieldItemOrgOptions"></div>
<!--<select ng-model="editFieldItem.companyName" class="form-control"-->
<!--title="{{editFieldItem.companyName}}"-->
<!--ng-class="{'upload-fail-mark':!editFieldItem.companyName}"-->
<!--ng-change="matchCompanyId(editFieldItem,companyNameOptionsMap)"-->
<!--placeholder="{{'PleaseSelected' | translate}}">-->
<!--<option value=""></option>-->
<!--<option ng-repeat="(key,companyName) in companyNameOptionsMap"-->
<!--ng-selected="(editFieldItem.companyName == companyName)"-->
<!--value="{{companyName}}">{{companyName}}-->
<!--</option>-->
<!--</select>-->
</div>
</div>
<div class="col-sm-6 form-group">
......@@ -1398,28 +1404,13 @@
</div>
</div>-->
<div class="modal fade" id="filePreviewPop" file-preview tabindex="-1" role="dialog" aria-labelledby="myModal"
data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:80%;" role="document">
<div class="modal-content">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideFilePreviewPop()">×</span>
<div class="modal-title">{{currentSheetName}}</div>
</div>
<div class="modal-body">
<div class="dx-viewport demo-container" id="preview_dataGrid">
</div>
</div>
</div>
<button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-prev" ng-click="prevPaging_xls()" title="上一页">&lt;
</button>
<button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-next" ng-click="nextPaging_xls()" title="下一页">&gt;
</button>
<div class="TDL-pdf-layout-dialog" id="filePreviewPop" file-preview >
<div class="wrapper TDL-pdf-preview-pop" id="excetlContainer">
</div>
</div>
<button class="TDL-pdf-preview-pop-close-btn" ng-click="hideFilePreviewPop()">×</button>
</div>
<div class="modal fade" id="uploadResultPop" tabindex="-1" role="dialog" aria-labelledby="myModal"
data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:60%;max-width:960px" role="document">
......
......@@ -165,6 +165,33 @@ taxDocumentManageModule.factory('taxDocumentListService',
xhr.send(JSON.stringify(params));
return defer.promise;
},
viewExcelBySpread:function (url) {
var deferred = $q.defer();
var promise = deferred.promise;
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true); // 也可以使用POST方式,根据接口
xhr.responseType = "blob"; // 返回类型blob
// 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑
xhr.onload = function () {
// 请求完成
if (this.status === 200) {
// 返回200
var blob = this.response;
var excelIo = new GC.Spread.Excel.IO();
excelIo.open(blob, function (json) {
deferred.resolve(json);
}, function (e) {
// console.error(e.errorMessage);
//alert(e.errorMessage);
deferred.reject(e.errorMessage);
}, {});
}
};
// 发送ajax请求
xhr.send();
return promise;
}
};
}]);
\ No newline at end of file
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