暫無描述
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.

ajax_archives_list.htm 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. {include file="public/layout" /}
  2. <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;min-width:400px;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page" style="box-shadow:none;min-width: 400px;">
  6. <div class="flexigrid">
  7. <div class="mDiv">
  8. <div class="ftitle">
  9. <h3>商品列表</h3>
  10. <h5>(共{$pager->totalRows}条数据)</h5>
  11. </div>
  12. <div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
  13. <form class="navbar-form form-inline" id="searchForm" action="{:url('Sharp/ajax_archives_list')}" method="get" onsubmit="layer_loading('正在处理');">
  14. {$searchform.hidden|default=''}
  15. <div class="sDiv">
  16. <div class="sDiv2">
  17. <select name="typeid" class="select" style="margin:0px 5px;">
  18. <option value="0">--选择栏目--</option>
  19. {$arctype_html}
  20. </select>
  21. </div>
  22. <div class="sDiv2">
  23. <input type="hidden" name="channel" id="channel" value="{$Request.param.channel|default=''}">
  24. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="标题搜索...">
  25. <input type="submit" class="btn" value="搜索">
  26. <i class="iconfont e-sousuo"></i>
  27. </div>
  28. </div>
  29. </form>
  30. </div>
  31. <div class="hDiv">
  32. <div class="hDivBox">
  33. <table cellspacing="0" cellpadding="0" style="width: 100%">
  34. <thead>
  35. <tr>
  36. <th abbr="article_title" axis="col3" class="w50">
  37. <div class="tc">ID</div>
  38. </th>
  39. <th align="center" abbr="article_title" axis="col3" class="w60">
  40. <div class="tc">封面图</div>
  41. </th>
  42. <th align="left" abbr="article_title" axis="col3" class="">
  43. <div style="text-align: left; padding-left: 10px;" class="">商品标题</div>
  44. </th>
  45. <th abbr="article_time" axis="col6" class="w100">
  46. <div class="tc">所属栏目</div>
  47. </th>
  48. <th abbr="article_time" axis="col6" class="w100">
  49. <div class="tc">更新时间</div>
  50. </th>
  51. <th abbr="choose" axis="col6" class="w50">
  52. <div class="tc">操作</div>
  53. </th>
  54. </tr>
  55. </thead>
  56. </table>
  57. </div>
  58. </div>
  59. <div class="bDiv" style="height: auto;">
  60. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  61. <table style="width: 100%;">
  62. <tbody>
  63. {empty name="list"}
  64. <tr>
  65. <td class="no-data" align="center" axis="col0" colspan="50">
  66. <div class="no_row">
  67. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  68. </div>
  69. </td>
  70. </tr>
  71. {else/}
  72. {foreach name="list" item="vo" key="k" }
  73. <tr>
  74. <td class="sort">
  75. <div class="tc w50">
  76. {$vo.aid}
  77. </div>
  78. </td>
  79. <td class="w60">
  80. <div class="tc">
  81. <img src="{$vo.litpic|get_default_pic=###}" width="60" height="60">
  82. </div>
  83. </td>
  84. <td class="" style="width: 100%;">
  85. <div class="tl" style="padding-left: 10px;">
  86. <div class="title">
  87. {$vo.title}
  88. </div>
  89. </div>
  90. </td>
  91. <td class="">
  92. <div class="w100 tc"><a href="{:url('Sharp/ajax_archives_list', array('typeid'=>$vo['typeid']))}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a></div>
  93. </td>
  94. <td>
  95. <div class="w100 tc">
  96. {$vo.update_time|date='Y-m-d',###}
  97. </div>
  98. </td>
  99. <td class="operation">
  100. <div class="w50 tc">
  101. <a href="javascript:void(0);" onclick="confirm_choose_sharp_good('{$vo.aid}');" class="btn blue">
  102. 选择
  103. </a>
  104. </div>
  105. </td>
  106. </tr>
  107. {/foreach}
  108. {/empty}
  109. </tbody>
  110. </table>
  111. </div>
  112. <div class="iDiv" style="display: none;"></div>
  113. </div>
  114. <div class="tDiv">
  115. <div class="tDiv2">
  116. {include file="public/page" /}
  117. </div>
  118. <div style="clear:both"></div>
  119. </div>
  120. </div>
  121. </div>
  122. <script type="text/javascript">
  123. function confirm_choose_sharp_good(aid){
  124. window.parent.reback(aid)
  125. }
  126. $(document).ready(function(){
  127. // 表格行点击选中切换
  128. $('#flexigrid > table>tbody >tr').click(function(){
  129. $(this).toggleClass('trSelected');
  130. });
  131. // 点击刷新数据
  132. $('.fa-refresh').click(function(){
  133. location.href = location.href;
  134. });
  135. $('#searchForm select[name=typeid]').change(function(){
  136. $('#searchForm').submit();
  137. });
  138. });
  139. /**
  140. * 获取已选择的数据
  141. * @returns {Array}
  142. */
  143. function getSelectedData() {
  144. var data = [];
  145. $('input[name^=ids]').each(function(i,o){
  146. if($(o).is(':checked')){
  147. var params = $('#ids_' + $(o).val()).val();
  148. params = $.parseJSON(params);
  149. data.push(params);
  150. }
  151. })
  152. if(data.length == 0){
  153. layer.alert('请至少选择一项', {
  154. shade: layer_shade,
  155. area: ['480px', '190px'],
  156. move: false,
  157. title: '提示',
  158. closeBtn: 3,
  159. success: function () {
  160. $(".layui-layer-content").css('text-align', 'left');
  161. }
  162. });
  163. return;
  164. }
  165. return data;
  166. }
  167. </script>
  168. {include file="public/footer" /}