order_detail.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. {include file="../application/h5/view/wx_book_dinner/header.html"}
  2. <style>
  3. .pull-right{
  4. float: right;
  5. margin-left: 10px;
  6. }
  7. </style>
  8. <div class="weui-header bg-blue">
  9. <div class="weui-header-left"> <a class="icon icon-109 f-white close-popup close-pop" href="{:url('order')}">返回</a> </div>
  10. <h1 class="weui-header-title">订单详情</h1>
  11. <div class="weui-header-right"></div>
  12. </div>
  13. <div>
  14. {if $info['cate'] == 1}
  15. {volist name="info['types']" id="v"}
  16. <div class="weui_cells_title">
  17. {$v.day} [{$v.dinner_type}] {$v.group}
  18. {if $v['type'] == 0 && $v['options'] == 1}
  19. <!-- <a href="javascript:;" data-title="{$v.day} [{$v.dinner_type}] {$v.group}" data-sign="{$v.sign}" onclick="cancelBtn(this)" class="pull-right"><span style="color: red;">取消</span></a>-->
  20. <a href="{:url('changedinner',['sign'=>$v['sign']])}" class="pull-right">换流食</a>
  21. {/if}
  22. {if $v['options'] == 1}
  23. <a href="{:url('refunddinner',['sign'=>$v['sign']])}" class="pull-right"><span style="color: red;">退餐</span></a>
  24. {/if}
  25. </div>
  26. <div class="weui_cells weui_cells_form">
  27. <div class="weui_cell text-muted">
  28. {$v.dinners}
  29. </div>
  30. </div>
  31. {/volist}
  32. <div style="height: 15px"></div>
  33. {/if}
  34. {if $info['cate'] == 0}
  35. <div class="weui_panel_hd" style="background-color: #ffffff;">订购物品</div>
  36. <div class="weui_panel_bd weui_panel_bd weui_cells_access" style="background-color: #ffffff;">
  37. {foreach $item as $key => $value}
  38. <a href="javascript:;" class="weui_media_box weui_media_appmsg show-dialog-get">
  39. <div class="weui_media_hd weui-lazy">
  40. <img class="weui_media_appmsg_thumb" src="{$value.img}">
  41. </div>
  42. <div class="weui_media_bd">
  43. <h4 class="weui_media_title">{$value.dinner_name}<span style="color: red;">x{$value.num}份</span></h4>
  44. <p class="weui_media_desc">{$value.content}</p>
  45. <p class="weui_media_info">¥{$value.money}</p>
  46. </div>
  47. </a>
  48. {/foreach}
  49. </div>
  50. {if !empty($refuse_item)}
  51. <div class="weui_panel_hd" style="background-color: #ffffff;">退款物品</div>
  52. <div class="weui_panel_bd weui_panel_bd weui_cells_access" style="background-color: #ffffff;">
  53. {foreach $refuse_item as $key => $value}
  54. <a href="javascript:;" class="weui_media_box weui_media_appmsg show-dialog-get">
  55. <div class="weui_media_hd weui-lazy">
  56. <img class="weui_media_appmsg_thumb" src="{$value.img}">
  57. </div>
  58. <div class="weui_media_bd">
  59. <h4 class="weui_media_title">{$value.dinner_name}<span style="color: red;">x{$value.num}份</span></h4>
  60. <p class="weui_media_desc">{$value.content}</p>
  61. <p class="weui_media_info">¥{$value.money}</p>
  62. </div>
  63. </a>
  64. {/foreach}
  65. </div>
  66. {/if}
  67. {/if}
  68. <ul class="weui-payrec">
  69. <div class="weui-pay-m">
  70. <li class="weui-pay-order">
  71. <dl class="weui-pay-line">
  72. <dd class="weui-pay-name">收件人</dd>
  73. <dt class="weui-pay-label">姓名:</dt><dd class="weui-pay-e">{$info.name}</dd>
  74. </dl>
  75. <dl class="weui-pay-line"><dt class="weui-pay-label">金额:</dt><dd class="weui-pay-e">¥{$info.price}</dd></dl>
  76. <dl class="weui-pay-line"><dt class="weui-pay-label">手机号:</dt><dd class="weui-pay-e">{$info.mobile}</dd></dl>
  77. <dl class="weui-pay-line"><dt class="weui-pay-label">所属单位:</dt><dd class="weui-pay-e">{$info.orgName}</dd></dl>
  78. <dl class="weui-pay-line"><dt class="weui-pay-label">收货地址:</dt><dd class="weui-pay-e">{$info.address}</dd></dl>
  79. <dl class="weui-pay-line"><dt class="weui-pay-label">床号备注:</dt><dd class="weui-pay-e">{$info.remark}</dd></dl>
  80. <dl class="weui-pay-line"><dt class="weui-pay-label">下单时间:</dt><dd class="weui-pay-e">{$info.pay_time}</dd></dl>
  81. </li>
  82. </div>
  83. </ul>
  84. </div>
  85. <script>
  86. function cancelBtn(_self){
  87. let title = $(_self).attr('data-title');
  88. let sign = $(_self).attr('data-sign');
  89. $.confirm("您确定要取消"+title+"吗?", "确认取消?", function() {
  90. let url = "{:url('canceldinner')}";
  91. $.post(url,{sign:sign},function (ret) {
  92. console.log('ret',ret);
  93. if(ret.code == 1){
  94. $.toast("取消成功!");
  95. setTimeout(()=>{
  96. window.location.reload();
  97. },1000);
  98. }else{
  99. $.toast(ret.msg);
  100. }
  101. });
  102. }, function() {
  103. //取消操作
  104. });
  105. }
  106. </script>