orderdetails.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <template>
  2. <view class="">
  3. <u-navbar
  4. :title="title"
  5. @leftClick="leftClick"
  6. :autoBack="true"
  7. :safeAreaInsetTop="true"
  8. >
  9. </u-navbar>
  10. <view class="addr page-wrap u-flex u-row-between">
  11. <view class="left">
  12. <view class="top">
  13. <text class="label" v-if="isDefaultAddr">默认</text>{{theAddr.address}}
  14. </view>
  15. <view class="center">{{theAddr.receiveAdress}}</view>
  16. <view class="bottom">{{theAddr.receiveName}} {{theAddr.receivePhone}}</view>
  17. </view>
  18. <!-- <u-icon name="arrow-right" color="#676767" size="20" @click="selectAddr"></u-icon> -->
  19. </view>
  20. <!-- <view class="payway page-wrap u-flex u-row-between">
  21. <view class="left">支付方式</view>
  22. <view class="u-flex">
  23. 微信支付
  24. <u-icon name="arrow-right" color="#676767" size="20"></u-icon>
  25. </view>
  26. </view> -->
  27. <view class="order-product page-wrap">
  28. <view class="product u-flex" v-for="(item,index) in dataList" :key="item.id">
  29. <u--image :showLoading="true" :src="item.mainImg" width="180rpx" height="180rpx"></u--image>
  30. <view class="text">
  31. <view class="up">
  32. <view class="name ellipsis-2">{{item.goodsName}}</view>
  33. <view class="info">
  34. {{item.specification}}
  35. {{item.unit}}
  36. </view>
  37. </view>
  38. <view class="down u-flex u-row-between">
  39. <view class="left">
  40. <view class="" v-if="vuex_member_info.levelType>1">
  41. <text class="price">¥ <text class="price-num">{{item.vipPrice}}</text></text>
  42. <text class="vip-icon">VIP</text>
  43. <text class="original-price gray line-through">¥ {{item.salePrice}}</text>
  44. </view>
  45. <view class="" v-else>
  46. <text class="price">¥ <text class="price-num">{{item.salePrice}}</text></text>
  47. </view>
  48. </view>
  49. <u-number-box v-model="item.quantity" @change="changeQuantity(index, $event)" integer></u-number-box>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="page-wrap order-reduced">
  55. <view class="reduced-item u-flex u-row-between u-border-bottom">
  56. <view class="left">
  57. <text>优惠券</text>
  58. <text class="label">已选一张</text>
  59. </view>
  60. <view class="right u-flex">
  61. <text class="price red">-¥ <text class="price-num">1000</text></text>
  62. <!-- <u-icon name="arrow-right" color="#676767" size="20"></u-icon> -->
  63. </view>
  64. </view>
  65. <view class="reduced-item integral u-flex u-row-between">
  66. <view class="left">
  67. <text>积分</text>
  68. <text class="num">3676</text>
  69. <text class="tip">满1000可用</text>
  70. </view>
  71. <view class="right u-flex">
  72. <text class="price red" v-if="useIntegral">-¥ <text class="price-num">1000</text></text>
  73. <u-checkbox-group @change="integralCheckboxChange">
  74. <u-checkbox shape="circle" activeColor="#02AB35" name="integral" ></u-checkbox>
  75. </u-checkbox-group>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="page-wrap total">
  80. <view class="total-item u-flex u-row-between u-border-bottom">
  81. <view class="left">
  82. 商品金额
  83. </view>
  84. <view class="right">
  85. ¥2399.00
  86. </view>
  87. </view>
  88. <view class="total-item u-flex u-row-between">
  89. <view class="left">
  90. 运费
  91. <text class="gray">总重:40kg</text>
  92. </view>
  93. <view class="right">
  94. + ¥2399.00
  95. </view>
  96. </view>
  97. </view>
  98. <view class="cart-bottom">
  99. <view class="inner u-flex u-row-between">
  100. <view class="left u-flex">
  101. <view class="total-price">
  102. 待支付:<text class="red">¥4322.00</text>
  103. </view>
  104. </view>
  105. <view class="btn">去结算</view>
  106. </view>
  107. </view>
  108. </view>
  109. </template>
  110. <script>
  111. export default {
  112. data() {
  113. return {
  114. id:'',
  115. title:'订单详情',
  116. fromPage:'',
  117. useIntegral:false,
  118. dataList:[],
  119. theAddr:{},
  120. isDefaultAddr:false,
  121. }
  122. },
  123. onLoad(page) {
  124. // console.log('page',page);
  125. this.id = page.id;
  126. },
  127. onShow() {
  128. },
  129. methods: {
  130. leftClick(e){
  131. console.log('leftClick',e);
  132. },
  133. }
  134. }
  135. </script>
  136. <style>
  137. page{
  138. background-color: #F5F5F5;
  139. /* padding-top: 50px; */
  140. }
  141. </style>
  142. <style lang="scss" scoped>
  143. .page-wrap{
  144. background-color: #fff;
  145. margin-bottom: 20rpx;
  146. }
  147. .addr{
  148. .top{
  149. margin-bottom: 16rpx;
  150. font-size: 26rpx;
  151. color: #999;
  152. .label{
  153. background-color: #FFEBEB;
  154. border: 1px solid #FF5F62;
  155. color: #FF5F62;
  156. padding: 5rpx 20rpx;
  157. border-radius: 30rpx;
  158. margin-right: 10rpx;
  159. }
  160. }
  161. .center{
  162. margin-bottom: 10rpx;
  163. font-size: 30rpx;
  164. color: #333;
  165. line-height: 50rpx;
  166. font-weight: 600;
  167. }
  168. .bottom{
  169. font-size: 30rpx;
  170. color: #666;
  171. }
  172. }
  173. .order-reduced{
  174. .reduced-item{
  175. padding-bottom: 30rpx;
  176. &:not(:last-child){
  177. margin-bottom: 30rpx;
  178. }
  179. .label{
  180. border-radius: 2px;
  181. border: 1px solid #FF3C3F;
  182. margin-left: 20rpx;
  183. font-size: 20rpx;
  184. color: #FF3C3F;
  185. padding: 0 10rpx;
  186. }
  187. }
  188. .integral{
  189. .num{
  190. font-size: 30rpx;
  191. color: #02AB35;
  192. font-weight: 600;
  193. margin-left: 30rpx;
  194. margin-right: 16rpx;
  195. }
  196. .tip{
  197. font-size: 24rpx;
  198. color: #999;
  199. }
  200. .price{
  201. margin-right: 10rpx;
  202. }
  203. }
  204. }
  205. .total{
  206. .total-item{
  207. padding-bottom: 30rpx;
  208. &:not(:last-child){
  209. margin-bottom: 30rpx;
  210. }
  211. .right{
  212. font-weight: 600;
  213. }
  214. }
  215. .gray{
  216. font-size: 24rpx;
  217. margin-left: 15rpx;
  218. }
  219. }
  220. .cart-bottom{
  221. height: 98rpx;
  222. .inner{
  223. position: fixed;
  224. background-color: #fff;
  225. height: 98rpx;
  226. left: 0;
  227. right: 0;
  228. bottom: 0;
  229. padding: 0 20rpx;
  230. .total-price{
  231. font-size: 30rpx;
  232. color: #333;
  233. font-weight: 600;
  234. margin-left: 30rpx;
  235. }
  236. .btn{
  237. height: 80rpx;
  238. line-height: 80rpx;
  239. border-radius: 50rpx;
  240. padding: 0 50rpx;
  241. background-color: #FF3C3F;
  242. color: #fff;
  243. text-align: center;
  244. }
  245. }
  246. }
  247. .product{
  248. .text{
  249. .name{
  250. height: auto;
  251. }
  252. .info{
  253. font-size: 24rpx;
  254. font-weight: 400;
  255. color: #666666;
  256. }
  257. }
  258. }
  259. </style>