refuse.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {include file="../application/h5/view/wx_book_dinner/header.html"}
  2. <div class="weui-header bg-blue">
  3. <div class="weui-header-left"> <a class="icon icon-109 f-white close-popup close-pop" href="javascript:history.back(-1);">返回</a> </div>
  4. <h1 class="weui-header-title">退单选择</h1>
  5. <div class="weui-header-right"></div>
  6. </div>
  7. <form action="refuse?id={$id}" method="post" class="form ajax-form" role="form" style='padding: 10px;'>
  8. {if !empty($data['cartInfo'])}
  9. <div class="weui_cells_title">选择你要退的商品</div>
  10. <div class="weui_cells weui_cells_checkbox">
  11. {foreach $data['cartInfo'] as $key => $value}
  12. <label class="weui_cell weui_check_label" for="s_{$value.id}">
  13. <div class="weui_cell_hd">
  14. <input type="checkbox" class="weui_check" name="checkbox_{$value.id}" id="s_{$value.id}">
  15. <i class="weui_icon_checked"></i>
  16. </div>
  17. <div class="weui_cell_bd weui_cell_primary">
  18. <p>{$value.dinner_name}<span style="color: red;">(x{$value.num}份)</span></p>
  19. </div>
  20. </label>
  21. {/foreach}
  22. </div>
  23. <div class="submit-btn" style="margin-top: 60px;">
  24. <button type="button" class="weui_btn weui_btn_primary">提交</button>
  25. </div>
  26. {else}
  27. <div class="submit-btn" style="margin-top: 60px;">
  28. 当前订单商品已全部退单
  29. </div>
  30. {/if}
  31. </form>
  32. <script>
  33. $('.weui_btn').click(function () {
  34. $.post('refuse?id={$id}',$('.ajax-form').serialize(),function (result) {
  35. if(result.code ==1){
  36. $.toptips(result.message,'warning');
  37. }else{
  38. window.location.href = 'order';
  39. }
  40. },'json')
  41. })
  42. </script>