applicationForm.vue 16 KB

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