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
fc9b4435
Commit
fc9b4435
authored
Mar 18, 2019
by
liboyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载交接单
parent
67ec44bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
ExportExcel.java
src/main/java/com/yxproject/start/utils/ExportExcel.java
+2
-2
service.js
src/main/resources/static/js/service.js
+3
-1
receitp.js
src/main/resources/static/views/receitp/receitp.js
+9
-1
No files found.
src/main/java/com/yxproject/start/utils/ExportExcel.java
View file @
fc9b4435
...
@@ -172,7 +172,7 @@ public class ExportExcel {
...
@@ -172,7 +172,7 @@ public class ExportExcel {
FileOutputStream
fout
=
null
;
FileOutputStream
fout
=
null
;
try
{
try
{
// fout = new FileOutputStream("E:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls");
// fout = new FileOutputStream("E:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls");
fout
=
new
FileOutputStream
(
"
D
:\\Excel\\"
+
simpleDateFormat
.
format
(
new
Date
())+
"交接单"
+
".xls"
);
fout
=
new
FileOutputStream
(
"
F
:\\Excel\\"
+
simpleDateFormat
.
format
(
new
Date
())+
"交接单"
+
".xls"
);
wb
.
write
(
fout
);
wb
.
write
(
fout
);
fout
.
close
();
fout
.
close
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
...
@@ -181,7 +181,7 @@ public class ExportExcel {
...
@@ -181,7 +181,7 @@ public class ExportExcel {
System
.
out
.
println
(
"Excel文件生成成功..."
+
new
Date
());
System
.
out
.
println
(
"Excel文件生成成功..."
+
new
Date
());
// return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
// return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
return
"
D
:\\Excel\\"
+
simpleDateFormat
.
format
(
new
Date
())
+
"交接单"
+
".xls"
;
return
"
F
:\\Excel\\"
+
simpleDateFormat
.
format
(
new
Date
())
+
"交接单"
+
".xls"
;
}
}
...
...
src/main/resources/static/js/service.js
View file @
fc9b4435
...
@@ -877,7 +877,9 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
...
@@ -877,7 +877,9 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
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
,
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 @
fc9b4435
...
@@ -88,7 +88,14 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
...
@@ -88,7 +88,14 @@ 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"
});
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
href
=
URL
.
createObjectURL
(
blob
);
// a.download = fileName;
a
.
click
();
})
}
}
});
});
\ No newline at end of file
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