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

194 lines
4.1 KiB

1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="step1">
  3. <pickDateTimer :FormData="FormData" @updatedForm="updatedForm"/>
  4. <view class="btn_row">
  5. <view class="border btn" @click="changeStep(2)">返回上一步</view>
  6. <view class="btn" @click="showClick">确认预约</view>
  7. </view>
  8. <u-popup :show="show" mode="center" :round="8">
  9. <view class="popupCon">
  10. <view class="h2">再次确认预约信息</view>
  11. <view class="content">
  12. <view class="row">
  13. <view class="lab">预约类型</view>
  14. <view class="val">考场模拟训练预约</view>
  15. </view>
  16. <view class="row">
  17. <view class="lab">预约科目</view>
  18. <view class="val">{{ FormData.subject==2?'科目二':'科目三'}}</view>
  19. </view>
  20. <view class="row">
  21. <view class="lab">预约考场</view>
  22. <view class="val">{{ FormData.classDate }}</view>
  23. </view>
  24. <view class="row">
  25. <view class="lab">预约车型</view>
  26. <view class="val">{{FormData.trainType }}</view>
  27. </view>
  28. <view class="row">
  29. <view class="lab">预约车辆</view>
  30. <view class="val">{{ FormData.licnum }}</view>
  31. </view>
  32. <view class="row">
  33. <view class="lab">预约时间</view>
  34. <view class="val">{{ FormData.classDate }} {{FormData.classTime}}</view>
  35. </view>
  36. </view>
  37. <view class="btn_row">
  38. <view class="border btn" @click="show = false">返回修改</view>
  39. <view class="btn" @click="examSimulationCreateFn">确认</view>
  40. </view>
  41. </view>
  42. </u-popup>
  43. </view>
  44. </template>
  45. <script>
  46. import pickDateTimer from './pickDate'
  47. import { examSimulationCreate } from '@/config/api.js'
  48. export default {
  49. components: {pickDateTimer},
  50. props: ['step','FormData'],
  51. data() {
  52. return {
  53. show: false
  54. }
  55. },
  56. methods: {
  57. changeStep(val) {
  58. this.$emit('changeStep', val)
  59. },
  60. async examSimulationCreateFn() {
  61. if(!this.FormData.courseIds) return this.$u.toast('请选择预约时间')
  62. let obj = {
  63. "studentId": this.studentId,
  64. "classDetailId": this.FormData.courseIds
  65. }
  66. const res = await examSimulationCreate(obj)
  67. if(res.code==0) {
  68. this.show = false
  69. this.$u.toast('预约成功')
  70. setTimeout(()=>{
  71. this.$goPage('/pages/mineEntry/myAppointment/myAppointment?currentTab=3')
  72. },1500)
  73. }
  74. console.log(res)
  75. },
  76. updatedForm(val) {
  77. this.$emit('updatedForm',val)
  78. },
  79. showClick() {
  80. if(!this.FormData.courseIds) return this.$u.toast('请选择预约时间')
  81. this.show = true
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. .card {
  88. width: 100%;
  89. overflow: hidden;
  90. .dateBox {
  91. padding: 36rpx 0 40rpx 0;
  92. .month-row {
  93. display: flex;
  94. justify-content: center;
  95. align-items: center;
  96. margin-bottom: 36rpx;
  97. .month {
  98. font-size: 32rpx;
  99. color: $themC;
  100. }
  101. .arrow {
  102. margin-left: 6rpx;
  103. }
  104. }
  105. .date_row {
  106. width: 100%;
  107. height: 100rpx;
  108. position: relative;
  109. .icon {
  110. width: 40rpx;
  111. height: 40rpx;
  112. background: rgba(51,51,51,0.18);
  113. backdrop-filter: blur(4rpx);
  114. position: absolute;
  115. top: 50%;
  116. transform: translateY(-50%);
  117. display: flex;
  118. align-items: center;
  119. justify-content: center;
  120. border-radius: 50%;
  121. &.left {
  122. left: 16rpx;
  123. }
  124. &.right {
  125. right: 16rpx;
  126. }
  127. }
  128. }
  129. }
  130. }
  131. .popupCon {
  132. padding: 30rpx 50rpx;
  133. .h2 {
  134. font-weight: 600;
  135. color: #333333;
  136. line-height: 70rpx;
  137. font-size: 36rpx;
  138. text-align: center;
  139. }
  140. .content {
  141. padding-bottom: 20rpx;
  142. .row {
  143. padding: 22rpx 0;
  144. display: flex;
  145. font-size: 28rpx;
  146. align-items: center;
  147. .lab {
  148. width: 180rpx;
  149. color: #686B73;
  150. }
  151. .val {
  152. flex: 1;
  153. font-weight: 500;
  154. }
  155. }
  156. }
  157. }
  158. .btn_row {
  159. display: flex;
  160. justify-content: space-between;
  161. .btn {
  162. width: 47%;
  163. height: 72rpx;
  164. background: #1989FA;
  165. border-radius: 8rpx;
  166. font-size: 28rpx;
  167. color: #fff;
  168. text-align: center;
  169. line-height: 72rpx;
  170. &.border {
  171. background: rgba(25, 137, 250, 0.1);
  172. border: 2rpx solid $themC;
  173. color: $themC;
  174. }
  175. }
  176. }
  177. </style>