学员端小程序
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.

238 lines
6.3 KiB

1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 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" v-if="info.payMent">
  92. <view class="label hui">已支付定金</view>
  93. <view class="value blue">{{$u.utils.priceTo(info.payMent)}}</view>
  94. </view>
  95. <view class="rows" v-if="info.payTail">
  96. <view class="label hui">待支付尾款</view>
  97. <view class="value blue">{{$u.utils.priceTo(info.payTail)}}</view>
  98. </view>
  99. <view class="btn_row">
  100. <view class="" style="min-width: 120rpx;">
  101. <view class="refundBtn" @click="goFund" v-if="!info.refundId">申请退款</view>
  102. </view>
  103. <view class="rightBtn">
  104. <view class="btnBorder">下载发票</view>
  105. <view class="btnBorder">培训缴费电子凭证</view>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. <refundInfo :info="refundData" v-if="refundData.id" />
  112. </view>
  113. </view>
  114. </template>
  115. <script>
  116. import refundInfo from './comp/refundInfo.vue'
  117. import {
  118. applyOrderGet,
  119. selectRefundDetail
  120. } from '@/config/api.js'
  121. export default {
  122. components: {
  123. refundInfo
  124. },
  125. data() {
  126. return {
  127. value: '',
  128. orderId: '',
  129. info: {},
  130. refundData: {},
  131. orderTypeTxt: ['', '学费', '理科费', '考场模拟', '额外学时购买'], //1:驾校培训费用,2:理科培训费用,3:考场适应性费用,4:额外学时购买
  132. orderStatusTxt: ['待支付', '已支付', '已取消', '支付失败'], //0:待支付,1:已支付,-1:已取消,2:支付失败
  133. }
  134. },
  135. onLoad(options) {
  136. // setTimeout(obj.say, 500)
  137. if (options.orderId) {
  138. this.orderId = options.orderId
  139. this.applyOrderGetFn()
  140. }
  141. },
  142. onPullDownRefresh() {
  143. this.applyOrderGetFn()
  144. },
  145. methods: {
  146. debounce(func, wait) {
  147. this.timeout;
  148. let context = this; // this
  149. // let args = arguments; // event
  150. if(this.timeout) clearTimeout(this.timeout)
  151. console.log(111)
  152. this.timeout = setTimeout(function() {
  153. func()
  154. }, wait);
  155. },
  156. inputFn(val) {
  157. console.log('1111111111')
  158. },
  159. async applyOrderGetFn() {
  160. const {
  161. data: res
  162. } = await applyOrderGet({
  163. orderId: this.orderId
  164. })
  165. this.info = res
  166. uni.stopPullDownRefresh()
  167. if (res.refundId) {
  168. this.selectRefundDetailFn()
  169. }
  170. },
  171. async selectRefundDetailFn() {
  172. const {
  173. data: res
  174. } = await selectRefundDetail({
  175. id: this.info.refundId
  176. })
  177. // console.log(res)
  178. this.refundData = res
  179. uni.stopPullDownRefresh()
  180. },
  181. goFund() {
  182. this.$goPage('/pages/mineEntry/refund/refund?orderId=' + this.orderId)
  183. },
  184. }
  185. }
  186. </script>
  187. <style lang="scss" scoped>
  188. @import '../comp/comp.scss';
  189. .btn_row {
  190. display: flex;
  191. justify-content: space-between;
  192. .rightBtn {
  193. display: flex;
  194. justify-content: flex-end;
  195. .btnBorder {
  196. margin-left: 14rpx;
  197. padding: 0 16rpx;
  198. font-size: 24rpx;
  199. }
  200. }
  201. }
  202. .feeIcon {
  203. width: 28rpx;
  204. height: 28rpx;
  205. margin-left: 12rpx;
  206. }
  207. .card {
  208. padding: 20rpx;
  209. }
  210. .pad {
  211. padding-bottom: 60rpx;
  212. }
  213. .refundBtn {
  214. width: 200rpx;
  215. height: 72rpx;
  216. background: #FFFFFF;
  217. border-radius: 8rpx;
  218. border: 2rpx solid #E8E9EC;
  219. line-height: 72rpx;
  220. margin: 24rpx 0 0 0;
  221. font-size: 28rpx;
  222. color: #ADADAD;
  223. text-align: center;
  224. }
  225. </style>