commodityDetail.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <template>
  2. <view class="detail">
  3. <view class="title">
  4. <view class="title-left" v-if="orderInformation.member">
  5. <image
  6. class="header-img"
  7. :src="orderInformation.member.avatar"
  8. mode=""
  9. ></image>
  10. <text>{{ orderInformation.member.nickname }}</text>
  11. <image
  12. class="right-325"
  13. src="../../../static/mine/325.png"
  14. mode=""
  15. ></image>
  16. </view>
  17. </view>
  18. <view class="commodity-information">
  19. <view class="commodity-1" v-for="item in orderInformation.goods">
  20. <image class="commodity-img" :src="item.sku_item.image" mode=""></image>
  21. <view class="">
  22. <view class="commodity-2">
  23. <view class="commodity-title"> {{ item.goods_name }}</view>
  24. <view class="commodity-price">
  25. <text style="font-size: 20rpx">¥</text>
  26. <text>{{ item.sku_item.price.split(".")[0] }}</text
  27. >.
  28. <text style="font-size: 20rpx">{{
  29. item.sku_item.price.split(".")[1]
  30. }}</text>
  31. </view>
  32. </view>
  33. <view class="commodity-3">
  34. <view class="specifications"> {{ item.sku_item.item }} </view>
  35. <view style="font-size: 24rpx"> x{{ item.goods_num }} </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="detail-1">
  41. <text class="_text-1">{{
  42. "共" + orderInformation.goods.length + "件商品" + "&nbsp;"
  43. }}</text>
  44. <text class="_text-2">买家实付</text>
  45. <view class="_price">
  46. <text style="font-size: 20rpx">¥</text>
  47. <text>{{ payMoney.split(".")[0] }}</text
  48. >.
  49. <text style="font-size: 20rpx">{{ payMoney.split(".")[1] }}</text>
  50. </view>
  51. </view>
  52. <view class="information">
  53. <text class="_label">退款状态</text>
  54. <view style="color: #f83224"> {{ statusName }} </view>
  55. </view>
  56. <view class="information">
  57. <text class="_label">退款原因</text>
  58. <view class="_title-right">
  59. {{ orderInformation.goods[0].refund.refund_illustrate }}
  60. </view>
  61. </view>
  62. <view class="information">
  63. <text class="_label">退款金额</text>
  64. <view lass="_title-right" style="font-weight: 600">
  65. ¥{{ orderInformation.goods[0].refund.refund_price }}
  66. </view>
  67. </view>
  68. <view class="information">
  69. <text class="_label">申请时间</text>
  70. <view style="color: #222"> {{ orderInformation.created_at }} </view>
  71. </view>
  72. <view class="information">
  73. <text class="_label">退款编号</text>
  74. <view style="color: #222">
  75. <text>{{ orderInformation.order_no + "|" }}</text>
  76. <text @click="cope(orderInformation.order_no)">复制</text>
  77. </view>
  78. </view>
  79. </view>
  80. </template>
  81. <script>
  82. export default {
  83. props: {
  84. status: {
  85. typeof: Number,
  86. default: 0,
  87. },
  88. orderInformation: {
  89. typeof: Object,
  90. default: () => {
  91. return {};
  92. },
  93. },
  94. },
  95. data() {
  96. return {};
  97. },
  98. computed: {
  99. statusName() {
  100. if (this.orderInformation.goods[0].refund.status == "0") {
  101. return "待商家处理";
  102. } else if (this.orderInformation.goods[0].refund.status == "1") {
  103. return "已退款";
  104. } else if (this.orderInformation.goods[0].refund.status == "2") {
  105. return "拒绝退款";
  106. } else if (this.orderInformation.goods[0].refund.status == "3") {
  107. return "平台介入";
  108. }
  109. },
  110. // 买家实付金额
  111. payMoney() {
  112. let money = 0;
  113. this.orderInformation.goods.map((item) => {
  114. money = money + Number(item.amount);
  115. });
  116. return String(money.toFixed(2));
  117. },
  118. //退款金额
  119. refundMoney() {
  120. let money = 0;
  121. this.orderInformation.goods.map((item) => {
  122. if (item.refund.actual_refund_price) {
  123. money = money + Number(item.refund.actual_refund_price);
  124. } else {
  125. money = money + Number(item.refund.refund_price);
  126. }
  127. });
  128. return String(money.toFixed(2));
  129. },
  130. },
  131. methods: {
  132. cope(str) {
  133. uni.setClipboardData({
  134. data: str,
  135. success() {
  136. uni.showToast({
  137. title: "复制成功",
  138. icon: "none",
  139. });
  140. },
  141. });
  142. },
  143. application() {
  144. uni.navigateTo({
  145. url: "/pageC/applicationRefund/applicationRefund",
  146. });
  147. },
  148. },
  149. };
  150. </script>
  151. <style scoped lang="scss">
  152. .detail {
  153. padding: 28rpx 20rpx;
  154. background-color: #fff;
  155. border-radius: 16rpx;
  156. margin-top: 28rpx;
  157. .title {
  158. display: flex;
  159. justify-content: space-between;
  160. .title-left {
  161. display: flex;
  162. font-size: 32rpx;
  163. align-items: center;
  164. .header-img {
  165. width: 36rpx;
  166. height: 36rpx;
  167. border-radius: 50%;
  168. margin-right: 20rpx;
  169. }
  170. .right-325 {
  171. width: 32rpx;
  172. height: 32rpx;
  173. }
  174. }
  175. .order-status {
  176. color: #f83224;
  177. font-size: 26rpx;
  178. }
  179. }
  180. .commodity-information {
  181. margin-top: 28rpx;
  182. .commodity-1 {
  183. display: flex;
  184. .commodity-img {
  185. width: 180rpx;
  186. height: 180rpx;
  187. margin-right: 20rpx;
  188. border-radius: 10rpx;
  189. }
  190. .commodity-2 {
  191. display: flex;
  192. justify-content: space-between;
  193. .commodity-title {
  194. width: 326rpx;
  195. overflow: hidden;
  196. white-space: nowrap;
  197. text-overflow: ellipsis;
  198. margin-right: 38rpx;
  199. }
  200. }
  201. .commodity-3 {
  202. display: flex;
  203. justify-content: space-between;
  204. margin-top: 20rpx;
  205. color: #777;
  206. .specifications {
  207. font-size: 28rpx;
  208. color: #777;
  209. }
  210. }
  211. }
  212. }
  213. .last {
  214. border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
  215. padding-bottom: 20rpx;
  216. }
  217. .btn-list {
  218. display: flex;
  219. justify-content: flex-end;
  220. button {
  221. width: 152rpx;
  222. height: 58rpx;
  223. border: 2rpx solid #979797;
  224. color: #444;
  225. margin: 0;
  226. padding: 0;
  227. font-size: 24rpx;
  228. background-color: #fff;
  229. border-radius: 34rpx;
  230. margin-top: 20rpx;
  231. margin-left: 20rpx;
  232. }
  233. }
  234. .detail-1 {
  235. display: flex;
  236. justify-content: flex-end;
  237. align-items: flex-end;
  238. padding-bottom: 20rpx;
  239. border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
  240. ._text-1 {
  241. color: #222;
  242. font-size: 24rpx;
  243. }
  244. ._text-2 {
  245. color: #222;
  246. font-size: 28rpx;
  247. font-weight: 600;
  248. }
  249. ._price {
  250. font-weight: 600;
  251. color: #222;
  252. }
  253. }
  254. .information {
  255. display: flex;
  256. justify-content: space-between;
  257. font-size: 28rpx;
  258. align-items: flex-end;
  259. margin: 24rpx 0;
  260. ._label {
  261. font-size: 28rpx;
  262. color: #333;
  263. }
  264. ._title-right {
  265. font-size: 28rpx;
  266. color: #333;
  267. }
  268. }
  269. ._bottom {
  270. display: flex;
  271. justify-content: flex-end;
  272. font-size: 28rpx;
  273. align-items: flex-end;
  274. margin-top: 34rpx;
  275. }
  276. }
  277. </style>