Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
a186fdaf
Commit
a186fdaf
authored
Nov 16, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] fixed bugs for status
parent
0c93b8e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
vat-caculate-data.ctrl.js
...vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
+15
-4
No files found.
atms-web/src/main/webapp/app/vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
View file @
a186fdaf
...
...
@@ -284,10 +284,14 @@
if
(
data
&&
data
.
result
)
updateTasksStatus
(
data
.
data
);
if
(
data
.
data
.
jobStatus
==
'Begin'
||
data
.
data
.
jobStatus
==
'Running'
){
if
(
!
$scope
.
timer
)
$scope
.
timer
=
$interval
(
function
(){
vatReportService
.
getJobStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
data
.
data
.
id
).
then
(
function
(
result
){
if
(
result
.
data
&&
result
.
status
==
200
){
updateTasksStatus
(
result
.
data
);
}
else
{
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
}
});
...
...
@@ -296,6 +300,8 @@
}).
error
(
function
(
data
,
status
,
config
,
statusText
)
{
if
(
status
==
412
){
SweetAlert
.
error
(
'报表提审中或审核已通过!'
);
}
else
if
(
status
==
409
){
SweetAlert
.
error
(
'报表已在处理中!'
);
}
});
...
...
@@ -554,7 +560,7 @@
if
(
job
.
jobStatus
==
'End'
){
items
.
forEach
(
function
(
item
,
index
){
item
.
status
=
'completed'
;
item
.
t
ask
=
$translate
.
instant
(
'completed'
);
item
.
t
ext
=
$translate
.
instant
(
'completed'
);
});
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'completed'
;
...
...
@@ -605,14 +611,16 @@
if
(
result
.
data
&&
result
.
status
==
200
){
updateTasksStatus
(
result
.
data
);
if
(
result
.
data
.
jobStatus
==
'Begin'
||
result
.
data
.
jobStatus
==
'Running'
){
if
(
!
$scope
.
timer
)
$scope
.
timer
=
$interval
(
function
(){
vatReportService
.
getJobStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
result
.
data
.
id
)
.
success
(
function
(
result
){
.
then
(
function
(
result
){
if
(
result
.
data
&&
result
.
status
==
200
){
updateTasksStatus
(
result
.
data
);
}
else
{
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
}
}).
error
(
function
(
result
){
$interval
.
cancel
(
$scope
.
timer
);
});
},
1000
);
...
...
@@ -653,6 +661,9 @@
initTasks
();
$scope
.
startCaculate
=
startCaculate
;
$scope
.
startCaculate2
=
startCaculate2
;
$scope
.
$on
(
'$destroy'
,
function
(){
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
});
})();
}
...
...
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