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

484 lines
12 KiB

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
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
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
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="报名信息确认"></topNavbar>
  4. <view class="pad">
  5. <!-- #ifndef H5 -->
  6. <view class="card">
  7. <view class="row">
  8. <view class="lab">扫描教练二维码</view>
  9. <view class="rightCon">
  10. <view class="scan" @click="scanCodeFn">扫一扫</view>
  11. </view>
  12. </view>
  13. </view>
  14. <!-- #endif -->
  15. <view class="card">
  16. <view class="row" >
  17. <view class="lab">选择驾校</view>
  18. <view class="rightCon">
  19. <view class="row" @click="showSchool=true">
  20. <view class="val">
  21. <mySelect :value="form.school"/>
  22. </view>
  23. <view class="arrow">
  24. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="row">
  30. <view class="lab">选择车型</view>
  31. <view class="rightCon">
  32. <view class="row" @click="showCar=true">
  33. <view class="val">
  34. <mySelect :value="form.car"/>
  35. </view>
  36. <view class="arrow">
  37. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="row">
  43. <view class="lab">选择班型</view>
  44. <view class="rightCon">
  45. <view class="row" @click="showClassModel=true">
  46. <view class="val">
  47. <mySelect :value="form.classModel"/>
  48. </view>
  49. <view class="arrow">
  50. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="row">
  56. <view class="lab">选择教练</view>
  57. <view class="rightCon">
  58. <view class="row" @click="goCoach">
  59. <view class="val">
  60. <mySelect :value="form.coach"/>
  61. </view>
  62. <view class="arrow">
  63. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="card">
  70. <view class="row">
  71. <view class="lab">业务类型</view>
  72. <view class="rightCon">
  73. <u-radio-group
  74. v-model="form.radiovalue1"
  75. >
  76. <u-radio
  77. :customStyle="{marginRight: '24rpx'}"
  78. v-for="(item, index) in radiolist1"
  79. :key="index"
  80. :label="item.name"
  81. :name="item.id"
  82. >
  83. </u-radio>
  84. </u-radio-group>
  85. </view>
  86. </view>
  87. </view>
  88. <view class="card">
  89. <view class="row">
  90. <view class="lab">是否异地转入</view>
  91. <view class="rightCon" style="margin-left: 40rpx;">
  92. <u-radio-group
  93. v-model="form.radiovalue2"
  94. @change="changeVal"
  95. >
  96. <u-radio
  97. :customStyle="{marginRight: '24rpx'}"
  98. v-for="(item, index) in radiolist2"
  99. :key="item.id"
  100. :label="item.name"
  101. :name="item.id"
  102. >
  103. </u-radio>
  104. </u-radio-group>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="card" v-if="form.radiovalue1==2">
  109. <view class="row">
  110. <view class="lab long">原驾驶证号</view>
  111. <view class="rightCon">
  112. <view class="row">
  113. <view class="val">{{ form.certificateCodeShow }}</view>
  114. </view>
  115. </view>
  116. </view>
  117. <view class="row">
  118. <view class="lab long">驾驶证初领日期</view>
  119. <view class="rightCon">
  120. <view class="row" @click="showFirstLicenceTime=true" >
  121. <view class="val">
  122. <mySelect :value="form.firstLicenceTime"/>
  123. </view>
  124. <view class="arrow">
  125. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <view class="row">
  131. <view class="lab long">原准驾车型</view>
  132. <view class="rightCon">
  133. <view class="row" @click="showOldDriveModel=true" >
  134. <view class="val">
  135. <mySelect :value="form.oldDriveModel"/>
  136. </view>
  137. <view class="arrow">
  138. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <view class="card" v-if="form.radiovalue2==1">
  145. <view class="row">
  146. <view class="lab">来源城市</view>
  147. <view class="rightCon">
  148. <view class="row">
  149. <view class="val">
  150. <mySelect :value="form.classModel"/>
  151. </view>
  152. <view class="arrow">
  153. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. <view class="row">
  159. <view class="lab ">已过科目</view>
  160. <view class="rightCon">
  161. <view class="row" @click="showSubjectPass=true">
  162. <view class="val">
  163. <mySelect :value="form.subjectPass"/>
  164. </view>
  165. <view class="arrow">
  166. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. <view class="row">
  172. <view class="lab">待学科目</view>
  173. <view class="rightCon">
  174. <view class="row" @click="showSubjectTreat=true">
  175. <view class="val">
  176. <mySelect :value="form.subjectTreat"/>
  177. </view>
  178. <view class="arrow">
  179. <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
  180. </view>
  181. </view>
  182. </view>
  183. </view>
  184. </view>
  185. <view class="card">
  186. <view class="row">
  187. <view class="lab">学费</view>
  188. <view class="rightCon">
  189. <view class="row">
  190. <view class="val">100</view>
  191. </view>
  192. </view>
  193. </view>
  194. <view class="row">
  195. <view class="lab">合计</view>
  196. <view class="rightCon">
  197. <view class="row">
  198. <view class="val blue">100</view>
  199. </view>
  200. </view>
  201. </view>
  202. </view>
  203. <view class="card">
  204. <view class="row">
  205. <view class="lab">支付形式</view>
  206. <view class="rightCon">
  207. <u-radio-group
  208. v-model="form.radiovalue3"
  209. >
  210. <u-radio
  211. :customStyle="{marginRight: '24rpx'}"
  212. v-for="(item, index) in radiolist3"
  213. :key="index"
  214. :label="item.name"
  215. :name="item.name"
  216. >
  217. </u-radio>
  218. </u-radio-group>
  219. </view>
  220. </view>
  221. </view>
  222. <view class="card">
  223. <view class="row">
  224. <view class="lab">优惠券</view>
  225. <view class="rightCon">
  226. <view class="row">
  227. <view class="val red">-1000</view>
  228. </view>
  229. </view>
  230. </view>
  231. </view>
  232. <view class="card">
  233. <view class="row">
  234. <view class="lab">待支付金额</view>
  235. <view class="rightCon">
  236. <view class="row">
  237. <view class="val blue">100</view>
  238. </view>
  239. </view>
  240. </view>
  241. </view>
  242. <view class="btnBg" @click="confirmClick">确认</view>
  243. </view>
  244. <u-popup :show="showPopup" mode="center" :round="8" >
  245. <comfigPopup @comfigClick="comfigClick"/>
  246. </u-popup>
  247. <u-popup :show="showSchool" mode="bottom" :round="8" @close="showSchool=false">
  248. <searchSchool @chooseSchool="chooseSchool"/>
  249. </u-popup>
  250. <!-- 选择班型 -->
  251. <u-picker :show="showClassModel" :columns="columnsClassModel" keyName="label" @confirm="confirmClassModel"></u-picker>
  252. <!-- 选择车型 -->
  253. <u-picker :show="showCar" :columns="columnsCar" keyName="label" @confirm="confirmCar"></u-picker>
  254. <!-- 原驾驶证初领日期 -->
  255. <u-datetime-picker :show="showFirstLicenceTime" mode="date" @confirm="confirmFirstLicenceTime"></u-datetime-picker>
  256. <!-- 原驾驶证学驾车型 -->
  257. <u-popup :show="showOldDriveModel" mode="bottom" :round="8" @close="showOldDriveModel=false">
  258. <oldDrive @pickerOldDrive="pickerOldDrive"/>
  259. </u-popup>
  260. <!-- 已过科目 -->
  261. <u-picker :show="showSubjectPass" :columns="columnsSubject" keyName="label" @confirm="confirmSubjectPass"></u-picker>
  262. <!-- 待科目 -->
  263. <u-picker :show="showSubjectTreat" :columns="columnsSubject" keyName="label" @confirm="confirmTreat"></u-picker>
  264. </view>
  265. </template>
  266. <script>
  267. import comfigPopup from './comp/comfigPopup'
  268. import searchSchool from './comp/searchSchool'
  269. import oldDrive from './comp/oldDrive'
  270. export default {
  271. components: { comfigPopup, searchSchool, oldDrive },
  272. data() {
  273. return {
  274. showPopup: false,
  275. showClassModel: false,
  276. showCar: false,
  277. showFirstLicenceTime: false,
  278. showOldDriveModel: false,
  279. showSubjectPass: false,
  280. showSubjectTreat: false,
  281. columnsClassModel: [
  282. [
  283. {
  284. label: '普通班型',
  285. id: 1
  286. },
  287. {
  288. label: 'vip班型',
  289. id: 2
  290. }
  291. ]
  292. ],
  293. columnsSubject: [
  294. [
  295. {label: '科目一', id: 1},
  296. {label: '科目二', id: 2},
  297. {label: '科目三', id: 3},
  298. ]
  299. ],
  300. columnsCar: [],
  301. form: {
  302. school: '',
  303. classModel: '',
  304. car: '',
  305. coach: '',
  306. certificateCodeShow: '原驾驶证号xxx',
  307. firstLicenceTime: '',
  308. oldDriveModel: '',
  309. subjectPass: '',
  310. subjectTreat: '',
  311. radiovalue2: 1,
  312. radiovalue1: 1,
  313. },
  314. showSchool: false,
  315. radiolist1: [ {name: '初领', id: 1}, {name: '增驾', id: 2}],
  316. radiolist2: [ {name: '是', id: 1}, {name: '否', id: 2}],
  317. radiolist3: [ {name: '全款', id: 1}, {name: '预付款', id: 2}]
  318. }
  319. },
  320. onLoad() {
  321. uni.$on('upDateCoachItem',(item)=>{
  322. console.log(item)
  323. this.form.coach = item.name
  324. })
  325. },
  326. methods: {
  327. // 选择驾校
  328. chooseSchool(item) {
  329. this.form.school = item.name
  330. this.form.schoolId = item.id
  331. this.columnsCar = [item.businessScope.split(',')]
  332. console.log(this.columnsCar)
  333. this.showSchool = false
  334. },
  335. // 选择班型
  336. confirmClassModel(val) {
  337. let item = val.value[0]
  338. console.log(item)
  339. this.showClassModel = false
  340. this.form.classModel = item.label
  341. },
  342. // 选择车型
  343. confirmCar(val) {
  344. let item = val.value[0]
  345. console.log(item)
  346. this.showCar = false
  347. this.form.car = item
  348. },
  349. // 跳转到选择教练
  350. goCoach() {
  351. if(!this.form.schoolId) return this.$u.toast('请先选择驾校')
  352. this.$goPage('/pages/indexEntry/enroll/registInfo/chooseCoach/chooseCoach?schoolId=' + this.form.schoolId)
  353. },
  354. // 选择原驾驶证初领日期
  355. confirmFirstLicenceTime(val) {
  356. console.log(val)
  357. this.form.firstLicenceTime = uni.$u.timeFormat(val.value, 'yyyy-mm-dd');
  358. this.showFirstLicenceTime = false
  359. },
  360. // 选择原准驾车型
  361. pickerOldDrive(val) {
  362. this.form.oldDriveModel = val
  363. this.showOldDriveModel = false
  364. console.log(val)
  365. },
  366. // 选择已过科目
  367. confirmSubjectPass(val) {
  368. let item = val.value[0]
  369. this.form.subjectPass = item.label
  370. this.showSubjectPass = false
  371. },
  372. // 选择已过科目
  373. confirmTreat(val) {
  374. let item = val.value[0]
  375. this.form.subjectTreat = item.label
  376. this.showSubjectTreat = false
  377. },
  378. // 扫码
  379. scanCodeFn() {
  380. let _this = this
  381. uni.scanCode({
  382. success: function(res) {
  383. console.log('条码类型:' + res.scanType);
  384. console.log('条码内容:' + res.result);
  385. }
  386. });
  387. },
  388. changeVal(val) {
  389. console.log(val)
  390. },
  391. // 点击确认
  392. confirmClick() {
  393. this.showPopup = true
  394. },
  395. comfigClick(val) {
  396. console.log(val)
  397. this.showPopup = false
  398. if(val) {
  399. this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
  400. }
  401. }
  402. }
  403. }
  404. </script>
  405. <style lang="scss" scoped>
  406. .pad {
  407. padding-bottom: 66rpx;
  408. }
  409. .card {
  410. padding: 10rpx 40rpx 10rpx 32rpx;
  411. margin-bottom: 20rpx;
  412. .row {
  413. height: 100rpx;
  414. display: flex;
  415. align-items: center;
  416. width: 100%;
  417. .lab {
  418. width: 152rpx;
  419. line-height: 100rpx;
  420. white-space: nowrap;
  421. &.long {
  422. width: 230rpx;
  423. }
  424. }
  425. .scan {
  426. margin-left: auto;
  427. width: 130rpx;
  428. height: 60rpx;
  429. background: rgba(25,137,250,0.1);
  430. border-radius: 8rpx;
  431. border: 2rpx solid #1989FA;
  432. background: #E8F3FE;
  433. text-align: center;
  434. line-height: 60rpx;
  435. color: $themC;
  436. }
  437. .rightCon {
  438. flex: 1;
  439. width: 0;
  440. display: flex;
  441. .val {
  442. flex: 1;
  443. width: 0;
  444. input {
  445. font-size: 28rpx;
  446. }
  447. &.blue {
  448. color: $themC;
  449. }
  450. &.red {
  451. color: #FF6A2A;
  452. }
  453. }
  454. .icon {
  455. width: 30rpx;
  456. height: 30rpx;
  457. u-icon {
  458. }
  459. }
  460. }
  461. }
  462. }
  463. .btnBg {
  464. width: 396rpx;
  465. margin: 100rpx auto 0 auto;
  466. }
  467. </style>