orderInofrmation.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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' && !item.refund"
  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. @click.stop="$emit('toLogistics', itemInfo)"
  97. v-if="
  98. itemInfo.order.status == 'delivered' ||
  99. itemInfo.order.status == 'finished'
  100. "
  101. >
  102. 查看物流
  103. </button>
  104. <button
  105. class="status-1"
  106. v-if="
  107. itemInfo.order.status == 'refund' ||
  108. itemInfo.order.status == 'finished'
  109. "
  110. >
  111. 再来一单
  112. </button>
  113. <button
  114. class="status-2"
  115. v-if="itemInfo.order.status == 'delivered'"
  116. @click.stop="$emit('confirm', itemInfo)"
  117. >
  118. 确认收货
  119. </button>
  120. <button
  121. class="status-2"
  122. v-if="itemInfo.order.status == 'finished'"
  123. @click.stop="$emit('toEvaluate', itemInfo)"
  124. >
  125. 评价
  126. </button>
  127. </view>
  128. </view>
  129. </template>
  130. <script>
  131. import textRight from "../../accountSecurity/component/textRight.vue";
  132. export default {
  133. components: {
  134. textRight,
  135. },
  136. props: {
  137. itemInfo: {
  138. typeof: Object,
  139. default: {},
  140. },
  141. },
  142. computed: {
  143. statusName() {
  144. if (this.itemInfo.order.status == "unpaid") {
  145. return "待付款";
  146. } else if (this.itemInfo.order.status == "closed") {
  147. return "已取消";
  148. } else if (this.itemInfo.order.status == "refund") {
  149. return "退款成功";
  150. } else if (this.itemInfo.order.status == "refunding") {
  151. return "退款中";
  152. } else if (this.itemInfo.order.status == "unreview") {
  153. return "拼团中";
  154. } else if (
  155. this.itemInfo.order.status == "undelivered" ||
  156. this.itemInfo.order.status == "paid"
  157. ) {
  158. return "等待发货";
  159. } else if (this.itemInfo.order.status == "delivered") {
  160. return "等待收货";
  161. } else if (this.itemInfo.order.status == "finished") {
  162. return "交易完成";
  163. } else if (this.itemInfo.order.status == "undifference") {
  164. return "待补邮费";
  165. }
  166. },
  167. },
  168. data() {
  169. return {};
  170. },
  171. watch: {
  172. itemInfo(newVal) {},
  173. },
  174. methods: {
  175. // toEvaluate() {
  176. // uni.navigateTo({
  177. // url: "/pageD/evaluate/evaluate?",
  178. // });
  179. // },
  180. },
  181. };
  182. </script>
  183. <style scoped lang="scss">
  184. .detail {
  185. padding: 28rpx 20rpx;
  186. background-color: #fff;
  187. border-radius: 16rpx;
  188. margin-top: 28rpx;
  189. .title {
  190. display: flex;
  191. justify-content: space-between;
  192. .title-left {
  193. display: flex;
  194. font-size: 32rpx;
  195. align-items: center;
  196. .header-img {
  197. width: 36rpx;
  198. height: 36rpx;
  199. border-radius: 50%;
  200. margin-right: 20rpx;
  201. }
  202. .right-325 {
  203. width: 32rpx;
  204. height: 32rpx;
  205. }
  206. }
  207. .order-status {
  208. color: #f83224;
  209. font-size: 26rpx;
  210. }
  211. }
  212. .commodity-information {
  213. margin-top: 28rpx;
  214. .commodity-1 {
  215. display: flex;
  216. .commodity-img {
  217. width: 180rpx;
  218. height: 180rpx;
  219. margin-right: 20rpx;
  220. border-radius: 10rpx;
  221. }
  222. .commodity-2 {
  223. display: flex;
  224. justify-content: space-between;
  225. .commodity-title {
  226. width: 328rpx;
  227. overflow: hidden;
  228. white-space: nowrap;
  229. text-overflow: ellipsis;
  230. margin-right: 38rpx;
  231. }
  232. }
  233. .commodity-3 {
  234. display: flex;
  235. justify-content: space-between;
  236. margin-top: 20rpx;
  237. color: #777;
  238. .specifications {
  239. font-size: 28rpx;
  240. color: #777;
  241. }
  242. }
  243. .application {
  244. background-color: #fff;
  245. border-radius: 34rpx;
  246. padding: 0;
  247. margin: 0;
  248. // padding: 0 26rpx;
  249. font-size: 28rpx;
  250. color: #222;
  251. height: 58rpx;
  252. line-height: 58rpx;
  253. margin-left: 20rpx;
  254. border: 2rpx solid #979797;
  255. margin-top: 10rpx;
  256. width: 140rpx;
  257. font-size: 22rpx;
  258. float: right;
  259. }
  260. }
  261. }
  262. .price {
  263. display: flex;
  264. justify-content: flex-end;
  265. font-size: 28rpx;
  266. align-items: flex-end;
  267. }
  268. .btn-list {
  269. display: flex;
  270. justify-content: flex-end;
  271. margin-top: 34rpx;
  272. .more {
  273. color: #777;
  274. font-size: 28rpx;
  275. line-height: 68rpx;
  276. margin-right: 20rpx;
  277. }
  278. .status-1 {
  279. background-color: #fff;
  280. border-radius: 34rpx;
  281. margin: 0;
  282. padding: 0;
  283. font-size: 28rpx;
  284. color: #222;
  285. width: 168rpx;
  286. height: 68rpx;
  287. line-height: 68rpx;
  288. margin-left: 20rpx;
  289. border: 2rpx solid #979797;
  290. }
  291. .status-2 {
  292. background-color: #ffffff;
  293. border-radius: 34rpx;
  294. margin: 0;
  295. padding: 0;
  296. font-size: 28rpx;
  297. color: #f83224;
  298. width: 168rpx;
  299. height: 68rpx;
  300. line-height: 68rpx;
  301. margin-left: 20rpx;
  302. border: 2rpx solid #f83224;
  303. }
  304. }
  305. }
  306. </style>