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
cd3b4349
Commit
cd3b4349
authored
Dec 05, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] add verirfy for import manaul excel
parent
c1f7aded
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
19 deletions
+46
-19
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+23
-12
vat-report-view.html
.../app/common/controls/vat-report-view/vat-report-view.html
+22
-6
template.svc.js
...eb/src/main/webapp/app/common/webservices/template.svc.js
+1
-1
No files found.
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
cd3b4349
...
...
@@ -17,6 +17,7 @@
$scope
.
voucherFileName
=
""
;
$scope
.
voucherFileID
=
""
;
$scope
.
manualSpread
=
{};
$scope
.
file
=
null
;
//Notice: ************************************
//$scope.templateCode, $scope.reportId, $scope.initRow, $scope.initCol等都是外部传递进来的数据。
...
...
@@ -2545,7 +2546,7 @@
$scope
.
commitApprove
=
function
(){
if
(
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'
){
SweetAlert
.
error
(
'报表提审中或审核已通过!'
);
}
else
{
...
...
@@ -2576,7 +2577,7 @@
$scope
.
doApprove
=
function
(){
if
(
vatSessionService
.
month
)
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
).
success
(
function
(
result
){
if
(
result
&&
result
==
'committed'
){
$
(
"#ApprovalComment"
).
modal
(
'show'
)
...
...
@@ -2674,20 +2675,30 @@
};
$scope
.
upLoadManual
=
function
(){
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
(
"仅支持海关专用缴款书或代扣代缴税收通用缴款书取数"
);
}
if
(
vatSessionService
.
month
)
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
).
success
(
function
(
result
){
if
(
result
&&
result
==
'committed'
){
SweetAlert
.
error
(
'报表提审中或审核已通过!'
);
}
else
{
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
.
manualSpread
=
new
GC
.
Spread
.
Sheets
.
Workbook
(
document
.
getElementById
(
"ss"
),{
sheetCount
:
1
});
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
var
excelFile
=
document
.
getElementById
(
"fileDemo"
).
files
[
0
]
;
var
excelFile
=
$scope
.
file
;
excelIo
.
open
(
excelFile
,
function
(
json
)
{
var
workbookObj
=
json
;
$scope
.
manualSpread
.
fromJSON
(
workbookObj
);
...
...
@@ -2772,7 +2783,7 @@
$scope
.
cleanManual
=
function
(){
$scope
.
manualSpread
=
new
GC
.
Spread
.
Sheets
.
Workbook
(
document
.
getElementById
(
"ss"
),{
sheetCount
:
1
});
$
(
'#ss'
).
html
(
''
);
document
.
getElementById
(
"fileDemo"
).
value
=
""
;
$scope
.
file
=
null
;
};
...
...
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.html
View file @
cd3b4349
...
...
@@ -204,14 +204,30 @@
</div>
<div
class=
"row"
style=
"margin-left:12px; margin-right:12px;"
>
<div
class=
"col-lg-12 col-md-12 col-sm-12"
>
<div
class=
"inputContainer"
>
<input
type=
"file"
id=
"fileDemo"
class=
"btn btn-sm"
name=
"选择文件"
>
<input
type=
"button"
id=
"loadExcel"
value=
"加载文件"
class=
"btn btn-sm"
ng-click=
"loadMyExcel()"
>
<button
class=
"btn btn-sm"
ng-click=
"multiWrite()"
>
批量录入
</button>
<button
class=
"btn btn-sm"
ng-click=
"cleanManual()"
>
清空
</button>
<div
class=
"col-sm-4"
>
<div
class=
"form-control"
type=
"text"
name=
"fileName"
readonly
placeholder=
""
ng-required=
"isAdd"
title=
"{{file ? file.name : ''}}"
>
{{file ? file.name : '' | limitString :25}}
</div>
</div>
<div
class=
"col-sm-2"
>
<button
type=
"button"
type=
"file"
ngf-select
ng-model=
"file"
accept=
".xls,.xlsx"
class=
"btn browse"
>
选择文件
</button>
</div>
<div
class=
"col-sm-2"
>
<button
type=
"button"
class=
"btn browse"
ng-click=
"loadMyExcel()"
>
加载文件
</button>
</div>
<div
class=
"col-sm-2"
>
<button
type=
"button"
class=
"btn browse"
ng-click=
"multiWrite()"
>
批量录入
</button>
</div>
<div
class=
"col-sm-2"
>
<button
type=
"button"
class=
"btn browse"
ng-click=
"cleanManual()"
>
清空
</button>
</div>
</div>
</div>
</div>
...
...
atms-web/src/main/webapp/app/common/webservices/template.svc.js
View file @
cd3b4349
...
...
@@ -93,7 +93,7 @@ webservices.factory('templateService', ['$log', '$http', '$q', 'apiConfig', 'htt
excelIo
.
open
(
blob
,
function
(
json
)
{
deferred
.
resolve
(
json
);
},
function
(
e
)
{
console
.
error
(
e
.
errorm
essage
);
// console.error(e.errorM
essage);
//alert(e.errorMessage);
deferred
.
reject
(
e
.
errorMessage
);
},
{});
...
...
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