Commit f76ca39d authored by chase's avatar chase

merge

parent 8328fd4b
...@@ -50,8 +50,7 @@ public class TaxDocumentController { ...@@ -50,8 +50,7 @@ public class TaxDocumentController {
@PostMapping("add") @PostMapping("add")
@ResponseBody @ResponseBody
public boolean addTaxDocument(@RequestBody TaxDocument taxDocument, public boolean addTaxDocument(@RequestBody TaxDocument taxDocument,
@RequestPart("file") MultipartFile file, @RequestParam MultipartFile file) {
@RequestParam(required = false) String modual) {
return taxDocumentService.addTaxDocumentList(file,taxDocument); return taxDocumentService.addTaxDocumentList(file,taxDocument);
} }
......
...@@ -53,9 +53,13 @@ public class TaxDocumentServiceImpl { ...@@ -53,9 +53,13 @@ public class TaxDocumentServiceImpl {
if(CollectionUtils.isNotEmpty(uploadDetail.getList())){ if(CollectionUtils.isNotEmpty(uploadDetail.getList())){
urlMap = uploadDetail.getList().stream().collect(Collectors.toMap(DidiFileUploadDetailResult::getUid, didiFileUploadDetailResult -> didiFileUploadDetailResult.getViewHttpUrl())); urlMap = uploadDetail.getList().stream().collect(Collectors.toMap(DidiFileUploadDetailResult::getUid, didiFileUploadDetailResult -> didiFileUploadDetailResult.getViewHttpUrl()));
} }
if(urlMap!=null){
for(TaxDocument data:dataList){ for(TaxDocument data:dataList){
data.setFilePositionUrl(urlMap.get(data.getFileUploadId())); data.setFilePositionUrl(urlMap.get(data.getFileUploadId()));
} }
}
return dataList; return dataList;
} }
...@@ -87,7 +91,7 @@ public class TaxDocumentServiceImpl { ...@@ -87,7 +91,7 @@ public class TaxDocumentServiceImpl {
} }
//档案名称 fileName //档案名称 fileName
if (StringUtils.isNotBlank(taxDocumentDto.getFileName())) { if (StringUtils.isNotBlank(taxDocumentDto.getFileName())) {
criteria.andFileNameEqualTo(taxDocumentDto.getFileName()); criteria.andFileNameLike(taxDocumentDto.getFileName());
} }
//业务线 businessLine //业务线 businessLine
if (StringUtils.isNotBlank(taxDocumentDto.getBusinessLine())) { if (StringUtils.isNotBlank(taxDocumentDto.getBusinessLine())) {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Created by Administrator on 2019/3/1 0001. * Created by Administrator on 2019/3/1 0001.
*/ */
taxDocumentManageModule.controller('taxDocumentListController', taxDocumentManageModule.controller('taxDocumentListController',
['$log', '$http', '$q', '$scope', '$translate', '$timeout', 'SweetAlert', '$compile', 'taxDocumentListService', '$filter', ['$log', '$http', '$q', '$scope', '$translate', '$timeout', 'SweetAlert', '$compile', 'taxDocumentListService', '$filter','apiInterceptor',
function ($log, $http, $q, $scope, $translate, $timeout, SweetAlert, $compile, taxDocumentListService, $filter) { function ($log, $http, $q, $scope, $translate, $timeout, SweetAlert, $compile, taxDocumentListService, $filter,apiInterceptor) {
$scope.queryFieldModel = {}; $scope.queryFieldModel = {};
$scope.editFieldModel = { $scope.editFieldModel = {
...@@ -267,13 +267,25 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -267,13 +267,25 @@ taxDocumentManageModule.controller('taxDocumentListController',
var uploadItem = $scope.uploader.queue[0]; var uploadItem = $scope.uploader.queue[0];
var fileName = uploadItem._file ? uploadItem._file.name : uploadItem.name; var fileName = uploadItem._file ? uploadItem._file.name : uploadItem.name;
uploadItem.formData = [ uploadItem.formData = [
{originFileName:fileName} {originFileName:fileName},
]; ];
Object.keys($scope.editFieldModel).forEach(function(key){
var fields = {};
if(/(ownTime|fileTime|effectiveTime)/.test(key)){
fields[key] = $scope.editFieldModel[key].split("-").join("/");
}else{
fields[key] = $scope.editFieldModel[key];
}
uploadItem.formData.push(fields);
});
// data == true,代表可以直接上传,否则属于覆盖行为 // data == true,代表可以直接上传,否则属于覆盖行为
if (data === true) { if (data === true) {
$scope.uploader.url = apiInterceptor.webApiHostUrl + "/taxDoc/add";
$scope.uploader.uploadItem(0); $scope.uploader.uploadItem(0);
$scope.isCoverOperation = false; $scope.isCoverOperation = false;
$('#busy-indicator-container').show();
// addLogicAfterUploadFile($scope.editFieldModel,'simple'); // addLogicAfterUploadFile($scope.editFieldModel,'simple');
} else { } else {
SweetAlert.swal({ SweetAlert.swal({
...@@ -289,7 +301,11 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -289,7 +301,11 @@ taxDocumentManageModule.controller('taxDocumentListController',
}, },
function (isConfirm) { function (isConfirm) {
if (isConfirm) { if (isConfirm) {
$scope.uploader.url = apiInterceptor.webApiHostUrl + "/taxDoc/edit";
$scope.uploader.uploadItem(0); $scope.uploader.uploadItem(0);
// editDocFileRecord($scope.editFieldModel, 'simple');
$('#busy-indicator-container').show();
$scope.isCoverOperation = true; $scope.isCoverOperation = true;
} }
}) })
...@@ -439,13 +455,11 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -439,13 +455,11 @@ taxDocumentManageModule.controller('taxDocumentListController',
} }
}); });
taxDocumentListService.getCompanyNameOptions().then(function(res){ taxDocumentListService.getCompanyNameOptions().then(function(res){
if (res && 0 === res.code) { if (res && 0 === res.code) {
angular.forEach(res.data, function (item) { angular.forEach(res.data, function (item) {
$scope.companyNameOptionsMap[item.id]=item.name; $scope.companyNameOptionsMap[item.id]=item.name;
}); });
console.log($scope.companyNameOptionsMap)
} else { } else {
SweetAlert.error($translate.instant('RevenueGetOrgError')); SweetAlert.error($translate.instant('RevenueGetOrgError'));
} }
...@@ -475,7 +489,7 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -475,7 +489,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope.cancelDocFileType = cancelDocFileType; $scope.cancelDocFileType = cancelDocFileType;
})(); })();
}]) }]);
taxDocumentManageModule.directive("multiDatePicker", function () { taxDocumentManageModule.directive("multiDatePicker", function () {
return { return {
restrict: "EA", restrict: "EA",
...@@ -624,7 +638,7 @@ taxDocumentManageModule.directive('fileUploader',function () { ...@@ -624,7 +638,7 @@ taxDocumentManageModule.directive('fileUploader',function () {
$("#uploadFilePlugin").click(); $("#uploadFilePlugin").click();
}; };
$scope.uploader = new FileUploader({ $scope.uploader = new FileUploader({
url: "http://etms.longi-silicon.com:8180/api/v1/taxDoc/upload", url: apiInterceptor.webApiHostUrl + "/taxDoc/add",
// autoUpload: true,//添加后,自动上传 // autoUpload: true,//添加后,自动上传
headers:{"Authorization":apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()}, headers:{"Authorization":apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()},
removeAfterUpload:true, removeAfterUpload:true,
...@@ -632,20 +646,14 @@ taxDocumentManageModule.directive('fileUploader',function () { ...@@ -632,20 +646,14 @@ taxDocumentManageModule.directive('fileUploader',function () {
$scope.uploader.filters.push({//xls限制 $scope.uploader.filters.push({//xls限制
name: 'fileTypeFilter', name: 'fileTypeFilter',
fn: function (item, options) { fn: function (item, options) {
// var type = item.name.split(".").pop();
// var matchResult = /xlsx|xls|pdf/i.test(type);
var fileNativePath = $("#uploadFilePlugin")[0].value; var fileNativePath = $("#uploadFilePlugin")[0].value;
var splitMark = /\//.test(fileNativePath) ? "/" : "\\"; var splitMark = /\//.test(fileNativePath) ? "/" : "\\";
var prevPath = fileNativePath.split(splitMark); var prevPath = fileNativePath.split(splitMark);
prevPath.pop(); prevPath.pop();
fileNativePath = prevPath.join(splitMark) + splitMark; fileNativePath = prevPath.join(splitMark) + splitMark;
// if(matchResult){
$scope.uploader.clearQueue(); $scope.uploader.clearQueue();
$scope.editFieldModel.fileNativePath = fileNativePath; $scope.editFieldModel.fileNativePath = fileNativePath;
$scope.editFieldModel.fileName = item.name; $scope.editFieldModel.fileName = item.name;
// $scope.uploader.addToQueue($("#uploadFilePlugin")[0].files[0]);
// $scope.uploader.queue[0] = $("#uploadFilePlugin")[0].files[0];
// }
return true; return true;
} }
}); });
...@@ -654,23 +662,39 @@ taxDocumentManageModule.directive('fileUploader',function () { ...@@ -654,23 +662,39 @@ taxDocumentManageModule.directive('fileUploader',function () {
}); });
$scope.uploader.onErrorItem = function(fileItem, response, status, headers) { $scope.uploader.onErrorItem = function(fileItem, response, status, headers) {
SweetAlert.warning($translate.instant('FailUpload')); SweetAlert.warning($translate.instant('FailUpload'));
$scope.uploader.clearQueue(); // $scope.uploader.cancelItem();
// $scope.uploader.clearQueue();
$scope.editFieldModel = {}; $scope.editFieldModel = {};
// console.info('onErrorItem', fileItem, response, status, headers);
$('#busy-indicator-container').hide();
}; };
// $scope.uploader.onCancelItem = function(fileItem, response, status, headers) { // $scope.uploader.onCancelItem = function(fileItem, response, status, headers) {
// console.info('onCancelItem', fileItem, response, status, headers); // console.info('onCancelItem', fileItem, response, status, headers);
// }; // };
$scope.uploader.onSuccessItem = function(fileItem, response, status, headers) { $scope.uploader.onSuccessItem = function(fileItem, response, status, headers) {
fileItem.filePositionUrl = response; // fileItem.filePositionUrl = response;
$scope.editFieldModel.filePositionUrl = response; // $scope.editFieldModel.filePositionUrl = response;
var title = $translate.instant("Uploaded");
if($scope.isCoverOperation) { if($scope.isCoverOperation) {
$scope.coverDocFileRecord($scope.editFieldModel, 'simple'); title = $translate.instant("Edited");
// $scope.coverDocFileRecord($scope.editFieldModel, 'simple');
} else { } else {
$scope.addLogicAfterUploadFile($scope.editFieldModel, 'simple'); title = $translate.instant("Uploaded");
// $scope.addLogicAfterUploadFile($scope.editFieldModel, 'simple');
} }
// console.info('onSuccessItem', arguments);
SweetAlert.swal({
title:title,
type: "success",
confirmButtonText: $translate.instant('Confirm'),
closeOnConfirm: true
},
function (isConfirm) {
if(isConfirm) $scope.loadMainData();
});
$('#simpleUploadPopDialog').modal('hide');
}; };
}] }]
} }
...@@ -709,7 +733,6 @@ taxDocumentManageModule.directive('multiFileUploader',function () { ...@@ -709,7 +733,6 @@ taxDocumentManageModule.directive('multiFileUploader',function () {
},500); },500);
$scope.multiUploader = new FileUploader({ $scope.multiUploader = new FileUploader({
url: "http://etms.longi-silicon.com:8180/api/v1/taxDoc/upload",
// autoUpload: true,//添加后,自动上传 // autoUpload: true,//添加后,自动上传
headers:{"Authorization":apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()}, headers:{"Authorization":apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()},
removeAfterUpload:true, removeAfterUpload:true,
...@@ -717,9 +740,6 @@ taxDocumentManageModule.directive('multiFileUploader',function () { ...@@ -717,9 +740,6 @@ taxDocumentManageModule.directive('multiFileUploader',function () {
$scope.multiUploader.filters.push({//xls限制 $scope.multiUploader.filters.push({//xls限制
name: 'fileTypeFilter', name: 'fileTypeFilter',
fn: function (item, options) { fn: function (item, options) {
// var type = item.name.split(".").pop();
// var matchResult = /xlsx|xls|pdf/i.test(type);
// if(matchResult){
var fileNativePath = $("#multiUploadFilePlugin")[0].value; var fileNativePath = $("#multiUploadFilePlugin")[0].value;
var splitMark = /\//.test(fileNativePath) ? "/" : "\\"; var splitMark = /\//.test(fileNativePath) ? "/" : "\\";
var prevPath = fileNativePath.split(splitMark); var prevPath = fileNativePath.split(splitMark);
...@@ -730,8 +750,6 @@ taxDocumentManageModule.directive('multiFileUploader',function () { ...@@ -730,8 +750,6 @@ taxDocumentManageModule.directive('multiFileUploader',function () {
fileName:item.name, fileName:item.name,
iShow:$scope.editFieldModel_multi.length === 0 iShow:$scope.editFieldModel_multi.length === 0
}); });
// }
// 根据需求,改为不做类型限制 // 根据需求,改为不做类型限制
return true; return true;
} }
...@@ -751,55 +769,59 @@ taxDocumentManageModule.directive('multiFileUploader',function () { ...@@ -751,55 +769,59 @@ taxDocumentManageModule.directive('multiFileUploader',function () {
$scope.multiUploadSuccessItems = []; $scope.multiUploadSuccessItems = [];
$scope.multiUploader.onCompleteAll = function () { $scope.multiUploader.onCompleteAll = function () {
if($scope.multiUploadErrorItems.length >=5){
//如果上传错误大于5个,直接取消上传行为
console.info("失败数量:",$scope.multiUploadErrorItems);
SweetAlert.warning($translate.instant('UploadLimit'));
}else{
console.info("成功数量:",$scope.multiUploadSuccessItems);
//先探测有没有覆盖的情况
$scope.editFieldModel_multi.forEach(function(fieldItem){
taxDocumentListService.verifyDuplicate(fieldItem).then(function(data){
//$scope.multiUploadSuccessItems的长度可以用作判断上传是否已经完成 $("#uploadResultPop").modal("show");
$scope.multiUploadSuccessItems.shift();
if (data === true) {
$scope.addLogicAfterUploadFile(fieldItem,'multi');
} else {
$scope.coverDocFileRecord(fieldItem,'multi');
}
});
});
}
$scope.multiUploader.clearQueue(); $('#multiUploadPopDialog').modal('hide');
// $scope.multiUploader.clearQueue();
}; };
$scope.multiUploader.onSuccessItem = function(fileItem,response) { $scope.multiUploader.onSuccessItem = function(fileItem,response) {
fileItem.filePositionUrl = response; // fileItem.filePositionUrl = response;
$scope.multiUploadSuccessItems.push(fileItem); $scope.multiUploadSuccessItems.push(fileItem);
// 存储返回的URL
$scope.editFieldModel_multi.forEach(function(modelItem){
if(modelItem.fileName === fileItem._file.name){
modelItem.filePositionUrl = response;
}
});
}; };
$scope.multiUploadSubmit = function(){ $scope.multiUploadSubmit = function(){
$scope.multiUploadErrorItems = []; $scope.multiUploadErrorItems = [];
$scope.multiUploadSuccessItems = []; $scope.multiUploadSuccessItems = [];
for(var i = 0; i < $scope.multiUploader.queue.length;i++){ for(var i = 0; i < $scope.multiUploader.queue.length;i++){
// 先设置uploader队列里每个文件的请求参数:fileOriginalName // 先设置uploader队列里每个文件的请求参数:fileOriginalName
var fileItem = $scope.multiUploader.queue[i]; var fileItem = $scope.multiUploader.queue[i];
fileItem.formData = [{ fileItem.formData = [{
fileOriginName:fileItem._file.name fileOriginName:fileItem.name ? fileItem.name : fileItem._file.name
}]; }];
var editFieldModel = $scope.editFieldModel_multi[i];
Object.keys(editFieldModel).forEach(function(key){
var fields = {};
if(/(ownTime|fileTime|effectiveTime)/.test(key)){
fields[key] = editFieldModel[key].split("-").join("/");
}else{
fields[key] = editFieldModel[key];
}
fileItem.formData.push(fields);
});
$scope.multiUploader.uploadItem(i);
(function(_i,_fileItem,_editFieldModel,_taxDocumentListService,_multiUploader){
_taxDocumentListService.verifyDuplicate(_editFieldModel).then(function(data){
if (data === true) {
_fileItem.url = apiInterceptor.webApiHostUrl + "/taxDoc/add";
} else {
_fileItem.url = apiInterceptor.webApiHostUrl + "/taxDoc/edit";
} }
_multiUploader.uploadItem(_i);
});
})(i,fileItem,editFieldModel,taxDocumentListService,$scope.multiUploader);
} }
};
$scope.confirmUploadResult = function(){
$('#uploadResultPop').modal('hide');
$scope.loadMainData();
};
}] }]
} }
}); });
...@@ -839,20 +861,36 @@ taxDocumentManageModule.directive('filePreview',function(){ ...@@ -839,20 +861,36 @@ taxDocumentManageModule.directive('filePreview',function(){
SweetAlert.warning($translate.instant('UnFile')); SweetAlert.warning($translate.instant('UnFile'));
} }
};*/ };*/
$scope.currentSheetName = '';
var sheetCurPageIndex = 0;
var sheetSumPages = 1;
var sheetPromise = null;
var cacheUrl = null;
$scope.viewRemoteFile = function (fileName, filePositionUrl) { $scope.prevPaging_xls = function(){
if(typeof filePositionUrl !== 'string' if(sheetCurPageIndex <= 0) return sheetCurPageIndex = 0;
|| filePositionUrl === 'null' sheetCurPageIndex --;
|| filePositionUrl === 'undefined') sheetPromise.then(function(resData){renderXLS(resData)})
return SweetAlert.warning($translate.instant('UnRecord')); };
$scope.nextPaging_xls = function(){
if(sheetCurPageIndex >= (sheetSumPages - 1)) return sheetCurPageIndex = sheetSumPages - 1;
sheetCurPageIndex ++;
sheetPromise.then(function(resData){renderXLS(resData)})
};
//区分文件类型 function getXLS(url){
var fileType = fileName.split(".").pop(); // return taxDocumentListService.getBinaryData('./bundles/MS Function list - Phase 1.xlsx');
if(/xlsx|xls/i.test(fileType)){ return taxDocumentListService.getBinaryData(url);
taxDocumentListService.getBinaryData(filePositionUrl).then(function(resData){ }
function renderXLS(resData){
try{ try{
var wb = window.XLSX.read(resData, {type:"array"}); var wb = window.XLSX.read(resData, {type:"array"});
var data = window.XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
sheetSumPages = wb.SheetNames.length;
$scope.currentSheetName = wb.SheetNames[sheetCurPageIndex];
var data = window.XLSX.utils.sheet_to_json(wb.Sheets[$scope.currentSheetName]);
// console.log(data); // console.log(data);
if(data && data.length){ if(data && data.length){
$scope.filePreview_dataGridUpdate(data); $scope.filePreview_dataGridUpdate(data);
...@@ -861,7 +899,22 @@ taxDocumentManageModule.directive('filePreview',function(){ ...@@ -861,7 +899,22 @@ taxDocumentManageModule.directive('filePreview',function(){
}catch(e){ }catch(e){
SweetAlert.warning(e.message); SweetAlert.warning(e.message);
} }
}); }
$scope.viewRemoteFile = function (fileName, filePositionUrl) {
if(typeof filePositionUrl !== 'string'
|| filePositionUrl === 'null'
|| filePositionUrl === 'undefined')
return SweetAlert.warning($translate.instant('UnRecord'));
//区分文件类型
var fileType = fileName.split(".").pop();
if(/xlsx|xls/i.test(fileType)){
if(cacheUrl !== filePositionUrl){
cacheUrl = filePositionUrl;
sheetPromise = getXLS(filePositionUrl);
}
sheetPromise.then(function(resData){renderXLS(resData)})
} }
else if(/pdf/i.test(fileType)){ else if(/pdf/i.test(fileType)){
// return SweetAlert.warning('暂时不支持PDF预览'); // return SweetAlert.warning('暂时不支持PDF预览');
...@@ -936,7 +989,7 @@ taxDocumentManageModule.directive('filePreview',function(){ ...@@ -936,7 +989,7 @@ taxDocumentManageModule.directive('filePreview',function(){
rowAlternationEnabled: true, //单双行颜色 rowAlternationEnabled: true, //单双行颜色
}; };
var dataGrid = $('<div dx-data-grid="filePreview_dataGridOptions">'); var dataGrid = $('<div dx-data-grid="filePreview_dataGridOptions">');
$("#preview_dataGrid").append(dataGrid); $("#preview_dataGrid").html("").append(dataGrid);
$compile(dataGrid)($scope); $compile(dataGrid)($scope);
}; };
...@@ -981,12 +1034,12 @@ taxDocumentManageModule.directive('pdfPreview',function(){ ...@@ -981,12 +1034,12 @@ taxDocumentManageModule.directive('pdfPreview',function(){
container.style.display = "none"; container.style.display = "none";
}; };
$scope.prevPaging = function(){ $scope.prevPaging = function(){
if(pdfCurPageIndex === 1) return; if(pdfCurPageIndex <= 1) return pdfCurPageIndex = 1;
pdfCurPageIndex --; pdfCurPageIndex --;
pdfPromise.then(function(pdf){renderPdf(pdf)}) pdfPromise.then(function(pdf){renderPdf(pdf)})
}; };
$scope.nextPaging = function(){ $scope.nextPaging = function(){
if(pdfCurPageIndex === pdfSumPages) return; if(pdfCurPageIndex >= pdfSumPages) return pdfCurPageIndex = pdfSumPages;
pdfCurPageIndex ++; pdfCurPageIndex ++;
pdfPromise.then(function(pdf){renderPdf(pdf)}) pdfPromise.then(function(pdf){renderPdf(pdf)})
}; };
......
...@@ -355,6 +355,7 @@ ...@@ -355,6 +355,7 @@
<div class="TDL-query-val"> <div class="TDL-query-val">
<select ng-model="queryFieldModel.companyName" class="form-control radius3" <select ng-model="queryFieldModel.companyName" class="form-control radius3"
title="{{queryFieldModel.companyName}}" required placeholder="{{'PleaseSelected' | translate}}"> title="{{queryFieldModel.companyName}}" required placeholder="{{'PleaseSelected' | translate}}">
<option selected></option>
<option ng-repeat="(key,companyName) in companyNameOptionsMap" <option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-click="queryFieldModel.companyId = key" ng-click="queryFieldModel.companyId = key"
value="{{companyName}}">{{companyName}}</option> value="{{companyName}}">{{companyName}}</option>
...@@ -614,7 +615,7 @@ ...@@ -614,7 +615,7 @@
{{'Duration' | translate}} {{'Duration' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:320px;" <input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:320px;"
class="form-control" ng-model="editFieldModel.ownTime" required class="form-control" ng-model="editFieldModel.ownTime" required
data-min-view="2"/> data-min-view="2"/>
</div> </div>
...@@ -624,7 +625,7 @@ ...@@ -624,7 +625,7 @@
{{'AvailabilityDate' | translate}} {{'AvailabilityDate' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:320px;" <input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:320px;"
class="form-control" ng-model="editFieldModel.fileTime" class="form-control" ng-model="editFieldModel.fileTime"
data-min-view="2"/> data-min-view="2"/>
</div> </div>
...@@ -632,7 +633,7 @@ ...@@ -632,7 +633,7 @@
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="DueDate"></label> <label class="col-sm-3 control-label" translate="DueDate"></label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:320px;" <input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:320px;"
class="form-control" ng-model="editFieldModel.effectiveTime" class="form-control" ng-model="editFieldModel.effectiveTime"
data-min-view="2"/> data-min-view="2"/>
</div> </div>
...@@ -821,7 +822,7 @@ ...@@ -821,7 +822,7 @@
{{'Duration' | translate}} {{'Duration' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:280px;" <input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:280px;"
class="form-control" ng-model="editFieldItem.ownTime" required class="form-control" ng-model="editFieldItem.ownTime" required
data-min-view="2"/> data-min-view="2"/>
</div> </div>
...@@ -831,7 +832,7 @@ ...@@ -831,7 +832,7 @@
{{'AvailabilityDate' | translate}} {{'AvailabilityDate' | translate}}
</label> </label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:280px;" <input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:280px;"
class="form-control" ng-model="editFieldItem.fileTime" class="form-control" ng-model="editFieldItem.fileTime"
data-min-view="2"/> data-min-view="2"/>
</div> </div>
...@@ -839,7 +840,7 @@ ...@@ -839,7 +840,7 @@
<div class="col-sm-6 form-group"> <div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="DueDate"></label> <label class="col-sm-3 control-label" translate="DueDate"></label>
<div class="col-sm-11" style="width:61.67%"> <div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:280px;" <input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:280px;"
class="form-control" ng-model="editFieldItem.effectiveTime" class="form-control" ng-model="editFieldItem.effectiveTime"
data-min-view="2"/> data-min-view="2"/>
</div> </div>
...@@ -903,7 +904,7 @@ ...@@ -903,7 +904,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideFilePreviewPop()">×</span> <span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideFilePreviewPop()">×</span>
<div class="modal-title">{{fileName}}</div> <div class="modal-title">{{currentSheetName}}</div>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="dx-viewport demo-container" id="preview_dataGrid"> <div class="dx-viewport demo-container" id="preview_dataGrid">
...@@ -911,6 +912,37 @@ ...@@ -911,6 +912,37 @@
</div> </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>
</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:80%;" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title">提示讯息</div>
</div>
<div class="modal-body">
<p ng-if="multiUploadSuccessItems.length">{{multiUploadSuccessItems.length}}个档案上传成功</p>
<ul>
<li ng-repeat="item in multiUploadSuccessItems">
<span>{{item._file.name}}</span>
</li>
</ul>
<p ng-if="multiUploadErrorItems.length">{{multiUploadErrorItems.length}}个档案上传失败</p>
<ul>
<li ng-repeat="item in multiUploadErrorItems">
<span>{{item._file.name}}</span>
</li>
</ul>
</div>
<div class="modal-footer">
<button class="btn btn-primary" translate="Confirm" ng-click="confirmUploadResult()"></button>
<!--<button type="button" class="btn btn-third" data-dismiss="modal" translate="Cancel"></button>-->
</div>
</div>
</div> </div>
</div> </div>
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Created by Administrator on 2019/3/1 0001. * Created by Administrator on 2019/3/1 0001.
*/ */
taxDocumentManageModule.factory('taxDocumentListService', taxDocumentManageModule.factory('taxDocumentListService',
['$q', 'apiConfig', 'jqFetch','apiInterceptor', ['$q', 'apiConfig', 'jqFetch', 'apiInterceptor',
function ($q, apiConfig, jqFetch,apiInterceptor) { function ($q, apiConfig, jqFetch, apiInterceptor) {
'use strict'; 'use strict';
return { return {
fetchMainList: function (params) { fetchMainList: function (params) {
...@@ -15,33 +15,35 @@ taxDocumentManageModule.factory('taxDocumentListService', ...@@ -15,33 +15,35 @@ taxDocumentManageModule.factory('taxDocumentListService',
editRecord: function (params) { editRecord: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/edit', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/edit', params);
}, },
verifyDuplicate:function(params){ verifyDuplicate: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/queryWhetherData', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/queryWhetherData', params);
}, },
getFileInfoOptions:function(params){ getFileInfoOptions: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/query4SelectionBox', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/query4SelectionBox', params);
}, },
getCompanyNameOptions:function(params){ getCompanyNameOptions: function (params) {
return jqFetch.get(apiInterceptor.webApiHostUrl + '/org/getMyOrgList', params); return jqFetch.get(apiInterceptor.webApiHostUrl + '/org/getMyOrgList', params);
}, },
delFileRecordItems:function(params){ delFileRecordItems: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/batchDelete', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/batchDelete', params);
}, },
getBinaryData:function(url){ getBinaryData: function (url) {
var defer = $q.defer(); var defer = $q.defer();
var oReq = new XMLHttpRequest(); var oReq = new XMLHttpRequest();
oReq.onload = function(e) { oReq.onload = function (e) {
var arraybuffer = oReq.response; var arraybuffer = oReq.response;
console.info("arraybuffer:",arraybuffer); console.info("arraybuffer:", arraybuffer);
defer.resolve(arraybuffer); defer.resolve(arraybuffer);
}; };
// oReq.open("GET", 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=', true);
oReq.open("GET", url, true); oReq.open("GET", url, true);
oReq.responseType = "arraybuffer"; oReq.responseType = "arraybuffer";
oReq.send(); oReq.send();
// return jqFetch.get(url,{},'arraybuffer');
return defer.promise; return defer.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