Commit cf4059ae authored by wuzhilong's avatar wuzhilong

页面调整

parent 381f95ac
......@@ -113,11 +113,11 @@ public class PersonPostApi {
*/
@RequestMapping("uploadCancelPost")
@Transactional
public boolean uploadCancelPost(HttpServletRequest requ) {
public boolean uploadCancelPost(@RequestParam("importName") String importName,HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
String filename = "";
String name = requ.getParameter("name");
String name = requ.getParameter("importName");
DiskFileItemFactory factory = new DiskFileItemFactory();
// 设置缓冲区的大小为100KB,如果不指定,那么缓冲区的大小默认是10KB
......
......@@ -1230,6 +1230,17 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data)
})
},
uploadCancelPost:function(fd,importName,success){
$http({
method: 'POST',
url: "../personPostApi/uploadCancelPost?importName="+importName,
data: fd,
headers: {'Content-Type': undefined},
transformRequest: angular.identity
}).then(function successCallback(response) {
success(response.data)
})
},
selectFailedInfo:function(date1,date2,name,success){
// if($rootScope.loginData.roleList[0].process==2){
// name = "";
......
......@@ -33,6 +33,31 @@
</style>
<div class="content row">
<div class="col-md-12" style="margin-top:20px;">
<div class="box">
<strong class="box-header with-border">导入制证审核不通过文件</strong>
<div class="box box-primary">
<table class="table table-bordered">
<tr>
<td width="15%">选择Excel文件:</td>
<td width="40%">
<input type="file"
id="fileAF"
class="file"
data-show-preview="false"
data-allowed-file-extensions='["XLS","xls","XLSX","xlsx"]'
multiple/>
</td>
<td>
<div style="float: left">
<button class="btn btn-primary" ng-click="uploadFile()">导入</button>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="box" ng-if="loginData.roleList[0].process!=2">
<strong class="box-header">制证审核不通过记录</strong>
<div class="box box-primary">
......
......@@ -30,6 +30,15 @@ angular.module('AvatarCheck.addAuditFailure', ['ngRoute', 'AvatarCheck.http'])
});
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
//初始化文件上传控件
$("#fileAF").fileinput({
language: 'zh',
showUpload: false,
showCaption: true,
maxFileCount: 1024,
showPreview: true,
maxFileSize: 1024 * 30
});
//查询
$scope.aselectAF = function () {
var begDate = $('#datepicker1').val();
......@@ -106,4 +115,39 @@ angular.module('AvatarCheck.addAuditFailure', ['ngRoute', 'AvatarCheck.http'])
});
});
};
//上传审核不通过文件
$scope.uploadFile = function () {
var importName = $rootScope.loginData.name;
var fd = new FormData();
var files = document.querySelector('input#fileAF').files;
if(files.length==0){
MessageService.showAlert("请选择上传的文件...")
}else{
for(var i in files){
fd.append('file', files[i]);
}
ngDialog.openConfirm({
template: 'dialogs/alert.html' + urlTimeStamp(),
width: 600,
cache: false,
closeByDocument:false,
controller: ['$scope', function ($scope) {
$scope.wrongMsg =-1;
$scope.msgText = "上传中,请稍等...";
console.log(fd,importName);
HttpService.uploadCancelPost(fd,importName,function (data) {
$scope.msgText = data;
console.log(data)
// if(data){
// $scope.closeThisDialog();
// }else{
// $scope.wrongMsg = '上传失败';
// }
})
}]
});
}
}
});
\ 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