order.wxml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <view class="bg">
  2. <view class="ctorder-view">
  3. <view class="ctorder-title">下单模式</view>
  4. <view class="ctorder-radio">
  5. <radio-group bindchange="radioChange">
  6. <label class="radio">
  7. <radio value="1" checked="{{ordertype==1?true:false}}"/>订餐
  8. </label>
  9. <label class="radio">
  10. <radio value="0" checked="{{ordertype==0?true:false}}"/>单点
  11. </label>
  12. </radio-group>
  13. </view>
  14. </view>
  15. <view class="ctorder-view">
  16. <view class="ctorder-title">订餐日期</view>
  17. <view class="">
  18. <view class="ctorder-datepicker" wx:if="{{ordertype == 0}}">
  19. <picker mode="date" value="{{date1}}" start="{{startdate1}}" end="{{enddate1}}" bindchange="bindDateChange">
  20. <view class="picker">
  21. <image src="../../../images/footer/date.png" class="image"></image>
  22. {{date1?date1:"请选择日期"}}
  23. </view>
  24. </picker>
  25. </view>
  26. <!-- <view class="ctorder-datepicker" style="margin-top:15rpx" wx:if="{{ordertype == 1}}">
  27. <picker mode="date" value="{{date2}}" start="{{startdate2}}" end="{{enddate2}}" bindchange="bindDateChange2">
  28. <view class="picker">
  29. {{date2?date2:"请选择结束日期"}}
  30. </view>
  31. </picker>
  32. </view>
  33. <view class="ctorder-checkboxun" style="margin-top:15rpx" wx:if="{{ordertype == 1}}">
  34. <checkbox-group bindchange="checkboxChangeUn">
  35. <label class="checkbox">
  36. <checkbox value="1"/>去除周六
  37. </label>
  38. <label class="checkbox" style="margin-left:15rpx">
  39. <checkbox value="2"/>去除周日
  40. </label>
  41. </checkbox-group>
  42. </view> -->
  43. <view wx:if="{{ordertype == 1}}">{{date3}} 至 {{date2}}</view>
  44. </view>
  45. </view>
  46. <!-- <view>订餐范围</view>
  47. <view class="section">
  48. <view class="section__title">日期选择器</view>
  49. <picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange">
  50. <view class="picker">
  51. 当前选择: {{date}}
  52. </view>
  53. </picker>
  54. </view> -->
  55. <view class="ctorder-view" wx:if="{{ordertype == 0}}">
  56. <view class="ctorder-title">订餐种类</view>
  57. <view class="ctorder-checkbox">
  58. <!-- <checkbox-group bindchange="checkboxChange"> -->
  59. <radio-group bindchange="checkboxChange">
  60. <label class="checkbox">
  61. <radio value="1" disabled="{{!can1}}"/>早餐
  62. <!-- <checkbox value="1"/>早餐 -->
  63. <view class="ctorder-numbox">
  64. <view class="cartlist_num">
  65. <button bindtap="mius" class="mius" data-type='1'>-</button>
  66. <input type="number" value="{{num1}}" bindinput="changeCount" data-type='1'/>
  67. <button bindtap="add" class="add" data-type='1'>+</button>
  68. </view>
  69. </view>
  70. </label>
  71. <label class="checkbox">
  72. <radio value="2" disabled="{{!can2}}"/>午餐
  73. <!-- <checkbox value="2" />午餐 -->
  74. <view class="ctorder-numbox">
  75. <view class="cartlist_num">
  76. <button bindtap="mius" class="mius" data-type='2'>-</button>
  77. <input type="number" value="{{num2}}" bindinput="changeCount" data-type='2'/>
  78. <button bindtap="add" class="add" data-type='2'>+</button>
  79. </view>
  80. </view>
  81. </label>
  82. <label class="checkbox">
  83. <radio value="3" disabled="{{!can3}}"/>晚餐
  84. <!-- <checkbox value="3" />晚餐 -->
  85. <view class="ctorder-numbox">
  86. <view class="cartlist_num">
  87. <button bindtap="mius" class="mius" data-type='3'>-</button>
  88. <input type="number" value="{{num3}}" bindinput="changeCount" data-type='3'/>
  89. <button bindtap="add" class="add" data-type='3'>+</button>
  90. </view>
  91. </view>
  92. </label>
  93. <!-- </checkbox-group> -->
  94. </radio-group>
  95. </view>
  96. </view>
  97. <view class="ctorder-view" wx:if="{{ordertype == 1}}">
  98. <view class="ctorder-title">订餐列表
  99. <checkbox bindtap="checkAllfunc" checked="{{checkAll}}" style="float:right">全选</checkbox>
  100. </view>
  101. <checkbox-group bindchange="checkboxChangeList">
  102. <view class="ctorder-checkbox-list" wx:for="{{preOrderList}}">
  103. <view class="listinfo">{{item['food_date']}}
  104. <view>{{item['food_day']}}</view>
  105. </view>
  106. <view class="inlinechekbox">
  107. <label class="checkbox">
  108. <checkbox value="{{[item['food_date'],1,1]}}" disabled="{{!item['can_break_fast']}}" checked="{{item['break_fast']}}"/>早
  109. </label>
  110. <label class="checkbox">
  111. <checkbox value="{{[item['food_date'],1,2]}}" disabled="{{!item['can_lunch']}}" checked="{{item['lunch']}}"/>中
  112. </label>
  113. <label class="checkbox">
  114. <checkbox value="{{[item['food_date'],1,3]}}" disabled="{{!item['can_dinner']}}" checked="{{item['dinner']}}"/>晚
  115. </label>
  116. </view>
  117. </view>
  118. </checkbox-group>
  119. </view>
  120. <!-- <view class="ctorder-view" wx:if="{{ordertype == 0}}">
  121. <view class="ctorder-title">餐单明细</view>
  122. <view class="ctorder-info-list" wx:for="{{orderList}}">
  123. <view class="ctorder-info-list-item">{{item[0]}}
  124. <text wx:if="{{item[1] == 1}}">早餐</text>
  125. <text wx:if="{{item[1] == 2}}">午餐</text>
  126. <text wx:if="{{item[1] == 3}}">晚餐</text>
  127. x{{item[2]}}
  128. <text style="float:right">合计:{{item[3]}}元</text>
  129. </view>
  130. </view>
  131. </view> -->
  132. <view class="ctorder-fixedbox">
  133. <view class="fb-left">
  134. <text>合计支付:{{total}}</text>
  135. <text style="font-size:28rpx">账户余额:{{balance / 100}}</text>
  136. </view>
  137. <view class="fb-right" bindtap="toOrder" wx:if="{{!loading}}">
  138. 下单
  139. </view>
  140. <view class="fb-right" wx:else style="background:#eee">
  141. 正在下单
  142. </view>
  143. </view>
  144. </view>