mgdiscount_goods.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {extend name="default/base/base_seller" /}
  2. {block name="seller_btn"}
  3. <a class="dssc-btn dssc-btn-green" href="{:url('Sellerpromotionmgdiscount/mgdiscount_goods_add')}"><i class="iconfont">&#xe6db;</i>{$Think.lang.mgdiscount_goods_add}</a>
  4. {/block}
  5. {block name="seller_main"}
  6. <table class="dssc-default-table">
  7. <thead>
  8. <tr>
  9. <th class="w180">{$Think.lang.goods_name}</th>
  10. <th class="w180">{$Think.lang.level_discount}</th>
  11. <th class="w150">{$Think.lang.ds_handle}</th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. {notempty name="goods_list"}
  16. {foreach name="goods_list" item="goods"}
  17. <tr class="bd-line">
  18. <td>{$goods.goods_name}</td>
  19. <td>
  20. {foreach name="$goods.goods_mgdiscount_arr" item="goods_mgdiscount"}
  21. {$goods_mgdiscount.level_name}/{$goods_mgdiscount.level_discount}{$Think.lang.ds_xianshi_flag}<br/>
  22. {/foreach}
  23. </td>
  24. <td class="dscs-table-handle tc">
  25. <span>
  26. <a href="{:url('Sellerpromotionmgdiscount/mgdiscount_goods_edit',['goods_commonid'=>$goods.goods_commonid])}" class="btn-green">
  27. <i class="iconfont">&#xe734;</i>
  28. <p>{$Think.lang.ds_edit}</p>
  29. </a>
  30. </span>
  31. <span>
  32. <a href="javascript:;" dstype="btn_del_mgdiscount" data_goods_commonid={$goods.goods_commonid} class="btn-red">
  33. <i class="iconfont">&#xe725;</i>
  34. <p>{$Think.lang.ds_delete}</p>
  35. </a>
  36. </span>
  37. </td>
  38. </tr>
  39. {/foreach}
  40. {else /}
  41. <tr>
  42. <td class="norecord" colspan="20">
  43. <div class="warning-option"><i class="iconfont">&#xe64c;</i><span>{$Think.lang.no_record}</span>
  44. </div>
  45. </td>
  46. </tr>
  47. {/notempty}
  48. </tbody>
  49. <tfoot>
  50. {notempty name="goods_list"}
  51. <tr>
  52. <td colspan="20">
  53. <div class="pagination">{$show_page|raw}</div>
  54. </td>
  55. </tr>
  56. {/notempty}
  57. </tfoot>
  58. </table>
  59. <form id="submit_form" action="" method="post">
  60. <input type="hidden" id="goods_commonid" name="goods_commonid" value="">
  61. </form>
  62. <script type="text/javascript">
  63. $(document).ready(function () {
  64. $('[dstype="btn_del_mgdiscount"]').on('click', function () {
  65. var action = "{:url('Sellerpromotionmgdiscount/mgdiscount_del')}";
  66. var goods_commonid = $(this).attr('data_goods_commonid');
  67. layer.confirm('{$Think.lang.ds_ensure_del}', {
  68. btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
  69. title: false,
  70. }, function () {
  71. $('#submit_form').attr('action', action);
  72. $('#goods_commonid').val(goods_commonid);
  73. ds_ajaxpost('submit_form', 'url', "{:url('Sellerpromotionmgdiscount/mgdiscount_goods')}");
  74. });
  75. });
  76. });
  77. </script>
  78. {/block}