学员端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

218 lines
5.7 KiB

1 year ago
12 months ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="订单详情"></topNavbar>
  4. <view class="pad">
  5. <view class="card">
  6. <view class="consultItem">
  7. <view class="top_row">
  8. <view class="flex">
  9. <view class="tag" :class="{yellow: (info.orderType==1||info.feeType==1)}">
  10. {{orderTypeTxt[info.orderType||info.feeType]}}</view>
  11. <view class="schoolName">{{ $u.utils.truncateText(info.schoolName, 12) }}</view>
  12. </view>
  13. <view class="status">
  14. <view class="text">{{orderStatusTxt[info.orderStatus]}}</view>
  15. <!-- <view class="icon">
  16. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  17. </view> -->
  18. </view>
  19. </view>
  20. <view class="target">
  21. <view class="row">
  22. <view class="leftLab">
  23. <view class="icon">
  24. <image src="@/static/images/car/ic_chexing.png" mode=""></image>
  25. </view>
  26. <view class="lab">学驾车型</view>
  27. </view>
  28. <view class="name">{{info.trainType}}</view>
  29. </view>
  30. <view class="row">
  31. <view class="leftLab">
  32. <view class="icon">
  33. <image src="@/static/images/car/ic_banxing.png" mode=""></image>
  34. </view>
  35. <view class="lab">所选班型</view>
  36. </view>
  37. <view class="name">{{info.className}}</view>
  38. </view>
  39. <view class="row">
  40. <view class="leftLab">
  41. <view class="icon">
  42. <image src="@/static/images/car/ic_jiaxiao.png" mode=""></image>
  43. </view>
  44. <view class="lab">驾校类型</view>
  45. </view>
  46. <view class="name">{{ info.appSchoolType }}</view>
  47. </view>
  48. <view class="row">
  49. <view class="leftLab">
  50. <view class="icon">
  51. <image src="@/static/images/car/ic_xingshi.png" mode=""></image>
  52. </view>
  53. <view class="lab">支付形式</view>
  54. </view>
  55. <view class="name">{{info.appPayForm}}</view>
  56. </view>
  57. <view class="row">
  58. <view class="leftLab">
  59. <view class="icon">
  60. <image src="@/static/images/car/ic_fangshi.png" mode=""></image>
  61. </view>
  62. <view class="lab">支付方式</view>
  63. </view>
  64. <view class="name">{{info.appPayType}}</view>
  65. </view>
  66. <view class="row">
  67. <view class="leftLab">
  68. <view class="icon">
  69. <image src="@/static/images/car/ic_shijian.png" mode=""></image>
  70. </view>
  71. <view class="lab">支付时间</view>
  72. </view>
  73. <view class="name">{{ $u.timeFormat(info.payTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
  74. </view>
  75. </view>
  76. <view class="border_bottom">
  77. <view class="rows">
  78. <view class="label">培训费总价</view>
  79. <view class="value">{{$u.utils.priceTo(info.totalAmount)}}</view>
  80. </view>
  81. <!-- <view class="rows">
  82. <view class="label hui">学驾培训费</view>
  83. <view class="value hui">{{$u.utils.priceTo(info.totalAmount)}}</view>
  84. </view> -->
  85. </view>
  86. <view class="border_bottom">
  87. <view class="rows">
  88. <view class="label hui">实际支付</view>
  89. <view class="value hui">{{$u.utils.priceTo(info.payActual)}}</view>
  90. </view>
  91. <view class="rows">
  92. <view class="label hui">已支付定金</view>
  93. <view class="value blue">没字段</view>
  94. </view>
  95. <view class="rows">
  96. <view class="label hui">待支付尾款</view>
  97. <view class="value blue">没字段</view>
  98. </view>
  99. <view class="refundBtn" @click="goFund" v-if="!info.refundId">申请退款</view>
  100. </view>
  101. </view>
  102. </view>
  103. <refundInfo :info="refundData" v-if="refundData.id" />
  104. </view>
  105. </view>
  106. </template>
  107. <script>
  108. import refundInfo from './comp/refundInfo.vue'
  109. import {
  110. applyOrderGet,
  111. selectRefundDetail
  112. } from '@/config/api.js'
  113. export default {
  114. components: {
  115. refundInfo
  116. },
  117. data() {
  118. return {
  119. value: '',
  120. orderId: '',
  121. info: {},
  122. refundData: {},
  123. orderTypeTxt: ['', '学费', '理科费', '考场模拟', '额外学时购买'], //1:驾校培训费用,2:理科培训费用,3:考场适应性费用,4:额外学时购买
  124. orderStatusTxt: ['待支付', '已支付', '已取消', '支付失败'], //0:待支付,1:已支付,-1:已取消,2:支付失败
  125. }
  126. },
  127. onLoad(options) {
  128. // setTimeout(obj.say, 500)
  129. if (options.orderId) {
  130. this.orderId = options.orderId
  131. this.applyOrderGetFn()
  132. }
  133. },
  134. onPullDownRefresh() {
  135. this.applyOrderGetFn()
  136. },
  137. methods: {
  138. debounce(func, wait) {
  139. this.timeout;
  140. let context = this; // this
  141. // let args = arguments; // event
  142. if(this.timeout) clearTimeout(this.timeout)
  143. console.log(111)
  144. this.timeout = setTimeout(function() {
  145. func()
  146. }, wait);
  147. },
  148. inputFn(val) {
  149. console.log('1111111111')
  150. },
  151. async applyOrderGetFn() {
  152. const {
  153. data: res
  154. } = await applyOrderGet({
  155. orderId: this.orderId
  156. })
  157. this.info = res
  158. uni.stopPullDownRefresh()
  159. if (res.refundId) {
  160. this.selectRefundDetailFn()
  161. }
  162. },
  163. async selectRefundDetailFn() {
  164. const {
  165. data: res
  166. } = await selectRefundDetail({
  167. id: this.info.refundId
  168. })
  169. // console.log(res)
  170. this.refundData = res
  171. uni.stopPullDownRefresh()
  172. },
  173. goFund() {
  174. this.$goPage('/pages/mineEntry/refund/refund?orderId=' + this.orderId)
  175. },
  176. }
  177. }
  178. </script>
  179. <style lang="scss" scoped>
  180. @import '../comp/comp.scss';
  181. .feeIcon {
  182. width: 28rpx;
  183. height: 28rpx;
  184. margin-left: 12rpx;
  185. }
  186. .card {
  187. padding: 20rpx;
  188. }
  189. .pad {
  190. padding-bottom: 60rpx;
  191. }
  192. .refundBtn {
  193. width: 200rpx;
  194. height: 72rpx;
  195. background: #FFFFFF;
  196. border-radius: 8rpx;
  197. border: 2rpx solid #E8E9EC;
  198. line-height: 72rpx;
  199. margin: 24rpx 0 0 0;
  200. font-size: 28rpx;
  201. color: #ADADAD;
  202. text-align: center;
  203. }
  204. </style>