submitorder.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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" href="{:url('cart')}">返回</a> </div>
  4. <h1 class="weui-header-title">订单详情</h1>
  5. <div class="weui-header-right"></div>
  6. </div>
  7. <form id="form" action="submitorder?orders={$ids}" method="post" class="ajax-form-order">
  8. <div class="weui_cells_title">所属机构</div>
  9. <div class="weui_cells">
  10. <div class="weui_cell" style="background-color: #ccc;">
  11. <div class="weui_cell_bd weui_cell_primary">
  12. <div class="weui_input" type="readonly" >{$HospitalName}</div>
  13. </div>
  14. </div>
  15. </div>
  16. <div class="weui_cells_title">联系方式</div>
  17. <div class="weui_cells weui_cells_form">
  18. <div class="weui_cell">
  19. <div class="weui_cell_hd"><label class="weui_label">姓名<i style="color:red;">*</i></label></div>
  20. <div class="weui_cell_bd weui_cell_primary">
  21. <input class="weui_input" name="name" type="text" value="{$name}" placeholder="请输入姓名">
  22. </div>
  23. </div>
  24. <div class="weui_cell">
  25. <div class="weui_cell_hd"><label class="weui_label">手机号<i style="color:red;">*</i></label></div>
  26. <div class="weui_cell_bd weui_cell_primary">
  27. <input class="weui_input" type="number" name='mobile' value="{$phone}" pattern="[0-9]*" placeholder="请输入号码">
  28. </div>
  29. </div>
  30. </div>
  31. <div class="weui_cells_title">收货地址<i style="color:red;">*</i></div>
  32. <div class="weui_cells">
  33. <div class="weui_cell">
  34. <div class="weui_cell_bd weui_cell_primary">
  35. <textarea id="textarea" readonly class="weui_textarea" name="address" placeholder="请输入“{$HospitalName}”里的具体位置" rows="3">{$address}</textarea>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="weui_cells_title">床号及备注<i style="color:red;">*</i></div>
  40. <div class="weui_cells">
  41. <div class="weui_cell">
  42. <div class="weui_cell_bd weui_cell_primary">
  43. <textarea id="textarea" class="weui_textarea" name="remark" placeholder="请输入床号及备注信息(最多15字)" rows="3"></textarea>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="weui_cells_title"></div>
  48. <div class="weui-form-preview">
  49. <div class="weui-form-preview-hd">
  50. <label class="weui-form-preview-label">付款总金额</label>
  51. <em class="weui-form-preview-value">¥{$count}</em>
  52. </div>
  53. <div class="weui-form-preview-bd">
  54. {foreach $list as $key => $value}
  55. <p>
  56. <label class="weui-form-preview-label">{$value.name}
  57. x{$value.count}</label>
  58. <span class="weui-form-preview-value">¥{$value.money}</span>
  59. </p>
  60. {/foreach}
  61. </div>
  62. </div>
  63. {if !$is_pay}
  64. <input type="hidden" name="order_type" value="4">
  65. {else}
  66. {if $bDinder}
  67. {include file="../application/h5/view/wx_book_dinner/pay_type.html"}
  68. {/if}
  69. {/if}
  70. <div class="page-bd">
  71. <div class="weui_cells_title">是否自取</div>
  72. <div class="weui_cells weui_cells_radio">
  73. <label class="weui_cell weui_check_label" for="x15">
  74. <div class="weui_cell_bd weui_cell_primary">
  75. <p>否</p>
  76. </div>
  77. <div class="weui_cell_ft">
  78. <input type="radio" class="weui_check" name="is_take" id="x15" value="0" checked="checked">
  79. <span class="weui_icon_checked"></span>
  80. </div>
  81. </label>
  82. <label class="weui_cell weui_check_label" for="x16">
  83. <div class="weui_cell_bd weui_cell_primary">
  84. <p>是</p>
  85. </div>
  86. <div class="weui_cell_ft">
  87. <input type="radio" name="is_take" class="weui_check" id="x16" value="1">
  88. <span class="weui_icon_checked"></span>
  89. </div>
  90. </label>
  91. </div>
  92. </div>
  93. <div class="weui_btn_area">
  94. <button id="formSubmitBtn" type="button" onclick="order()" class="weui_btn weui_btn_primary">提交订单</button>
  95. </div>
  96. <div style="height: 30px;"/>
  97. </form>
  98. <script type="text/javascript">
  99. $(document).ready(function () {
  100. //提交数据
  101. $('.ajax-form-order').ajaxSubmit(function(result){
  102. if(result.code ==1){
  103. $.toptips(result.message,'warning');
  104. }else{
  105. window.location.href = result.url;
  106. }
  107. return false;
  108. });
  109. });
  110. function add() {
  111. $.post('submitorder?orders={$ids}',$('.ajax-form-order').serialize(),function (result) {
  112. if(result.code ==1){
  113. $.toptips(result.message,'warning');
  114. }else{
  115. window.location.href = result.data.url;
  116. }
  117. },'json')
  118. }
  119. function order() {
  120. layer.open({
  121. content: '请仔细确认您的订单数量及金额。如需退单,仅可在下单当日申请,并联系餐厅人员审核,方可退款。'
  122. ,btn: ['确定', '取消']
  123. ,yes: function(index){
  124. layer.closeAll();
  125. add();
  126. }
  127. });
  128. }
  129. </script>