洛阳学员端
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.

255 lines
6.8 KiB

3 months 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" @click="downloadImage">下载凭证</view>
  105. <view class="btnBorder" @click="goVoucher">培训缴费电子凭证</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 { downloadImg } from '../comp/download.js'
  118. import {
  119. applyOrderGet,
  120. selectRefundDetail,
  121. getStudentVoucher
  122. } from '@/config/api.js'
  123. export default {
  124. components: {
  125. refundInfo
  126. },
  127. data() {
  128. return {
  129. value: '',
  130. orderId: '',
  131. info: {},
  132. refundData: {},
  133. orderTypeTxt: ['', '学费', '理科费', '考场模拟', '额外学时购买'], //1:驾校培训费用,2:理科培训费用,3:考场适应性费用,4:额外学时购买
  134. orderStatusTxt: ['待支付', '已支付', '已取消', '支付失败'], //0:待支付,1:已支付,-1:已取消,2:支付失败
  135. }
  136. },
  137. onLoad(options) {
  138. // setTimeout(obj.say, 500)
  139. if (options.orderId) {
  140. this.orderId = options.orderId
  141. this.applyOrderGetFn()
  142. }
  143. },
  144. onPullDownRefresh() {
  145. this.applyOrderGetFn()
  146. },
  147. methods: {
  148. goVoucher() {
  149. this.$goPage('/pages/mineEntry/myOrder/voucher/voucher?orderId='+ this.orderId)
  150. },
  151. debounce(func, wait) {
  152. this.timeout;
  153. let context = this; // this
  154. // let args = arguments; // event
  155. if(this.timeout) clearTimeout(this.timeout)
  156. console.log(111)
  157. this.timeout = setTimeout(function() {
  158. func()
  159. }, wait);
  160. },
  161. inputFn(val) {
  162. console.log('1111111111')
  163. },
  164. async applyOrderGetFn() {
  165. const {
  166. data: res
  167. } = await applyOrderGet({
  168. orderId: this.orderId
  169. })
  170. this.info = res
  171. uni.stopPullDownRefresh()
  172. if (res.refundId) {
  173. this.selectRefundDetailFn()
  174. }
  175. },
  176. async selectRefundDetailFn() {
  177. const {
  178. data: res
  179. } = await selectRefundDetail({
  180. id: this.info.refundId
  181. })
  182. // console.log(res)
  183. this.refundData = res
  184. uni.stopPullDownRefresh()
  185. },
  186. goFund() {
  187. this.$goPage('/pages/mineEntry/refund/refund?orderId=' + this.orderId)
  188. },
  189. async downloadImage() {
  190. let obj = {
  191. studentId: this.studentId,
  192. type: 1
  193. }
  194. const {data: imageUrl} = await getStudentVoucher(obj)
  195. // 图片链接
  196. downloadImg(imageUrl)
  197. }
  198. }
  199. }
  200. </script>
  201. <style lang="scss" scoped>
  202. @import '../comp/comp.scss';
  203. .btn_row {
  204. display: flex;
  205. justify-content: space-between;
  206. align-items: center;
  207. margin: 24rpx 0 0 0;
  208. .rightBtn {
  209. display: flex;
  210. justify-content: flex-end;
  211. .btnBorder {
  212. margin-left: 14rpx;
  213. padding: 0 16rpx;
  214. font-size: 24rpx;
  215. height: 72rpx;
  216. line-height: 72rpx;
  217. border-radius: 8rpx;
  218. }
  219. }
  220. }
  221. .feeIcon {
  222. width: 28rpx;
  223. height: 28rpx;
  224. margin-left: 12rpx;
  225. }
  226. .card {
  227. padding: 20rpx;
  228. }
  229. .pad {
  230. padding-bottom: 60rpx;
  231. }
  232. .refundBtn {
  233. width: 200rpx;
  234. height: 72rpx;
  235. background: #FFFFFF;
  236. border-radius: 8rpx;
  237. border: 2rpx solid #E8E9EC;
  238. line-height: 72rpx;
  239. font-size: 28rpx;
  240. color: #ADADAD;
  241. text-align: center;
  242. }
  243. </style>