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
61bb997b
Commit
61bb997b
authored
Dec 07, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] fixed some bugs
parent
300673ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
34 deletions
+74
-34
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+74
-34
No files found.
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
61bb997b
...
@@ -2574,7 +2574,7 @@
...
@@ -2574,7 +2574,7 @@
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
).
success
(
function
(
result
){
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
).
success
(
function
(
result
){
if
(
result
&&
result
==
'committed'
){
if
(
result
&&
result
==
'committed'
){
SweetAlert
.
error
(
'报表提审中
或审核已通过
!'
);
SweetAlert
.
error
(
'报表提审中!'
);
}
else
{
}
else
{
SweetAlert
.
swal
({
SweetAlert
.
swal
({
title
:
"warning!"
,
title
:
"warning!"
,
...
@@ -2700,35 +2700,56 @@
...
@@ -2700,35 +2700,56 @@
$scope
.
voucherFileID
=
evidence
.
fileID
;
$scope
.
voucherFileID
=
evidence
.
fileID
;
};
};
$scope
.
upLoadManual
=
function
(){
$scope
.
upLoadManual
=
function
(){
var
text
=
$
(
".li"
).
find
(
".active"
).
text
();
if
(
vatSessionService
.
month
)
$log
.
debug
(
text
);
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
if
(
text
==
'海关专用缴款书'
||
text
==
'代扣代缴税收通用缴款书取数'
){
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
).
success
(
function
(
result
){
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
if
(
result
&&
result
==
'committed'
){
$
(
"#importExcellFile"
).
modal
(
'show'
);
SweetAlert
.
error
(
'报表提审中!'
);
}
else
{
}
else
{
SweetAlert
.
warning
(
"仅支持海关专用缴款书或代扣代缴税收通用缴款书取数"
);
var
text
=
$
(
".li"
).
find
(
".active"
).
text
();
}
$log
.
debug
(
text
);
if
(
text
==
'海关专用缴款书'
||
text
==
'代扣代缴税收通用缴款书取数'
){
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
$
(
"#importExcellFile"
).
modal
(
'show'
);
}
else
{
SweetAlert
.
warning
(
"仅支持海关专用缴款书或代扣代缴税收通用缴款书取数"
);
}
}
});
};
};
$scope
.
loadMyExcel
=
function
(){
$scope
.
loadMyExcel
=
function
(){
$scope
.
manualSpread
=
new
GC
.
Spread
.
Sheets
.
Workbook
(
document
.
getElementById
(
"ss"
),{
sheetCount
:
1
});
if
(
$scope
.
file
){
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
if
(
$scope
.
hasManualLoad
){
var
excelFile
=
document
.
getElementById
(
"fileDemo"
).
files
[
0
];
SweetAlert
.
warning
(
"已载入文件,如需重新载入请先清空!"
);
excelIo
.
open
(
excelFile
,
function
(
json
)
{
}
else
{
var
workbookObj
=
json
;
$scope
.
manualSpread
=
new
GC
.
Spread
.
Sheets
.
Workbook
(
document
.
getElementById
(
"ss"
),{
sheetCount
:
1
});
$scope
.
manualSpread
.
fromJSON
(
workbookObj
);
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
},
function
(
e
)
{
var
excelFile
=
$scope
.
file
;
alert
(
e
.
errorMessage
);
excelIo
.
open
(
excelFile
,
function
(
json
)
{
if
(
e
.
errorCode
===
2
/*noPassword*/
||
e
.
errorCode
===
3
/*invalidPassword*/
)
{
var
workbookObj
=
json
;
document
.
getElementById
(
'password'
).
onselect
=
null
;
$scope
.
manualSpread
.
fromJSON
(
workbookObj
);
},
function
(
e
)
{
alert
(
e
.
errorMessage
);
if
(
e
.
errorCode
===
2
/*noPassword*/
||
e
.
errorCode
===
3
/*invalidPassword*/
)
{
document
.
getElementById
(
'password'
).
onselect
=
null
;
}
},
{
});
$scope
.
hasManualLoad
=
true
;
}
}
}
,
{
}
else
{
SweetAlert
.
warning
(
"请先选择文件!"
);
}
);
}
};
};
$scope
.
multiWrite
=
function
(){
$scope
.
multiWrite
=
function
(){
if
(
$scope
.
hasManualLoad
){
var
manualSheet
=
$scope
.
manualSpread
.
getActiveSheet
();
var
manualSheet
=
$scope
.
manualSpread
.
getActiveSheet
();
var
currentSheet
=
$scope
.
spread
.
getActiveSheet
()
var
currentSheet
=
$scope
.
spread
.
getActiveSheet
()
currentSheet
.
options
.
isProtected
=
false
;
currentSheet
.
options
.
isProtected
=
false
;
...
@@ -2740,30 +2761,43 @@
...
@@ -2740,30 +2761,43 @@
if
(
jsonTagInfo
.
isReadOnly
)
if
(
jsonTagInfo
.
isReadOnly
)
continue
;
continue
;
var
cellValue
=
manualSheet
.
getValue
(
rowIndex
,
columnIndex
);
var
cellValue
=
manualSheet
.
getValue
(
rowIndex
,
columnIndex
);
var
cellString
=
''
;
if
(
typeof
(
cellValue
)
==
"string"
)
cellValue
=
cellValue
.
trim
();
if
(
typeof
(
cellValue
)
==
"string"
)
cellValue
=
cellValue
.
trim
();
var
r
=
/^00
\d
*|^
\.\d
+|
\.
$/
;
var
r
=
/^00
\d
*|^
\.\d
+|
\.
$/
;
if
(
typeof
cellValue
==
"undefined"
||
cellValue
==
null
||
cellValue
==
""
||
cellValue
==
"NaN"
)
continue
;
if
(
typeof
cellValue
==
"undefined"
||
cellValue
==
null
||
cellValue
==
""
||
cellValue
==
"NaN"
)
continue
;
if
(
cellValue
&&
(
isNaN
(
cellValue
)
||
r
.
test
(
cellValue
)))
{
if
(
cellValue
&&
(
isNaN
(
cellValue
)
||
r
.
test
(
cellValue
)))
{
SweetAlert
.
warning
(
$translate
.
instant
(
'CheckInputValueFormat'
));
cellString
=
cellValue
;
return
;
}
else
if
(
cellValue
&&
parseFloat
(
cellValue
).
toFixed
(
2
)
>
9999999999999
)
{
}
else
if
(
cellValue
&&
parseFloat
(
cellValue
).
toFixed
(
2
)
>
9999999999999
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
'CheckInputValueLength'
));
SweetAlert
.
warning
(
$translate
.
instant
(
'CheckInputValueLength'
));
return
;
return
;
}
}
cellValue
=
jsonTagInfo
.
dataType
===
5
?
parseInt
(
cellValue
):
parseFloat
(
cellValue
).
toFixed
(
2
);
cellValue
=
jsonTagInfo
.
dataType
===
5
?
parseInt
(
cellValue
):
parseFloat
(
cellValue
).
toFixed
(
2
);
var
handInputModel
=
{
var
handInputModel
=
{};
cellID
:
jsonTagInfo
.
cellID
,
if
(
cellString
){
cellTemplateID
:
jsonTagInfo
.
cellTemplateID
,
handInputModel
=
{
reportID
:
jsonTagInfo
.
reportID
,
cellID
:
jsonTagInfo
.
cellID
,
amount
:
cellValue
cellTemplateID
:
jsonTagInfo
.
cellTemplateID
,
};
reportID
:
jsonTagInfo
.
reportID
,
keyinData
:
cellString
};
}
else
{
handInputModel
=
{
cellID
:
jsonTagInfo
.
cellID
,
cellTemplateID
:
jsonTagInfo
.
cellTemplateID
,
reportID
:
jsonTagInfo
.
reportID
,
amount
:
cellValue
};
}
$scope
.
myConfirm
(
handInputModel
);
$scope
.
myConfirm
(
handInputModel
);
}
}
}
}
}
}
}
else
{
SweetAlert
.
warning
(
"文件未载入!"
);
}
};
};
...
@@ -2772,7 +2806,7 @@
...
@@ -2772,7 +2806,7 @@
handInputModel
.
serviceTypeID
=
vatSessionService
.
project
.
serviceTypeID
;
handInputModel
.
serviceTypeID
=
vatSessionService
.
project
.
serviceTypeID
;
handInputModel
.
period
=
vatSessionService
.
month
;
handInputModel
.
period
=
vatSessionService
.
month
;
if
(
handInputModel
.
amount
||
handInputModel
.
name
)
{
if
(
handInputModel
.
amount
||
handInputModel
.
name
||
handInputModel
.
keyinData
)
{
//日志对象
//日志对象
logDto
.
ID
=
PWC
.
newGuid
();
logDto
.
ID
=
PWC
.
newGuid
();
logDto
.
CreateTime
=
new
Date
();
logDto
.
CreateTime
=
new
Date
();
...
@@ -2796,10 +2830,16 @@
...
@@ -2796,10 +2830,16 @@
return
$q
.
reject
();
return
$q
.
reject
();
};
};
$scope
.
cleanManual
=
function
(){
$scope
.
cleanManual
=
function
(){
$scope
.
manualSpread
=
new
GC
.
Spread
.
Sheets
.
Workbook
(
document
.
getElementById
(
"ss"
),{
sheetCount
:
1
});
$scope
.
manualSpread
=
new
GC
.
Spread
.
Sheets
.
Workbook
(
document
.
getElementById
(
"ss"
),{
sheetCount
:
1
});
$
(
'#ss'
).
html
(
''
);
$
(
'#ss'
).
html
(
''
);
document
.
getElementById
(
"fileDemo"
).
value
=
""
;
$scope
.
hasManualLoad
=
false
;
$scope
.
file
=
null
;
};
$scope
.
closeManualModal
=
function
()
{
$scope
.
cleanManual
();
$scope
.
modalInstance
.
dismiss
(
'cancel'
);
};
};
...
...
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