orderInofrmation.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <template>
  2. <view class="detail" @click="$emit('toDetail', itemInfo)">
  3. <view class="title">
  4. <view class="title-left">
  5. <image class="header-img" :src="itemInfo.image" mode=""></image>
  6. <text>{{ itemInfo.merchant_name }}</text>
  7. <image
  8. class="right-325"
  9. src="../../../static/mine/325.png"
  10. mode=""
  11. ></image>
  12. </view>
  13. <text
  14. class="order-status"
  15. :style="itemInfo.status == 'closed' ? 'color:#666' : ''"
  16. >{{ statusName }}</text
  17. >
  18. </view>
  19. <view
  20. class="commodity-information"
  21. v-for="item in itemInfo.order_goods"
  22. :key="item.id"
  23. >
  24. <view class="commodity-1">
  25. <image class="commodity-img" :src="item.goods_image" mode=""></image>
  26. <view class="">
  27. <view class="commodity-2">
  28. <view class="commodity-title"> {{ item.goods.name_cn }} </view>
  29. <view class="commodity-price">
  30. <text style="font-size: 20rpx">¥</text>
  31. <text>{{ item.goods.price.split(".")[0] }}</text
  32. >.
  33. <text style="font-size: 20rpx">{{
  34. item.goods.price.split(".")[1]
  35. }}</text>
  36. </view>
  37. </view>
  38. <view class="commodity-3">
  39. <view class="specifications"> {{ item.sku_item.item }} </view>
  40. <view style="font-size: 24rpx"> x{{ item.goods_num }} </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="price">
  46. <text>需付款</text>
  47. <text style="font-size: 20rpx">¥</text>
  48. <text>133</text>.
  49. <text style="font-size: 20rpx">22</text>
  50. </view>
  51. <view class="btn-list">
  52. <view class="more" v-show="itemInfo.status == 8"> 更多 </view>
  53. <button
  54. class="status-1"
  55. @click.stop="$emit('cancellationOrder', itemInfo)"
  56. v-show="itemInfo.status == 'unpaid' || itemInfo.status == 5"
  57. >
  58. 取消订单
  59. </button>
  60. <button class="status-2" v-show="itemInfo.status == 'unpaid'">
  61. 继续付款
  62. </button>
  63. <button
  64. class="status-1"
  65. v-show="itemInfo.status == 'closed' || itemInfo.status == 3"
  66. >
  67. 删除订单
  68. </button>
  69. <button class="status-2" v-show="itemInfo.status == 'closed'">
  70. 再次购买
  71. </button>
  72. <button
  73. class="status-1"
  74. v-show="itemInfo.status == 7 || itemInfo.status == 8"
  75. >
  76. 查看物流
  77. </button>
  78. <button
  79. class="status-1"
  80. v-show="itemInfo.status == 3 || itemInfo.status == 8"
  81. >
  82. 再来一单
  83. </button>
  84. <button class="status-2" v-show="itemInfo.status == 7">确认收货</button>
  85. <button
  86. class="status-2"
  87. v-show="itemInfo.status == 8"
  88. @click.stop="toEvaluate"
  89. >
  90. 评价
  91. </button>
  92. </view>
  93. </view>
  94. </template>
  95. <script>
  96. import textRight from "../../accountSecurity/component/textRight.vue";
  97. export default {
  98. components: {
  99. textRight,
  100. },
  101. props: {
  102. itemInfo: {
  103. typeof: Object,
  104. default: {},
  105. },
  106. },
  107. computed: {
  108. statusName() {
  109. if (this.itemInfo.status == "unpaid") {
  110. return "待付款";
  111. } else if (this.itemInfo.status == "closed") {
  112. return "已取消";
  113. } else if (this.itemInfo.status == 3) {
  114. return "退款成功";
  115. } else if (this.itemInfo.status == "refunding") {
  116. return "退款中";
  117. } else if (this.itemInfo.status == "unreview") {
  118. return "拼团中";
  119. } else if (
  120. this.itemInfo.status == "paid" ||
  121. this.itemInfo.status == "merdelivered"
  122. ) {
  123. return "等待发货";
  124. } else if (this.itemInfo.status == "delivered") {
  125. return "等待收货";
  126. } else if (this.itemInfo.status == 8) {
  127. return "交易完成";
  128. }
  129. },
  130. },
  131. data() {
  132. return {};
  133. },
  134. methods: {
  135. toEvaluate() {
  136. uni.navigateTo({
  137. url: "/pageD/evaluate/evaluate",
  138. });
  139. },
  140. },
  141. };
  142. </script>
  143. <style scoped lang="scss">
  144. .detail {
  145. padding: 28rpx 20rpx;
  146. background-color: #fff;
  147. border-radius: 16rpx;
  148. margin-top: 28rpx;
  149. .title {
  150. display: flex;
  151. justify-content: space-between;
  152. .title-left {
  153. display: flex;
  154. font-size: 32rpx;
  155. align-items: center;
  156. .header-img {
  157. width: 36rpx;
  158. height: 36rpx;
  159. border-radius: 50%;
  160. margin-right: 20rpx;
  161. }
  162. .right-325 {
  163. width: 32rpx;
  164. height: 32rpx;
  165. }
  166. }
  167. .order-status {
  168. color: #f83224;
  169. font-size: 26rpx;
  170. }
  171. }
  172. .commodity-information {
  173. margin-top: 28rpx;
  174. .commodity-1 {
  175. display: flex;
  176. .commodity-img {
  177. width: 180rpx;
  178. height: 180rpx;
  179. margin-right: 20rpx;
  180. border-radius: 10rpx;
  181. }
  182. .commodity-2 {
  183. display: flex;
  184. justify-content: space-between;
  185. .commodity-title {
  186. width: 328rpx;
  187. overflow: hidden;
  188. white-space: nowrap;
  189. text-overflow: ellipsis;
  190. margin-right: 38rpx;
  191. }
  192. }
  193. .commodity-3 {
  194. display: flex;
  195. justify-content: space-between;
  196. margin-top: 20rpx;
  197. color: #777;
  198. .specifications {
  199. font-size: 28rpx;
  200. color: #777;
  201. }
  202. }
  203. }
  204. }
  205. .price {
  206. display: flex;
  207. justify-content: flex-end;
  208. font-size: 28rpx;
  209. align-items: flex-end;
  210. }
  211. .btn-list {
  212. display: flex;
  213. justify-content: flex-end;
  214. margin-top: 34rpx;
  215. .more {
  216. color: #777;
  217. font-size: 28rpx;
  218. line-height: 68rpx;
  219. margin-right: 20rpx;
  220. }
  221. .status-1 {
  222. background-color: #fff;
  223. border-radius: 34rpx;
  224. margin: 0;
  225. padding: 0;
  226. font-size: 28rpx;
  227. color: #222;
  228. width: 168rpx;
  229. height: 68rpx;
  230. line-height: 68rpx;
  231. margin-left: 20rpx;
  232. border: 2rpx solid #979797;
  233. }
  234. .status-2 {
  235. background-color: #ffffff;
  236. border-radius: 34rpx;
  237. margin: 0;
  238. padding: 0;
  239. font-size: 28rpx;
  240. color: #f83224;
  241. width: 168rpx;
  242. height: 68rpx;
  243. line-height: 68rpx;
  244. margin-left: 20rpx;
  245. border: 2rpx solid #f83224;
  246. }
  247. }
  248. }
  249. </style>