index.html 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.ds_groupbuy}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <form method="get" name="formSearch">
  13. <div class="ds-search-form">
  14. <dl>
  15. <dt>{$Think.lang.group_name}</dt>
  16. <dd><input type="text" value="{$Request.get.groupbuy_name}" name="groupbuy_name" id="groupbuy_name" class="txt" style="width:100px;"></dd>
  17. </dl>
  18. <dl>
  19. <dt>{$Think.lang.ds_store_name}</dt>
  20. <dd><input type="text" value="{$Request.get.store_name}" name="store_name" id="store_name" class="txt" style="width:100px;"></dd>
  21. </dl>
  22. <dl>
  23. <dt>{$Think.lang.groupbuy_index_state}</dt>
  24. <dd><select name="groupbuy_state" class="w90">
  25. {notempty name="groupbuy_state_array"}
  26. {foreach name="groupbuy_state_array" item="val"}
  27. <option value="{$key}" {eq name="key" value="$Request.get.groupbuy_state" }selected{
  28. /eq}>
  29. {$val}</option>
  30. {/foreach}
  31. {/notempty}
  32. </select>
  33. </dd>
  34. </dl>
  35. <div class="btn_group">
  36. <a href="javascript:document.formSearch.submit();" class="btn" title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
  37. {if $filtered}
  38. <a href="{:url('Groupbuy/index')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
  39. {/if}
  40. </div>
  41. </div>
  42. </form>
  43. <!-- 说明 -->
  44. <div class="explanation" id="explanation">
  45. <div class="title" id="checkZoom">
  46. <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
  47. <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
  48. </div>
  49. <ul>
  50. <li>{$Think.lang.groupbuy_index_help1}</li>
  51. </ul>
  52. </div>
  53. <form id="list_form" method="post">
  54. <input type="hidden" id="group_id" name="group_id"/>
  55. <table class="ds-default-table">
  56. <thead>
  57. <tr class="thead">
  58. <th colspan="2">{$Think.lang.groupbuy_index_name}</th>
  59. <th class="align-center" width="120">{$Think.lang.ds_start_time}</th>
  60. <th class="align-center" width="120">{$Think.lang.ds_end_time}</th>
  61. <th class="align-center" width="80">{$Think.lang.groupbuy_index_click}</th>
  62. <th class="align-center" width="80">{$Think.lang.groupbuy_buy_quantity}</th>
  63. <th class="align-center" width="80">{$Think.lang.ds_recommend}</th>
  64. <th class="align-center" width="120">{$Think.lang.groupbuy_index_state}</th>
  65. <th class="align-center" width="150">{$Think.lang.ds_handle}</th>
  66. </tr>
  67. </thead>
  68. <tbody id="treet1">
  69. {notempty name="groupbuy_list"}
  70. {foreach name="groupbuy_list" item="val"}
  71. <tr class="hover">
  72. <td class="w60 picture">
  73. <div class="size-56x56"><span class="thumb size-56x56"><i></i>
  74. <a target="_blank" href="{:url('home/Showgroupbuy/groupbuy_detail',['group_id'=>$val.groupbuy_id])}"><img src="{:groupbuy_thumb($val.groupbuy_image)}" style=" max-width: 56px; max-height: 56px;"/></a></span></div>
  75. </td>
  76. <td class="group"><p>
  77. <a target="_blank" href="{:url('home/Showgroupbuy/groupbuy_detail',['group_id'=>$val.groupbuy_id])}"> {$val.groupbuy_name}</a>
  78. </p>
  79. <p class="goods">{$Think.lang.ds_goods_name}:<a target="_blank" href="{:url('home/Goods/index',['goods_id'=>$val.goods_id])}" title="{$val.goods_name}" target="_blank">{$val.goods_name}</a></p>
  80. <p class="store">{$Think.lang.ds_store_name}:<a href="{:url('home/Store/index',['store_id'=>$val.store_id])}" title="{$val.store_name}" target="_blank">{$val.store_name}</a>
  81. {present name="flippedOwnShopIds[$val.store_id]"}
  82. <span class="ownshop">[{$Think.lang.ds_ownshop}]</span>
  83. {/present}
  84. </p>
  85. </td>
  86. <td class="align-center nowarp">{$val.start_time_text}</td>
  87. <td class="align-center nowarp">{$val.end_time_text}</td>
  88. <td class="align-center">{$val.groupbuy_views}</td>
  89. <td class="align-center">{$val.groupbuy_buy_quantity}</td>
  90. <td class="yes-onoff align-center">
  91. {eq name="val.groupbuy_recommended" value="0"}
  92. <a href="JavaScript:void(0);" class=" disabled" ajax_branch='recommended' ds_type="inline_edit" fieldname="recommended" fieldid="{$val.groupbuy_id}" fieldvalue="0" title="{$Think.lang.ds_editable}">
  93. <img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/transparent.gif">
  94. </a>
  95. {else /}
  96. <a href="JavaScript:void(0);" class=" enabled" ajax_branch='recommended' ds_type="inline_edit" fieldname="recommended" fieldid="{$val.groupbuy_id}" fieldvalue="1" title="{$Think.lang.ds_editable}">
  97. <img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/transparent.gif">
  98. </a>
  99. {/eq}
  100. <td class="align-center">{$val.groupbuy_state_text}</td>
  101. <td class="align-center" id="ds_row_{$val.groupbuy_id}">
  102. {if $val.reviewable}
  103. <a dstype="btn_review_pass" data-groupbuy-id="{$val.groupbuy_id}" href="javascript:;" class="dsui-btn-add"><i class="iconfont"></i>{$Think.lang.ds_pass}</a>
  104. <a dstype="btn_review_fail" data-groupbuy-id="{$val.groupbuy_id}" href="javascript:;" class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_refuse}</a>
  105. {/if}
  106. {if $val.cancelable}
  107. <a dstype="btn_cancel" data-groupbuy-id="{$val.groupbuy_id}" href="javascript:;" class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_cancel}</a>
  108. {/if}
  109. <a href="javascript:dsLayerConfirm('{:url('Groupbuy/groupbuy_del',['groupbuy_id'=>$val.groupbuy_id])}','{$Think.lang.ensure_del}',{$val.groupbuy_id})" class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
  110. </td>
  111. </tr>
  112. {/foreach}
  113. {else /}
  114. <tr class="no_data">
  115. <td colspan="16">{$Think.lang.ds_no_record}</td>
  116. </tr>
  117. {/notempty}
  118. </tbody>
  119. </table>
  120. {notempty name="groupbuy_list"}
  121. {$show_page|raw}
  122. {/notempty}
  123. </form>
  124. </div>
  125. <form id="op_form" action="" method="POST">
  126. <input type="hidden" id="groupbuy_id" name="groupbuy_id">
  127. </form>
  128. <script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
  129. <script type="text/javascript">
  130. $(document).ready(function () {
  131. $('[dstype="btn_review_pass"]').on('click', function () {
  132. var action = "{:url('Groupbuy/groupbuy_review_pass')}";
  133. var groupbuy_id = $(this).attr('data-groupbuy-id');
  134. layer.confirm('{$Think.lang.ensure_verify_success}', {
  135. btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
  136. title: false,
  137. }, function () {
  138. $('#op_form').attr('action', action);
  139. $('#groupbuy_id').val(groupbuy_id);
  140. $('#op_form').submit();
  141. });
  142. });
  143. $('[dstype="btn_review_fail"]').on('click', function () {
  144. var action = "{:url('Groupbuy/groupbuy_review_fail')}";
  145. var groupbuy_id = $(this).attr('data-groupbuy-id');
  146. layer.confirm('{$Think.lang.ensure_verify_fail}', {
  147. btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
  148. title: false,
  149. }, function () {
  150. $('#op_form').attr('action', action);
  151. $('#groupbuy_id').val(groupbuy_id);
  152. $('#op_form').submit();
  153. });
  154. });
  155. $('[dstype="btn_cancel"]').on('click', function () {
  156. var action = "{:url('Groupbuy/groupbuy_cancel')}";
  157. var groupbuy_id = $(this).attr('data-groupbuy-id');
  158. layer.confirm('{$Think.lang.ensure_close}', {
  159. btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
  160. title: false,
  161. }, function () {
  162. $('#op_form').attr('action', action);
  163. $('#groupbuy_id').val(groupbuy_id);
  164. $('#op_form').submit();
  165. });
  166. });
  167. });
  168. </script>