after_sales_detail.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view>
  3. <view class="after-sales-detail">
  4. <view class="after-sales-header">
  5. <view class="after-sales-status white lg">
  6. {{afterSale.status_text}}
  7. </view>
  8. </view>
  9. <view class="return-address-contain flex bg-white m-t-20">
  10. <view class="address-title">退货地址:</view>
  11. <view class="sm address flex-1">{{afterSale.shop.address}}, {{afterSale.shop.contact}},
  12. {{afterSale.shop.mobile}}</view>
  13. <view class="xs copy-btn flex-none row-center" @tap="onCopy">复制</view>
  14. </view>
  15. <view class="goods-container bg-white m-t-20">
  16. <view class="m-l-20">
  17. <shop-title :shop="{name: afterSale.shop_name, id: afterSale.sid}"></shop-title>
  18. </view>
  19. <view class="goods-item flex">
  20. <view class="goods-img">
  21. <u-image width="180rpx" height="180rpx" border-radius="10rpx"
  22. :src="afterSale.order_goods.image"></u-image>
  23. </view>
  24. <view class="goods-info flex-1 m-l-24">
  25. <view class="line-2">{{afterSale.order_goods.goods_name}}</view>
  26. <view class="m-t-10 xs line-1 muted">{{afterSale.order_goods.spec_value}}</view>
  27. <view class="flex row-between m-t-20">
  28. <price-format :price="afterSale.order_goods.goods_price" :first-size="30" :second-size="30"
  29. :subscript-size="30" />
  30. <view>x{{afterSale.order_goods.goods_num}}</view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="return-goods-container bg-white m-t-20">
  36. <view class="return-goods-item flex sm">
  37. <view class="return-title">退款方式:</view>
  38. <view class="return-explain">{{afterSale.refund_type_text}}</view>
  39. </view>
  40. <view class="return-goods-item flex sm m-t-20">
  41. <view class="return-title">退款原因:</view>
  42. <view class="return-explain">{{afterSale.refund_reason}}</view>
  43. </view>
  44. <view class="return-goods-item flex sm m-t-20">
  45. <view class="return-title">退款金额:</view>
  46. <view class="return-explain primary">¥{{afterSale.refund_price}}</view>
  47. </view>
  48. <view class="return-goods-item flex sm m-t-20">
  49. <view class="return-title">退款编号:</view>
  50. <view class="return-explain">{{afterSale.sn}}</view>
  51. </view>
  52. <view class="return-goods-item flex sm m-t-20">
  53. <view class="return-title">申请时间:</view>
  54. <view class="return-explain">{{afterSale.create_time}}</view>
  55. </view>
  56. </view>
  57. <view class="btn-group fixed bg-white flex row-right" v-if="afterSale.status != 6">
  58. <view class="m-r-20 btn br60" @tap="confirmDialog=true">撤销申请</view>
  59. <router-link :to="{path: '/bundle/pages/apply_refund/apply_refund', query: {after_sale_id: afterSale.id,
  60. order_id: afterSale.order_goods.order_id,
  61. item_id: afterSale.order_goods.item_id}}">
  62. <view class="m-r-20 btn br60 primary" v-if="(afterSale.status == 4 || afterSale.status == 1)">重新申请
  63. </view>
  64. </router-link>
  65. <router-link
  66. :to="{path: '/bundle/pages/input_express_info/input_express_info', query: {id: afterSale.id}}">
  67. <view class="m-r-20 btn br60" v-if="afterSale.status == 2">
  68. 填写快递单号
  69. </view>
  70. </router-link>
  71. </view>
  72. </view>
  73. <u-modal v-model="confirmDialog" confirm-text="确定" :showCancelButton="true" :confirm-color="colorConfig.primary"
  74. @confirm="cancelApplyFun">
  75. <view class="flex-col col-center tips-dialog" style="padding: 30rpx 0;">
  76. <image class="icon-lg" src="/static/images/icon_warning.png"></image>
  77. <view class="m-t-30">是否要撤销申请?</view>
  78. </view>
  79. </u-modal>
  80. </view>
  81. </template>
  82. <script>
  83. import {
  84. afterSaleDetail,
  85. cancelApply
  86. } from "@/api/user";
  87. import {
  88. trottle,
  89. copy
  90. } from "@/utils/tools.js";
  91. export default {
  92. data() {
  93. return {
  94. afterSale: {
  95. shop: {},
  96. order_goods: {}
  97. },
  98. confirmDialog: false
  99. };
  100. },
  101. onLoad(options) {
  102. },
  103. onShow() {
  104. this.id = this.$Route.query.id
  105. this.afterSaleDetailFun();
  106. },
  107. methods: {
  108. onCopy() {
  109. const {
  110. afterSale
  111. } = this;
  112. const {
  113. address,
  114. contact,
  115. mobile
  116. } = afterSale.shop;
  117. copy(`${address},${contact},${mobile}`)
  118. },
  119. cancelApplyFun() {
  120. cancelApply({
  121. id: this.id
  122. }).then(res => {
  123. if (res.code == 1) {
  124. uni.$emit("refreshsale")
  125. this.$toast({
  126. title: res.msg
  127. }, {
  128. tab: 3,
  129. url: 1
  130. });
  131. }
  132. });
  133. },
  134. afterSaleDetailFun() {
  135. afterSaleDetail({
  136. id: this.id
  137. }).then(res => {
  138. if (res.code == 1) {
  139. this.afterSale = res.data
  140. }
  141. });
  142. }
  143. }
  144. };
  145. </script>
  146. <style lang="scss">
  147. .after-sales-detail {
  148. padding-bottom: calc(120rpx + env(safe-area-inset-bottom));
  149. .after-sales-header {
  150. .after-sales-status {
  151. padding: 48rpx 30rpx;
  152. background-color: #555555;
  153. }
  154. .after-sales-explain {
  155. padding: 20rpx 30rpx 24rpx;
  156. }
  157. }
  158. .return-goods-container {
  159. padding: 20rpx 24rpx 55rpx;
  160. .return-goods-item {
  161. line-height: 40rpx;
  162. }
  163. }
  164. .btn-group {
  165. padding: 0rpx 24rpx;
  166. position: fixed;
  167. left: 0;
  168. right: 0;
  169. bottom: 0;
  170. height: 100rpx;
  171. padding-bottom: env(safe-area-inset-bottom);
  172. box-sizing: content-box;
  173. .btn {
  174. padding: 10rpx 34rpx;
  175. border: 1px solid #999999;
  176. &.primary {
  177. border-color: $-color-primary;
  178. }
  179. }
  180. }
  181. .goods-container {
  182. .goods-item {
  183. padding: 25rpx 24rpx;
  184. .goods-info {
  185. min-width: 500rpx;
  186. }
  187. }
  188. }
  189. }
  190. .return-address-contain {
  191. padding: 20rpx 24rpx 28rpx 30rpx;
  192. .address {
  193. flex: 1;
  194. line-height: 38rpx;
  195. }
  196. .address-title {
  197. width: 150rpx;
  198. align-self: flex-start;
  199. line-height: 40rpx;
  200. }
  201. .copy-btn {
  202. background-color: #F4F4F4;
  203. color: #555555;
  204. padding: 3rpx 16rpx;
  205. margin-left: 12rpx;
  206. border-radius: 4rpx;
  207. }
  208. }
  209. .tips-dialog {
  210. height: 230rpx;
  211. width: 100%;
  212. }
  213. </style>