teamSign.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <image src="../../static/img/activity.png" mode=""></image>
  5. </view>
  6. <view class="freeSign">
  7. 免费报名
  8. </view>
  9. <view class="signInfo">
  10. 完成信息填写,即可参加红十字会救护员培训
  11. </view>
  12. <view class="box">
  13. <!-- <view class="red-box">
  14. 申请登记表
  15. </view> -->
  16. <view class="box-1">
  17. <view class="box-left">
  18. 企业名称<text class="imp">*</text>:
  19. </view>
  20. <input type="text" value="" class="list-input" v-model="name" />
  21. </view>
  22. <view class="box-1">
  23. <view class="box-left">
  24. 负责人姓名<text class="imp">*</text>:
  25. </view>
  26. <input type="text" value="" class="list-input" v-model="phone" />
  27. </view>
  28. <view class="box-1">
  29. <view class="box-left">
  30. 企业地址<text class="imp">*</text>:
  31. </view>
  32. <picker @change="bindPickerSex" :value="index" :range="array" class="box-right">
  33. <text>{{ sex }}</text>
  34. </picker>
  35. </view>
  36. <view class="box-1">
  37. <view class="box-left">
  38. 联系电话<text class="imp">*</text>:
  39. </view>
  40. <input type="text" value="" class="list-input" v-model="phone" />
  41. </view>
  42. <view class="box-1">
  43. <view class="box-left">
  44. 参加培训人数<text class="imp">*</text>:
  45. </view>
  46. <input type="text" value="" class="list-input" v-model="phone" />
  47. </view>
  48. </view>
  49. <view class="statement">
  50. <view class="title">
  51. 免费报名
  52. </view>
  53. <view class="main">
  54. <view>
  55. 请参训学员在培训当天携带身份证复印件1张,一寸证件照2张。
  56. </view>
  57. <view style="margin-top: 16rpx;">
  58. 报名电话: 0573-88103165
  59. </view>
  60. </view>
  61. </view>
  62. <view class="buttom" :class="{ action: loding }" @click="!loding?join():''">
  63. 立即报名
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import {
  69. joinSec
  70. } from '@/api/index.js';
  71. import {
  72. upload
  73. } from '@/api/ask.js';
  74. export default {
  75. data() {
  76. const currentDate = this.getDate({
  77. format: true
  78. })
  79. return {
  80. otherjob:'',
  81. otherspe:'',
  82. loding: false, //是否提交中
  83. array: ['男', '女'],
  84. chooseEdu: ['博士后', '博士', '硕士', '本科', '专科', '其他'],
  85. chooseVol: ['有', '无'],
  86. is_vol: '',
  87. is_experience: '',
  88. chooseExp: ['是', '否'],
  89. items: [{
  90. value: '我自愿捐献全部遗体(含器官组织)'
  91. }, {
  92. value: '或只捐献眼角膜'
  93. }],
  94. timeList: [{
  95. id: 0,
  96. num: "周一",
  97. list: {
  98. morning: '周一上午',
  99. after: '周一下午',
  100. night: '周一晚上'
  101. }
  102. },
  103. {
  104. id: 1,
  105. num: "周二",
  106. list: {
  107. morning: '周二上午',
  108. after: '周二下午',
  109. night: '周二晚上'
  110. }
  111. },
  112. {
  113. id: 2,
  114. num: "周三",
  115. list: {
  116. morning: '周三上午',
  117. after: '周三下午',
  118. night: '周三晚上'
  119. }
  120. },
  121. {
  122. id: 3,
  123. num: "周四",
  124. list: {
  125. morning: '周四上午',
  126. after: '周四下午',
  127. night: '周四晚上'
  128. }
  129. },
  130. {
  131. id: 4,
  132. num: "周五",
  133. list: {
  134. morning: '周五上午',
  135. after: '周五下午',
  136. night: '周五晚上'
  137. }
  138. },
  139. {
  140. id: 5,
  141. num: "周六",
  142. list: {
  143. morning: '周六上午',
  144. after: '周六下午',
  145. night: '周六晚上'
  146. }
  147. },
  148. {
  149. id: 6,
  150. num: "周日",
  151. list: {
  152. morning: '周日上午',
  153. after: '周日下午',
  154. night: '周日晚上'
  155. }
  156. },
  157. ],
  158. jobList: [
  159. { id: 0, class_name: "赈灾工作" },
  160. { id: 1, class_name: "救护培训" },
  161. { id: 2, class_name: "活动策划" },
  162. { id: 3, class_name: "护送服务" },
  163. { id: 4, class_name: "医疗护理服务" },
  164. { id: 5, class_name: "探访服务" },
  165. { id: 6, class_name: "外语翻译" },
  166. { id: 7, class_name: "调查服务" },
  167. { id: 8, class_name: "宣传推广" },
  168. { id: 9, class_name: "文书档案工作" },
  169. { id: 10, class_name: "其他(请注明)" },
  170. ],
  171. specialityList: [
  172. { id: 0, class_name: "医疗护理" },
  173. { id: 1, class_name: "紧急救护" },
  174. { id: 2, class_name: "家电维修" },
  175. { id: 3, class_name: "影音制作" },
  176. { id: 4, class_name: "文艺演出" },
  177. { id: 5, class_name: "理发" },
  178. { id: 6, class_name: "摄影摄像"},
  179. { id: 7, class_name: "电脑中文打字" },
  180. { id: 8, class_name: "汽车驾驶" },
  181. { id: 9, class_name: "外语翻译" },
  182. { id: 10, class_name: "法律咨询" },
  183. { id: 11, class_name: "文案策划"},
  184. { id: 12, class_name: "其他(请注明)" },
  185. ],
  186. current: "",
  187. index: 0,
  188. mz: '',
  189. cardimg: '', //证件照
  190. card: '',
  191. checklist: [],
  192. name: '',
  193. sex: '',
  194. birth: '',
  195. fillingDate: '',
  196. phone: '',
  197. address: '',
  198. work: '',
  199. specialty: '',
  200. education: '',
  201. }
  202. },
  203. computed: {
  204. startDate() {
  205. return this.getDate('start');
  206. },
  207. endDate() {
  208. return this.getDate('end');
  209. }
  210. },
  211. methods: {
  212. async join() {
  213. let obj = this;
  214. if (obj.name == '') {
  215. obj.$api.msg('请输入您的姓名');
  216. return;
  217. }
  218. if (obj.sex == '') {
  219. obj.$api.msg('请输入您的性别');
  220. return;
  221. }
  222. // if (obj.birth == '') {
  223. // obj.$api.msg('请填写您的生日');
  224. // return;
  225. // }
  226. const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
  227. if (!reg.test(obj.phone)) {
  228. obj.$api.msg('请填写正确的手机号码');
  229. return;
  230. }
  231. if (obj.address == '') {
  232. obj.$api.msg('请填写您的地址');
  233. return;
  234. }
  235. // /^(^[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])$)$/
  236. if (obj.work == '') {
  237. obj.$api.msg('请填写您的工作单位');
  238. return;
  239. }
  240. if (obj.cardimg == '') {
  241. obj.$api.msg('请上传您的证件');
  242. return
  243. }
  244. let reg1 =
  245. /^(^[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])$)$/
  246. if (!reg1.test(obj.card)) {
  247. obj.$api.msg('请填写正确的身份证信息');
  248. return;
  249. }
  250. if (obj.mz == '') {
  251. obj.$api.msg('请填写您所属的名族');
  252. return;
  253. }
  254. if (obj.specialty == '') {
  255. obj.$api.msg('请填写您的职位');
  256. return;
  257. }
  258. // if (obj.education == '') {
  259. // obj.$api.msg('请填写您的教育程度');
  260. // return;
  261. // }
  262. // if (obj.is_vol == '') {
  263. // obj.$api.msg('请填写您的是否受过志愿服务');
  264. // return;
  265. // }
  266. // if (obj.is_experience == '') {
  267. // obj.$api.msg('请填写您的有无服务经验');
  268. // return;
  269. // }
  270. obj.loding = true;
  271. joinSec({
  272. name: obj.name,
  273. sex: obj.sex,
  274. education: obj.education,
  275. birth: obj.birth,
  276. mz: obj.mz,
  277. phone: obj.phone,
  278. address: obj.address,
  279. work: obj.work,
  280. specialty: obj.specialty,
  281. img: obj.cardimg,
  282. card: obj.card,
  283. }).then(e => {
  284. obj.name = '';
  285. obj.sex = '';
  286. obj.education = '';
  287. obj.birth = '';
  288. obj.mz = '',
  289. obj.phone = '';
  290. obj.address = '';
  291. obj.work = '';
  292. obj.specialty = '';
  293. obj.cardimg = '',
  294. obj.card = ''
  295. uni.navigateTo({
  296. url: '../joinSuc/joinNow'
  297. });
  298. }).catch(function(e) {
  299. console.log('出错了')
  300. console.log(e);
  301. });
  302. },
  303. imgsub() {
  304. console.log('imgsub')
  305. upload({
  306. filename: ''
  307. }).then(data => {
  308. this.cardimg = data[0].url;
  309. })
  310. },
  311. // 选择性别
  312. bindPickerSex: function(e) {
  313. this.sex = this.array[e.target.value];
  314. this.index = e.target.value + 1;
  315. },
  316. // 选择教育程度
  317. bindPickerEdu: function(e) {
  318. this.education = this.chooseEdu[e.target.value];
  319. this.index = e.target.value + 1;
  320. },
  321. // 选择日期
  322. bindDateChange: function(e) {
  323. this.birth = e.target.value
  324. },
  325. //选择填写日期
  326. fillingDateChange: function(e) {
  327. this.fillingDate = e.target.value
  328. },
  329. // 是否参加志愿活动
  330. bindPickerVol: function(e) {
  331. this.is_vol = this.chooseVol[e.target.value];
  332. this.index = e.target.value + 1;
  333. },
  334. // 有无服务经验
  335. bindPickerExp: function(e) {
  336. this.is_experience = this.chooseExp[e.target.value];
  337. this.index = e.target.value + 1;
  338. },
  339. // 选择捐献
  340. radioChange: function(evt) {
  341. for (let i = 0; i < this.items.length; i++) {
  342. if (this.items[i].value === evt.target.value) {
  343. this.current = i;
  344. break;
  345. }
  346. }
  347. },
  348. getDate(type) {
  349. const date = new Date();
  350. let year = date.getFullYear();
  351. let month = date.getMonth() + 1;
  352. let day = date.getDate();
  353. if (type === 'start') {
  354. year = year - 60;
  355. } else if (type === 'end') {
  356. year = year + 2;
  357. }
  358. month = month > 9 ? month : '0' + month;;
  359. day = day > 9 ? day : '0' + day;
  360. return `${year}-${month}-${day}`;
  361. },
  362. // 选择可提供时间
  363. // this.quantum = item.detail.value.join(',');
  364. checktime1(e) {
  365. // var items = this.timeList,
  366. // let quantum = [];
  367. this.quantum = e.detail.value.join(',');
  368. console.log(this.quantum);
  369. },
  370. checktime2(e) {
  371. // var items = this.timeList,
  372. let values = e.detail.value;
  373. // let quantum = [];
  374. console.log(values);
  375. },
  376. checktime3(e) {
  377. // var items = this.timeList,
  378. let values = e.detail.value;
  379. // let quantum = [];
  380. console.log(values);
  381. },
  382. // 选择可提供时间
  383. timeOnChange: function(item1) {
  384. this.quantum = item1.detail.value.join(',');
  385. console.log('可选择时间',this.quantum)
  386. },
  387. //选择有兴趣参与的工作
  388. checkjob(item) {
  389. this.taste = item.detail.value.join(',');
  390. console.log('选择工作:',this.taste)
  391. this.otherjob = item.detail.value
  392. },
  393. // 选择专长checkspeciality
  394. checkspeciality(item) {
  395. this.speciali = item.detail.value.join(',');
  396. console.log('选择专长',this.speciali)
  397. this.otherspe = item.detail.value
  398. },
  399. }
  400. }
  401. </script>
  402. <style lang="scss">
  403. page {
  404. background-color: #FFFFFF
  405. }
  406. .content {
  407. // padding-top: 64rpx;
  408. // background-color: #f3afad;
  409. .top {
  410. width: 100%;
  411. height: 368rpx;
  412. image {
  413. width: 100%;
  414. height: 368rpx;
  415. }
  416. }
  417. .freeSign{
  418. padding: 24rpx 0;
  419. display: flex;
  420. align-items: center;
  421. justify-content: center;
  422. background-color: #FFFFFF;
  423. border-bottom: 1rpx solid #F2F2F2;
  424. }
  425. .signInfo{
  426. padding: 24rpx 0;
  427. display: flex;
  428. font-size: 28rpx;
  429. align-items: center;
  430. justify-content: center;
  431. background-color: #FFFFFF;
  432. border-bottom: 1rpx solid #F2F2F2;
  433. }
  434. .statement{
  435. // margin: 32rpx;
  436. background-color: #FFFFFF;
  437. // padding: 32rpx 23rpx;
  438. border-radius: 12rpx;
  439. .title{
  440. height: 84rpx;
  441. display: flex;
  442. justify-content: center;
  443. align-items: center;
  444. font-size: 32rpx;
  445. border-bottom: 2rpx dotted #f3f3f3;
  446. }
  447. .main{
  448. padding: 32rpx;
  449. text-indent: 48rpx;
  450. color:#666 ;
  451. font-weight: 400;
  452. }
  453. }
  454. .buttom {
  455. width: 460rpx;
  456. height: 100rpx;
  457. background: linear-gradient(0deg, #C90F1B, #F14D33);
  458. border-radius: 50rpx;
  459. margin: 50rpx auto;
  460. font-size: 36rpx;
  461. font-weight: 400;
  462. color: #FFFFFF;
  463. line-height: 100rpx;
  464. text-align: center;
  465. &.action {
  466. background: #999999;
  467. }
  468. }
  469. .box {
  470. // margin-top: 44rpx;
  471. // width: 690rpx;
  472. // margin: 32rpx auto 0;
  473. background-color: #FFFFFF;
  474. border-radius: 10rpx;
  475. padding: 28rpx 20rpx 84rpx 20rpx;
  476. position: relative;
  477. // .red-box {
  478. // width: 405rpx;
  479. // line-height: 66rpx;
  480. // text-align: center;
  481. // background: linear-gradient(0deg, #C90F1B, #F14D33);
  482. // border-radius: 10rpx;
  483. // font-size: 30rpx;
  484. // font-weight: 500;
  485. // color: #FFFFFF;
  486. // // position: relative;
  487. // position: absolute;
  488. // top: -36rpx;
  489. // left: 50%;
  490. // transform: translateX(-50%);
  491. // z-index: 1;
  492. // }
  493. .box-check {
  494. font-size: 28rpx;
  495. font-weight: 500;
  496. color: #666666;
  497. line-height: 100rpx;
  498. }
  499. .imp {
  500. color: red;
  501. margin-left: 5rpx;
  502. }
  503. .check-box {
  504. margin: 44rpx 0rpx;
  505. padding: 25rpx 25rpx;
  506. border: 3rpx solid #e9b2af;
  507. width: 100%;
  508. display: flex;
  509. flex-direction: column;
  510. border-radius: 25rpx;
  511. color: #E63931;
  512. .info {
  513. margin-bottom: 32rpx;
  514. text-align: center;
  515. }
  516. .chooseTim {
  517. text-align: center;
  518. font-size: 42rpx;
  519. }
  520. .choose-job{
  521. color: #666666;
  522. // height: 45rpx; 爱心捐赠
  523. .goods_check{
  524. display: flex;
  525. flex-direction: column;
  526. .uni-label-pointer{
  527. // width: 50%;
  528. // display: flex;
  529. }
  530. }
  531. .other{
  532. width: 100%;
  533. border-bottom: 2rpx solid #f3f3f3;
  534. }
  535. }
  536. .box-cent {
  537. font-size: 28rpx;
  538. font-weight: 500;
  539. color: #666666;
  540. display: flex;
  541. .cent-left {
  542. margin-right: 28rpx;
  543. .left-txt {
  544. line-height: 100rpx;
  545. }
  546. }
  547. .cent-right {
  548. flex: 1;
  549. display: flex;
  550. justify-content: space-around;
  551. .right-check {
  552. line-height: 100rpx;
  553. }
  554. }
  555. }
  556. }
  557. .box-1 {
  558. display: flex;
  559. flex-direction: column;
  560. align-items: center;
  561. width: 100%;
  562. margin-top: 32rpx;
  563. // height: 133rpx;
  564. .box-left {
  565. padding-left: 2rpx;
  566. width: 100%;
  567. text-align: left;
  568. color: #E63931;
  569. }
  570. input {
  571. height: 66rpx;
  572. line-height: 66rpx;
  573. margin-top: 32rpx;
  574. // height: 88rpx;
  575. }
  576. .list-input {
  577. padding-left: 24rpx;
  578. // margin: 12rpx 0 ;
  579. // line-height: 66rpx;
  580. display: flex;
  581. align-items: center;
  582. width: 100%;
  583. font-size: 36rpx;
  584. flex: 1;
  585. color: #FF9797;
  586. border: 1rpx solid #f3afad;
  587. border-radius: 22rpx;
  588. text-align: left;
  589. padding-right: 24rpx;
  590. .input-placeholder {
  591. height: 70rpx;
  592. color: #FF9797;
  593. }
  594. }
  595. .box-right {
  596. display: flex;
  597. align-items: center;
  598. padding-left: 24rpx;
  599. height: 66rpx;
  600. line-height: 66rpx;
  601. border: 1rpx solid #f3afad;
  602. border-radius: 22rpx;
  603. margin: 32rpx 36rpx 0 36rpx;
  604. width: 96%;
  605. font-size: 36rpx;
  606. color: #FF9797;
  607. text-align: left;
  608. // line-height: 1;
  609. }
  610. }
  611. .upload-box {
  612. width: 100%;
  613. height: 247rpx;
  614. background: #FFFFFF;
  615. // border: 1px solid #E63931;
  616. border-radius: 27rpx;
  617. display: flex;
  618. flex-direction: column;
  619. padding: 30rpx 40rpx 30rpx 0;
  620. margin: 0 auto 30rpx;
  621. .upload-left {
  622. font-weight: 400;
  623. color: #E63931;
  624. }
  625. .upload-right {
  626. flex: 1;
  627. display: flex;
  628. align-items: center;
  629. justify-content: center;
  630. .upload-img {
  631. width: 103rpx;
  632. height: 103rpx;
  633. margin-top: 24rpx;
  634. }
  635. }
  636. }
  637. }
  638. }
  639. </style>