classification.jsp 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglib.jsp"%>
  3. <html>
  4. <head>
  5. <title>导入Excel</title>
  6. <meta name="decorator" content="ani"/>
  7. <style type="text/css">
  8. .common-style {
  9. width:80%;
  10. display: inline-block;
  11. height: 34px;
  12. padding: 6px 12px;
  13. margin: 0px 2px;
  14. font-size: 14px;
  15. line-height: 1.42857143;
  16. color: #555;
  17. background-color: #fff;
  18. background-image: none;
  19. border: 1px solid #ccc;
  20. border-radius: 4px;
  21. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  22. box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  23. -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  24. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  25. }
  26. .btn-style {
  27. display: inline-block;
  28. height: 34px;
  29. margin-left: 105px;
  30. font-size: 14px;
  31. line-height: 1.42857143;
  32. color: #555;
  33. background-image: none;
  34. border: 1px solid #ccc;
  35. border-radius: 4px;
  36. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  37. box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  38. -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  39. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  40. }
  41. </style>
  42. <script>
  43. $(document).ready(function() {
  44. });
  45. function importExcel() {
  46. if($('#classificationFile').val()==null || $('#classificationFile').val()==''){
  47. jp.warning("请上传待匹配文件!");
  48. return;
  49. }
  50. var url = '${ctx}/sg/classification/classify';
  51. var importForm =$("#importForm")[0];
  52. jp.loading(' 正在匹配,请稍等...');
  53. jp.uploadFile(importForm, url,function (data){
  54. if(data.success){
  55. var address = '${ctx}/sg/classification/download?tempFileName='+data.body.tempFileName;
  56. jp.downloadFile(address);
  57. jp.close();
  58. }else{
  59. jp.error(data.msg);
  60. }
  61. });//调用保存事件
  62. }
  63. </script>
  64. </head>
  65. <body class="bg-white">
  66. <div class="wrapper wrapper-content">
  67. <div class="row">
  68. <div class="col-md-12">
  69. <div class="panel panel-primary">
  70. <div class="panel-body">
  71. <form id="importForm" action="${url}" method="post" enctype="multipart/form-data" class="form-horizontal">
  72. <div class="form-group" style="margin:15px 25%">
  73. <label class="col-sm-4 control-label">待匹配文件:</label>
  74. <div class="col-sm-8">
  75. <div class=" input-group" style=" width: 100%;">
  76. <input id="classificationFile" class="common-style" name="classificationFile" type="file" />
  77. </div>
  78. </div>
  79. </div>
  80. </form>
  81. <div class="col-lg-6" style="margin:15px 25%">
  82. <div class="form-group text-center" >
  83. <div>
  84. <button class="btn btn-primary btn-lg btn-parsley" onclick="importExcel()">开始匹配</button>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </body>
  94. </html>