addpubfile.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. ·<!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <link rel="stylesheet" href="${ctx}/assets/lib/bootstrap-3.3.7/css/bootstrap.min.css">
  10. <link rel="stylesheet" href="${ctx}/assets/lib/bootstrap-upload/css/default.css">
  11. <link rel="stylesheet" href="${ctx}/assets/lib/bootstrap-upload/css/fileinput.css">
  12. <script type="text/javascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.min.js"></script>
  13. <script type="text/javascript" src="${ctx}/assets/lib/jquery.form/jquery.form.min.js"></script>
  14. <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
  15. <script type="text/javascript" src="${ctx}/assets/lib/My97DatePicker/WdatePicker.js"></script>
  16. <script type="text/javascript" src="${ctx}/assets/lib/bootstrap-upload/js/fileinput.js"></script>
  17. <script type="text/javascript" src="${ctx}/assets/lib/bootstrap-upload/js/locales/zh.js"></script>
  18. <script type="text/javascript" src="${ctx}/assets/lib/bootstrap-3.3.7/js/bootstrap.min.js"></script>
  19. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  20. <script src="${ctx}/assets/js/validate.js" ></script>
  21. <script type="text/javascript">
  22. function doSubmit(){
  23. if(doValidate(form1))
  24. {
  25. $('#form1').attr('action','${ctx}/myconsole/complaint/transact/saveAddDoData');
  26. $('#form1').ajaxSubmit(resultHandle);
  27. }
  28. }
  29. function resultHandle(data){
  30. var res=eval('(' + data + ')');
  31. if(res.flag){
  32. layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 1},
  33. function(){
  34. layer.closeAll('dialog');
  35. window.close();
  36. });
  37. }else{
  38. if(res.flag == false)
  39. {
  40. layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 0}, function(){layer.closeAll('dialog');});
  41. }
  42. }
  43. }
  44. function setCollapseIcon(collapseIcon)
  45. {
  46. var curCollapseIconClass=$("#"+collapseIcon).attr("class");
  47. if(curCollapseIconClass=="glyphicon glyphicon-menu-up")
  48. {
  49. $("#"+collapseIcon).attr("class","glyphicon glyphicon-menu-down");
  50. }
  51. else
  52. {
  53. $("#"+collapseIcon).attr("class","glyphicon glyphicon-menu-up");
  54. }
  55. }
  56. </script>
  57. <title>上传公共文件</title>
  58. <meta name="keywords" content="">
  59. <meta name="description" content="">
  60. </head>
  61. <body >
  62. <div class="panel panel-primary">
  63. <div class="panel-heading">
  64. <div style="display:inline;" >公共文件&nbsp;&nbsp;</div>
  65. <div style="display:inline;" ><a class="panel-title" data-toggle="collapse" data-parent="#accordion" href="#collapseEndFile"><span id="EndFileCollapseIcon" onClick="setCollapseIcon('EndFileCollapseIcon')" class="glyphicon glyphicon-menu-up" aria-hidden="true"></span></a></div>
  66. </div>
  67. <div id="collapseEndFile" class="panel-collapse collapse in">
  68. <div class="panel-body" style="font-size:14px">
  69. <div class="row" style="padding:5px">
  70. <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1" >
  71. <label class="control-label" for="FileAppealID">选择文件</label></div>
  72. <div class="col-xs-11 col-sm-11 col-md-11 col-lg-11" >
  73. <input type="hidden" id="FileAppealID" name="FileAppealID" value="${FileTypeID}"/>
  74. <input id="file-0a" class="file-loading" type="file" multiple data-min-file-count="1">
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="row" style="padding:5px">
  81. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" align=center>
  82. <button type="button" class="btn btn-success" id="EndButton" onclick=window.close() ><span class="glyphicon glyphicon-save"></span>&nbsp;&nbsp;关&nbsp;&nbsp;&nbsp;&nbsp;闭</button>
  83. </div>
  84. </div>
  85. </div>
  86.  
  87. </body>
  88. </html>
  89. <script type="text/javascript">
  90. $(document).on('ready', function() {
  91. $('#file-0a').fileinput({
  92. language: 'zh',
  93. uploadUrl: '${ctx}/myconsole/complaint/uploadfile/upload?FileAppealID=${FileTypeID}&FileType=${FileTypeName}',
  94. deleteUrl: '${ctx}/myconsole/complaint/uploadfile/delete',
  95. dropZoneEnabled: false,
  96. allowedFileExtensions : ['jpg', 'png','gif','doc','docx','pdf','mp3','mp4','xlsx','msg','rar','ppt','cad','zip'],
  97. }).on("fileuploaded", function(event,data,previewId,index) {
  98. if(data.response)
  99. {
  100. var result = data.response.id; 
  101. }
  102. });
  103. });
  104. </script>