cancle-order.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <view>
  3. <view class="mlr-36 blue size-26 pd-26 radius-10" style="background: #F3F0FF;">
  4. 取消订单一经提交后不可撤销和修改,保险订单将一并退
  5. 款。申请后平台将在2天内处理,订单钱款将会原路退回;
  6. 已使用的优惠券不再退回。
  7. </view>
  8. <view class="plr-36 ptb-30" style="border-bottom: 1rpx solid #F8F8F8;">
  9. <view class="flex1 flex-middle">
  10. <view class="">
  11. <view class="bg-green" style="width: 16rpx;height: 16rpx;border-radius: 50%;"></view>
  12. </view>
  13. <view class="ml-20 gray-2">
  14. {{info.start}}
  15. </view>
  16. </view>
  17. <view class="flex1 flex-middle mt-30" v-for="(item,i) in info.shaddress" :key="i" >
  18. <view class="">
  19. <view class="bg-orange" style="width: 16rpx;height: 16rpx;border-radius: 50%;"></view>
  20. </view>
  21. <view class="ml-20 u-flex-1 flex">
  22. <view class="gray-2">
  23. {{item.end}}
  24. </view>
  25. <!-- <view class="">
  26. {{item.floor}}
  27. </view> -->
  28. </view>
  29. </view>
  30. </view>
  31. <view v-if="info.pay_method==1">
  32. <view class="plr-36 ptb-30 flex" style="border-bottom: 1rpx solid #F8F8F8;">
  33. <view class="gray-2">
  34. 退款金额(实付金额)
  35. </view>
  36. <view class="">
  37. <text class="red size-26 bold">¥</text>
  38. <text class="red size-40 bold">{{info.discount_price}}</text>
  39. </view>
  40. </view>
  41. <view class="plr-36 ptb-30" style="border-bottom: 1rpx solid #F8F8F8;">
  42. <view class="flex gray-2">
  43. <view class="">
  44. 退款账户
  45. </view>
  46. <view class="">
  47. <text class="red size-26 bold">¥</text>
  48. <text class="red size-40 bold">{{info.discount_price}}</text>
  49. </view>
  50. </view>
  51. <view class="gray-2 size-26 mt-10">
  52. (1-3个工作日到账,若原路退回失败,款项会尝试退还至您钱
  53. 包的余额)
  54. </view>
  55. </view>
  56. </view>
  57. <view class="plr-36 pt-30" style="padding-bottom: 150rpx;">
  58. <view class="gray-2">
  59. 退款原因(必选)
  60. </view>
  61. <u-radio-group v-model="value" @change="radioGroupChange" active-color="#00c28e" class="w100">
  62. <u-radio name="1" :disabled="false" class="w100 flex flex-reverse mt-20">
  63. 联系不上司机
  64. </u-radio>
  65. <u-radio name="2" :disabled="false" class="w100 flex flex-reverse mt-20">
  66. 司机要求取消订单
  67. </u-radio>
  68. <u-radio name="3" :disabled="false" class="w100 flex flex-reverse mt-20">
  69. 司机要求加价或现金交易
  70. </u-radio>
  71. <u-radio name="4" :disabled="false" class="w100 flex flex-reverse mt-20">
  72. 选择其他出行工具
  73. </u-radio>
  74. <u-radio name="5" :disabled="false" class="w100 flex flex-reverse mt-20">
  75. 行程有变
  76. </u-radio>
  77. <u-radio name="6" :disabled="false" class="w100 flex flex-reverse mt-20">
  78. 目的地有误
  79. </u-radio>
  80. </u-radio-group>
  81. </view>
  82. <view class="fixed-bottom pd-30">
  83. <u-button type="primary" :disabled="!value" @click="submit">确认取消订单</u-button>
  84. </view>
  85. </view>
  86. </template>
  87. <script>
  88. import {
  89. mapState
  90. } from 'vuex'
  91. export default {
  92. data() {
  93. return {
  94. id:'',
  95. value:'',
  96. info:{}
  97. };
  98. },
  99. computed: {
  100. // ...mapState(['userInfo'])
  101. },
  102. onLoad(option) {
  103. this.id = option.id
  104. this.init()
  105. },
  106. methods: {
  107. init(){
  108. this.$http('/addons/ddrive/hyorder/info',{order_id:this.id},"POST").then(data=>{
  109. this.info=data
  110. })
  111. },
  112. radioGroupChange(e){
  113. console.log(e);
  114. },
  115. submit(){
  116. this.$http('/addons/ddrive/hyorder/cancel',{
  117. order_id: this.id,
  118. cancel_type: this.value
  119. },"POST").then(data=>{
  120. uni.showToast({
  121. title: '取消订单成功',
  122. icon:'none'
  123. })
  124. setTimeout(()=>{
  125. uni.redirectTo({
  126. url:'/pages/huoyun/order-detail?refund_id=' + data.refund_id + '&id=' + this.id
  127. })
  128. })
  129. })
  130. }
  131. }
  132. }
  133. </script>
  134. <style lang="scss" scoped>
  135. /deep/.u-radio__label{
  136. margin-left: 0;
  137. }
  138. /deep/.u-primary-hover {
  139. background: linear-gradient(to right,#00b6b4,#00d496) !important;
  140. }
  141. /deep/.u-btn--primary--disabled {
  142. background-color: $bg-1 !important;
  143. }
  144. .flex-reverse{
  145. flex-direction: row-reverse;
  146. }
  147. /deep/.u-radio{
  148. width: 100% !important;
  149. display: flex;
  150. flex-direction: row-reverse;
  151. justify-content: space-between;
  152. }
  153. </style>