singexcel.jsp 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <%@ page contentType="text/html;charset=UTF-8" language="java"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
  4. <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  6. <html>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  9. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui/css/H-ui.min.css" />
  10. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/css/H-ui.admin.css" />
  11. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/Hui-iconfont/1.0.7/iconfont.css" />
  12. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/icheck/icheck.css" />
  13. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/skin/default/skin.css" id="skin" />
  14. <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/css/style.css" />
  15. <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/manage/js/jquery.min.js"></script>
  16. <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/ajaxfileupload.js"></script>
  17. <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/js/layer.js"></script>
  18. <title>签到导入</title>
  19. </head>
  20. <body>
  21. <nav class="breadcrumb">
  22. <i class="Hui-iconfont">&#xe67f;</i> 信息导入
  23. <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
  24. </nav>
  25. <div class="page-container">
  26. <div style="width:1120px;height:80px;margin:5px auto;">
  27. <span style="color:red;">注意:* 为了防止操作不当,请您在导入数据前先下载我们规定表格格式,然后将您的数据复制到规定表格中再导入!</span><br/>
  28. <a href="${pageContext.request.contextPath}/upload/luru.xls" style="color:#0066CC;text-decoration:underline;"><h3>下载表格&nbsp;<i class="Hui-iconfont">&#xe674;</i></h3></a>
  29. </div>
  30. <form action="signload.html" method="post" enctype="multipart/form-data" class="form form-horizontal" id="banneradd">
  31. <div class="row cl">
  32. <label class="form-label col-xs-4 col-sm-2">选择表格:</label>
  33. <div class="formControls col-xs-8 col-sm-4">
  34. <input type="file" id="fileToUpload" class="input-text" name="fileToUpload">
  35. </div>
  36. <div class="formControls col-xs-8 col-sm-4">
  37. <input type="text" class="input-text" readonly name="url" id="url">
  38. </div>
  39. </div>
  40. <div class="row cl">
  41. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  42. <button onClick="$('#banneradd').submit()" class="btn btn-primary radius" type="button"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
  43. </div>
  44. </div>
  45. </form>
  46. </div>
  47. <script type="text/javascript">
  48. $("#fileToUpload").change(function(){
  49. var index = layer.load(0, {shade: false});
  50. var f = document.getElementById('fileToUpload').files[0];
  51. $.ajaxFileUpload({
  52. fileElementId : 'fileToUpload',
  53. url : 'uploadImage',
  54. dataType : 'text',
  55. data : {},
  56. async : true,
  57. error : function(data) {
  58. alert("网络异常,请重试");
  59. },
  60. success : function(message) {
  61. $("#url").val(message);
  62. chen();
  63. layer.close(index);
  64. }
  65. });
  66. });
  67. function chen(){
  68. $("#fileToUpload").change(function(){
  69. var index = layer.load(0, {shade: false});
  70. var f = document.getElementById('fileToUpload').files[0];
  71. $.ajaxFileUpload({
  72. fileElementId : 'fileToUpload',
  73. url : 'uploadImage',
  74. dataType : 'text',
  75. data : {},
  76. async : true,
  77. error : function(data) {
  78. alert("网络异常,请重试");
  79. },
  80. success : function(message) {
  81. $("#url").val(message);
  82. chen();
  83. layer.close(index);
  84. }
  85. });
  86. });
  87. }
  88. </script>
  89. </body>
  90. </html>