暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

index.htm 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. {include file="public/layout" /}
  2. <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page" style="box-shadow:none;">
  6. <div class="flexigrid" style="min-height: 600px;">
  7. <div class="mDiv">
  8. <div class="ftitle">
  9. {include file="archives/tags_btn" /}
  10. </div>
  11. <form class="navbar-form form-inline" id="searchForm" action="{:url('Product/index')}" method="get" onsubmit="layer_loading('正在处理');">
  12. {$searchform.hidden|default=''}
  13. <div class="sDiv">
  14. {include file="archives/flag_btn" /}
  15. <div class="sDiv2">
  16. <input type="hidden" name="typeid" id="typeid" value="{$Request.param.typeid|default=''}">
  17. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="标题搜索...">
  18. <input type="submit" class="btn" value="搜索">
  19. <i class="iconfont e-sousuo"></i>
  20. </div>
  21. </div>
  22. </form>
  23. </div>
  24. <div class="hDiv">
  25. <div class="hDivBox">
  26. <table cellspacing="0" cellpadding="0" style="width: 100%">
  27. <thead>
  28. <tr>
  29. <th class="sign w40" axis="col0">
  30. <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  31. </th>
  32. <th abbr="article_title" axis="col3" class="w70">
  33. <div class="tc">ID</div>
  34. </th>
  35. <th align="left" abbr="article_title" axis="col3" class="">
  36. <div style="padding-left: 10px;" class="">标题</div>
  37. </th>
  38. <th abbr="article_time" axis="col6" class="w120">
  39. <div class="tc">所属栏目</div>
  40. </th>
  41. <th abbr="article_time" axis="col6" class="w50">
  42. <div class="tc sort_style"><a href="{:getArchivesSortUrl('arcrank')}">审核&nbsp;<i {eq name='$Request.param.orderby' value='arcrank'}{eq name='$Request.param.orderway' value='asc'}class="asc"{else /}class="desc"{/eq}{/eq}></i></a></div>
  43. </th>
  44. <th align="center" abbr="article_time" axis="col6" class="w50">
  45. <div class="tc">推荐</div>
  46. </th>
  47. <th abbr="article_time" axis="col6" class="w60">
  48. <div class="tc">浏览量</div>
  49. </th>
  50. <th abbr="article_time" axis="col6" class="w100">
  51. <div class="tc">发布时间</div>
  52. </th>
  53. <th axis="col1" class="w160">
  54. <div class="tc">操作</div>
  55. </th>
  56. <th abbr="article_time" axis="col6" class="w60">
  57. <div class="tc sort_style"><a href="{:getArchivesSortUrl('sort_order')}">排序&nbsp;<i {eq name='$Request.param.orderby' value='sort_order'}{eq name='$Request.param.orderway' value='asc'}class="asc"{else /}class="desc"{/eq}{/eq}></i></a></div>
  58. </th>
  59. </tr>
  60. </thead>
  61. </table>
  62. </div>
  63. </div>
  64. <div class="bDiv" style="height: auto;">
  65. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  66. <table style="width: 100%;">
  67. <tbody>
  68. {empty name="list"}
  69. <tr>
  70. <td class="no-data" align="center" axis="col0" colspan="50">
  71. <div class="no_row">
  72. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  73. </div>
  74. </td>
  75. </tr>
  76. {else/}
  77. {foreach name="list" item="vo" key="k" }
  78. <tr>
  79. <td class="sign">
  80. <div class="tc w40"><input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.aid}"></div>
  81. </td>
  82. <td class="sort">
  83. <div class="tc w70">
  84. {$vo.aid}
  85. </div>
  86. </td>
  87. <td class="" style="width: 100%;">
  88. <div class="tl" style="padding-left: 10px;">
  89. {notempty name="$vo.is_litpic"}
  90. <i class="fa fa-picture-o color_z" onmouseover="layer_tips=layer.tips('<img src={$vo.litpic} class=\'layer_tips_img\'>',this,{tips: [3, '#fff'],skin:'layer-yourskin-mt0'});" onmouseout="layer.close(layer_tips);"></i>
  91. {/notempty}
  92. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  93. <a href="JavaScript:void(0);" data-url="{:url('Product/edit', ['id'=>$vo['aid'], 'callback_url'=>$callback_url])}" onclick="productEdit(this, {$shopOpen|default='0'}, {$vo.aid});" style="{eq name="vo.is_b" value="1"} font-weight: bold; {/eq}">{$vo.title}</a>
  94. {else /}
  95. {$vo.title}
  96. {/eq}
  97. {assign name='showArcFlagData' value='$vo|showArchivesFlagStr'}
  98. {volist name='$showArcFlagData' id="vo1"}
  99. {eq name='$i' value='1'}<span style="color: red;">[{/eq}
  100. <i style="font-size: 12px;">{$vo1['small_name']}</i>
  101. {eq name='$i' value='$showArcFlagData|count'}]</span>{/eq}
  102. {/volist}
  103. </div>
  104. </td>
  105. <td>
  106. <div class="w120 tc ellipsis">
  107. <a href="{:url('Product/index', array('typeid'=>$vo['typeid'], 'tab'=>3))}" title="{$vo.typename}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a>
  108. </div>
  109. </td>
  110. <td class="">
  111. <div class="tc w50">
  112. {if condition="$vo['arcrank'] eq -1"}
  113. <span class="no" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"} data-typeid="{$vo.typeid}" data-seo_pseudo="{$seo_pseudo|default='1'}" onclick="changeTableVal('archives','aid','{$vo.aid}','arcrank',this);" {/eq} ><i class="fa fa-ban"></i>否</span>
  114. {else /}
  115. <span class="yes" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"} data-typeid="{$vo.typeid}" data-seo_pseudo="{$seo_pseudo|default='1'}" onclick="changeTableVal('archives','aid','{$vo.aid}','arcrank',this);" {/eq} ><i class="fa fa-check-circle"></i>是</span>
  116. {/if}
  117. </div>
  118. </td>
  119. <td class="">
  120. <div class="tc w50">
  121. {if condition="$vo['is_recom'] eq 1"}
  122. <span class="yes" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}onClick="changeTableVal('archives','aid','{$vo.aid}','is_recom',this);"{/eq} ><i class="fa fa-check-circle"></i>是</span>
  123. {else /}
  124. <span class="no" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}onClick="changeTableVal('archives','aid','{$vo.aid}','is_recom',this);"{/eq} ><i class="fa fa-ban"></i>否</span>
  125. {/if}
  126. </div>
  127. </td>
  128. <td class="">
  129. <div class="tc w60">
  130. {$vo.click}
  131. </div>
  132. </td>
  133. <td align="center" class="">
  134. <div class="w100 tc">
  135. {$vo.add_time|date='Y-m-d',###}
  136. </div>
  137. </td>
  138. <td class="operation">
  139. <div class="w160 tc">
  140. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  141. <a href="JavaScript:void(0);" data-url="{:url('Product/edit', ['id'=>$vo['aid'], 'callback_url'=>$callback_url])}" onclick="productEdit(this, {$shopOpen|default='0'}, {$vo.aid});" class="btn blue">编辑</a>
  142. <i></i>
  143. {/eq}
  144. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  145. <a class="btn red" href="javascript:void(0);" data-url="{:url('Product/del')}" data-id="{$vo.aid}" {eq name="$global['web_recycle_switch']" value='1'} data-deltype="del" {else /} data-deltype="pseudo" {/eq} onClick="delfun(this);">删除</a>
  146. <i></i>
  147. {/eq}
  148. <a href="{$vo.arcurl}" target="_blank" class="btn blue">浏览</a>
  149. </div>
  150. </td>
  151. <td class="sort">
  152. <div class="w60 tc">
  153. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  154. <input type="text" onchange="changeTableVal('archives','aid','{$vo.aid}','sort_order',this);" size="4" value="{$vo.sort_order}" />
  155. {else /}
  156. {$vo.sort_order}
  157. {/eq}
  158. </div>
  159. </td>
  160. </tr>
  161. {/foreach}
  162. {/empty}
  163. </tbody>
  164. </table>
  165. </div>
  166. <div class="iDiv" style="display: none;"></div>
  167. </div>
  168. {notempty name="list"}
  169. <div class="footer-oper">
  170. <span class="ml15">
  171. <input type="checkbox" autocomplete="off" class="checkAll">
  172. </span>
  173. <div class="nav-dropup">
  174. <button class="layui-btn layui-btn-primary dropdown-bt">批量操作<i class="layui-icon layui-icon-up"></i></button>
  175. <div class="dropdown-menus" style="display:none; {if condition='0 < $pager->totalRows && ($pager->totalRows < 3 || $pager->listRows < 3)'}top:28px;bottom:unset;border-bottom:1px solid rgba(0,0,0,.15);border-top:none;min-height: 250px;{/if}">
  176. {eq name="'Archives@batch_attr'|is_check_access" value="1"}
  177. <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量新增属性');" data-url="{:url('Archives/batch_attr', ['opt'=>'add'])}">新增属性</a>
  178. <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量删除属性');" data-url="{:url('Archives/batch_attr', ['opt'=>'del'])}">删除属性</a>
  179. <hr class="layui-bg-gray">
  180. {/eq}
  181. {eq name="'Archives@batch_copy'|is_check_access" value="1"}
  182. <a href="javascript:void(0);" onclick="func_batch_copy(this, 'ids');" data-url="{:url('Archives/batch_copy', array('typeid'=>$Request.param.typeid))}">复制文档</a>
  183. {/eq}
  184. {eq name="'Archives@move'|is_check_access" value="1"}
  185. <a href="javascript:void(0);" onclick="func_move(this, 'ids');" data-url="{:url('Archives/move', array('typeid'=>$Request.param.typeid))}">移动文档</a>
  186. {/eq}
  187. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  188. <a href="javascript:void(0);" onclick="batch_del(this, 'ids');" data-url="{:url('Product/del')}" {eq name="$global['web_recycle_switch']" value='1'} data-deltype="del" {else /} data-deltype="pseudo" {/eq}>删除文档</a>
  189. {/eq}
  190. {eq name="'Archives@check'|is_check_access" value="1"}
  191. <hr class="layui-bg-gray">
  192. <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-url="{:url('Archives/check')}">审核文档</a>
  193. <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-url="{:url('Archives/uncheck')}">取消审核</a>
  194. {/eq}
  195. </div>
  196. </div>
  197. {eq name="'RecycleBin@archives_index'|is_check_access" value="1"}
  198. {neq name="$global['web_recycle_switch']" value='1'} <a href="{:url('RecycleBin/archives_index')}" class="layui-btn layui-btn-primary" title="回收站">回收站</a> {/neq}
  199. {/eq}
  200. {include file="public/page" /}
  201. </div>
  202. {/notempty}
  203. </div>
  204. </div>
  205. <script type="text/javascript">
  206. $(function(){
  207. $('input[name*=ids]').click(function(){
  208. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  209. $('.checkAll').prop('checked','checked');
  210. } else {
  211. $('.checkAll').prop('checked', false);
  212. }
  213. });
  214. $('input[type=checkbox].checkAll').click(function(){
  215. $('input[type=checkbox]').prop('checked',this.checked);
  216. });
  217. });
  218. $(document).ready(function(){
  219. // 表格行点击选中切换
  220. $('#flexigrid > table>tbody >tr').click(function(){
  221. $(this).toggleClass('trSelected');
  222. });
  223. // 点击刷新数据
  224. $('.fa-refresh').click(function(){
  225. location.href = location.href;
  226. });
  227. // 批量操作
  228. $(".dropdown-bt").click(function(){
  229. $(".dropdown-menus").slideToggle(200);
  230. event.stopPropagation();
  231. })
  232. $(document).click(function(){
  233. $(".dropdown-menus").slideUp(200);
  234. event.stopPropagation();
  235. })
  236. });
  237. var aids = '';
  238. function func_move(obj, name)
  239. {
  240. var a = [];
  241. var k = 0;
  242. aids = '';
  243. $('input[name^='+name+']').each(function(i,o){
  244. if($(o).is(':checked')){
  245. a.push($(o).val());
  246. if (k > 0) {
  247. aids += ',';
  248. }
  249. aids += $(o).val();
  250. k++;
  251. }
  252. })
  253. if(a.length == 0){
  254. layer.alert('请至少选择一项', {
  255. shade: layer_shade,
  256. area: ['480px', '190px'],
  257. move: false,
  258. title: '提示',
  259. btnAlign:'r',
  260. closeBtn: 3,
  261. success: function () {
  262. $(".layui-layer-content").css('text-align', 'left');
  263. }
  264. });
  265. return;
  266. }
  267. var url = $(obj).attr('data-url');
  268. //iframe窗
  269. layer.open({
  270. type: 2,
  271. title: '移动文档',
  272. fixed: true, //不固定
  273. shadeClose: false,
  274. shade: layer_shade,
  275. maxmin: false, //开启最大化最小化按钮
  276. area: ['480px', '360px'],
  277. content: url
  278. });
  279. }
  280. /**
  281. * 批量审核
  282. */
  283. function batch_check(obj, name) {
  284. var url = $(obj).attr('data-url');
  285. var a = [];
  286. $('input[name^='+name+']').each(function(i,o){
  287. if($(o).is(':checked')){
  288. a.push($(o).val());
  289. }
  290. })
  291. if(a.length == 0){
  292. layer.alert('请至少选择一项', {
  293. shade: layer_shade,
  294. area: ['480px', '190px'],
  295. move: false,
  296. title: '提示',
  297. btnAlign:'r',
  298. closeBtn: 3,
  299. success: function () {
  300. $(".layui-layer-content").css('text-align', 'left');
  301. }
  302. });
  303. return;
  304. }
  305. // title = '批量审核';
  306. // btn = ['确定', '取消']; //按钮
  307. // // 删除按钮
  308. // layer.confirm(title, {
  309. // title: false,
  310. // btn: btn //按钮
  311. // }, function () {
  312. layer_loading('正在处理');
  313. $.ajax({
  314. type: "POST",
  315. url: url,
  316. data: {ids:a, _ajax:1},
  317. dataType: 'json',
  318. success: function (res) {
  319. layer.closeAll();
  320. if(res.code == 1){
  321. layer.msg(res.msg, {icon: 1, time:1000}, function(){
  322. window.location.reload()
  323. });
  324. }else{
  325. layer.alert(res.msg, {icon: 2, title:false});
  326. }
  327. },
  328. error:function(e){
  329. layer.closeAll();
  330. layer.alert(e.responseText, {icon: 2, title:false});
  331. }
  332. });
  333. // }, function (index) {
  334. // layer.closeAll(index);
  335. // });
  336. }
  337. /**
  338. * 获取修改之前的内容
  339. */
  340. function get_aids()
  341. {
  342. return aids;
  343. }
  344. </script>
  345. {include file="public/footer" /}