index.wxml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <nav type="back" background-color="{{activeColor}}" title="餐饮订单" frontColor="#ffffff" />
  2. <view class="tabs">
  3. <van-tabs active="{{ active }}" bind:change="onChange" color="{{activeColor}}">
  4. <van-tab title="全部"></van-tab>
  5. <van-tab title="待付款"></van-tab>
  6. <van-tab title="待使用"></van-tab>
  7. <van-tab title="待评价"></van-tab>
  8. </van-tabs>
  9. </view>
  10. <scroll-view style="height:calc(100vh - {{stickytop+44}}px);" scroll-y="{{true}}">
  11. <block wx:if="{{active==0}}">
  12. <block wx:if="{{list.length==0}}">
  13. <van-empty description="暂无订单" />
  14. </block>
  15. <block wx:for="{{list}}" wx:key="index">
  16. <view class="box">
  17. <view class="order-number">
  18. <view class="number">订单号:{{item.orderNum}}</view>
  19. <block wx:if="{{item.status==100}}">
  20. <view class="state">待付款</view>
  21. </block>
  22. <block wx:if="{{item.status==200}}">
  23. <view class="state">待使用</view>
  24. </block>
  25. <block wx:if="{{item.status==400}}">
  26. <view class="state">待评价</view>
  27. </block>
  28. <block wx:if="{{item.status==800}}">
  29. <view class="state">已完成</view>
  30. </block>
  31. <block wx:if="{{item.status==500}}">
  32. <view class="state">退款审核中</view>
  33. </block>
  34. <block wx:if="{{item.status==601}}">
  35. <view class="state">退款中</view>
  36. </block>
  37. <block wx:if="{{item.status==602}}">
  38. <view class="state">退款失败</view>
  39. </block>
  40. <block wx:if="{{item.status==700}}">
  41. <view class="state">退款成功</view>
  42. </block>
  43. </view>
  44. <view class="order-txt" data-item="{{item}}" catchtap="orderpay">
  45. <image class="order-image" src="{{item.image}}" />
  46. <view class="order-name">
  47. <view>{{item.name}}</view>
  48. <view class="order-price">¥{{item.price}}</view>
  49. <view class="order-time">营业时间:{{item.shopStore.workingTime}}</view>
  50. </view>
  51. </view>
  52. <view class="order-order">
  53. <block wx:if="{{item.status < 800}}">
  54. <button open-type="contact" class="bu" style="background-color: {{activeColor}};">联系客服</button>
  55. </block>
  56. <block wx:if="{{item.status == 800}}">
  57. <view class="pay" data-item="{{item}}" catchtap="orderpay" style="background-color: {{activeColor}};">订单详情</view>
  58. </block>
  59. <block wx:if="{{item.status==100}}">
  60. <view class="service" data-index="{{index}}" catchtap="delOrder">取消订单</view>
  61. </block>
  62. <block wx:if="{{item.status==200}}">
  63. <view class="service" data-item="{{item}}" catchtap="refund">申请退款</view>
  64. </block>
  65. <block wx:if="{{item.status==100}}">
  66. <view class="pay" data-item="{{item}}" catchtap="storepackage" style="background-color: {{activeColor}};">去支付</view>
  67. </block>
  68. <block wx:if="{{item.status==200}}">
  69. <view class="pay" data-item="{{item}}" catchtap="orderpay" style="background-color: {{activeColor}};">去使用</view>
  70. </block>
  71. <block wx:if="{{item.status==400}}">
  72. <view class="pay" data-item="{{item}}" catchtap="evaluation" style="background-color: {{activeColor}};">去评价</view>
  73. </block>
  74. </view>
  75. </view>
  76. </block>
  77. </block>
  78. <block wx:if="{{active==1}}">
  79. <block wx:if="{{list.length==0}}">
  80. <van-empty description="暂无订单" />
  81. </block>
  82. <block wx:for="{{list}}" wx:key="index">
  83. <view class="box">
  84. <view class="order-number">
  85. <view class="number">订单号:{{item.orderNum}}</view>
  86. <view class="state">待付款</view>
  87. </view>
  88. <view class="order-txt" data-item="{{item}}" bindtap="orderpay">
  89. <image class="order-image" src="{{item.image}}" />
  90. <view class="order-name">
  91. <view>{{item.name}}</view>
  92. <view class="order-price">¥{{item.price}}</view>
  93. <view class="order-time">营业时间:{{item.shopStore.workingTime}}</view>
  94. </view>
  95. </view>
  96. <view class="order-order">
  97. <!-- <view class="service">联系客服</view> -->
  98. <button open-type="contact" class="bu">联系客服</button>
  99. <block wx:if="{{item.status==100}}">
  100. <view class="service" data-index="{{index}}" catchtap="delOrder">取消订单</view>
  101. </block>
  102. <view class="pay" data-item="{{item}}" catchtap="storepackage" style="background-color: {{activeColor}};">去支付</view>
  103. </view>
  104. </view>
  105. </block>
  106. </block>
  107. <block wx:if="{{active==2}}">
  108. <block wx:if="{{list.length==0}}">
  109. <van-empty description="暂无订单" />
  110. </block>
  111. <block wx:for="{{list}}" wx:key="index">
  112. <view class="box">
  113. <view class="order-number">
  114. <view class="number">订单号:{{item.orderNum}}</view>
  115. <view class="state">待使用</view>
  116. </view>
  117. <view class="order-txt" data-item="{{item}}" bindtap="orderpay">
  118. <image class="order-image" src="{{item.image}}" />
  119. <view class="order-name">
  120. <view>{{item.name}}</view>
  121. <view class="order-price">¥{{item.price}}</view>
  122. <view class="order-time">营业时间:{{item.shopStore.workingTime}}</view>
  123. </view>
  124. </view>
  125. <view class="order-order">
  126. <!-- <view class="service">联系客服</view> -->
  127. <button open-type="contact" class="bu">联系客服</button>
  128. <view class="service">申请退款</view>
  129. <view class="pay" data-item="{{item}}" catchtap="orderpay" style="background-color: {{activeColor}};">去使用</view>
  130. </view>
  131. </view>
  132. </block>
  133. </block>
  134. <block wx:if="{{active==3}}">
  135. <block wx:if="{{list.length==0}}">
  136. <van-empty description="暂无订单" />
  137. </block>
  138. <block wx:for="{{list}}" wx:key="index">
  139. <view class="box">
  140. <view class="order-number">
  141. <view class="number">订单号:{{item.orderNum}}</view>
  142. <view class="state">待评价</view>
  143. </view>
  144. <view class="order-txt" data-item="{{item}}" bindtap="orderpay">
  145. <image class="order-image" src="{{item.image}}" />
  146. <view class="order-name">
  147. <view>{{item.name}}</view>
  148. <view class="order-price">¥{{item.price}}</view>
  149. <view class="order-time">营业时间:{{item.shopStore.workingTime}}</view>
  150. </view>
  151. </view>
  152. <view class="order-order">
  153. <!-- <view class="service">联系客服</view> -->
  154. <button open-type="contact" class="bu">联系客服</button>
  155. <view class="pay" data-item="{{item}}" catchtap="evaluation" style="background-color: {{activeColor}};">去评价</view>
  156. </view>
  157. </view>
  158. </block>
  159. </block>
  160. </scroll-view>
  161. <payment style="z-index: 99999;" id='payMent' show="{{show}}" tradeNo="{{tradeNo}}" price="{{price}}" bind:payResult='acceptResult' showType="all" />