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
99c06612
Commit
99c06612
authored
Apr 23, 2019
by
liboyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打印交接单
parent
835eccb8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
service.js
src/main/resources/static/js/service.js
+16
-3
receitp.js
src/main/resources/static/views/receitp/receitp.js
+7
-6
No files found.
src/main/resources/static/js/service.js
View file @
99c06612
...
@@ -939,15 +939,28 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
...
@@ -939,15 +939,28 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success
(
response
.
data
)
success
(
response
.
data
)
})
})
},
},
// printReceitpData:function(data,success) {
// var body = JSON.stringify(data);
// $http({
// method: 'POST',
// url: "../exportExcel/printReceiptExcelData",
// data: body,
// headers: {'Content-Type': 'application/json'},
// transformRequest: angular.identity,
// responseType:'arraybuffer'
// }).then(function successCallback(response) {
// success(response.data)
// })
// },
printReceitpData
:
function
(
data
,
success
)
{
printReceitpData
:
function
(
data
,
success
)
{
var
body
=
JSON
.
stringify
(
data
);
var
body
=
JSON
.
stringify
(
data
);
$http
({
$http
({
method
:
'POST'
,
method
:
'POST'
,
url
:
"../exportExcel/printReceiptExcelData"
,
url
:
"../exportExcel/printReceiptExcelData"
,
data
:
body
,
data
:
body
,
headers
:
{
'Content-Type'
:
'application/json'
}
,
headers
:
{
'Content-Type'
:
'application/json'
}
transformRequest
:
angular
.
identity
,
//
transformRequest: angular.identity,
responseType
:
'arraybuffer'
//
responseType:'arraybuffer'
}).
then
(
function
successCallback
(
response
)
{
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
success
(
response
.
data
)
})
})
...
...
src/main/resources/static/views/receitp/receitp.js
View file @
99c06612
...
@@ -135,12 +135,13 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
...
@@ -135,12 +135,13 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
}
}
console
.
log
(
json
)
console
.
log
(
json
)
HttpService
.
printReceitpData
(
json
,
function
(
data
)
{
HttpService
.
printReceitpData
(
json
,
function
(
data
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
"application/vnd.ms-excel"
});
console
.
log
(
data
)
var
a
=
document
.
createElement
(
"a"
);
// var blob = new Blob([data], {type: "application/vnd.ms-excel"});
document
.
body
.
appendChild
(
a
);
// var a = document.createElement("a");
a
.
href
=
URL
.
createObjectURL
(
blob
);
// document.body.appendChild(a);
// a.download = fileName;
// a.href = URL.createObjectURL(blob);
a
.
click
();
// // a.download = fileName;
// a.click();
})
})
}
}
...
...
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