parcel_list.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <view class="order_list">
  3. <view class="order_header">
  4. <view class="create_time">
  5. <trans _t="创建时间" />: {{ useGlobal().$format(item.indate) }}
  6. </view>
  7. </view>
  8. <view class="order_item">
  9. <view
  10. class="order_item_wrapper"
  11. v-for="(val, num) in item.goods || [item]"
  12. :key="num"
  13. >
  14. <view class="_item_wrapper">
  15. <view class="thumb_img">
  16. <up-lazy-load :image="val.pic_url" class="_img"></up-lazy-load>
  17. </view>
  18. <view class="goods_info">
  19. <view class="info_name">
  20. <view class="_name">{{ val.goodTitle }}</view>
  21. <view class="_price"
  22. >{{ symbol.symbol }}&nbsp;{{ Moneyhtml(val.price) }}</view
  23. >
  24. </view>
  25. <view class="spec_info">
  26. <view class="spec_desc">{{ val.sku_desc }}</view>
  27. <view class="spec_num">x{{ val.total }}</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="order_footer" v-if="item?.goods?.length">
  33. <view class="order_price all_price">
  34. <view class="price_text"> <trans _t="运费" />: </view>
  35. <text class="price-pay"
  36. >{{ symbol.symbol
  37. }}{{
  38. Moneyhtml(item.money - item.discount) < 0
  39. ? 0.01
  40. : Moneyhtml(item.money - item.discount)
  41. }}</text
  42. >
  43. <text class="price-original" v-if="item.discount > 0"
  44. >{{ symbol.symbol }}{{ Moneyhtml(item.money) }}</text
  45. >
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script setup>
  52. import { ref, computed } from "vue";
  53. import { t } from "@/locale";
  54. import { useGlobal, Toast, Moneyhtml } from "@/utils";
  55. import { useSystemStore } from "@/store";
  56. const useSystem = useSystemStore();
  57. const props = defineProps({
  58. item: {
  59. type: Object,
  60. default: () => ({}),
  61. },
  62. });
  63. const symbol = computed(() => useSystem.getSymbol);
  64. </script>
  65. <style lang="less" scoped>
  66. @import url("@/style.less");
  67. .order_list {
  68. margin-top: 24rpx;
  69. padding: 16rpx 24rpx;
  70. background-color: var(--light);
  71. border-radius: 16rpx;
  72. .order_header {
  73. .ver();
  74. margin-bottom: 16rpx;
  75. .create_time {
  76. .size(24rpx);
  77. color: var(--text);
  78. font-weight: 700;
  79. text {
  80. font-weight: 500;
  81. }
  82. }
  83. }
  84. .order_item {
  85. &_wrapper {
  86. margin-top: 16rpx;
  87. ._item_wrapper {
  88. .flex();
  89. .thumb_img {
  90. width: 140rpx;
  91. height: 140rpx;
  92. ._img {
  93. width: inherit;
  94. height: inherit;
  95. border-radius: 16rpx;
  96. }
  97. }
  98. .goods_info {
  99. margin-left: 16rpx;
  100. flex: 1;
  101. .info_name {
  102. color: var(--text);
  103. .size(24rpx);
  104. font-weight: 700;
  105. line-height: 44rpx;
  106. .ver();
  107. ._name {
  108. flex: 1;
  109. // .ellipsis();
  110. margin-right: 8rpx;
  111. }
  112. }
  113. .spec_info {
  114. .flex();
  115. flex: 1;
  116. margin-top: 8rpx;
  117. color: var(--text-01);
  118. .size(24rpx);
  119. line-height: 40rpx;
  120. .spec_desc {
  121. flex: 1;
  122. margin-right: 8rpx;
  123. }
  124. }
  125. }
  126. }
  127. .order_status {
  128. color: var(--primary);
  129. .size(24rpx);
  130. height: 40rpx;
  131. .flex_position(flex-end);
  132. margin-top: 16rpx;
  133. .icon-question2 {
  134. .size(36rpx);
  135. }
  136. }
  137. }
  138. .order_footer {
  139. margin-top: 16rpx;
  140. border-top: var(--bor);
  141. .order_price {
  142. .flex_position(flex-end);
  143. color: var(--text);
  144. .size(28rpx);
  145. height: 64rpx;
  146. line-height: 60rpx;
  147. &:first-child {
  148. padding-top: 16rpx;
  149. }
  150. }
  151. .all_price {
  152. font-weight: 700;
  153. color: var(--red);
  154. .price_text {
  155. color: var(--text);
  156. }
  157. }
  158. .price-pay {
  159. color: var(--red);
  160. font-weight: bold;
  161. margin-right: 16rpx;
  162. }
  163. .price-original {
  164. font-size: 24rpx;
  165. color: #999;
  166. text-decoration: line-through;
  167. }
  168. }
  169. }
  170. }
  171. </style>