orderPaid.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <template>
  2. <view class="order-detail">
  3. <topNavBar title="订单详情" />
  4. <view class="order-state padding-sm dflex-b w-full">
  5. <view class="state-left">
  6. <view class="state-info">待支付 </view>
  7. <view class="order-code">剩余 09:59 逾期未支付将自动取消</view>
  8. </view>
  9. <uni-icons type="right" size="24" color="#FFF"></uni-icons>
  10. </view>
  11. <view class="gap"></view>
  12. <view class="padding-sm dflex-b bg-main" @click="show = true">
  13. <view class="dflex">
  14. <view class="w-full dflex-wrap-w send-label">
  15. 取餐时间
  16. </view>
  17. </view>
  18. <u-icon slot="icon" size="20" name="arrow-right" :label="goods.arriveCutTime" labelPos="left"></u-icon>
  19. </view>
  20. <view class="gap"></view>
  21. <view class="padding-sm dflex-b bg-main">
  22. <view class="dflex">
  23. <view class="w-full dflex-wrap-w send-label">
  24. 取餐方式
  25. </view>
  26. </view>
  27. <view>
  28. <radio style="transform: scale(0.85)" value="r1" :checked="true" color="#ff0000" class="radio">
  29. {{goods.pickupType.pickupType ? '店内用餐' : '打包带走'}}
  30. </radio>
  31. </view>
  32. </view>
  33. <view class="gap"></view>
  34. <view class="goods-order-list padding-lr-sm">
  35. <view class="shop dflex-b ">
  36. <view class="shop-check">
  37. <text class="send-label">{{goods.storeName}}</text>
  38. </view>
  39. <view class="total-goods">共计{{goods.itemList.length}}件商品</view>
  40. </view>
  41. <view class="goods-cart w-full">
  42. <view class="goods-cont padding-tb" v-for="(item, index) in goods.itemList" :key="index">
  43. <my-goods :item="item">
  44. <view class="good-num">×{{item.quantity}}</view>
  45. </my-goods>
  46. </view>
  47. </view>
  48. <!-- <view class="goods-cart" v-for="(item, index) in goods.itemList" :key="index">
  49. <view class="goods-cont dflex-b padding-tb-16">
  50. <view class="goods-cart-info dflex-b">
  51. <view class="pic"></view>
  52. <my-goods :item="item">
  53. <view class="good-num">×{{item.quantity}}</view>
  54. </my-goods>
  55. <view class="goods-cart-right">
  56. <view class="cart-title">{{item.skuName}}</view>
  57. <view class="order-spec">
  58. <text>500g</text>
  59. </view>
  60. <view class="cart-row-info dflex-s">
  61. <view class="cart-price">
  62. ¥<text>{{item.price}}</text>
  63. </view>
  64. <view class="goods-num">×{{item.quantity}}</view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="goods-cont dflex-b padding-tb-16">
  70. <view class="goods-cart-info dflex-b">
  71. <view class="pic"></view>
  72. <view class="goods-cart-right">
  73. <view class="cart-title">商品名称商品名称</view>
  74. <view class="order-spec">
  75. <text>500g</text>
  76. </view>
  77. <view class="cart-row-info dflex-s">
  78. <view class="cart-price">
  79. ¥<text>12.30</text>
  80. </view>
  81. <view class="goods-num">×1</view>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. </view> -->
  87. </view>
  88. <view class="gap"></view>
  89. <!-- 金额明细 -->
  90. <view class="bg-main">
  91. <view class="dflex-b padding-lr padding-tb-sm">
  92. <view class="flex1 send-label">总金额</view>
  93. <view class=""><text style="font-size: 24rpx;">¥</text>{{goods.payment}}</view>
  94. </view>
  95. </view>
  96. <view class="gap"></view>
  97. <view class="bar-space"></view>
  98. <view class="cart-bottom padding-sm dflex-b">
  99. <view class="go-cart dflex-c">取消订单</view>
  100. <view class="go-buy dflex-c background-gradient">去支付</view>
  101. </view>
  102. </view>
  103. </template>
  104. <script>
  105. export default {
  106. data() {
  107. return {
  108. goods: {}
  109. }
  110. },
  111. onLoad(e) {
  112. this.fatchDate(e)
  113. },
  114. onUnload() {
  115. uni.navigateBack({
  116. delta: 3, //返回上5层
  117. success: () => {
  118. uni.$emit('register_refresh') // 直接调用上个页面的刷新方法
  119. }
  120. })
  121. },
  122. methods: {
  123. async fatchDate(e) {
  124. console.log('e', e)
  125. const result = await this.$request('get', `/order/retailOrder/${e.id}`,
  126. true)
  127. if (result) {
  128. console.log('result', result.data)
  129. this.goods = result.data
  130. }
  131. }
  132. }
  133. }
  134. </script>
  135. <style lang="scss" scoped>
  136. .order-state {
  137. background-color: #F96C22;
  138. box-sizing: border-box;
  139. color: #FFF;
  140. .state-info {
  141. font-size: 14px;
  142. padding-bottom: 4px;
  143. }
  144. .order-code {
  145. font-size: 12px;
  146. }
  147. }
  148. .addr-label {
  149. padding: 6upx 0;
  150. border-radius: 3px;
  151. background-color: #F6390D;
  152. color: #fff;
  153. width: 120upx;
  154. text-align: center;
  155. flex-shrink: 0;
  156. margin-right: 14upx;
  157. }
  158. .order-spec {
  159. padding-bottom: 10upx;
  160. }
  161. .shop {
  162. padding-top: 20upx;
  163. }
  164. .goods-num {
  165. font-size: 16px;
  166. padding-left: 20upx;
  167. }
  168. .sub-coupon {
  169. padding-top: 20upx;
  170. padding-bottom: 0;
  171. color: #000;
  172. .coupon-name {
  173. font-weight: normal;
  174. }
  175. .mj-tag {
  176. background-color: #F6390D;
  177. >text {
  178. color: #FFF;
  179. }
  180. }
  181. }
  182. .total-goods {
  183. font-size: 12px;
  184. color: #999;
  185. }
  186. .submit-bar {
  187. height: 100upx;
  188. width: 100%;
  189. background-color: #FFF;
  190. position: fixed;
  191. left: 0;
  192. bottom: 0;
  193. .submit-total {
  194. font-size: 16px;
  195. font-weight: 700;
  196. color: #F6390D;
  197. }
  198. .submit-btn {
  199. background-image: $base-bg-gradient-color;
  200. height: 70upx;
  201. width: 200upx;
  202. color: #FFF;
  203. font-size: 14px;
  204. font-weight: 700;
  205. border-radius: 35upx;
  206. }
  207. }
  208. .order-btn {
  209. height: 76upx;
  210. border-radius: 38px;
  211. background-image: $base-bg-gradient-color;
  212. text-align: center;
  213. line-height: 76upx;
  214. color: #FFF;
  215. font-size: 14px;
  216. width: 90%;
  217. position: fixed;
  218. left: 5%;
  219. bottom: 30upx;
  220. z-index: 99;
  221. }
  222. .order-info {
  223. background-color: #FFF;
  224. box-sizing: border-box;
  225. }
  226. .row-cell {
  227. padding-bottom: 20upx;
  228. .cell-right {
  229. font-size: 12px;
  230. color: #999;
  231. }
  232. }
  233. .row-cell:last-child {
  234. padding-bottom: 0;
  235. }
  236. .pic {
  237. margin-right: 20upx;
  238. height: 160rpx;
  239. width: 160rpx;
  240. background-color: #EEE;
  241. }
  242. .send-label {
  243. font-size: 14px;
  244. font-weight: 700;
  245. }
  246. .cart-bottom {
  247. width: 100%;
  248. position: fixed;
  249. left: 0;
  250. bottom: 0;
  251. height: 130rpx;
  252. box-sizing: border-box;
  253. background-color: #FFF;
  254. z-index: 10;
  255. box-shadow: 0px -4px 16px 0px rgba(0, 0, 0, 0.15);
  256. .go-cart {
  257. height: 80%;
  258. box-sizing: border-box;
  259. border: solid 1px #FF0000;
  260. font-size: 14px;
  261. color: #FF0000;
  262. border-radius: 50upx;
  263. margin: 0 10px;
  264. width: 45%;
  265. }
  266. .go-buy {
  267. height: 80%;
  268. width: 45%;
  269. background-color: #FF0000;
  270. color: #FFF;
  271. border-radius: 50upx;
  272. font-size: 14px;
  273. }
  274. }
  275. .good-num {
  276. font-size: 12px;
  277. padding-top: 65rpx;
  278. }
  279. .goods-cont {
  280. width: 100%;
  281. box-sizing: border-box;
  282. }
  283. </style>