No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

batch_copy.htm 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>复制文档</title>
  6. <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
  7. <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/bootstrap/css/bootstrap.min.css">
  8. {load href="__STATIC__/common/js/jquery.min.js" /}
  9. {load href="__PUBLIC__/plugins/layer-v3.1.0/layer.js" /}
  10. <script type="text/javascript">
  11. var eyou_basefile = "{$Request.baseFile}";
  12. var module_name = "{$Think.const.MODULE_NAME}";
  13. var __root_dir__ = "__ROOT_DIR__";
  14. var __lang__ = "{$admin_lang}";
  15. var __main_lang__ = "{$main_lang}";
  16. </script>
  17. <script src="__SKIN__/js/global.js?v={$version}"></script>
  18. <style type="text/css">
  19. .container-fluid {
  20. padding: 10px 10px;
  21. overflow: hidden;
  22. }
  23. .control-group {
  24. padding: 5px 0px;
  25. }
  26. .input{
  27. width: 100px;
  28. }
  29. .select {
  30. height: 28px;
  31. font-size: 12px;
  32. border: 1px solid #eee;
  33. padding: 4px 0;
  34. }
  35. .btn{
  36. background-color: #3398cc;
  37. color: #FFF;
  38. border-radius: 4px;
  39. padding: 6px 20px;
  40. }
  41. .btn:hover {
  42. color: #FFF;
  43. background-color: #2189be;
  44. }
  45. .controls{
  46. margin: 0 auto;
  47. }
  48. .notic{
  49. border-radius:6px;
  50. padding: 10px 16px;
  51. margin: 0;
  52. color: #0ba4da !important;
  53. background-color: rgba(79, 192, 232, 0.11) !important;
  54. }
  55. em{
  56. color: red;
  57. }
  58. input[type="text"]{
  59. color: #555555;
  60. background-color: #FFF;
  61. border: solid 1px #eee;
  62. padding: 4px 6px;
  63. resize: none;
  64. }
  65. input[type="text"]:focus, input[type="text"]:hover, input[type="text"]:active{
  66. border: 1px solid;
  67. border-color: rgba(82,168,236,0.8);
  68. box-shadow: 0 0 0 2px rgba(82, 168, 236, 0.15);
  69. outline: 0 none;
  70. }
  71. </style>
  72. </head>
  73. <body>
  74. <div class="container-fluid">
  75. <div class="row-fluid">
  76. <div class="span12">
  77. <form class="form-horizontal" id="post_form" method="POST" action="{$form_action|default=''}" onsubmit="check_submit();">
  78. <div class="control-group">
  79. <div class="controls">
  80. <p class="notic">只支持复制到相同模型栏目</p>
  81. </div>
  82. </div>
  83. <div class="control-group">
  84. <div class="controls">
  85. <label class="control-label" for="inputEmail"><em>*</em> 复制到栏目:</label>
  86. <select id="typeid" name="typeid" class="select">
  87. {$arctype_html}
  88. </select>
  89. <input type="hidden" name="aids" id="aids" value="" class="input">
  90. </div>
  91. </div>
  92. <div class="control-group">
  93. <div class="controls">
  94. <label class="control-label" for="inputEmail"><em>*</em> 每篇复制数:</label>
  95. <input type="text" name="num" value="5" class="input" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onpaste="this.value=this.value.replace(/[^\d]/g,'');" autocomplete="off">
  96. </div>
  97. </div>
  98. <div class="control-group" style="margin-top: 30px;">
  99. <div class="controls" style="text-align: center;">
  100. <input type="hidden" name="_ajax" value="1">
  101. <input type="button" class="btn" value="确认提交" onclick="check_submit();" />
  102. </div>
  103. </div>
  104. </form>
  105. </div>
  106. </div>
  107. </div>
  108. <script type="text/javascript">
  109. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  110. $('#aids').val(parent.get_aids());
  111. function check_submit()
  112. {
  113. layer_loading('正在处理');
  114. $.ajax({
  115. url: $('#post_form').attr('action'),
  116. type: 'POST',
  117. dataType: 'JSON',
  118. data: $('#post_form').serialize(),
  119. success: function(res){
  120. layer.closeAll();
  121. if (res.code == 1) {
  122. parent.layer.msg(res.msg, {shade: layer_shade, time: 1000}, function(){
  123. parent.window.location.reload();
  124. parent.layer.close(parentObj);
  125. });
  126. } else {
  127. layer.alert(res.msg, {icon: 5, title:false});
  128. }
  129. return false;
  130. },
  131. error: function(e){
  132. layer.closeAll();
  133. layer.alert('操作失败', {icon: 5, title:false});
  134. return false;
  135. }
  136. });
  137. }
  138. /**
  139. * 封装的加载层
  140. */
  141. function layer_loading(msg){
  142. var loading = layer.msg(
  143. msg+'...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请勿刷新页面',
  144. {
  145. icon: 1,
  146. time: 3600000, //1小时后后自动关闭
  147. shade: [0.2] //0.1透明度的白色背景
  148. });
  149. //loading层
  150. var index = layer.load(3, {
  151. shade: [0.1,'#fff'] //0.1透明度的白色背景
  152. });
  153. return loading;
  154. }
  155. </script>
  156. </body>
  157. </html>