commodityDetail.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. <template>
  2. <view class="detail">
  3. <view v-for="item in orderDetail.goods" :key="item.id">
  4. <view class="title">
  5. <view class="title-left">
  6. <image class="header-img" :src="item.merchant.image" mode=""></image>
  7. <text>{{ item.merchant.merchant_name }}</text>
  8. <image
  9. class="right-325"
  10. src="../../../static/mine/325.png"
  11. mode=""
  12. ></image>
  13. </view>
  14. </view>
  15. <view class="commodity-information">
  16. <view class="commodity-1">
  17. <image
  18. class="commodity-img"
  19. :src="item.sku_item.image"
  20. mode=""
  21. ></image>
  22. <view class="">
  23. <view class="commodity-2">
  24. <view class="commodity-title">{{ item.goods_name }} </view>
  25. <view class="commodity-price">
  26. <text style="font-size: 20rpx">¥</text>
  27. <text>{{ item.discount_price.split(".")[0] }}</text
  28. >.
  29. <text style="font-size: 20rpx">{{
  30. item.discount_price.split(".")[1]
  31. }}</text>
  32. </view>
  33. </view>
  34. <view class="commodity-3">
  35. <view class="specifications"> {{ item.sku_item.item }} </view>
  36. <view style="font-size: 24rpx"> x{{ item.goods_num }} </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view
  41. class="btn-list"
  42. v-if="
  43. orderDetail.simplify_status == 'paid' ||
  44. orderDetail.simplify_status == 'undelivered' ||
  45. orderDetail.simplify_status == 'unreview' ||
  46. orderDetail.simplify_status == 'merdelivered'
  47. "
  48. >
  49. <!-- status就是 状态 0未审核 1已通过 2未通过 3平台介入 -->
  50. <button
  51. @click="platformIntervene(item)"
  52. v-if="
  53. item.refund &&
  54. (item.refund.status == 2 ||
  55. item.refund.status == 0 ||
  56. item.refund.status == 3)
  57. "
  58. >
  59. 平台介入
  60. </button>
  61. <button
  62. @click="toRefundDetail(item)"
  63. v-if="
  64. item.refund &&
  65. (item.refund.status == 0 ||
  66. item.refund.status == 1 ||
  67. item.refund.status == 2 ||
  68. item.refund.status == 3)
  69. "
  70. >
  71. 退款详情
  72. </button>
  73. <button
  74. @click="application(item)"
  75. v-if="item.refund && item.refund.status == 2"
  76. >
  77. 继续申请
  78. </button>
  79. <button v-if="!item.refund" @click="application(item)">
  80. 申请退款
  81. </button>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="information">
  86. <text class="_label">商品总价</text>
  87. <view style="color: #222; font-weight: 600" v-if="orderDetail.freight">
  88. <text style="font-size: 20rpx">¥</text>
  89. <text>{{ orderDetail.goods_amount.split(".")[0] }}</text
  90. >.
  91. <text style="font-size: 20rpx">{{
  92. orderDetail.goods_amount.split(".")[1]
  93. }}</text>
  94. </view>
  95. </view>
  96. <view class="information">
  97. <text class="_label">商品总重量</text>
  98. <view class="_title-right"> {{ orderDetail.weight_total || 0 }}Kg </view>
  99. </view>
  100. <view class="information">
  101. <text class="_label">跨境物流</text>
  102. <view lass="_title-right">
  103. {{ orderDetail.container.transport_type.name_cn }} |
  104. {{ orderDetail.container.name_cn }}
  105. </view>
  106. </view>
  107. <view class="information last">
  108. <text class="_label">运费</text>
  109. <view style="color: #222; font-weight: 600" v-if="orderDetail.freight">
  110. <text style="font-size: 20rpx">¥</text>
  111. <text>{{ orderDetail.freight.split(".")[0] }}</text
  112. >.
  113. <text style="font-size: 20rpx">{{
  114. orderDetail.freight.split(".")[1]
  115. }}</text>
  116. </view>
  117. </view>
  118. <view class="_bottom">
  119. <text class="_label">应付款 </text>
  120. <view
  121. style="color: #f83224; margin-left: 10rpx; font-weight: 600"
  122. v-if="orderDetail.amount"
  123. >
  124. <text style="font-size: 20rpx">¥</text>
  125. <text>{{ orderDetail.amount.split(".")[0] }}</text
  126. >.
  127. <text style="font-size: 20rpx">{{
  128. orderDetail.amount.split(".")[1]
  129. }}</text>
  130. </view>
  131. </view>
  132. </view>
  133. </template>
  134. <script>
  135. import textRight from "../../accountSecurity/component/textRight.vue";
  136. export default {
  137. components: {
  138. textRight,
  139. },
  140. props: {
  141. status: {
  142. typeof: Number,
  143. default: 0,
  144. },
  145. orderDetail: {
  146. typeof: Object,
  147. default: () => {
  148. return {};
  149. },
  150. },
  151. },
  152. data() {
  153. return {};
  154. },
  155. methods: {
  156. //申请退款
  157. application(value) {
  158. uni.navigateTo({
  159. url: `/pageC/applicationRefund/applicationRefund?orderId=${value.id}`,
  160. });
  161. },
  162. //售后订单详情
  163. toRefundDetail(value) {
  164. uni.navigateTo({
  165. url: `/pageC/refundDetail/refundDetail?orderId=${value.refund.id}`,
  166. });
  167. },
  168. //申请平台介入
  169. platformIntervene(value) {
  170. if (value.refund.status != 3) {
  171. uni.$u.http
  172. .post(`/api/order_refund/platform_intervention`, {
  173. order_refund_id: value.refund.id,
  174. })
  175. .then((res) => {
  176. uni.showToast({
  177. title: "已申请平台介入",
  178. icon: "none",
  179. });
  180. });
  181. } else {
  182. uni.showToast({
  183. title: "平台已介入",
  184. icon: "none",
  185. });
  186. }
  187. },
  188. },
  189. };
  190. </script>
  191. <style scoped lang="scss">
  192. .detail {
  193. padding: 28rpx 20rpx;
  194. background-color: #fff;
  195. border-radius: 16rpx;
  196. margin-top: 28rpx;
  197. .title {
  198. display: flex;
  199. justify-content: space-between;
  200. margin-top: 20rpx;
  201. .title-left {
  202. display: flex;
  203. font-size: 32rpx;
  204. align-items: center;
  205. .header-img {
  206. width: 36rpx;
  207. height: 36rpx;
  208. border-radius: 50%;
  209. margin-right: 20rpx;
  210. }
  211. .right-325 {
  212. width: 32rpx;
  213. height: 32rpx;
  214. }
  215. }
  216. .order-status {
  217. color: #f83224;
  218. font-size: 26rpx;
  219. }
  220. }
  221. .commodity-information {
  222. margin-top: 28rpx;
  223. .commodity-1 {
  224. display: flex;
  225. .commodity-img {
  226. width: 180rpx;
  227. height: 180rpx;
  228. margin-right: 20rpx;
  229. border-radius: 10rpx;
  230. }
  231. .commodity-2 {
  232. display: flex;
  233. justify-content: space-between;
  234. .commodity-title {
  235. width: 328rpx;
  236. overflow: hidden;
  237. white-space: nowrap;
  238. text-overflow: ellipsis;
  239. margin-right: 38rpx;
  240. }
  241. }
  242. .commodity-3 {
  243. display: flex;
  244. justify-content: space-between;
  245. margin-top: 20rpx;
  246. color: #777;
  247. .specifications {
  248. font-size: 28rpx;
  249. color: #777;
  250. }
  251. }
  252. }
  253. }
  254. .last {
  255. border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
  256. padding-bottom: 20rpx;
  257. }
  258. .btn-list {
  259. display: flex;
  260. justify-content: flex-end;
  261. button {
  262. width: 152rpx;
  263. height: 58rpx;
  264. border: 2rpx solid #979797;
  265. color: #444;
  266. margin: 0;
  267. padding: 0;
  268. font-size: 24rpx;
  269. background-color: #fff;
  270. border-radius: 34rpx;
  271. margin-top: 20rpx;
  272. margin-left: 20rpx;
  273. }
  274. }
  275. .information {
  276. display: flex;
  277. justify-content: space-between;
  278. font-size: 28rpx;
  279. align-items: flex-end;
  280. margin: 34rpx 0;
  281. ._label {
  282. font-size: 28rpx;
  283. color: #333;
  284. }
  285. ._title-right {
  286. font-size: 28rpx;
  287. color: #333;
  288. }
  289. }
  290. ._bottom {
  291. display: flex;
  292. justify-content: flex-end;
  293. font-size: 28rpx;
  294. align-items: flex-end;
  295. margin-top: 34rpx;
  296. }
  297. }
  298. </style>