orderInofrmation.vue 7.5 KB

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