index.wxml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <!--index.wxml-->
  2. <view class="wrap">
  3. <view class="order_t">
  4. <!-- order_status //1正常 2已完成 0关闭 -->
  5. <!-- ship_status // //0待发货/待自提 1已发货/已自提 -->
  6. <!-- fare_type //0邮寄 1自提 -->
  7. <view class="order_status" wx:if="{{ orderInfo.fare_type == 1 }}">{{ orderInfo.order_status == 2 ? '已完成' : orderInfo.order_status == 0 ? '已关闭' : orderInfo.pay_status != 1 ? '待支付' : orderInfo.ship_status ? '已自提' : '待自提' }}</view>
  8. <view class="order_status" wx:if="{{ orderInfo.fare_type == 0 }}">{{ orderInfo.order_status == 2 ? '已完成' : orderInfo.order_status == 0 ? '已关闭' : orderInfo.pay_status != 1 ? '待支付' : orderInfo.ship_status ? '配送中'+ count_time : '待配送' }}</view>
  9. <view class="order_tips" wx:if="{{ orderInfo.order_status == 1 && orderInfo.fare_type == 1 && orderInfo.ship_status == 0 }}">请您及时取餐,如有问题提前与商家沟通</view>
  10. <view class="order_tips" wx:if="{{ orderInfo.order_status == 0 }}">感谢您对羊汤馆的支持,欢迎再次光临</view>
  11. <view class="order_btns">
  12. <!-- <view class="btn cancel">联系商家</view> -->
  13. <view class="btn cancel" wx:if="{{ orderInfo.ship_status == 0 && orderInfo.order_status == 1 }}" bind:tap="cancleOrder">取消订单</view>
  14. <view class="btn cancel" wx:if="{{ orderInfo.pay_status == 1 && orderInfo.ship_status == 1 && orderInfo.order_status == 1 }}" bind:tap="receiveOrder">收货</view>
  15. <view class="btn" bind:tap="goTopay" wx:if="{{ orderInfo.order_status == 1 && orderInfo.pay_status != 1 }}">立即支付</view>
  16. <view class="btn" bind:tap="toGoods" wx:if="{{ orderInfo.order_status == 0 || orderInfo.order_status == 2 || (orderInfo.order_status == 1 && orderInfo.ship_status == 1 )}}">再来一单</view>
  17. </view>
  18. <image class="order_tag" src="{{ orderInfo.fare_type ? '/statics/img/ziqu_order.png' : '/statics/img/waimai_order.png' }}"></image>
  19. </view>
  20. <view class="order_m">
  21. <view class="shop_info">
  22. <view class="shop_info_l">
  23. <view class="shop_name">{{ orderInfo.store.title }}</view>
  24. <view class="shop_adress">{{ orderInfo.store.address }}</view>
  25. </view>
  26. <image class="shop_phone" src="/statics/img/icon_phone.png" bind:tap="onMakePhone"></image>
  27. </view>
  28. <view class="order_goods">
  29. <view class="goods_item" wx:for="{{ orderInfo.order_good }}" wx:key="index">
  30. <view class="goods_item_l">
  31. <image class="goods_tu" src="{{ imgUrl + item.good_thumb }}"></image>
  32. <view class="goods_info">
  33. <view class="goods_title">{{ item.good_title }}</view>
  34. <view class="goods_labels" wx:if="{{ item.good_specs }}">
  35. <view class="label">{{ item.good_specs.title }}</view>
  36. <!-- <view class="label">甜辣</view>
  37. <view class="label">鸭翅</view> -->
  38. </view>
  39. </view>
  40. </view>
  41. <view class="goods_item_r">
  42. <view class="goods_price" wx:if="{{ !item.add_good_rule_id }}"><text class="unit">¥</text>{{ orderInfo.user.is_member ? item.member_price : item.price }}</view>
  43. <view class="goods_price" wx:if="{{ item.add_good_rule_id }}"><text class="unit">¥</text>{{ item.add_price }}</view>
  44. <view class="goods_num">x{{ item.nums }}</view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="delivery" wx:if="{{ orderInfo.fare_type == 0 }}">
  49. <view class="text">配送费</view>
  50. <view class="price"><text class="unit">¥</text>{{ orderInfo.delivery_fee }}</view>
  51. </view>
  52. <view class="quan" wx:if="{{ orderInfo.user_coupon }}">
  53. <view class="quan_l">
  54. <image class="quan_icon" src="/statics/img/icon_quan.png"></image>
  55. <view class="quan_wenzi">优惠券</view>
  56. </view>
  57. <view class="quan_price"><text class="unit">-¥</text>{{ orderInfo.coupon_price }}</view>
  58. </view>
  59. <view class="total_price">
  60. <text class="" wx:if="{{ orderInfo.user_coupon }}">已优惠</text>
  61. <text class="discount" wx:if="{{ orderInfo.user_coupon }}">¥{{ orderInfo.coupon_price }}</text>
  62. <text class="">小计</text>
  63. <text class="price"><text class="unit">¥</text>{{ orderInfo.pay_price }}</text>
  64. </view>
  65. </view>
  66. <view class="section_wrap">
  67. <view class="section_name">配送信息</view>
  68. <view class="section">
  69. <view class="item">
  70. <view class="item_l">取货方式</view>
  71. <view class="item_r">{{ orderInfo.fare_type ? '自提订单' : '外卖订单' }}</view>
  72. </view>
  73. <view class="item">
  74. <view class="item_l">服务门店</view>
  75. <view class="item_r">{{orderInfo.store.title }}</view>
  76. </view>
  77. <view class="item" wx:if="{{ orderInfo.fare_type == 0 }}">
  78. <view class="item_l">配送地址</view>
  79. <view class="item_r">{{ orderInfo.address }}</view>
  80. </view>
  81. <view class="item" wx:if="{{ orderInfo.fare_type == 0 }}">
  82. <view class="item_r">{{ orderInfo.person +' '+ orderInfo.phone }}</view>
  83. </view>
  84. <view class="item" wx:if="{{ orderInfo.fare_type == 1 }}">
  85. <view class="item_l">预留电话</view>
  86. <view class="item_r">{{ orderInfo.user.phone }}</view>
  87. </view>
  88. <view class="item" wx:if="{{ orderInfo.fare_type == 1 }}">
  89. <view class="item_l">商家地址</view>
  90. <view class="item_r">{{ orderInfo.store.address }}</view>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="section_wrap">
  95. <view class="section_name">订单信息</view>
  96. <view class="section">
  97. <view class="item">
  98. <view class="item_l">订单编号</view>
  99. <view class="item_r">{{ orderInfo.order_num }}</view>
  100. </view>
  101. <view class="item">
  102. <view class="item_l">下单时间</view>
  103. <view class="item_r">{{ orderInfo.created_at }}</view>
  104. </view>
  105. <view class="item">
  106. <view class="item_l">支付方式</view>
  107. <view class="item_r">
  108. <view class="item_pay">{{ orderInfo.pay_name }}</view>
  109. <!-- <view class="item_pay" wx:if="{{ orderInfo.user_coupon }}">优惠券</view> -->
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <!-- loading -->
  116. <!-- <van-overlay show="{{ loading }}" z-index="100">
  117. <van-loading custom-class="custom_loading" />
  118. </van-overlay> -->