returngood.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view>
  3. <view class="cart-list">
  4. <view style="padding: 0 36upx;line-height: 70upx;border-bottom: 14upx solid #F5F5F5;">
  5. <span>{{detail.statusremak}}</span>
  6. </view>
  7. <view style="padding: 30upx 36upx 15upx 36upx;border-bottom: 1px solid #F5F5F5;">
  8. <image :src="pictureUrl+'/uploads/home/store/'+detail.store_id+'/'+detail.store_avatar" style="border-radius: 50%;
  9. width: 50upx;height: 50upx;vertical-align: middle;"></image>
  10. <span style="padding-left: 16upx;">{{detail.store_name}}</span>
  11. </view>
  12. <view>
  13. <van-card
  14. title-class="changewidth"
  15. price-class ="priceClass"
  16. :price="detail.goods_price"
  17. :desc="detail.descire"
  18. :title="detail.desarray"
  19. :thumb="pictureUrl + '/uploads/home/store/goods/'+detail.goods_image.substr(0, detail.goods_image.indexOf('\_')) + '/' + detail.goods_image"
  20. >
  21. </van-card>
  22. </view>
  23. <view class="topTip">
  24. <view style="font-size: 28upx;">合计:{{detail.goods_price}}</view>
  25. </view>
  26. <view style="padding: 15upx 36upx;">订单编号:<text class="orderCode">{{detail.order_sn}}</text></view>
  27. <view style="padding: 0upx 32upx;">
  28. <TextArea ref="getValue" :tips="tips" @submitValue="submitValue"/>
  29. <uploadImage @getImg="getImg" />
  30. <view style="margin-top: 30upx;" class="submitRemin" @click="submitRemin">提交</view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import TextArea from '@/component/textarea.vue'
  37. import uploadImage from '@/component/uploadImage.vue'
  38. export default {
  39. components: {
  40. TextArea,
  41. uploadImage
  42. },
  43. data() {
  44. return {
  45. id: 0,
  46. pictureUrl: this.pictureUrl,
  47. detail: {},
  48. tips:"退款内容不能少于五个字",
  49. remark:'',
  50. images:''
  51. }
  52. },
  53. onLoad(e) {
  54. this.detail = JSON.parse(e.id);
  55. },
  56. methods: {
  57. submitValue(e) {
  58. this.remark = e.detail.value;
  59. },
  60. getImg(e) {
  61. this.images = e;
  62. },
  63. submitRemin() {
  64. if(this.remark == '') {
  65. this.$msg("退款内容不能为空");
  66. return;
  67. }else if(this.remark.length < 5) {
  68. this.$msg("退款理由不能少于5个字");
  69. return;
  70. }
  71. this.request({
  72. url: '/v3/Order/refund',
  73. method:'post',
  74. data: {
  75. images: this.images,
  76. remark:this.remark,
  77. order_id: this.detail.order_id,
  78. goods_id: this.detail.goods_id
  79. },
  80. success: (res) => {
  81. if(res.data.data.code == 1000) {
  82. this.$msg("申请退款成功");
  83. }
  84. uni.$emit('refshlist'); // 刷新订单详情
  85. uni.navigateBack();
  86. }
  87. })
  88. }
  89. }
  90. }
  91. </script>
  92. <style>
  93. .topTip {
  94. display: flex;
  95. align-items: center;
  96. justify-content: flex-start;
  97. padding: 20upx 36upx;
  98. }
  99. .van-card {
  100. background-color: #fff!important;
  101. }
  102. </style>