index.wxml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <nav type="back" background-color="{{activeColor}}" title="民宿订单" frontColor="#ffffff" />
  2. <van-tabs class="tabs" active="{{ active }}" bind:change="onChange" color="{{activeColor}}">
  3. <van-tab title="全部"></van-tab>
  4. <van-tab title="已付款"></van-tab>
  5. <van-tab title="已入住"></van-tab>
  6. <van-tab title="已完成"></van-tab>
  7. </van-tabs>
  8. <scroll-view style="height:calc(100vh - {{navigationBarHeight+ 44}}px);" scroll-y="{{true}}">
  9. <block wx:if="{{active==0}}">
  10. <block wx:if="{{list.length==0}}">
  11. <van-empty description="暂无订单" />
  12. </block>
  13. <block wx:for="{{list}}" wx:key="index">
  14. <view class="box">
  15. <view class="order-number">
  16. <view class="number">订单号:{{item.orderNum}}</view>
  17. <block wx:if="{{item.status==100}}">
  18. <view class="state">已付款</view>
  19. </block>
  20. <block wx:if="{{item.status==200}}">
  21. <view class="state">已入住</view>
  22. </block>
  23. <block wx:if="{{item.status==500}}">
  24. <view class="state">退款审核中</view>
  25. </block>
  26. <block wx:if="{{item.status==601}}">
  27. <view class="state">退款中</view>
  28. </block>
  29. <block wx:if="{{item.status==602}}">
  30. <view class="state">退款失败</view>
  31. </block>
  32. <block wx:if="{{item.status==700}}">
  33. <view class="state">退款成功</view>
  34. </block>
  35. <block wx:if="{{item.status==800}}">
  36. <view class="state">已完成</view>
  37. </block>
  38. </view>
  39. <view class="order-txt" data-item="{{item}}" catchtap="orderpay">
  40. <image class="order-image" src="{{item.room.images[0]}}" />
  41. <view class="order-name">
  42. <view class="name">{{item.room.name}}</view>
  43. <view class="order-price" style="color: {{activeColor}};">¥{{item.room.price}}/晚</view>
  44. <view class="order-time">{{item.shopStore.address}}</view>
  45. </view>
  46. </view>
  47. <view class="order-times">
  48. <view class="order-date">
  49. <view class="date">{{item.orderTime}}——{{item.Time}}</view>
  50. <view class="sky">{{item.day}}晚</view>
  51. </view>
  52. <view class="price" style="color: {{activeColor}};">¥{{item.price}}</view>
  53. </view>
  54. <view class="order-order">
  55. <view class="service" data-item="{{item}}" catchtap="phone">联系房东</view>
  56. <block wx:if="{{item.status==100}}">
  57. <view class="service" data-item="{{item}}" catchtap="replyRefund">
  58. 申请退款
  59. </view>
  60. </block>
  61. <block wx:if="{{item.status==200}}">
  62. <view class="pay" style="background-color: {{activeColor}};color: #ffffff;" data-item="{{item}}" catchtap="evaluation">去评价</view>
  63. </block>
  64. <block wx:if="{{item.status==100}}">
  65. <view class="pay" style="background-color: {{activeColor}};color: #ffffff" data-item="{{item}}" catchtap="orderpay">详情</view>
  66. </block>
  67. </view>
  68. </view>
  69. </block>
  70. </block>
  71. <block wx:if="{{active==1}}">
  72. <block wx:if="{{list.length==0}}">
  73. <van-empty description="暂无订单" />
  74. </block>
  75. <block wx:for="{{list}}" wx:key="index">
  76. <view class="box">
  77. <view class="order-number">
  78. <view class="number">订单号:{{item.orderNum}}</view>
  79. <view class="state">已付款</view>
  80. </view>
  81. <view class="order-txt" data-item="{{item}}" bindtap="orderpay">
  82. <image class="order-image" src="{{item.room.images[0]}}" />
  83. <view class="order-name">
  84. <view class="name">{{item.room.name}}</view>
  85. <view class="order-price">¥{{item.room.price}}</view>
  86. <view class="order-time">营业时间:{{item.shopStore.workingTime}}</view>
  87. </view>
  88. </view>
  89. <view class="order-times">
  90. <view class="order-date">
  91. <view class="date">{{item.orderTime}}——{{item.Time}}</view>
  92. <view class="sky">{{item.day}}晚</view>
  93. </view>
  94. <view class="price">¥{{item.price}}</view>
  95. </view>
  96. <view class="order-order">
  97. <view class="service" data-item="{{item}}" catchtap="phone">联系房东</view>
  98. <view class="service" data-item="{{item}}" catchtap="replyRefund">申请退款</view>
  99. <view class="pay" data-item="{{item}}" catchtap="orderpay" style="background-color: {{activeColor}};color: #ffffff">详情</view>
  100. </view>
  101. </view>
  102. </block>
  103. </block>
  104. <block wx:if="{{active==2}}">
  105. <block wx:if="{{list.length==0}}">
  106. <van-empty description="暂无订单" />
  107. </block>
  108. <block wx:for="{{list}}" wx:key="index">
  109. <view class="box">
  110. <view class="order-number">
  111. <view class="number">订单号:{{item.orderNum}}</view>
  112. <view class="state">已入住</view>
  113. </view>
  114. <view class="order-txt" data-item="{{item}}" bindtap="orderpay">
  115. <image class="order-image" src="{{item.room.images[0]}}" />
  116. <view class="order-name">
  117. <view class="name">{{item.room.name}}</view>
  118. <view class="order-price">¥{{item.room.price}}</view>
  119. <view class="order-time">营业时间:{{item.shopStore.workingTime}}</view>
  120. </view>
  121. </view>
  122. <view class="order-times">
  123. <view class="order-date">
  124. <view class="date">{{item.orderTime}}——{{item.Time}}</view>
  125. <view class="sky">{{item.day}}晚</view>
  126. </view>
  127. <view class="price">¥{{item.price}}</view>
  128. </view>
  129. <view class="order-order">
  130. <view class="service" data-item="{{item}}" catchtap="phone">联系房东</view>
  131. <view class="pay" data-item="{{item}}" catchtap="evaluation" style="background-color: {{activeColor}};color: #ffffff">去评价</view>
  132. </view>
  133. </view>
  134. </block>
  135. </block>
  136. <block wx:if="{{active==3}}">
  137. <block wx:if="{{list.length==0}}">
  138. <van-empty description="暂无订单" />
  139. </block>
  140. <block wx:for="{{list}}" wx:key="index">
  141. <view class="box">
  142. <view class="order-number">
  143. <view class="number">订单号:{{item.orderNum}}</view>
  144. <view class="state">已完成</view>
  145. </view>
  146. <view class="order-txt" data-item="{{item}}" bindtap="orderpay">
  147. <image class="order-image" src="{{item.room.images[0]}}" />
  148. <view class="order-name">
  149. <view class="name">{{item.room.name}}</view>
  150. <view class="order-price">¥{{item.room.price}}</view>
  151. <view class="order-time">营业时间:{{item.shopStore.workingTime}}</view>
  152. </view>
  153. </view>
  154. <view class="order-times">
  155. <view class="order-date">
  156. <view class="date">{{item.orderTime}}——{{item.Time}}</view>
  157. <view class="sky">{{item.day}}晚</view>
  158. </view>
  159. <view class="price">¥{{item.price}}</view>
  160. </view>
  161. <view class="order-order">
  162. <view class="service" style="width: 180rpx;text-align: center;background-color: {{activeColor}};color: #ffffff" data-item="{{item}}" catchtap="orderpay">
  163. 详情
  164. </view>
  165. </view>
  166. </view>
  167. </block>
  168. </block>
  169. </scroll-view>