history-after.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <template>
  2. <view class="bg">
  3. <view v-if="orderList.length>0">
  4. <view v-for="(item,index) in orderList" :key="index">
  5. <view class="info-region">
  6. <view>
  7. <view class="flex-items flex-sp-between mar-b-20 mar-lr-12">
  8. <view>
  9. 订单号:{{item.orderCode}}
  10. </view>
  11. </view>
  12. <view class="flex">
  13. <view>
  14. <image class=" mar-l-20 img" :src="item.productImg" mode="aspectFit"></image>
  15. </view>
  16. <view class="mar-l-20 mar-r-20">
  17. <view class="font32 pad-b-10 ">
  18. {{item.productName}}
  19. </view>
  20. <view class="pad-t-20 font-gray">
  21. 规格: {{item.skuName}}
  22. </view>
  23. <view class="pad-t-10 font-gray">
  24. 退货类型:
  25. {{item.type==1?'退货退款':'仅退款'}}
  26. </view>
  27. <view class="pad-t-10 font-gray">
  28. 退货原因:{{reasonRange[item.reason].text}}
  29. </view>
  30. </view>
  31. </view>
  32. <text class="flex-end font-red font28 font-bold mar-r-10">
  33. 退款金额 ¥{{item.afterPrice}}
  34. </text>
  35. </view>
  36. <!-- 售后中状态 -->
  37. <view class=" flex-items flex-end mar-t-20 mar-r-10">
  38. <view class="cancelBtn" @click="checkAfterSaleStatus(item)">
  39. 查看详情
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view v-else>
  46. <view class="flex-items-plus">
  47. <image src="../../static/images/empty.png" class="empty "></image>
  48. </view>
  49. <view class="font28 font-gray flex-items-plus">
  50. 数据为空
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. import {
  57. getAfterList
  58. } from '../../config/api.js';
  59. export default {
  60. components: {},
  61. data() {
  62. return {
  63. typeRange: [{
  64. value: 1,
  65. text: "退货退款"
  66. },
  67. {
  68. value: 2,
  69. text: "仅退款"
  70. },
  71. ],
  72. reasonRange: [{
  73. value: 1,
  74. text: "不喜欢,效果不好"
  75. },
  76. {
  77. value: 2,
  78. text: "不想要了"
  79. },
  80. {
  81. value: 3,
  82. text: "材质与商品描述不符"
  83. },
  84. {
  85. value: 4,
  86. text: "大小尺寸与商品描述不符"
  87. },
  88. {
  89. value: 5,
  90. text: "安装质量问题"
  91. },
  92. {
  93. value: 6,
  94. text: "做工瑕疵"
  95. },
  96. {
  97. value: 7,
  98. text: "颜色、款式、图案与描述不符"
  99. },
  100. {
  101. value: 8,
  102. text: "商品破损或污渍"
  103. },
  104. {
  105. value: 9,
  106. text: "其他原因"
  107. },
  108. ],
  109. current: 0,
  110. orderId: "",
  111. orderList: [],
  112. params: {
  113. current: 1,
  114. size: 10,
  115. status: "",
  116. isAfter: "",
  117. type: "",
  118. orderId: ""
  119. }
  120. };
  121. },
  122. onLoad(op) {
  123. this.params.orderId = op.orderId
  124. this.getList();
  125. },
  126. onPullDownRefresh() {
  127. this.orderList = [];
  128. this.params.current = 1;
  129. this.getList();
  130. uni.stopPullDownRefresh();
  131. },
  132. methods: {
  133. goDetail(item) {
  134. this.$route('/pages/order/detail?id=' + item.id);
  135. },
  136. checkAfterSaleStatus(item) {
  137. // 实现查看售后进度逻辑
  138. this.$route('/pages/order/after-progress?id=' + item.id + "&historyDetail=1");
  139. },
  140. // 订单列表
  141. getList() {
  142. getAfterList(this.params).then((res) => {
  143. this.orderList = res.data.records;
  144. });
  145. },
  146. }
  147. };
  148. </script>
  149. <style lang="scss">
  150. .bg {
  151. min-height: 100vh;
  152. padding-bottom: 20rpx;
  153. // background: linear-gradient(135deg, #f8ffee 0%, #fffff6 100%);
  154. }
  155. .info-region {
  156. /* 阴影效果 */
  157. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  158. border-radius: 15rpx;
  159. width: 720rpx;
  160. height: auto;
  161. padding: 15rpx;
  162. background-color: white;
  163. margin-top: 10rpx;
  164. margin-bottom: 20rpx;
  165. margin-left: 15rpx;
  166. }
  167. .img {
  168. border-radius: 20rpx;
  169. width: 200rpx;
  170. height: 200rpx;
  171. }
  172. .daifahuo {
  173. color: #ffffff;
  174. background-color: #e2c696;
  175. padding: 4rpx 10rpx 4rpx 10rpx;
  176. border-radius: 20rpx;
  177. }
  178. .fukuan {
  179. color: #ffffff;
  180. background-color: #e29c6d;
  181. padding: 4rpx 10rpx 4rpx 10rpx;
  182. border-radius: 20rpx;
  183. }
  184. .shouhuo {
  185. color: #ffffff;
  186. background-color: #e2d972;
  187. padding: 4rpx 10rpx 4rpx 10rpx;
  188. border-radius: 20rpx;
  189. }
  190. .wancheng {
  191. color: #ffffff;
  192. background-color: #83e25a;
  193. padding: 4rpx 10rpx 4rpx 10rpx;
  194. border-radius: 20rpx;
  195. }
  196. .pingjia {
  197. color: #ffffff;
  198. background-color: #e0e2d9;
  199. padding: 4rpx 10rpx 4rpx 10rpx;
  200. border-radius: 20rpx;
  201. }
  202. .shouhou {
  203. color: #ffffff;
  204. background-color: #e23e3e;
  205. padding: 4rpx 10rpx 4rpx 10rpx;
  206. border-radius: 20rpx;
  207. }
  208. .buyBtn {
  209. font-size: 30rpx;
  210. width: 160rpx;
  211. height: 50rpx;
  212. text-align: center;
  213. line-height: 50rpx;
  214. border-radius: 36rpx;
  215. color: #fff;
  216. background: #E2A28A;
  217. }
  218. .cancelBtn {
  219. font-size: 30rpx;
  220. width: 160rpx;
  221. height: 50rpx;
  222. text-align: center;
  223. line-height: 50rpx;
  224. border-radius: 36rpx;
  225. color: #6a6a6a;
  226. background: #e2e2e2;
  227. }
  228. .custom-easyinput {
  229. border: none;
  230. /* 取消边框 */
  231. outline: none;
  232. /* 取消聚焦时的轮廓线 */
  233. }
  234. </style>