Нема описа
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.

proattr_index.htm 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. {include file="public/layout" /}
  2. <body class="bodystyle" id="bodystyle" style="cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page">
  6. {include file="recycle_bin/bar" /}
  7. <div class="flexigrid">
  8. <div class="hDiv">
  9. <div class="hDivBox">
  10. <table cellspacing="0" cellpadding="0" style="width: 100%">
  11. <thead>
  12. <tr>
  13. <th class="sign w40" axis="col0">
  14. <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  15. </th>
  16. <th abbr="article_title" axis="col3" class="w70">
  17. <div class="tc">ID</div>
  18. </th>
  19. <th abbr="article_title" axis="col3" class="">
  20. <div class="text-l10">参数名称</div>
  21. </th>
  22. <th abbr="article_time" axis="col6" class="w150">
  23. <div class="tc">所属栏目</div>
  24. </th>
  25. <th abbr="article_time" axis="col6" class="w100">
  26. <div class="tc">删除时间</div>
  27. </th>
  28. <th axis="col1" class="w120">
  29. <div class="tc">操作</div>
  30. </th>
  31. </tr>
  32. </thead>
  33. </table>
  34. </div>
  35. </div>
  36. <div class="bDiv" style="height: auto;">
  37. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  38. <table style="width: 100%;">
  39. <tbody>
  40. {empty name="list"}
  41. <tr>
  42. <td class="no-data" align="center" axis="col0" colspan="50">
  43. <div class="no_row">
  44. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  45. </div>
  46. </td>
  47. </tr>
  48. {else/}
  49. {foreach name="list" item="vo" key="k" }
  50. <tr>
  51. <td class="sign">
  52. <div class="tc w40"><input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.attr_id}"></div>
  53. </td>
  54. <td class="sort">
  55. <div class="tc w70">
  56. {$vo.attr_id}
  57. </div>
  58. </td>
  59. <td class="" style="width: 100%;">
  60. <div class="tl text-l10">
  61. {$vo.attr_name}
  62. </div>
  63. </td>
  64. <td class="">
  65. <div class="w150 tc ellipsis"><a href="{:url('RecycleBin/proattr_index', array('typeid'=>$vo['typeid']))}" title="{$vo.typename}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a></div>
  66. </td>
  67. <td>
  68. <div class="w100 tc">
  69. {$vo.update_time|date='Y-m-d',###}
  70. </div>
  71. </td>
  72. <td class="">
  73. <div class="w120 tc">
  74. {eq name="'RecycleBin@proattr_recovery'|is_check_access" value="1"}
  75. <a class="btn blue" href="javascript:void(0);" data-url="{:url('RecycleBin/proattr_recovery')}" data-id="{$vo.attr_id}" data-attr_name="{$vo.attr_name}" onClick="recovery(this);">还原</a>
  76. {/eq}
  77. {eq name="'RecycleBin@proattr_del'|is_check_access" value="1"}
  78. <i></i>
  79. <a class="btn red" href="javascript:void(0);" data-url="{:url('RecycleBin/proattr_del')}" data-id="{$vo.attr_id}" data-attr_name="{$vo.attr_name}" onClick="delfun(this);">彻底删除</a>
  80. {/eq}
  81. </div>
  82. </td>
  83. </tr>
  84. {/foreach}
  85. {/empty}
  86. </tbody>
  87. </table>
  88. </div>
  89. <div class="iDiv" style="display: none;"></div>
  90. </div>
  91. <div class="tDiv">
  92. <div class="tDiv2">
  93. <div class="fbutton checkboxall">
  94. <input type="checkbox" autocomplete="off" class="checkAll">
  95. </div>
  96. {eq name="'RecycleBin@proattr_recovery'|is_check_access" value="1"}
  97. <div class="fbutton">
  98. <a onclick="batch_recovery(this, 'ids');" data-url="{:url('RecycleBin/proattr_recovery')}" class="layui-btn layui-btn-primary">
  99. <span>批量还原</span>
  100. </a>
  101. </div>
  102. {/eq}
  103. {eq name="'RecycleBin@proattr_del'|is_check_access" value="1"}
  104. <div class="fbutton">
  105. <a onclick="batch_del(this, 'ids');" data-url="{:url('RecycleBin/proattr_del')}" class="layui-btn layui-btn-primary">
  106. <span>批量彻底删除</span>
  107. </a>
  108. </div>
  109. {/eq}
  110. {include file="public/page" /}
  111. </div>
  112. <div style="clear:both"></div>
  113. </div>
  114. </div>
  115. </div>
  116. <script type="text/javascript">
  117. try{
  118. var mt20_1649209614 = sessionStorage.getItem("mt20_1649209614");
  119. if (mt20_1649209614 != 1){
  120. console.log("recycle_bin",mt20_1649209614);
  121. // $("#bodystyle").css("padding"," 15px 0px");
  122. }
  123. }catch(e){}
  124. $(function(){
  125. $('input[name*=ids]').click(function(){
  126. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  127. $('.checkAll').prop('checked','checked');
  128. } else {
  129. $('.checkAll').prop('checked', false);
  130. }
  131. });
  132. $('input[type=checkbox].checkAll').click(function(){
  133. $('input[type=checkbox]').prop('checked',this.checked);
  134. });
  135. });
  136. $(document).ready(function(){
  137. // 表格行点击选中切换
  138. $('#flexigrid > table>tbody >tr').click(function(){
  139. $(this).toggleClass('trSelected');
  140. });
  141. // 点击刷新数据
  142. $('.fa-refresh').click(function(){
  143. location.href = location.href;
  144. });
  145. });
  146. // 还原
  147. function recovery(obj){
  148. layer.confirm('确认还原?参数与关联栏目将一起还原。', {
  149. shade: layer_shade,
  150. area: ['480px', '190px'],
  151. move: false,
  152. title: '提示',
  153. btnAlign:'r',
  154. closeBtn: 3,
  155. btn: ['确定', '取消'] ,//按钮
  156. success: function () {
  157. $(".layui-layer-content").css('text-align', 'left');
  158. }
  159. }, function(){
  160. layer_loading('正在处理');
  161. // 确定
  162. $.ajax({
  163. type : 'post',
  164. url : $(obj).attr('data-url'),
  165. data : {del_id:$(obj).attr('data-id'), _ajax:1},
  166. dataType : 'json',
  167. success : function(data){
  168. layer.closeAll();
  169. if(data.code == 1){
  170. layer.msg(data.msg, {icon: 6});
  171. window.location.reload();
  172. }else{
  173. layer.alert(data.msg, {icon: 5, title:false});
  174. }
  175. }
  176. })
  177. }, function(index){
  178. layer.close(index);
  179. });
  180. return false;
  181. }
  182. /**
  183. * 批量还原提交
  184. */
  185. function batch_recovery(obj, name) {
  186. var a = [];
  187. $('input[name^='+name+']').each(function(i,o){
  188. if($(o).is(':checked')){
  189. a.push($(o).val());
  190. }
  191. })
  192. if(a.length == 0){
  193. layer.alert('请至少选择一项', {
  194. shade: layer_shade,
  195. area: ['480px', '190px'],
  196. move: false,
  197. title: '提示',
  198. btnAlign:'r',
  199. closeBtn: 3,
  200. success: function () {
  201. $(".layui-layer-content").css('text-align', 'left');
  202. }
  203. });
  204. return;
  205. }
  206. // 还原按钮
  207. layer.confirm('确认批量还原?选定参数与关联栏目一起还原。', {
  208. shade: layer_shade,
  209. area: ['480px', '190px'],
  210. move: false,
  211. title: '提示',
  212. btnAlign:'r',
  213. closeBtn: 3,
  214. btn: ['确定', '取消'] ,//按钮
  215. success: function () {
  216. $(".layui-layer-content").css('text-align', 'left');
  217. }
  218. }, function () {
  219. layer_loading('正在处理');
  220. $.ajax({
  221. type: "POST",
  222. url: $(obj).attr('data-url'),
  223. data: {del_id:a, _ajax:1},
  224. dataType: 'json',
  225. success: function (data) {
  226. layer.closeAll();
  227. if(data.code == 1){
  228. layer.msg(data.msg, {icon: 6});
  229. window.location.reload();
  230. }else{
  231. layer.alert(data.msg, {icon: 5, title:false});
  232. }
  233. },
  234. error:function(e){
  235. layer.closeAll();
  236. layer.alert(e.responseText, {icon: 5, title:false});
  237. }
  238. });
  239. }, function (index) {
  240. layer.closeAll(index);
  241. });
  242. }
  243. // 删除
  244. function delfun(obj){
  245. layer.confirm('确认彻底删除?', {
  246. shade: layer_shade,
  247. area: ['480px', '190px'],
  248. move: false,
  249. title: '提示',
  250. btnAlign:'r',
  251. closeBtn: 3,
  252. btn: ['确定', '取消'] ,//按钮
  253. success: function () {
  254. $(".layui-layer-content").css('text-align', 'left');
  255. }
  256. }, function(){
  257. layer_loading('正在处理');
  258. // 确定
  259. $.ajax({
  260. type : 'post',
  261. url : $(obj).attr('data-url'),
  262. data : {del_id:$(obj).attr('data-id'), _ajax:1},
  263. dataType : 'json',
  264. success : function(data){
  265. layer.closeAll();
  266. if(data.code == 1){
  267. layer.msg(data.msg, {icon: 6});
  268. window.location.reload();
  269. }else{
  270. layer.alert(data.msg, {icon: 5, title:false});
  271. }
  272. }
  273. })
  274. }, function(index){
  275. layer.close(index);
  276. });
  277. return false;
  278. }
  279. /**
  280. * 批量删除提交
  281. */
  282. function batch_del(obj, name) {
  283. var a = [];
  284. $('input[name^='+name+']').each(function(i,o){
  285. if($(o).is(':checked')){
  286. a.push($(o).val());
  287. }
  288. })
  289. if(a.length == 0){
  290. layer.alert('请至少选择一项', {
  291. shade: layer_shade,
  292. area: ['480px', '190px'],
  293. move: false,
  294. title: '提示',
  295. btnAlign:'r',
  296. closeBtn: 3,
  297. success: function () {
  298. $(".layui-layer-content").css('text-align', 'left');
  299. }
  300. });
  301. return;
  302. }
  303. // 删除按钮
  304. layer.confirm('确认批量彻底删除?', {
  305. shade: layer_shade,
  306. area: ['480px', '190px'],
  307. move: false,
  308. title: '提示',
  309. btnAlign:'r',
  310. closeBtn: 3,
  311. btn: ['确定', '取消'] ,//按钮
  312. success: function () {
  313. $(".layui-layer-content").css('text-align', 'left');
  314. }
  315. }, function () {
  316. layer_loading('正在处理');
  317. $.ajax({
  318. type: "POST",
  319. url: $(obj).attr('data-url'),
  320. data: {del_id:a, _ajax:1},
  321. dataType: 'json',
  322. success: function (data) {
  323. layer.closeAll();
  324. if(data.code == 1){
  325. layer.msg(data.msg, {icon: 6});
  326. window.location.reload();
  327. }else{
  328. layer.alert(data.msg, {icon: 5, title:false});
  329. }
  330. },
  331. error:function(e){
  332. layer.closeAll();
  333. layer.alert(e.responseText, {icon: 5, title:false});
  334. }
  335. });
  336. }, function (index) {
  337. layer.closeAll(index);
  338. });
  339. }
  340. </script>
  341. {include file="public/footer" /}