Açıklama Yok
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.

goods_list.htm 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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/goods_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 class="sign w40" axis="col0">
  37. <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  38. </th>
  39. <th abbr="article_title" axis="col3" class="w50">
  40. <div class="tc">ID</div>
  41. </th>
  42. <th align="center" abbr="article_title" axis="col3" class="w60">
  43. <div class="tc">封面图</div>
  44. </th>
  45. <th align="left" abbr="article_title" axis="col3" class="">
  46. <div style="text-align: left; padding-left: 10px;" class="">商品标题</div>
  47. </th>
  48. <th abbr="article_time" axis="col6" class="w100">
  49. <div class="tc">限购数量</div>
  50. </th>
  51. <th abbr="article_time" axis="col6" class="w100">
  52. <div class="tc">商品库存总量</div>
  53. </th>
  54. <th abbr="article_time" axis="col6" class="w100">
  55. <div class="tc">更新时间</div>
  56. </th>
  57. </tr>
  58. </thead>
  59. </table>
  60. </div>
  61. </div>
  62. <div class="bDiv" style="height: auto;">
  63. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  64. <table style="width: 100%;">
  65. <tbody>
  66. {empty name="list"}
  67. <tr>
  68. <td class="no-data" align="center" axis="col0" colspan="50">
  69. <div class="no_row">
  70. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  71. </div>
  72. </td>
  73. </tr>
  74. {else/}
  75. {foreach name="list" item="vo" key="k" }
  76. <tr>
  77. <td class="sign">
  78. <div class="tc w40">
  79. <input type="checkbox" autocomplete="off" name="infos[]" value='{$vo.json_encode_params}'>
  80. </div>
  81. </td>
  82. <td class="sort">
  83. <div class="tc w50">
  84. {$vo.sharp_goods_id}
  85. </div>
  86. </td>
  87. <td class="w60">
  88. <div class="tc">
  89. <img src="{$vo.litpic|get_default_pic=###}" width="60" height="60">
  90. </div>
  91. </td>
  92. <td class="" style="width: 100%;">
  93. <div class="tl" style="padding-left: 10px;">
  94. <div class="title">
  95. {$vo.title}
  96. </div>
  97. </div>
  98. </td>
  99. <td class="">
  100. <div class="w100 tc">
  101. {eq name="$vo.limit" value="0"}
  102. 不限购
  103. {else /}
  104. 限购{$vo.limit}件
  105. {/eq}
  106. </div>
  107. </td>
  108. <td class="">
  109. <div class="w100 tc">
  110. {$vo.seckill_stock}
  111. </div>
  112. </td>
  113. <td>
  114. <div class="w100 tc">
  115. {$vo.update_time|date='Y-m-d',###}
  116. </div>
  117. </td>
  118. </tr>
  119. {/foreach}
  120. {/empty}
  121. </tbody>
  122. </table>
  123. </div>
  124. <div class="iDiv" style="display: none;"></div>
  125. </div>
  126. <div class="tDiv">
  127. <div class="tDiv2">
  128. <div class="fbutton checkboxall">
  129. <input type="checkbox" autocomplete="off" class="checkAll">
  130. </div>
  131. <div class="fbutton">
  132. <a onclick="confirm_choose();" class="layui-btn layui-btn-primary">
  133. <span>确定</span>
  134. </a>
  135. </div>
  136. {include file="public/page" /}
  137. </div>
  138. <div style="clear:both"></div>
  139. </div>
  140. </div>
  141. </div>
  142. <script type="text/javascript">
  143. $(function(){
  144. $('input[name*=ids]').click(function(){
  145. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  146. $('.checkAll').prop('checked','checked');
  147. } else {
  148. $('.checkAll').prop('checked', false);
  149. }
  150. });
  151. $('input[type=checkbox].checkAll').click(function(){
  152. $('input[type=checkbox]').prop('checked',this.checked);
  153. });
  154. });
  155. function confirm_choose(){
  156. var infos = [];
  157. $('input[name^=infos]').each(function(){
  158. if($(this).is(':checked')){
  159. infos.push($(this).val());
  160. }
  161. })
  162. if(infos.length == 0){
  163. layer.alert('请至少选择一项', {
  164. shade: layer_shade,
  165. area: ['480px', '190px'],
  166. move: false,
  167. title: '提示',
  168. closeBtn: 3,
  169. success: function () {
  170. $(".layui-layer-content").css('text-align', 'left');
  171. }
  172. });
  173. return;
  174. }
  175. window.parent.reback(infos)
  176. }
  177. $(document).ready(function(){
  178. // 表格行点击选中切换
  179. $('#flexigrid > table>tbody >tr').click(function(){
  180. $(this).toggleClass('trSelected');
  181. });
  182. // 点击刷新数据
  183. $('.fa-refresh').click(function(){
  184. location.href = location.href;
  185. });
  186. $('#searchForm select[name=typeid]').change(function(){
  187. $('#searchForm').submit();
  188. });
  189. });
  190. /**
  191. * 获取已选择的数据
  192. * @returns {Array}
  193. */
  194. function getSelectedData() {
  195. var data = [];
  196. $('input[name^=ids]').each(function(i,o){
  197. if($(o).is(':checked')){
  198. var params = $('#ids_' + $(o).val()).val();
  199. params = $.parseJSON(params);
  200. data.push(params);
  201. }
  202. })
  203. if(data.length == 0){
  204. layer.alert('请至少选择一项', {
  205. shade: layer_shade,
  206. area: ['480px', '190px'],
  207. move: false,
  208. title: '提示',
  209. closeBtn: 3,
  210. success: function () {
  211. $(".layui-layer-content").css('text-align', 'left');
  212. }
  213. });
  214. return;
  215. }
  216. return data;
  217. }
  218. </script>
  219. {include file="public/footer" /}