Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
febd932a
Commit
febd932a
authored
Jul 22, 2024
by
guantiantian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
制证包管理增加格口文件信息展示
parent
91cbc36d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
339 additions
and
233 deletions
+339
-233
xmlAndSearch.html
...ain/resources/static/views/xmlAndSearch/xmlAndSearch.html
+37
-0
xmlAndSearch.js
src/main/resources/static/views/xmlAndSearch/xmlAndSearch.js
+302
-233
No files found.
src/main/resources/static/views/xmlAndSearch/xmlAndSearch.html
View file @
febd932a
...
...
@@ -29,6 +29,43 @@
</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-info"
style=
"padding-top: 0;"
>
<table
class=
"table table-bordered table-hover postTable"
ng-if=
"postPackageData.length>0"
>
<thead>
<tr>
<th>
NO.
</th>
<th>
文件ID
</th>
<th>
订单起始日期
</th>
<th>
订单截至日期
</th>
<th>
文件名
</th>
<th>
上传时间
</th>
<th>
解析状态
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"item in postPackageData"
>
<td>
{{$index+1}}
</td>
<td>
{{item.fileId}}
</td>
<td>
{{item.formStartTime | myDateFilter}}
</td>
<td>
{{item.formDeadline| myDateFilter}}
</td>
<td>
{{item.fileName}}
</td>
<td>
{{item.uploadDate | myDateFilter}}
</td>
<td
ng-if=
"item.state==0"
>
未解析
</td>
<td
ng-if=
"item.state==1"
>
已解析
</td>
<td>
<button
class=
"btn btn-danger"
ng-disabled=
"item.state==1"
ng-click=
"deletePostData(item.fileId,item.uploadDate)"
>
删除
</button>
</td>
</tr>
</tbody>
</table>
<div
class=
"box-body"
ng-if=
"postPackageData.length==0"
><h4>
暂无记录
</h4></div>
</div>
</div>
<div
class=
"box "
>
<strong
class=
"box-header with-border"
>
制证包上传
</strong>
<div
class=
"box box-primary"
>
...
...
src/main/resources/static/views/xmlAndSearch/xmlAndSearch.js
View file @
febd932a
'use strict'
;
"use strict"
angular
.
module
(
'AvatarCheck.xmlAndSearch'
,
[
'ngRoute'
,
'AvatarCheck.http'
,
'tm.pagination'
])
.
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/xmlAndSearch'
,
{
templateUrl
:
'views/xmlAndSearch/xmlAndSearch.html'
+
urlTimeStamp
(),
controller
:
'xmlAndSearchCtrl'
,
cache
:
false
});
}])
angular
.
module
(
"AvatarCheck.xmlAndSearch"
,
[
"ngRoute"
,
"AvatarCheck.http"
,
"tm.pagination"
,
])
.
config
([
"$routeProvider"
,
function
(
$routeProvider
)
{
$routeProvider
.
when
(
"/xmlAndSearch"
,
{
templateUrl
:
"views/xmlAndSearch/xmlAndSearch.html"
+
urlTimeStamp
(),
controller
:
"xmlAndSearchCtrl"
,
cache
:
false
,
})
},
])
.
controller
(
'xmlAndSearchCtrl'
,
function
(
$scope
,
$rootScope
,
HttpService
,
$interval
,
MessageService
,
$timeout
,
$filter
,
ngDialog
)
{
.
controller
(
"xmlAndSearchCtrl"
,
function
(
$scope
,
$rootScope
,
HttpService
,
$interval
,
MessageService
,
$timeout
,
$filter
,
ngDialog
)
{
$
(
"#id_file_photo_for_check"
).
fileinput
({
language
:
"zh"
,
showUpload
:
false
,
showCaption
:
true
,
maxFileCount
:
1024
,
showPreview
:
true
,
maxFileSize
:
1024
*
30
,
})
//Date picker
$
(
"#datepicker"
).
datetimepicker
({
minView
:
"month"
,
//选择日期后,不会再跳转去选择时分秒
language
:
"zh-CN"
,
format
:
"yyyy-mm-dd"
,
todayBtn
:
1
,
autoclose
:
1
,
})
$
(
"#dateGrid"
).
datetimepicker
({
minView
:
"month"
,
//选择日期后,不会再跳转去选择时分秒
language
:
"zh-CN"
,
format
:
"yyyy-mm-dd"
,
todayBtn
:
1
,
autoclose
:
1
,
})
//清除的代码
$
(
".glyphicon-remove"
).
click
(
function
()
{
$
(
$
(
$
(
this
).
parent
()).
prev
()).
val
(
""
)
})
$scope
.
choseDate
=
$filter
(
"date"
)(
new
Date
(),
"yyyy-MM-dd"
)
$scope
.
gridDate
=
$filter
(
"date"
)(
new
Date
(),
"yyyy-MM-dd"
)
$
(
"#id_file_photo_for_check"
).
fileinput
({
language
:
'zh'
,
showUpload
:
false
,
showCaption
:
true
,
maxFileCount
:
1024
,
showPreview
:
true
,
maxFileSize
:
1024
*
30
});
//Date picker
$
(
'#datepicker'
).
datetimepicker
({
minView
:
"month"
,
//选择日期后,不会再跳转去选择时分秒
language
:
'zh-CN'
,
format
:
'yyyy-mm-dd'
,
todayBtn
:
1
,
autoclose
:
1
});
$
(
'#dateGrid'
).
datetimepicker
({
minView
:
"month"
,
//选择日期后,不会再跳转去选择时分秒
language
:
'zh-CN'
,
format
:
'yyyy-mm-dd'
,
todayBtn
:
1
,
autoclose
:
1
});
//清除的代码
$
(
".glyphicon-remove"
).
click
(
function
(){
$
(
$
(
$
(
this
).
parent
()).
prev
()).
val
(
""
);
})
$scope
.
choseDate
=
$filter
(
"date"
)(
new
Date
(),
"yyyy-MM-dd"
);
$scope
.
gridDate
=
$filter
(
"date"
)(
new
Date
(),
"yyyy-MM-dd"
);
$scope
.
paginationConf
=
{
currentPage
:
1
,
itemsPerPage
:
10
,
perPageOptions
:
[
10
,
20
,
30
,
40
,
50
]
};
$scope
.
getXmlPackage
=
function
(){
if
(
$scope
.
paginationConf
.
currentPage
!=
1
){
$scope
.
paginationConf
.
currentPage
=
1
;
$scope
.
paginationConf
.
itemsPerPage
=
10
;
}
else
{
$scope
.
getXmlPackagePage
();
}
}
$scope
.
getXmlPackagePage
=
function
(){
// if($scope.paginationConf.currentPage==0){
// $scope.paginationConf.currentPage=1;
// }
HttpService
.
selectXmlPackage
(
$
(
"#datepicker"
).
val
(),
$scope
.
paginationConf
.
currentPage
,
$scope
.
paginationConf
.
itemsPerPage
,
function
(
data
){
$scope
.
paginationConf
.
totalItems
=
data
.
respData
.
count
;
$scope
.
xmlPackageData
=
data
.
respData
.
mapList
;
console
.
log
(
$scope
.
xmlPackageData
,
"$scope.xmlPackageData"
)
})
$scope
.
paginationConf
=
{
currentPage
:
1
,
itemsPerPage
:
10
,
perPageOptions
:
[
10
,
20
,
30
,
40
,
50
],
}
$scope
.
getXmlPackage
=
function
()
{
if
(
$scope
.
paginationConf
.
currentPage
!=
1
)
{
$scope
.
paginationConf
.
currentPage
=
1
$scope
.
paginationConf
.
itemsPerPage
=
10
}
else
{
$scope
.
getXmlPackagePage
()
}
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope
.
$watch
(
'paginationConf.currentPage +paginationConf.itemsPerPage'
,
$scope
.
getXmlPackagePage
);
var
getData
=
$scope
.
getXmlPackage
;
// $scope.analysis = function (uploadDate,packageCount) {
// ngDialog.open({
// template: 'dialogs/analysisDialog.html' + urlTimeStamp(),
// width: 977,
// cache: false,
// controller: ['$scope','HttpService', function ($scope,HttpService) {
// $scope.wrongMsg = -1;
// $scope.upDate =uploadDate;
// $scope.upCount=packageCount;
// HttpService.analyseData($("#dateGrid").val(), function (data) {
// $scope.resultData = data;
// console.log($scope.resultData)
// })
// $scope.analyseToUpdateIfPost=function(fileid){
// console.log(uploadDate)
// HttpService.analyseToUpdateIfPostCard(fileid,uploadDate,function(data){
// if(data){
// $scope.wrongMsg = "解析完成"
// // $scope.closeThisDialog();
// // MessageService.showAlert("解析完成")
// getData();
// }else{
// $scope.wrongMsg = "解析失败,请联系管理员!"
// }
// })
// }
// $scope.UpdateIdcard=function(fileid){
// HttpService.analyseToUpdateIdcard(fileid,function(data){
// if(data){
// $scope.wrongMsg = "清除标记成功"
// getData();
// }else{
// $scope.wrongMsg = "清除标记失败"
// }
// })
// }
//
// }]
// });
//
}
$scope
.
getXmlPackagePage
=
function
()
{
// if($scope.paginationConf.currentPage==0){
// $scope.paginationConf.currentPage=1;
// }
$scope
.
analysis
=
function
(
uploadDate
)
{
HttpService
.
analyseToUpdateIfPostCard
(
uploadDate
,
function
(
data
){
if
(
data
){
MessageService
.
showAlert
(
"解析完成"
)
getData
();
}
else
{
MessageService
.
showAlert
(
"解析失败,请联系管理员!"
)
}
})
}
HttpService
.
selectXmlPackage
(
$
(
"#datepicker"
).
val
(),
$scope
.
paginationConf
.
currentPage
,
$scope
.
paginationConf
.
itemsPerPage
,
function
(
data
)
{
$scope
.
paginationConf
.
totalItems
=
data
.
respData
.
count
$scope
.
xmlPackageData
=
data
.
respData
.
mapList
console
.
log
(
$scope
.
xmlPackageData
,
"$scope.xmlPackageData"
)
}
)
}
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope
.
$watch
(
"paginationConf.currentPage +paginationConf.itemsPerPage"
,
$scope
.
getXmlPackagePage
)
$scope
.
check
=
function
(
uploadDate
)
{
ngDialog
.
open
({
template
:
'dialogs/checkDialog.html'
+
urlTimeStamp
(),
width
:
876
,
cache
:
false
,
controller
:
[
'$scope'
,
'HttpService'
,
function
(
$scope
,
HttpService
)
{
HttpService
.
checkData
(
uploadDate
,
function
(
data
)
{
$scope
.
list
=
data
;
})
}]
});
}
$scope
.
uploadXml
=
function
()
{
var
fd
=
new
FormData
();
var
files
=
document
.
querySelector
(
'input#id_file_photo_for_check'
).
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
=
"/////上传中,请稍等.../////"
HttpService
.
uploadPackage
(
fd
,
function
(
data
)
{
if
(
angular
.
equals
(
data
.
code
,
"200"
)){
// $scope.closeThisDialog();
$scope
.
msgText
=
"上传成功!"
;
}
else
{
$scope
.
msgText
=
""
;
$scope
.
wrongMsg
=
data
.
errMsg
;
}
getData
();
//获取导入数据信息
})
}]
});
var
getData
=
$scope
.
getXmlPackage
// $scope.analysis = function (uploadDate,packageCount) {
// ngDialog.open({
// template: 'dialogs/analysisDialog.html' + urlTimeStamp(),
// width: 977,
// cache: false,
// controller: ['$scope','HttpService', function ($scope,HttpService) {
// $scope.wrongMsg = -1;
// $scope.upDate =uploadDate;
// $scope.upCount=packageCount;
// HttpService.analyseData($("#dateGrid").val(), function (data) {
// $scope.resultData = data;
// console.log($scope.resultData)
// })
// $scope.analyseToUpdateIfPost=function(fileid){
// console.log(uploadDate)
// HttpService.analyseToUpdateIfPostCard(fileid,uploadDate,function(data){
// if(data){
// $scope.wrongMsg = "解析完成"
// // $scope.closeThisDialog();
// // MessageService.showAlert("解析完成")
// getData();
// }else{
// $scope.wrongMsg = "解析失败,请联系管理员!"
// }
// })
// }
// $scope.UpdateIdcard=function(fileid){
// HttpService.analyseToUpdateIdcard(fileid,function(data){
// if(data){
// $scope.wrongMsg = "清除标记成功"
// getData();
// }else{
// $scope.wrongMsg = "清除标记失败"
// }
// })
// }
//
// }]
// });
//
// }
$scope
.
analysis
=
function
(
uploadDate
)
{
HttpService
.
analyseToUpdateIfPostCard
(
uploadDate
,
function
(
data
)
{
if
(
data
)
{
MessageService
.
showAlert
(
"解析完成"
)
getData
()
}
else
{
MessageService
.
showAlert
(
"解析失败,请联系管理员!"
)
}
})
}
$scope
.
check
=
function
(
uploadDate
)
{
ngDialog
.
open
({
template
:
"dialogs/checkDialog.html"
+
urlTimeStamp
(),
width
:
876
,
cache
:
false
,
controller
:
[
"$scope"
,
"HttpService"
,
function
(
$scope
,
HttpService
)
{
HttpService
.
checkData
(
uploadDate
,
function
(
data
)
{
$scope
.
list
=
data
})
},
],
})
}
}
$scope
.
uploadXml
=
function
()
{
var
fd
=
new
FormData
()
var
files
=
document
.
querySelector
(
"input#id_file_photo_for_check"
).
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
=
"/////上传中,请稍等.../////"
HttpService
.
uploadPackage
(
fd
,
function
(
data
)
{
if
(
angular
.
equals
(
data
.
code
,
"200"
))
{
// $scope.closeThisDialog();
$scope
.
msgText
=
"上传成功!"
}
else
{
$scope
.
msgText
=
""
$scope
.
wrongMsg
=
data
.
errMsg
}
getData
()
//获取导入数据信息
})
},
],
})
}
}
var
reGet
=
$scope
.
getXmlPackage
;
$scope
.
deleteDataById
=
function
(
uploadDate
,
packageCount
){
ngDialog
.
open
({
template
:
'dialogs/confirm.html'
+
urlTimeStamp
(),
width
:
600
,
cache
:
false
,
closeByDocument
:
false
,
controller
:
[
'$scope'
,
function
(
$scope
)
{
$scope
.
wrongMsg
=-
1
;
$scope
.
total
=
packageCount
;
$scope
.
importDate
=
uploadDate
;
$scope
.
confirmDelete
=
function
()
{
HttpService
.
deleteProdDataByFileId
(
uploadDate
,
function
(
data
)
{
if
(
data
.
state
==
1
){
$scope
.
closeThisDialog
();
reGet
();
}
else
{
$scope
.
wrongMsg
=
data
.
msg
;
}
var
reGet
=
$scope
.
getXmlPackage
$scope
.
deleteDataById
=
function
(
uploadDate
,
packageCount
)
{
ngDialog
.
open
({
template
:
"dialogs/confirm.html"
+
urlTimeStamp
(),
width
:
600
,
cache
:
false
,
closeByDocument
:
false
,
controller
:
[
"$scope"
,
function
(
$scope
)
{
$scope
.
wrongMsg
=
-
1
$scope
.
total
=
packageCount
$scope
.
importDate
=
uploadDate
$scope
.
confirmDelete
=
function
()
{
HttpService
.
deleteProdDataByFileId
(
uploadDate
,
function
(
data
)
{
if
(
data
.
state
==
1
)
{
$scope
.
closeThisDialog
()
reGet
()
}
else
{
$scope
.
wrongMsg
=
data
.
msg
}
})
}
},
],
})
}
})
};
// $scope.analysisMachineAcceptList = function(item) {
// ngDialog.open({
// template: 'dialogs/analysisMachineDialog.html' + urlTimeStamp(),
// width: 950,
// cache: false,
// closeByDocument:false,
// controller: ['$scope','HttpService', function ($scope,HttpService) {
//
// HttpService.getTypeList(function(data) {
// $scope.typeList = data;
// console.log($scope.typeList)
// });
//
// $scope.wrongMsg = -1;
// $scope.upDate =item.date;
// $scope.upCount=item.packageCount;
// HttpService.analyseMachineData($("#dateGrid").val(), function (data) {
// $scope.resultData = data;
// console.log(data)
// })
// $scope.analyseMachinePackage=function(fileid){
// var cardType = $("#cardType").val();
// console.log(fileid,item.date,cardType)
// HttpService.analysisMachineAcceptListData(fileid,item.date,cardType,function(data){
// if(data){
// $scope.wrongMsg = "解析完成"
// // $scope.closeThisDialog();
// // MessageService.showAlert("解析完成")
// getData();
// }else{
// $scope.wrongMsg = "解析失败"
// }
// })
// }
// $scope.UpdateIdcard=function(fileid){
// HttpService.analyseToUpdateIdcard(fileid,function(data){
// if(data){
// $scope.wrongMsg = "清除标记成功"
// getData();
// }else{
// $scope.wrongMsg = "清除标记失败"
// }
// })
// }
// }]
// });
// }
}]
});
}
$scope
.
paginationPostConf
=
{
currentPage
:
1
,
itemsPerPage
:
10
,
perPageOptions
:
[
5
,
10
,
15
,
20
,
25
],
}
// $scope.analysisMachineAcceptList = function(item) {
// ngDialog.open({
// template: 'dialogs/analysisMachineDialog.html' + urlTimeStamp(),
// width: 950,
// cache: false,
// closeByDocument:false,
// controller: ['$scope','HttpService', function ($scope,HttpService) {
//
// HttpService.getTypeList(function(data) {
// $scope.typeList = data;
// console.log($scope.typeList)
// });
//
// $scope.wrongMsg = -1;
// $scope.upDate =item.date;
// $scope.upCount=item.packageCount;
// HttpService.analyseMachineData($("#dateGrid").val(), function (data) {
// $scope.resultData = data;
// console.log(data)
// })
// $scope.analyseMachinePackage=function(fileid){
// var cardType = $("#cardType").val();
// console.log(fileid,item.date,cardType)
// HttpService.analysisMachineAcceptListData(fileid,item.date,cardType,function(data){
// if(data){
// $scope.wrongMsg = "解析完成"
// // $scope.closeThisDialog();
// // MessageService.showAlert("解析完成")
// getData();
// }else{
// $scope.wrongMsg = "解析失败"
// }
// })
// }
// $scope.UpdateIdcard=function(fileid){
// HttpService.analyseToUpdateIdcard(fileid,function(data){
// if(data){
// $scope.wrongMsg = "清除标记成功"
// getData();
// }else{
// $scope.wrongMsg = "清除标记失败"
// }
// })
// }
// }]
// });
// }
$scope
.
chosePostDate
=
$filter
(
"date"
)(
new
Date
(),
"yyyy-MM-dd"
)
});
$scope
.
getPostPackagePage
=
function
()
{
HttpService
.
selectPostPackageCount
(
$scope
.
fileName
,
$scope
.
state
,
$scope
.
chosePostDate
,
function
(
data
)
{
$scope
.
paginationPostConf
.
totalItems
=
data
.
respData
.
string
}
)
// if($scope.paginationConf.currentPage==0){
// $scope.paginationConf.currentPage=1;
// }
HttpService
.
selectPostPackage
(
$scope
.
fileName
,
$scope
.
state
,
$scope
.
paginationPostConf
.
currentPage
,
$scope
.
paginationPostConf
.
itemsPerPage
,
$scope
.
chosePostDate
,
function
(
data
)
{
$scope
.
postPackageData
=
data
.
respData
}
)
}
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope
.
$watch
(
"paginationPostConf.currentPage +paginationPostConf.itemsPerPage"
,
$scope
.
getPostPackagePage
)
}
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment