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
6ab4e563
Commit
6ab4e563
authored
Apr 23, 2019
by
ken.q.you
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix confirm bug---Ken
parent
b8857a0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
26 deletions
+37
-26
vat-caculate-data.ctrl.js
...vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
+36
-25
vat-caculate-data.html
...pp/vat/reduction/vat-caculate-data/vat-caculate-data.html
+1
-1
No files found.
atms-web/src/main/webapp/app/vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
View file @
6ab4e563
...
...
@@ -381,7 +381,9 @@
var
year
=
now
.
getFullYear
();
var
vatMonth
=
vatSessionService
.
month
;
if
(
vatSessionService
.
year
==
year
){
if
(
vatMonth
<
month
-
1
){
if
(
vatMonth
===
month
-
1
){
return
false
;
}
else
{
return
true
;
}
}
...
...
@@ -390,35 +392,44 @@
}
return
true
;
}
var
startCaculate3
=
function
()
{
var
bool
=
checkYearMonthCaculate2
();
if
(
bool
){
swal
({
title
:
"warning!"
,
text
:
$translate
.
instant
(
'IsConfirmTimeNotSame'
),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#dd6b55"
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
){
startCaculate2
();
}
else
{
return
;
}
})
var
confirmWithContinue
=
function
(
title
,
text
,
customClass
)
{
var
deferred
=
$q
.
defer
();
SweetAlert
.
swal
({
title
:
title
,
text
:
text
,
html
:
true
,
type
:
"warning"
,
customClass
:
customClass
||
''
,
showCancelButton
:
true
,
confirmButtonColor
:
"#dd6b55"
,
allowOutsideClick
:
false
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
false
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
deferred
.
resolve
(
isConfirm
);
});
return
deferred
.
promise
;
}
var
startCaculate4
=
function
(){
if
(
checkYearMonthCaculate2
()){
confirmWithContinue
(
$translate
.
instant
(
'IsConfirmTimeNotSame'
)).
then
(
function
(
isConfirm
)
{
if
(
isConfirm
){
startCaculate2
();
}
})
}
else
{
startCaculate2
();
}
}
var
startCaculate2
=
function
()
{
if
(
vatSessionService
.
project
.
projectStatusList
[
vatSessionService
.
month
]
>=
constant
.
ProjectStatusEnum
.
Generated
)
{
swal
({
title
:
"warning!"
,
...
...
@@ -727,7 +738,7 @@
$scope
.
resolveRef
=
[];
initTasks
();
$scope
.
startCaculate
=
startCaculate
;
$scope
.
startCaculate
3
=
startCaculate3
;
$scope
.
startCaculate
4
=
startCaculate4
;
$scope
.
$on
(
'$destroy'
,
function
(){
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
});
...
...
atms-web/src/main/webapp/app/vat/reduction/vat-caculate-data/vat-caculate-data.html
View file @
6ab4e563
...
...
@@ -3,7 +3,7 @@
<div
class=
"vat-caculate-data-title"
ng-if=
"tasks.length > 0"
>
<!--<span translate="vatCaculateDataDesc"></span>-->
<!--<button class="btn btn-vat-primary" translate="startCaculateData" ng-disabled="readonly" ng-click="startCaculate()"></button>-->
<button
class=
"btn btn-vat-primary"
translate=
"startCaculateData"
ng-disabled=
"readonly"
ng-click=
"startCaculate
3
()"
></button>
<button
class=
"btn btn-vat-primary"
translate=
"startCaculateData"
ng-disabled=
"readonly"
ng-click=
"startCaculate
4
()"
></button>
<span
ng-click=
"showOperateLogPop()"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'Remarks' | translate}}
</span>
</div>
...
...
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