applicationForm.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <image src="../../static/img/application.png" mode=""></image>
  5. </view>
  6. <view class="info-box">
  7. 遗体捐献是服务医疗事业,造福人类的高尚行为,是"人道、博爱、奉献"精神的崇高体现。
  8. 我已了解遗体捐献的基本常识和有关政策法规。我自愿登记成为武汉遗体捐献志愿者,身故后请执行人和所有亲属尊重我的决定。
  9. </view>
  10. <view class="box">
  11. <view class="red-box">
  12. 申请登记表
  13. </view>
  14. <view class="box-1">
  15. <view class="box-left">
  16. 姓名<text class="imp"></text>:
  17. </view>
  18. <input type="text" value="" class="list-input" v-model="name" />
  19. </view>
  20. <view class="box-1">
  21. <view class="box-left">
  22. 性别:
  23. </view>
  24. <picker @change="bindPickerSex" :value="index" :range="array" class="box-right">
  25. <text>{{ sex }}</text>
  26. </picker>
  27. </view>
  28. <view class="box-1">
  29. <view class="box-left">
  30. 出生年月:
  31. </view>
  32. <picker mode="date" :value="birthday" fields="month" :start="startDate" :end="endDate" @change="bindDateChange" class="box-right">
  33. <view>{{ birthday }}</view>
  34. </picker>
  35. </view>
  36. <view class="box-1">
  37. <view class="box-left">
  38. 身份证号码:
  39. </view>
  40. <input type="text" value="" class="list-input" v-model="card" />
  41. </view>
  42. <view class="box-1">
  43. <view class="box-left">
  44. 职业:
  45. </view>
  46. <input type="text" value="" class="list-input" v-model="occupation" />
  47. </view>
  48. <view class="box-1">
  49. <view class="box-left">
  50. 学历:
  51. </view>
  52. <picker @change="bindPickerEdu" :value="index" :range="chooseEdu" class="box-right">
  53. <text>{{ education }}</text>
  54. </picker>
  55. </view>
  56. <view class="check-box">
  57. <view class="info">
  58. ( 请在选项□内打√ )
  59. </view>
  60. <radio-group @change="radioChange">
  61. <label class="check-main" v-for="(item, index) in items" :key="item.value">
  62. <view >
  63. <radio :value="item.value" :checked="index === current" color="#FF727E" style="transform:scale(0.7)"/>
  64. </view>
  65. <view class="check-text">{{item.value}}</view>
  66. </label>
  67. </radio-group>
  68. </view>
  69. <!-- <view class="box-2">
  70. 我指定11:
  71. <view class="line">
  72. <input type="text" class="list-input" v-model="zd_name" />
  73. </view>
  74. 为我的遗体捐献执行人全权负责本人的遗体捐赠事宜:
  75. </view> -->
  76. <view class="box-1">
  77. <view class="box-left">
  78. 移动电话:
  79. </view>
  80. <input type="text" class="list-input" v-model="phone" />
  81. </view>
  82. <view class="box-1">
  83. <view class="box-left">
  84. 固定电话:
  85. </view>
  86. <input type="text" class="list-input" v-model="tel" />
  87. </view>
  88. <view class="check-box" style="padding-left: 44rpx;">
  89. <view class="info-1">
  90. <view class="info-2">
  91. 我指定
  92. </view>
  93. <input type="text" class="list-input" v-model="zd_name" />
  94. <view class="info-2">
  95. 为我的遗体
  96. </view>
  97. </view>
  98. <view class="info-3">
  99. 捐献执行人全权负责本人的遗体捐献事宜。
  100. </view>
  101. </view>
  102. <view class="box-1">
  103. <view class="box-left">
  104. 捐献执行人:
  105. </view>
  106. <input type="text" class="list-input" v-model="exexutor" />
  107. </view>
  108. <view class="box-1">
  109. <view class="box-left">
  110. 居住地址:
  111. </view>
  112. <input type="text" class="list-input" v-model="address" />
  113. </view>
  114. <view class="box-1">
  115. <view class="box-left">
  116. 身份证号码:
  117. </view>
  118. <input type="text" class="list-input" v-model="sfz" />
  119. </view>
  120. <view class="box-1">
  121. <view class="box-left">
  122. 与捐献志愿者关系:
  123. </view>
  124. <input type="text" class="list-input" v-model="relation" />
  125. </view>
  126. <view class="box-1">
  127. <view class="box-left">
  128. 捐献执行人移动电话:
  129. </view>
  130. <input type="text" class="list-input" v-model="n_phone" />
  131. </view>
  132. <view class="box-1">
  133. <view class="box-left">
  134. 捐献执行人固定电话:
  135. </view>
  136. <input type="text" class="list-input" v-model="n_tel" />
  137. </view>
  138. <view class="box-1">
  139. <view class="box-left">
  140. 申请日期:
  141. </view>
  142. <picker mode="date" :value="add_time" fields="day" :start="startDate" :end="endDate" @change="fillingDateChange" class="box-right">
  143. <view>{{ add_time }}</view>
  144. </picker>
  145. </view>
  146. <view class="box-1">
  147. <view class="box-left">
  148. 我保证填写的以上信息准确真实,如发生变更或个人意愿发生变化时,及时告知登记机构。
  149. </view>
  150. </view>
  151. </view>
  152. <view class="buttom" :class="{ action: loding }" @click="!loding?join():''">
  153. 提交申请
  154. </view>
  155. </view>
  156. </template>
  157. <script>
  158. import {
  159. joinSecc
  160. } from '@/api/index.js';
  161. import {
  162. upload
  163. } from '@/api/ask.js';
  164. export default {
  165. data() {
  166. const currentDate = this.getDate({
  167. format: true
  168. })
  169. return {
  170. loding: false, //是否提交中
  171. array: ['男', '女'],
  172. chooseEdu: ['博士后', '博士', '硕士', '本科', '专科', '其他'],
  173. chooseVol: ['是', '否'],
  174. chooseExp: ['是', '否'],
  175. items: [{
  176. value: '我自愿捐献全部遗体(含器官组织)'
  177. }, {
  178. value: '或只捐献眼角膜'
  179. }],
  180. current:'',
  181. index: 0,
  182. mz: '',
  183. cardimg: '', //证件照
  184. checklist: [],
  185. name: '',
  186. sex: '',
  187. birthday: '',
  188. card: '',
  189. occupation:'',
  190. education: '',
  191. add_time:'',
  192. remark:'',
  193. phone:'',
  194. tel:'',
  195. zd_name:'',
  196. address:'',
  197. exexutor:'',
  198. sfz:'',
  199. relation:'',
  200. n_phone:'',
  201. n_tel:'',
  202. }
  203. },
  204. computed: {
  205. startDate() {
  206. return this.getDate('start');
  207. },
  208. endDate() {
  209. return this.getDate('end');
  210. }
  211. },
  212. methods: {
  213. async join() {
  214. let obj = this;
  215. if (obj.name == '') {
  216. obj.$api.msg('请输入您的姓名');
  217. return;
  218. }
  219. if (obj.sex == '') {
  220. obj.$api.msg('请输入您的性别');
  221. return;
  222. }
  223. if (obj.birthday == '') {
  224. obj.$api.msg('请填写您的生日');
  225. return;
  226. }
  227. // const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
  228. // if (!reg.test(obj.phone)) {
  229. // obj.$api.msg('请填写正确的手机号码');
  230. // return;
  231. // }
  232. // if (obj.address == '') {
  233. // obj.$api.msg('请填写您的地址');
  234. // return;
  235. // }
  236. // /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/
  237. // if (obj.work == '') {
  238. // obj.$api.msg('请填写您的工作单位');
  239. // return;
  240. // }
  241. let reg1 =
  242. /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/
  243. if (!reg1.test(obj.card)) {
  244. obj.$api.msg('请填写正确的身份证信息');
  245. return;
  246. }
  247. if (obj.occupation == '') {
  248. obj.$api.msg('请填写您的职业');
  249. return;
  250. }
  251. if (obj.education == '') {
  252. obj.$api.msg('请选择您的学历');
  253. return;
  254. }
  255. if( obj.current !== 0 && obj.current !== 1 ) {
  256. obj.$api.msg('请在选项中打√');
  257. return;
  258. }
  259. const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
  260. if (!reg.test(obj.phone)) {
  261. obj.$api.msg('请填写正确的手机号码');
  262. return;
  263. }
  264. if (obj.zd_name == '') {
  265. obj.$api.msg('请在空格内填写遗体捐献执行人姓名');
  266. return;
  267. }
  268. if (obj.exexutor == '') {
  269. obj.$api.msg('请填写捐献执行人姓名');
  270. return;
  271. }
  272. if (obj.address== '') {
  273. obj.$api.msg('请填写居住地址');
  274. return;
  275. }
  276. let reg2 =
  277. /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/
  278. if (!reg2.test(obj.sfz)) {
  279. obj.$api.msg('请填写执行人正确身份证信息');
  280. return;
  281. }
  282. if (obj.relation== '') {
  283. obj.$api.msg('请填写与捐献志愿者关系');
  284. return;
  285. }
  286. const reg7 = /^(\+?0?86-?)?1[\d]\d{9}$/;
  287. if (!reg7.test(obj.n_phone)) {
  288. obj.$api.msg('请填写执行人正确的手机号码');
  289. return;
  290. }
  291. if( obj.add_time == '') {
  292. obj.$api.msg('请填写申请日期');
  293. return;
  294. }
  295. // if (obj.cardimg == '') {
  296. // obj.$api.msg('请上传您的证件');
  297. // return
  298. // }
  299. // if (obj.education == '') {
  300. // obj.$api.msg('请填写您的教育程度');
  301. // return;
  302. // }
  303. // if (obj.is_vol == '') {
  304. // obj.$api.msg('请填写您的是否受过志愿服务');
  305. // return;
  306. // }
  307. // if (obj.is_experience == '') {
  308. // obj.$api.msg('请填写您的有无服务经验');
  309. // return;
  310. // }
  311. obj.loding = true;
  312. joinSecc({
  313. name: obj.name,
  314. sex: obj.sex,
  315. education: obj.education,
  316. birthday: obj.birthday,
  317. card: obj.card,
  318. occupation: obj.occupation,
  319. add_time:obj.add_time,
  320. remark: obj.remark,
  321. phone:obj.phone,
  322. tel:obj.tel,
  323. zd_name:obj.zd_name,
  324. address:obj.address,
  325. exexutor:obj.exexutor,
  326. sfz:obj.sfz,
  327. relation:obj.relation,
  328. n_phone:obj.n_phone,
  329. n_tel:obj.n_tel
  330. }).then(e => {
  331. obj.name = '';
  332. obj.sex = '';
  333. obj.education = '';
  334. obj.birthday = '';
  335. obj.card = '';
  336. obj.occupation = '';
  337. obj.add_time = '';
  338. obj.phone = '';
  339. obj.tel = '';
  340. obj.zd_name = '';
  341. obj.address = '';
  342. obj.exexutor = '';
  343. obj.sfz = '';
  344. obj.relation = '';
  345. obj.n_phone = '';
  346. obj.n_tel = '';
  347. uni.navigateTo({
  348. url: '../joinSuc/joinNow'
  349. });
  350. }).catch(function(e) {
  351. console.log('出错了')
  352. console.log(e);
  353. });
  354. },
  355. imgsub() {
  356. console.log('imgsub')
  357. upload({
  358. filename: ''
  359. }).then(data => {
  360. this.cardimg = data[0].url;
  361. })
  362. },
  363. // 选择性别
  364. bindPickerSex: function(e) {
  365. this.sex = this.array[e.target.value];
  366. this.index = e.target.value + 1;
  367. },
  368. // 选择教育程度
  369. bindPickerEdu: function(e) {
  370. this.education = this.chooseEdu[e.target.value];
  371. // console.log('选择选择教育程度',this.education)
  372. this.index = e.target.value + 1;
  373. },
  374. // 选择日期
  375. bindDateChange: function(e) {
  376. this.birthday = e.target.value
  377. },
  378. //选择填写日期
  379. fillingDateChange: function(e){
  380. this.add_time = e.target.value
  381. },
  382. // 是否参加志愿活动
  383. bindPickerVol: function(e) {
  384. this.is_vol = this.chooseVol[e.target.value];
  385. this.index = e.target.value + 1;
  386. },
  387. // 有无服务经验
  388. bindPickerExp: function(e) {
  389. console.log('有无服务经验',e.target.value)
  390. this.is_experience = this.chooseExp[e.target.value];
  391. this.index = e.target.value + 1;
  392. },
  393. // 选择捐献
  394. radioChange: function(evt) {
  395. // console.log('选择捐献',evt)
  396. for (let i = 0; i < this.items.length; i++) {
  397. if (this.items[i].value === evt.target.value) {
  398. this.remark = evt.target.value
  399. console.log('this.remark',this.remark )
  400. this.current = i;
  401. console.log('this.current',this.current )
  402. break;
  403. }
  404. }
  405. },
  406. getDate(type) {
  407. const date = new Date();
  408. let year = date.getFullYear();
  409. let month = date.getMonth() + 1;
  410. let day = date.getDate();
  411. if (type === 'start') {
  412. year = year - 60;
  413. } else if (type === 'end') {
  414. year = year + 2;
  415. }
  416. month = month > 9 ? month : '0' + month;;
  417. day = day > 9 ? day : '0' + day;
  418. return `${year}-${month}-${day}`;
  419. },
  420. // 选择可提供时间
  421. // this.quantum = item.detail.value.join(',');
  422. checktime1(e) {
  423. // var items = this.timeList,
  424. // let quantum = [];
  425. this.quantum = e.detail.value.join(',');
  426. console.log(this.quantum);
  427. },
  428. checktime2(e) {
  429. // var items = this.timeList,
  430. let values = e.detail.value;
  431. // let quantum = [];
  432. console.log(values);
  433. },
  434. checktime3(e) {
  435. // var items = this.timeList,
  436. let values = e.detail.value;
  437. // let quantum = [];
  438. console.log(values);
  439. },
  440. //选择有兴趣参与的工作
  441. checkjob(item) {
  442. this.taste = item.detail.value.join(',');
  443. },
  444. // 选择专长checkspeciality
  445. checkspeciality(item) {
  446. this.speciali = item.detail.value.join(',');
  447. },
  448. }
  449. }
  450. </script>
  451. <style lang="scss">
  452. page {
  453. background-color: #f3afad;
  454. }
  455. .content {
  456. padding-top: 16rpx;
  457. background-color: #f3afad;
  458. .top {
  459. width: 100%;
  460. height: 188rpx;
  461. image {
  462. width: 100%;
  463. height: 188rpx;
  464. }
  465. }
  466. .info-box{
  467. text-indent: 64rpx;
  468. margin:12rpx 0 54rpx;
  469. padding: 0 32rpx 20rpx;
  470. // border: 3rpx solid #009100;
  471. width: 100%;
  472. display: flex;
  473. flex-direction: column;
  474. border-radius: 25rpx;
  475. color: #E63931;
  476. }
  477. .buttom {
  478. width: 660rpx;
  479. height: 100rpx;
  480. background: linear-gradient(0deg, #C90F1B, #F14D33);
  481. // background: $motif-color;
  482. border-radius: 50rpx;
  483. margin: 50rpx auto;
  484. font-size: 36rpx;
  485. font-weight: 400;
  486. color: #FFFFFF;
  487. line-height: 100rpx;
  488. text-align: center;
  489. &.action {
  490. background: #999999;
  491. }
  492. }
  493. .box {
  494. // margin-top: 44rpx;
  495. width: 690rpx;
  496. margin: 20rpx auto 0;
  497. background-color: #FFFFFF;
  498. border-radius: 10rpx;
  499. padding: 28rpx 20rpx 84rpx 20rpx;
  500. position: relative;
  501. .red-box {
  502. width: 405rpx;
  503. line-height: 66rpx;
  504. text-align: center;
  505. background: linear-gradient(0deg, #C90F1B, #F14D33);
  506. // background: $motif-color;
  507. border-radius: 10rpx;
  508. font-size: 30rpx;
  509. font-weight: 500;
  510. color: #FFFFFF;
  511. // position: relative;
  512. position: absolute;
  513. top: -36rpx;
  514. left: 50%;
  515. transform: translateX(-50%);
  516. z-index: 1;
  517. }
  518. .box-check {
  519. font-size: 28rpx;
  520. font-weight: 500;
  521. color: #666666;
  522. line-height: 100rpx;
  523. }
  524. .imp {
  525. color: red;
  526. margin-left: 5rpx;
  527. }
  528. .check-box{
  529. margin: 44rpx 0rpx;
  530. padding: 25rpx 25rpx;
  531. border: 3rpx solid #e9b2af;
  532. width: 100%;
  533. display: flex;
  534. flex-direction: column;
  535. border-radius: 25rpx;
  536. color: #ff4500;
  537. .info{
  538. margin-bottom:32rpx ;
  539. }
  540. .info-3{
  541. margin-top: 12rpx;
  542. line-height: 46rpx;
  543. }
  544. .info-1{
  545. display: flex;
  546. align-items: center;
  547. input {
  548. height: 56rpx;
  549. width: 400rpx;
  550. line-height: 56rpx;
  551. // margin-top: 32rpx;
  552. width: 300rpx;
  553. // height: 88rpx;
  554. }
  555. .list-input {
  556. padding-left: 24rpx;
  557. display: flex;
  558. align-items: center;
  559. width: 280rpx;
  560. font-size: 36rpx;
  561. // flex: 1;
  562. color: #FF9797;
  563. border-bottom: 1rpx solid #f3afad;
  564. text-align: center;
  565. padding-right: 24rpx;
  566. .input-placeholder {
  567. width: 400rpx;
  568. height: 70rpx;
  569. color: #FF9797;
  570. }
  571. }
  572. }
  573. .check-main{
  574. display: flex;
  575. // justify-content: space-between;
  576. width: 100%;
  577. .check-text{
  578. margin-right: 12rpx;
  579. }
  580. .checkbox,
  581. .uni-checkbox-input,
  582. .uni-checkbox-input-checked {
  583. border: 1px solid #ff4500;
  584. background: #ff4500;
  585. color: #fff !important;
  586. }
  587. }
  588. }
  589. .box-2{
  590. display: flex;
  591. // flex-direction: column;
  592. align-items: center;
  593. width: 100%;
  594. margin-top: 32rpx;
  595. color: #FF9797;
  596. .box-left {
  597. padding-left: 2rpx;
  598. // width: 190rpx;
  599. text-align: left;
  600. color: #ff4500;
  601. }
  602. .line{
  603. width: 200rpx;
  604. border-bottom: 1rpx solid #FF9797;
  605. }
  606. }
  607. .box-1 {
  608. display: flex;
  609. flex-direction: column;
  610. align-items: center;
  611. width: 100%;
  612. margin-top: 32rpx;
  613. // height: 133rpx;
  614. .box-left {
  615. padding-left: 2rpx;
  616. width: 100%;
  617. text-align: left;
  618. color: #ff4500;
  619. }
  620. input {
  621. height: 66rpx;
  622. line-height: 66rpx;
  623. margin-top: 32rpx;
  624. // height: 88rpx;
  625. }
  626. .list-input {
  627. padding-left: 24rpx;
  628. // margin: 12rpx 0 ;
  629. // line-height: 66rpx;
  630. display: flex;
  631. align-items: center;
  632. width: 100%;
  633. font-size: 36rpx;
  634. flex: 1;
  635. color: #FF9797;
  636. border: 1rpx solid #f3afad;
  637. border-radius: 22rpx;
  638. text-align: left;
  639. padding-right: 24rpx;
  640. .input-placeholder {
  641. height: 70rpx;
  642. color: #FF9797;
  643. }
  644. }
  645. .box-right {
  646. display: flex;
  647. align-items: center;
  648. padding-left: 24rpx;
  649. height: 66rpx;
  650. line-height: 66rpx;
  651. border: 1rpx solid #f3afad;
  652. border-radius: 22rpx;
  653. margin: 32rpx 36rpx 0 36rpx;
  654. width: 96%;
  655. font-size: 36rpx;
  656. color: #FF9797;
  657. text-align: left;
  658. // line-height: 1;
  659. }
  660. }
  661. .upload-box {
  662. width: 100%;
  663. height: 247rpx;
  664. background: #FFFFFF;
  665. // border: 1px solid #E63931;
  666. border-radius: 27rpx;
  667. display: flex;
  668. flex-direction: column;
  669. padding: 30rpx 40rpx 30rpx 0;
  670. margin: 0 auto 30rpx;
  671. .upload-left {
  672. font-weight: 400;
  673. color: #E63931;
  674. }
  675. .upload-right {
  676. flex: 1;
  677. display: flex;
  678. align-items: center;
  679. justify-content: center;
  680. .upload-img {
  681. width: 103rpx;
  682. height: 103rpx;
  683. margin-top: 24rpx;
  684. }
  685. }
  686. }
  687. }
  688. }
  689. </style>