info.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. <template>
  2. <view class="container">
  3. <view class="header">注:请按照自己的真实情况核实</view>
  4. <!-- 信息内容区域 -->
  5. <view class="form">
  6. <image v-if="studentInfo.picture" class="form_photo" :src="studentInfo.picture" mode=" aspectFill"></image>
  7. <image v-else class="form_photo" src="/static/7.png" mode=" aspectFill"></image>
  8. <view class="form_box">
  9. <view class="box_key">录取号:</view>
  10. <view class="box_input">
  11. <input
  12. class="input"
  13. type="text"
  14. placeholder="请输入录取号"
  15. placeholder-style="color:#CCCCCC;font-size:28rpx"
  16. v-model="studentInfo.admissNum"
  17. :disabled="studentInfo.admissNum"
  18. />
  19. </view>
  20. </view>
  21. <view class="form_box">
  22. <view class="box_key">姓名:</view>
  23. <view class="box_input">
  24. <input
  25. class="input"
  26. type="text"
  27. placeholder="请输入姓名"
  28. placeholder-style="color:#CCCCCC;font-size:28rpx"
  29. v-model="studentInfo.name"
  30. :disabled="studentInfo.name"
  31. />
  32. </view>
  33. </view>
  34. <view class="form_box">
  35. <view class="box_key">身份证号:</view>
  36. <view class="box_input">
  37. <input
  38. class="input"
  39. type="text"
  40. placeholder="请输入身份证号"
  41. placeholder-style="color:#CCCCCC;font-size:28rpx"
  42. v-model="studentInfo.cardId"
  43. :disabled="studentInfo.cardId"
  44. />
  45. </view>
  46. </view>
  47. <view class="form_box">
  48. <view class="box_key">出生年月:</view>
  49. <view class="box_input">
  50. <picker mode="date" :value="studentInfo.birthday" @change="bindPickerChangeTime">
  51. <view class="select" :class="{ active: studentInfo.birthday }">
  52. {{ studentInfo.birthday ? studentInfo.birthday : '请选择出生年月' }}
  53. <uni-icons type="down" size="20" color="#ccc"></uni-icons>
  54. </view>
  55. </picker>
  56. </view>
  57. </view>
  58. <view class="form_box">
  59. <view class="box_key">性别:</view>
  60. <view class="box_input">
  61. <input
  62. class="input"
  63. type="text"
  64. placeholder="请输入性别"
  65. placeholder-style="color:#CCCCCC;font-size:28rpx"
  66. v-model="studentInfo.sex"
  67. :disabled="studentInfo.sex"
  68. />
  69. </view>
  70. </view>
  71. <view class="form_box">
  72. <view class="box_key">校区:</view>
  73. <view class="box_input">
  74. <picker @change="bindPickerChange" :value="currtIndex" :range="schoolList" range-key="school" :disabled="currtIndex != null">
  75. <view class="select" :class="{ active: currtIndex != null }">
  76. {{ currtIndex != null ? schoolList[currtIndex].school : '请选择校区' }}
  77. <uni-icons type="down" size="20" color="#ccc"></uni-icons>
  78. </view>
  79. </picker>
  80. </view>
  81. </view>
  82. <view class="form_box">
  83. <view class="box_key">院系:</view>
  84. <view class="box_input">
  85. <input
  86. class="input"
  87. type="text"
  88. placeholder="请输入院系"
  89. placeholder-style="color:#CCCCCC;font-size:28rpx"
  90. v-model="studentInfo.college"
  91. :disabled="studentInfo.college"
  92. />
  93. </view>
  94. </view>
  95. <view class="form_box">
  96. <view class="box_key">专业:</view>
  97. <view class="box_input">
  98. <input
  99. class="input"
  100. type="text"
  101. placeholder="请输入专业"
  102. placeholder-style="color:#CCCCCC;font-size:28rpx"
  103. v-model="studentInfo.major"
  104. :disabled="studentInfo.major"
  105. />
  106. </view>
  107. </view>
  108. <view class="form_box">
  109. <view class="box_key">班级:</view>
  110. <view class="box_input">
  111. <input
  112. class="input"
  113. type="text"
  114. placeholder="请输入班级"
  115. placeholder-style="color:#CCCCCC;font-size:28rpx"
  116. v-model="studentInfo.classstr"
  117. :disabled="studentInfo.classstr"
  118. />
  119. </view>
  120. </view>
  121. <view class="form_box">
  122. <view class="box_key">考生号:</view>
  123. <view class="box_input">
  124. <input
  125. class="input"
  126. type="text"
  127. placeholder="请输入考生号"
  128. placeholder-style="color:#CCCCCC;font-size:28rpx"
  129. v-model="studentInfo.examNum"
  130. :disabled="studentInfo.examNum"
  131. />
  132. </view>
  133. </view>
  134. <!-- <view class="form_box">
  135. <view class="box_key">毕业中学:</view>
  136. <view class="box_input">
  137. <input
  138. class="input"
  139. type="text"
  140. placeholder="请输入毕业中学"
  141. placeholder-style="color:#CCCCCC;font-size:28rpx"
  142. v-model="studentInfo.graduationSchool"
  143. :disabled="studentInfo.graduationSchool"
  144. />
  145. </view>
  146. </view> -->
  147. <view class="form_box">
  148. <view class="box_key">政治面貌:</view>
  149. <view class="box_input">
  150. <input
  151. class="input"
  152. type="text"
  153. placeholder="请输入政治面貌"
  154. placeholder-style="color:#CCCCCC;font-size:28rpx"
  155. v-model="studentInfo.politicalStatu"
  156. :disabled="studentInfo.politicalStatu"
  157. />
  158. </view>
  159. </view>
  160. <view class="form_box">
  161. <view class="box_key">学制:</view>
  162. <view class="box_input">
  163. <input
  164. class="input"
  165. type="text"
  166. placeholder="请输入学制"
  167. placeholder-style="color:#CCCCCC;font-size:28rpx"
  168. v-model="studentInfo.eduSystem"
  169. :disabled="studentInfo.eduSystem"
  170. />
  171. </view>
  172. </view>
  173. <view class="form_box">
  174. <view class="box_key">层次:</view>
  175. <view class="box_input">
  176. <input
  177. class="input"
  178. type="text"
  179. placeholder="请输入层次"
  180. placeholder-style="color:#CCCCCC;font-size:28rpx"
  181. v-model="studentInfo.batchValue"
  182. :disabled="studentInfo.batchValue"
  183. />
  184. </view>
  185. </view>
  186. <view class="form_box">
  187. <view class="box_key">民族:</view>
  188. <view class="box_input">
  189. <input
  190. class="input"
  191. type="text"
  192. placeholder="请输入民族"
  193. placeholder-style="color:#CCCCCC;font-size:28rpx"
  194. v-model="studentInfo.nationality"
  195. :disabled="studentInfo.nationality"
  196. />
  197. </view>
  198. </view>
  199. </view>
  200. <!-- 温馨提示区域 -->
  201. <view class="tips">
  202. <view class="tips_title">温馨提示:</view>
  203. <view class="tips_text">{{ info }}</view>
  204. </view>
  205. <!-- 按钮区域 -->
  206. <view class="btns">
  207. <view class="btn up" @click="handleUp">上一步</view>
  208. <view class="btn down" @click="handleNext">下一步</view>
  209. </view>
  210. </view>
  211. </template>
  212. <script setup>
  213. import { onLoad } from '@dcloudio/uni-app'
  214. import { ref } from 'vue'
  215. import { getSchoolListDataReq, getSettingsInfoReq } from '@/api/index.js'
  216. // 学生信息
  217. const studentInfo = ref()
  218. // 校区数据
  219. const schoolList = ref([])
  220. // 校区当前索引
  221. const currtIndex = ref(null)
  222. const info = ref()
  223. onLoad(() => {
  224. studentInfo.value = uni.getStorageSync('studentInfo')
  225. // console.log(studentInfo.value)
  226. // 获取设置信息
  227. getSettingsInfo()
  228. // 获取校区数据
  229. getSchoolListData()
  230. })
  231. // 获取设置信息
  232. const getSettingsInfo = async () => {
  233. const res = await getSettingsInfoReq()
  234. // console.log(res)
  235. if (res.code == 200) {
  236. uni.setStorageSync('settingInfo', res.data)
  237. info.value = res.data.basicVerification
  238. }
  239. }
  240. // 获取校区数据
  241. const getSchoolListData = async () => {
  242. const res = await getSchoolListDataReq()
  243. // console.log(res)
  244. if (res.code == 200) {
  245. schoolList.value = res.data
  246. if (studentInfo.value.schoolId) {
  247. schoolList.value.forEach((ele, index) => {
  248. if (ele.id == studentInfo.value.schoolId) {
  249. currtIndex.value = index
  250. }
  251. })
  252. }
  253. }
  254. }
  255. // 选择出生年月回调
  256. const bindPickerChangeTime = (e) => {
  257. // console.log(e)
  258. studentInfo.value.birthday = e.detail.value
  259. }
  260. // 选择校区回调
  261. const bindPickerChange = (e) => {
  262. // console.log(e)
  263. currtIndex.value = e.detail.value
  264. studentInfo.value.school = schoolList.value[currtIndex.value].school
  265. studentInfo.value.schoolId = schoolList.value[currtIndex.value].id
  266. }
  267. // 点击上一步按钮回调
  268. const handleUp = () => {
  269. uni.navigateBack()
  270. }
  271. // 点击下一步按钮回调
  272. const handleNext = () => {
  273. if (!studentInfo.value.admissNum) {
  274. uni.showToast({
  275. title: '请输入录取号',
  276. icon: 'none'
  277. })
  278. return
  279. }
  280. if (!studentInfo.value.name) {
  281. uni.showToast({
  282. title: '请输入姓名',
  283. icon: 'none'
  284. })
  285. return
  286. }
  287. if (!studentInfo.value.cardId) {
  288. uni.showToast({
  289. title: '请输入身份证号',
  290. icon: 'none'
  291. })
  292. return
  293. }
  294. if (!studentInfo.value.birthday) {
  295. uni.showToast({
  296. title: '请选择出生年月',
  297. icon: 'none'
  298. })
  299. return
  300. }
  301. if (!studentInfo.value.sex) {
  302. uni.showToast({
  303. title: '请输入性别',
  304. icon: 'none'
  305. })
  306. return
  307. }
  308. if (currtIndex.value == null) {
  309. uni.showToast({
  310. title: '请选择校区',
  311. icon: 'none'
  312. })
  313. return
  314. }
  315. if (!studentInfo.value.college) {
  316. uni.showToast({
  317. title: '请输入院系',
  318. icon: 'none'
  319. })
  320. return
  321. }
  322. if (!studentInfo.value.major) {
  323. uni.showToast({
  324. title: '请输入专业',
  325. icon: 'none'
  326. })
  327. return
  328. }
  329. if (!studentInfo.value.classstr) {
  330. uni.showToast({
  331. title: '请输入班级',
  332. icon: 'none'
  333. })
  334. return
  335. }
  336. if (!studentInfo.value.examNum) {
  337. uni.showToast({
  338. title: '请输入考生号',
  339. icon: 'none'
  340. })
  341. return
  342. }
  343. // if (!studentInfo.value.graduationSchool) {
  344. // uni.showToast({
  345. // title: '请输入毕业中学',
  346. // icon: 'none'
  347. // })
  348. // return
  349. // }
  350. if (!studentInfo.value.politicalStatu) {
  351. uni.showToast({
  352. title: '请输入政治面貌',
  353. icon: 'none'
  354. })
  355. return
  356. }
  357. if (!studentInfo.value.eduSystem) {
  358. uni.showToast({
  359. title: '请输入学制',
  360. icon: 'none'
  361. })
  362. return
  363. }
  364. if (!studentInfo.value.batchValue) {
  365. uni.showToast({
  366. title: '请输入批次',
  367. icon: 'none'
  368. })
  369. return
  370. }
  371. if (!studentInfo.value.nationality) {
  372. uni.showToast({
  373. title: '请输入民族',
  374. icon: 'none'
  375. })
  376. return
  377. }
  378. uni.setStorageSync('studentInfo', studentInfo.value)
  379. // console.log(studentInfo.value)
  380. uni.navigateTo({
  381. url: '/pages/family/family'
  382. })
  383. }
  384. </script>
  385. <style lang="scss" scoped>
  386. .container {
  387. box-sizing: border-box;
  388. padding-bottom: 50rpx;
  389. min-height: 100vh;
  390. background-color: #f5f9ff;
  391. .header {
  392. padding-left: 20rpx;
  393. height: 93rpx;
  394. line-height: 93rpx;
  395. font-size: 28rpx;
  396. font-weight: bold;
  397. background-color: #fff;
  398. }
  399. .form {
  400. display: flex;
  401. flex-direction: column;
  402. align-items: center;
  403. margin-top: 10rpx;
  404. background-color: #fff;
  405. .form_photo {
  406. margin-top: 28rpx;
  407. margin-bottom: 33rpx;
  408. width: 186rpx;
  409. height: 231rpx;
  410. }
  411. .form_box {
  412. display: flex;
  413. align-items: center;
  414. box-sizing: border-box;
  415. padding-left: 50rpx;
  416. margin-bottom: 20rpx;
  417. width: 100%;
  418. height: 75rpx;
  419. .box_key {
  420. width: 140rpx;
  421. text-align: end;
  422. font-size: 28rpx;
  423. }
  424. .box_input {
  425. box-sizing: border-box;
  426. padding: 0 25rpx;
  427. width: 500rpx;
  428. height: 74rpx;
  429. border: 2rpx solid #cccccc;
  430. border-radius: 4rpx;
  431. .input {
  432. width: 100%;
  433. height: 100%;
  434. }
  435. .select {
  436. display: flex;
  437. align-items: center;
  438. justify-content: space-between;
  439. height: 74rpx;
  440. font-size: 28rpx;
  441. color: #ccc;
  442. }
  443. .active {
  444. color: #000;
  445. }
  446. }
  447. }
  448. }
  449. .tips {
  450. padding: 40rpx 15rpx 30rpx;
  451. font-size: 24rpx;
  452. line-height: 48rpx;
  453. background-color: #fff;
  454. .tips_title {
  455. padding-top: 28rpx;
  456. padding-left: 8rpx;
  457. background-color: #fff2f2;
  458. }
  459. .tips_text {
  460. padding-bottom: 28rpx;
  461. padding-left: 8rpx;
  462. background-color: #fff2f2;
  463. }
  464. }
  465. .btns {
  466. display: flex;
  467. align-items: center;
  468. justify-content: space-around;
  469. padding: 10rpx 0 20rpx;
  470. height: 100rpx;
  471. background-color: #fff;
  472. .btn {
  473. display: flex;
  474. align-items: center;
  475. justify-content: center;
  476. width: 300rpx;
  477. height: 100rpx;
  478. font-size: 32rpx;
  479. border-radius: 8rpx;
  480. }
  481. .up {
  482. border: 2rpx solid #0061ff;
  483. }
  484. .down {
  485. color: #fff;
  486. background-color: #0061ff;
  487. }
  488. }
  489. .btn_out {
  490. display: flex;
  491. align-items: center;
  492. justify-content: center;
  493. margin: auto;
  494. width: 690rpx;
  495. height: 100rpx;
  496. font-size: 32rpx;
  497. color: #fff;
  498. border-radius: 8rpx;
  499. background-color: #0061ff;
  500. }
  501. }
  502. </style>