detail.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <template>
  2. <view class="page safe-area-inset-bottom">
  3. <view class="card section" style="flex-direction: column;">
  4. <view class="center text-bold margin-50" style="font-size: 66rpx;">
  5. <text>{{order.verifyNum}}</text>
  6. </view>
  7. <view class="cu-steps steps-arrow margin-bottom-50">
  8. <view class="cu-item" :class="index>stepIndex?'text-default':'text-base'" v-for="(item,index) in stepList" :key="index">
  9. <text style="font-size: 70rpx;margin-bottom: 20rpx;margin-right: 10rpx;" :class="'cuIcon-' + item.icon"></text>
  10. <text >{{item.name}}</text>
  11. </view>
  12. </view>
  13. <view class="center padding-30" style="color: #999;">
  14. <text>备注:{{order.extraInfo}}</text>
  15. </view>
  16. </view>
  17. <view class="section"></view>
  18. <view class="padding-10 bg-white">
  19. <u-read-more ref="uReadMore" close-text="展开更多" show-height="300" color="#999">
  20. <view v-for="(item,index) in cart" :key="index" class="cart">
  21. <view class="flex" style="width: 70%;">
  22. <image :src="item.image" mode=""></image>
  23. <view class="item-content " >
  24. <text class="text-cut-1">{{item.name}}</text>
  25. <text class="text-cut-1">{{item.propertyStr ? item.propertyStr : item.name}}</text>
  26. </view>
  27. </view>
  28. <view class="item-data">
  29. <view class="">
  30. <text class="text-sm">x</text>
  31. <text class="text-lg" style="margin-left: 6rpx;">{{item.number}}</text>
  32. </view>
  33. <text class=" text-lg">{{item.realPrice / 100}}</text>
  34. </view>
  35. </view>
  36. </u-read-more>
  37. </view>
  38. <!-- 订单金额 -->
  39. <view class="">
  40. <view class="card text-df" v-if="$isNotEmpty(order.packingPrice)&&order.packingPrice != -1">
  41. <text class="text-gray">包装费</text>
  42. <text class="text-price">{{order.packingPrice / 100}}</text>
  43. </view>
  44. <view class="card text-df" v-if="$isNotEmpty(order.sendingPrice)&&order.sendingPrice != -1">
  45. <text class="text-gray">配送费</text>
  46. <text class="text-price">{{order.sendingPrice / 100}}</text>
  47. </view>
  48. <view class="card text-df ">
  49. <text class="text-gray">金额总计</text>
  50. <view class="">
  51. <text class="text-price">{{order.totalPrice / 100}}</text>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="section"></view>
  56. <view class="">
  57. <view class="card text-df" >
  58. <text class="text-gray">取单号</text>
  59. <text class="">{{order.verifyNum}}</text>
  60. </view>
  61. <view class="card text-df" v-if="$isNotEmpty(order.seatNum) && order.seatNum !=-1">
  62. <text class="text-gray">座位号</text>
  63. <text class="">{{order.seatNum}}</text>
  64. </view>
  65. <view class="card text-df" >
  66. <text class="text-gray">下单时间</text>
  67. <text class="">{{order.createTime}}</text>
  68. </view>
  69. <view class="card text-df" >
  70. <text class="text-gray">下单门店</text>
  71. <text class="">{{shop.name}}</text>
  72. </view>
  73. <view class="card text-df" >
  74. <text class="text-gray">付款状态</text>
  75. <text class="">{{order.payStatus}}</text>
  76. </view>
  77. <view class="card text-df" >
  78. <text class="text-gray">订单状态</text>
  79. <text class="">{{order.orderStatus}}</text>
  80. </view>
  81. <view class="card text-df" >
  82. <text class="text-gray">订单号</text>
  83. <text class="">{{order.id}}</text>
  84. </view>
  85. </view>
  86. <view class="">
  87. <view class="card text-df" >
  88. <text class="text-gray">下单手机号</text>
  89. <text class="">{{order.userPhone}}</text>
  90. </view>
  91. <view class="card text-df" >
  92. <text class="text-gray">取餐方式</text>
  93. <text class="">{{order.takeType}}</text>
  94. </view>
  95. <view class="card text-df">
  96. <text class="text-gray">取餐时间</text>
  97. <text class="">{{order.takeTime || '立即就餐'}}</text>
  98. </view>
  99. </view>
  100. </view>
  101. </template>
  102. <script>
  103. export default {
  104. name: '',
  105. data() {
  106. return {
  107. id:'',
  108. order:{},
  109. shop:{},
  110. cart:[],
  111. //订单流程
  112. stepList:[{
  113. name:'待付款',
  114. icon:'rechargefill'
  115. },
  116. {
  117. name:'已付款',
  118. icon:'roundcheckfill'
  119. },
  120. {
  121. name:'制作中',
  122. icon:'timefill'
  123. },
  124. {
  125. name:'已完成',
  126. icon:'goodsfill'
  127. }],
  128. };
  129. },
  130. onLoad(options) {
  131. this.id=options.id
  132. this.fetchDetail()
  133. },
  134. computed:{
  135. stepIndex:{
  136. get(){
  137. if (this.order.orderStatus == '待付款') {
  138. return 0
  139. }else{
  140. return 2
  141. }
  142. }
  143. }
  144. },
  145. methods:{
  146. fetchDetail(){
  147. let params={
  148. id:this.id
  149. }
  150. this.$api.goodsbills.detail(params).then(res=>{
  151. this.order=res.data || {}
  152. this.shop=this.order.shop || {}
  153. this.cart=JSON.parse(this.order.goodsPreview)
  154. })
  155. }
  156. }
  157. };
  158. </script>
  159. <style lang="scss" scoped>
  160. .page{
  161. margin: 20rpx;
  162. }
  163. .text-default{
  164. color: #ffbf91;
  165. }
  166. .btn-icon{
  167. background-color: rgba(255, 148, 71,.3);
  168. color: #FF9447;
  169. }
  170. .card {
  171. padding: 30rpx;
  172. background-color: #FFFFFF;
  173. border-bottom: 1rpx solid #f1f1f1;
  174. display: flex;
  175. justify-content: space-between;
  176. }
  177. .cart {
  178. border-bottom: 1rpx solid #f1f1f1;
  179. display: flex;
  180. background-color: #FFFFFF;
  181. padding: 15rpx 0;
  182. image {
  183. width: 100rpx;
  184. height: 100rpx;
  185. border-radius: 8rpx;
  186. }
  187. .item-content {
  188. width: calc(100% - 100rpx);
  189. margin-left: -40rpx;
  190. display: flex;
  191. flex-direction: column;
  192. justify-content: space-between;
  193. text:first-child {
  194. font-size: 30rpx;
  195. }
  196. text:last-child {
  197. font-size: 24rpx;
  198. color: #999;
  199. font-weight: 400;
  200. }
  201. }
  202. .item-data {
  203. display: flex;
  204. align-items: center;
  205. width: 30%;
  206. justify-content: space-between;
  207. margin-right: 20rpx;
  208. }
  209. }
  210. .cart:last-child {
  211. border: none;
  212. }
  213. </style>