dj-cancel.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view class="box">
  3. <view class="mlr-36 pb-50">
  4. <view class="size-34 bold ptb-30">
  5. 平台相关
  6. </view>
  7. <view class="bg-white radius-10 pd-30">
  8. <u-radio-group v-model="value" @change="radioGroupChange">
  9. <u-radio name="1" class="w100 mtb-10">
  10. 平台派单太远
  11. </u-radio>
  12. <u-radio name="2" class="w100 mtb-10">
  13. 上车位置错误/找不到上车位置
  14. </u-radio>
  15. </u-radio-group>
  16. </view>
  17. <view class="size-34 bold ptb-30">
  18. 司机相关
  19. </view>
  20. <view class="bg-white radius-10 pd-30">
  21. <u-radio-group v-model="value" :wrap="true" @change="radioGroupChange">
  22. <u-radio name="3" class="w100 mtb-10">
  23. 联系不上司机
  24. </u-radio>
  25. <u-radio name="4" class="w100 mtb-10">
  26. 司机以各种理由不来接我
  27. </u-radio>
  28. <u-radio name="5" class="w100 mtb-20">
  29. 司机要求取消订单
  30. </u-radio>
  31. <u-radio name="6" class="w100 mtb-10">
  32. 司机原地不动或反方向行驶
  33. </u-radio>
  34. <view class="">
  35. <u-radio name="7" class="w100 mtb-10">
  36. 司机要求加价或现金交易
  37. </u-radio>
  38. </view>
  39. <view class="">
  40. <u-radio name="8" class="w100 mtb-10">
  41. 司机迟到
  42. </u-radio>
  43. </view>
  44. <view class="">
  45. <u-radio name="9" class="w100 mtb-10">
  46. 不上订单显示车辆或司机
  47. </u-radio>
  48. </view>
  49. </u-radio-group>
  50. </view>
  51. <view class="size-34 bold ptb-30">
  52. 自己相关
  53. </view>
  54. <view class="bg-white radius-10 pd-30">
  55. <u-radio-group v-model="value" :wrap="true" @change="radioGroupChange">
  56. <u-radio name="10" class="w100 mtb-10">
  57. 行程有变
  58. </u-radio>
  59. <u-radio name="11" class="w100 mtb-10">
  60. 目的地有误
  61. </u-radio>
  62. <u-radio name="12" class="w100 mtb-10">
  63. 选择其他出行工具
  64. </u-radio>
  65. </u-radio-group>
  66. </view>
  67. <view class="mt-40">
  68. <u-button type="primary" shape="circle" @click="submit">确认提交</u-button>
  69. </view>
  70. </view>
  71. </view>
  72. </template>
  73. <script>
  74. export default {
  75. data() {
  76. return {
  77. value: 1,
  78. type:1,//1=代驾取消,2=顺风车取消
  79. }
  80. },
  81. onLoad(option) {
  82. this.id = option.id
  83. this.type = option.type
  84. },
  85. methods: {
  86. radioGroupChange(e) {
  87. console.log(e);
  88. },
  89. submit() {
  90. this.$http(this.type==1?'/addons/ddrive/order/cancel':'/addons/ddrive/sforder/cancel', {
  91. order_id: this.id,
  92. cancel_type: this.value
  93. }, "POST").then(data => {
  94. uni.showToast({
  95. title: '取消成功'
  96. })
  97. setTimeout(() => {
  98. if(this.type==2){
  99. uni.navigateBack({
  100. delta:2
  101. })
  102. }else{
  103. uni.navigateBack()
  104. }
  105. }, 1000)
  106. })
  107. }
  108. }
  109. }
  110. </script>
  111. <style lang="scss" scoped>
  112. .box {
  113. width: 100%;
  114. min-height: 100vh;
  115. background: #F8F8F8;
  116. }
  117. /deep/.u-radio-group {
  118. width: 100% !important;
  119. }
  120. /deep/.u-primary-hover {
  121. background: linear-gradient(to right,#00b6b4,#00d496) !important;
  122. }
  123. /* #ifndef MP-WEIXIN */
  124. /deep/.u-radio {
  125. display: flex;
  126. flex-direction: row-reverse;
  127. justify-content: space-between;
  128. }
  129. /* #endif */
  130. </style>