applicationForm.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <view class="title">登记选择</view>
  5. <view class="info-box">我自愿登记成为人体器官、造血干细胞、遗体捐献志愿者,自愿无偿捐献:</view>
  6. <view class="uni-list">
  7. <radio-group class="radio-box" @change="radioChange">
  8. <label v-for="(item, index) in items" :key="item.name">
  9. <label class="radio">
  10. {{ item.name }}
  11. <radio :checked="index === current" color="#E62129" style="transform:scale(0.5)" :value="item.name" />
  12. <text></text>
  13. </label>
  14. </label>
  15. </radio-group>
  16. </view>
  17. </view>
  18. <view class="box">
  19. <!-- <view class="red-box">
  20. 报名参与
  21. </view> -->
  22. <view class="box-1">
  23. <view class="box-left">姓名</view>
  24. <input type="text" placeholder="请填写你的名字" placeholder-class="placeholder" value="" class="list-input" v-model="name" />
  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>{{ birthday }}</view>
  30. </picker>
  31. </view>
  32. <view class="box-1">
  33. <view class="box-left">性别</view>
  34. <picker @change="bindPickerSex" :value="index" :range="array" class="box-right">
  35. <text>{{ sex }}</text>
  36. </picker>
  37. </view>
  38. <view class="box-1">
  39. <view class="box-left">文化程度</view>
  40. <picker @change="bindPickerEdu" :value="index" :range="chooseEdu" class="box-right">
  41. <text>{{ education }}</text>
  42. </picker>
  43. </view>
  44. <view class="box-1">
  45. <view class="box-left">民族</view>
  46. <input type="text" placeholder="请填写你的民族" placeholder-class="placeholder" value="" class="list-input" v-model="mz" />
  47. </view>
  48. <view class="box-1">
  49. <view class="box-left">邮箱</view>
  50. <input type="text" placeholder="请填写你的邮箱" placeholder-class="placeholder" value="" class="list-input" v-model="mail" />
  51. </view>
  52. <view class="box-1">
  53. <view class="box-left">地址</view>
  54. <input type="text" placeholder="请填写你的地址" placeholder-class="placeholder" value="" class="list-input" v-model="address" />
  55. </view>
  56. <view class="box-1">
  57. <view class="box-left">身份证号</view>
  58. <input type="text" placeholder="请填写你的身份证号" placeholder-class="placeholder" value="" class="list-input" v-model="card" />
  59. </view>
  60. <view class="box-1">
  61. <view class="box-left">联系电话</view>
  62. <input type="text" placeholder="请填写你的联系电话" placeholder-class="placeholder" value="" class="list-input" v-model="phone" />
  63. </view>
  64. <view class="box-1">
  65. <view class="box-left">微信号</view>
  66. <input type="text" placeholder="请填写你的微信号" placeholder-class="placeholder" value="" class="list-input" v-model="weixin" />
  67. </view>
  68. <view class="box-1">
  69. <view class="box-left">工作单位</view>
  70. <input type="text" placeholder="请填写你的工作单位" placeholder-class="placeholder" value="" class="list-input" v-model="work" />
  71. </view>
  72. <view class="box-1">
  73. <view class="box-left">职业/职务</view>
  74. <input type="text" value="" placeholder="请填写你的职业/职务" placeholder-class="placeholder" class="list-input" v-model="occupation" />
  75. </view>
  76. <view class="box-1">
  77. <view class="box-left">专业/专长</view>
  78. <input type="text" placeholder="请填写你的专业/专长" placeholder-class="placeholder" value="" class="list-input" v-model="major" />
  79. </view>
  80. <view class="upload-box">
  81. <view class="upload-left">照片</view>
  82. <view class="upload-right">
  83. <image :src="cardimg" mode="" class="upload-img" @click.stop="imgsub" v-if="cardimg"></image>
  84. <image src="../../static/images/upload.png" class="upload-img" mode="" v-if="!cardimg" @click.stop="imgsub"></image>
  85. </view>
  86. </view>
  87. </view>
  88. <view class="top" v-if="type == '人体器官' || type == '遗体捐献'">
  89. <view class="title">个人声明</view>
  90. <!-- <radio style="transform: scale(0.6)" @click="Getcheckboxs" color="#E62129" :checked="Getcheckeds" /> -->
  91. <view class="info-box">
  92. 人体器官捐献是服务医疗事业,造福人类的高尚行为,是“人道、博爱、奉献”精神的崇高体现,我已了解人体器官捐献的基本常识和有关政策法规。</view>
  93. <view class="info-box" style="padding-top: 0;">我自愿登记成为人体器官捐献志愿者,自愿无偿捐献:</view>
  94. <view class="uni-list" style="display: block;">
  95. <checkbox-group v-if="type == '遗体捐献'" style="display: inline-block;" @change="checkboxChangeAll">
  96. <label class="checkbox" style="padding-left: 0;">
  97. 全部器官(遗体捐献)
  98. <checkbox value="遗体捐献" :checked="all" color="#E62129" style="transform:scale(0.6)" />
  99. <!-- <text v-if="type == '人体器官'">或</text> -->
  100. </label>
  101. </checkbox-group>
  102. <checkbox-group v-if="type == '人体器官'" style="display: inline-block;" @change="checkboxChange">
  103. <label class="checkbox" v-for="item in apparatus" :key="item.name">
  104. {{ item.name }}
  105. <checkbox :checked="item.type" color="#E62129" style="transform:scale(0.6);margin: 0;padding: 0;" :value="item.name" />
  106. </label>
  107. </checkbox-group>
  108. <view class="box-2" v-if="type == '人体器官'">
  109. <view class="box-left">其他</view>
  110. <input type="text" value="" placeholder="若有其他内容请填写" class="list-input" v-model="other" />
  111. </view>
  112. <view class="font">请执行人和所有亲属尊重我的决定。</view>
  113. </view>
  114. </view>
  115. <view class="top" v-if="type == '人体器官' || type == '遗体捐献'">
  116. <view class="title">人体器官捐献执行人信息</view>
  117. <view class="info-box">我指定该亲属为我的器官捐献执行人,全权负责本人的器官捐献事宜,我保证填写的内容信息真实,如发生变更及时告知登记机构。</view>
  118. <view class="uni-list" style="display: block;">
  119. <view class="box-1" style="margin-top: 0rpx;">
  120. <view class="box-left">亲属关系</view>
  121. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写与本人的关系" class="list-input" v-model="relation" />
  122. </view>
  123. <view class="box-1" style="margin-top: 20rpx;">
  124. <view class="box-left">身份证号</view>
  125. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属身份证号" class="list-input" v-model="sfz" />
  126. </view>
  127. <view class="box-1" style="margin-top: 20rpx;">
  128. <view class="box-left">联系电话</view>
  129. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属联系电话" class="list-input" v-model="n_phone" />
  130. </view>
  131. </view>
  132. </view>
  133. <view class="top" v-if="type == '造血干细胞' ">
  134. <view class="title">中国造血干细胞捐献者资料库入库同意书</view>
  135. <view class="info-box">
  136. <text>我了解:</text>
  137. ①通过造血干细胞移植可以治疗人体造血系统及免疫系统的严重疾病,如白血病、恶性淋巴瘤等。②捐献造血干细胞是自愿、无偿的人道主义善举。③采集造血干细胞安全、科学、无损健康。
  138. </view>
  139. <view class="info-box" style="padding-top: 10rpx;">
  140. <text>我清楚:</text>
  141. ①中华骨髓库仅将我捐献的样本及造血干细胞用于造血干细胞移植相关工作,不会将其用于商业用途。②中华骨髓库会为我的个人隐私和个人资料保密。
  142. </view>
  143. <view class="info-box" style="padding-top: 10rpx;">
  144. <text>我坚定:</text>
  145. ①我将如实准确地提供个人健康资料并到指定地点留取样本。②一旦患者需要,我将竭尽全力为等待移植的患者捐献造血干细胞,并做好为其二次捐献造血干细胞或淋巴细胞的准备,以挽救其生命。
  146. </view>
  147. <view class="info-box" style="padding-top: 10rpx;">
  148. <text>我承诺:</text>
  149. ①在造血干细胞采集计划制定之后,我将不再改变捐献意愿,以免危及患者生命。②如联系地址或电话变更,我会及时告知中华骨髓库。
  150. </view>
  151. <view class="agree">
  152. <radio style="transform: scale(0.6)" @click="Getcheckbox" color="#E62129" :checked="Getchecked" />
  153. 我已认真阅读并同意入库
  154. </view>
  155. </view>
  156. <view class="top" v-if="type == '造血干细胞'">
  157. <view class="title">亲友一</view>
  158. <view class="info-box" style="text-indent: 0;">敬请留下两位亲友信息,以便与本人联系不上时,请他们转告:</view>
  159. <view class="uni-list">
  160. <view class="box-1" style="margin-top: 20rpx;">
  161. <view class="box-left">姓名</view>
  162. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属姓名" class="list-input" v-model="friendOnename" />
  163. </view>
  164. <view class="box-1" style="margin-top: 20rpx;">
  165. <view class="box-left">亲属关系</view>
  166. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属与本人的关系" class="list-input" v-model="friendOnerelation" />
  167. </view>
  168. <view class="box-1" style="margin-top: 20rpx;">
  169. <view class="box-left">联系方式</view>
  170. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属联系方式" class="list-input" v-model="friendOnephone" />
  171. </view>
  172. <view class="box-1" style="margin-top: 20rpx;">
  173. <view class="box-left">微信号</view>
  174. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属微信号" class="list-input" v-model="friendOneweixin" />
  175. </view>
  176. <view class="box-1" style="margin-top: 20rpx;">
  177. <view class="box-left">联系地址</view>
  178. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属的联系地址" class="list-input" v-model="friendOneaddress" />
  179. </view>
  180. </view>
  181. </view>
  182. <view class="top" v-if="type == '造血干细胞'">
  183. <view class="title">亲友二</view>
  184. <view class="info-box" style="text-indent: 0;">敬请留下两位亲友信息,以便与本人联系不上时,请他们转告:</view>
  185. <view class="uni-list">
  186. <view class="box-1" style="margin-top: 20rpx;">
  187. <view class="box-left">姓名</view>
  188. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属姓名" class="list-input" v-model="friendTwoname" />
  189. </view>
  190. <view class="box-1" style="margin-top: 20rpx;">
  191. <view class="box-left">亲属关系</view>
  192. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属与本人的关系" class="list-input" v-model="friendTworelation" />
  193. </view>
  194. <view class="box-1" style="margin-top: 20rpx;">
  195. <view class="box-left">联系方式</view>
  196. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属联系方式" class="list-input" v-model="friendTwophone" />
  197. </view>
  198. <view class="box-1" style="margin-top: 20rpx;">
  199. <view class="box-left">微信号</view>
  200. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属微信号" class="list-input" v-model="friendTwoweixin" />
  201. </view>
  202. <view class="box-1" style="margin-top: 20rpx;">
  203. <view class="box-left">联系地址</view>
  204. <input type="text" value="" placeholder-class="placeholder" placeholder="请填写亲属的联系地址" class="list-input" v-model="friendTwoaddress" />
  205. </view>
  206. </view>
  207. </view>
  208. <view class="buttomBox"><view class="buttom" :class="{ action: loding }" @click="!loding ? join() : ''">提交申请</view></view>
  209. </view>
  210. </template>
  211. <script>
  212. import { joinSecc } from '@/api/index.js';
  213. import { getList } from '@/api/index.js';
  214. import { upload } from '@/api/ask.js';
  215. export default {
  216. data() {
  217. const currentDate = this.getDate({
  218. format: true
  219. });
  220. return {
  221. all: false,
  222. isall: false,
  223. type: '',
  224. loding: false, //是否提交中
  225. array: ['男', '女'],
  226. chooseEdu: ['博士后', '博士', '硕士', '本科', '专科', '其他'],
  227. chooseVol: ['是', '否'],
  228. chooseExp: ['是', '否'],
  229. items: [
  230. {
  231. name: '人体器官'
  232. },
  233. {
  234. name: '造血干细胞'
  235. },
  236. {
  237. name: '遗体捐献'
  238. }
  239. ],
  240. apparatus: [
  241. {
  242. name: '肾脏',
  243. type: false
  244. },
  245. {
  246. name: '肝脏',
  247. type: false
  248. },
  249. {
  250. name: '心脏',
  251. type: false
  252. },
  253. {
  254. name: '肺脏',
  255. type: false
  256. },
  257. {
  258. name: '胰腺',
  259. type: false
  260. },
  261. {
  262. name: '小肠',
  263. type: false
  264. }
  265. ],
  266. remark: '',
  267. current: '',
  268. index: 0,
  269. mz: '',
  270. cardimg: '', //证件照
  271. checklist: [],
  272. name: '',
  273. sex: '请选择你的性别',
  274. birthday: '请选择你的出生年月',
  275. card: '',
  276. occupation: '',
  277. education: '请选择你的文化程度',
  278. phone: '',
  279. relation: '', //执行人关系
  280. n_phone: '', //执行人电话
  281. sfz: '', //执行人身份证号
  282. Getchecked: false,
  283. Getcheckeds: false,
  284. address: '',
  285. mail: '',
  286. weixin: '',
  287. major: '',
  288. work: '',
  289. other: '',
  290. friendOnename: '',
  291. friendOnerelation: '',
  292. friendOnephone: '',
  293. friendOneaddress: '',
  294. friendOneweixin: '',
  295. friendTwoname: '',
  296. friendTworelation: '',
  297. friendTwophone: '',
  298. friendTwoaddress: '',
  299. friendTwoweixin: ''
  300. };
  301. },
  302. computed: {
  303. startDate() {
  304. return this.getDate('start');
  305. },
  306. endDate() {
  307. return this.getDate('end');
  308. }
  309. },
  310. methods: {
  311. async join() {
  312. let obj = this;
  313. console.log(obj.type,"type")
  314. if (obj.type == '') {
  315. obj.$api.msg('请选择你要捐献的器官');
  316. return;
  317. }
  318. if (obj.name == '') {
  319. obj.$api.msg('请输入您的姓名');
  320. return;
  321. }
  322. if (obj.birth == '请选择你的出生年月') {
  323. obj.$api.msg('请选择出生年月');
  324. return;
  325. }
  326. if (obj.sex == '请选择你的性别') {
  327. obj.$api.msg('请输入您的性别');
  328. return;
  329. }
  330. if (obj.education == '请选择你的文化程度') {
  331. obj.$api.msg('请选择您的文化程度');
  332. return;
  333. }
  334. if (obj.mz == '') {
  335. obj.$api.msg('请填写您所属的民族');
  336. return;
  337. }
  338. if (obj.mail == '') {
  339. obj.$api.msg('请填写您的邮箱');
  340. return;
  341. }
  342. if (obj.address == '') {
  343. obj.$api.msg('请填写您的地址');
  344. return;
  345. }
  346. if (obj.card == '') {
  347. obj.$api.msg('请填写您的身份证号');
  348. return;
  349. }
  350. 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])$)$/;
  351. if (!reg1.test(obj.card)) {
  352. obj.$api.msg('请填写正确的身份证号');
  353. return;
  354. }
  355. if (obj.phone == '') {
  356. obj.$api.msg('请填写您的联系电话');
  357. return;
  358. }
  359. const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
  360. if (!reg.test(obj.phone)) {
  361. obj.$api.msg('请填写正确的联系电话');
  362. return;
  363. }
  364. if (obj.weixin == '') {
  365. obj.$api.msg('请填写您的微信号');
  366. return;
  367. }
  368. if (obj.work == '') {
  369. obj.$api.msg('请填写您的工作单位');
  370. return;
  371. }
  372. if (obj.specialty == '') {
  373. obj.$api.msg('请填写您的职业/职务');
  374. return;
  375. }
  376. if (obj.major == '') {
  377. obj.$api.msg('请填写您的专业/专长');
  378. return;
  379. }
  380. if (obj.cardimg == '') {
  381. obj.$api.msg('请上传您的证件');
  382. return;
  383. }
  384. if (obj.type == '人体器官' || obj.type == '遗体捐献') {
  385. console.log(obj.remark,'1111');
  386. if (obj.remark == '') {
  387. obj.$api.msg('请选择要捐献的器官');
  388. return;
  389. }
  390. if (obj.relation == '') {
  391. obj.$api.msg('请填写亲属身份');
  392. return;
  393. }
  394. if (obj.sfz == '') {
  395. obj.$api.msg('请填写亲属身份证号');
  396. return;
  397. }
  398. // if (obj.Getcheckeds != true) {
  399. // this.$api.msg('请阅读并同意入库!');
  400. // return;
  401. // }
  402. if (obj.n_phone == '') {
  403. obj.$api.msg('请填写亲属联系电话');
  404. return;
  405. }
  406. }
  407. if (obj.type == '造血干细胞') {
  408. if (obj.Getchecked != true) {
  409. this.$api.msg('请阅读并同意入库!');
  410. return;
  411. }
  412. console.log(this.friendOnename)
  413. if (obj.friendOnename == "") {
  414. this.$api.msg('请填写亲属一姓名!');
  415. return;
  416. }
  417. if (obj.friendOnerelation == "") {
  418. this.$api.msg('请填写亲属一与本人的关系!');
  419. return;
  420. }
  421. if (obj.friendOnephone == "") {
  422. this.$api.msg('请填写亲属一联系方式!');
  423. return;
  424. }
  425. if (obj.friendOneweixin == "") {
  426. this.$api.msg('请填写亲属一微信号!');
  427. return;
  428. }
  429. if (obj.friendOneaddress == "" ) {
  430. this.$api.msg('请填写亲属一的联系地址!');
  431. return;
  432. }
  433. if (obj.friendTwoname == "" ) {
  434. this.$api.msg('请填写亲属二姓名!');
  435. return;
  436. }
  437. if (obj.friendTworelation == "" ) {
  438. this.$api.msg('请填写亲属二与本人的关系!');
  439. return;
  440. }
  441. if (obj.friendTwophone == "" ) {
  442. this.$api.msg('请填写亲属二联系方式!');
  443. return;
  444. }
  445. if (obj.friendTwoweixin == "" ) {
  446. this.$api.msg('请填写亲属二微信号!');
  447. return;
  448. }
  449. if (obj.friendTwoaddress == "" ) {
  450. this.$api.msg('请填写亲属二的联系地址!');
  451. return;
  452. }
  453. }
  454. obj.loding = true;
  455. if (obj.type == '人体器官' || obj.type == '遗体捐献') {
  456. obj.body(1)
  457. } else if (obj.type == '造血干细胞') {
  458. obj.bloud()
  459. }
  460. else {
  461. obj.body(0);
  462. obj.bloud();
  463. }
  464. },
  465. //器官捐献
  466. body(item){
  467. const obj = this;
  468. joinSecc({
  469. name: obj.name,
  470. sex: obj.sex,
  471. education: obj.education,
  472. birthday: obj.birthday,
  473. card: obj.card,
  474. occupation: obj.occupation,
  475. remark: obj.remark,
  476. phone: obj.phone,
  477. address: obj.address,
  478. mail: obj.mail, // 邮箱
  479. weixin: obj.weixin, //微信
  480. major: obj.major, //专业或专长
  481. work: obj.work, // 工作单位
  482. cardimg: obj.cardimg, //照片
  483. relation: obj.relation,
  484. sfz: obj.sfz,
  485. n_phone: obj.n_phone,
  486. other: obj.other //其他器官
  487. })
  488. .then(e => {
  489. console.log(e,"2322222222222222222222222222222222222222")
  490. if(e.status == 400){
  491. console.log(e.msg);
  492. this.$api.msg("你已报名成功,不可重复报名")
  493. }else {
  494. obj.name = '';
  495. obj.sex = '请选择你的性别';
  496. obj.education = '请选择你的文化程度';
  497. obj.birth = '请选择你的出生年月';
  498. (obj.mz = ''), (obj.phone = '');
  499. obj.address = '';
  500. obj.work = '';
  501. obj.specialty = '';
  502. (obj.cardimg = ''), (obj.card = '');
  503. obj.mail = '';
  504. (obj.weixin = ''), (obj.major = '');
  505. if(item == 1){
  506. uni.navigateTo({
  507. url: '../joinSuc/joinNow'
  508. });
  509. }
  510. }
  511. })
  512. .catch(function(e) {
  513. console.log('出错了');
  514. console.log(e);
  515. });
  516. },
  517. //造血干细胞捐献
  518. bloud() {
  519. const obj = this;
  520. getList({
  521. name: obj.name,
  522. sex: obj.sex,
  523. education: obj.education, //文化程度
  524. birthday: obj.birthday,
  525. card: obj.card, //身份证号
  526. cardimg: obj.cardimg, //照片
  527. occupation: obj.occupation, //职业或职务
  528. phone: obj.phone,
  529. address: obj.address, //地址
  530. mail: obj.mail, // 邮箱
  531. weixin: obj.weixin, //微信
  532. major: obj.major, //专业或专长
  533. work: obj.work, // 工作单位
  534. friendOnename: obj.friendOnename, //亲友一的姓名
  535. friendOnerelation: obj.friendOnerelation, //亲友一与全赠者的关系
  536. friendOnephone: obj.friendOnephone, //亲友一的手机号
  537. friendOneweixin: obj.friendOneweixin, //亲友一的微信号
  538. friendOneaddress: obj.friendOneaddress, //亲友一的地址
  539. friendTwoname: obj.friendTwoname, //亲友二的姓名
  540. friendTworelation: obj.friendTworelation, //亲友二与全赠者的关系
  541. friendTwophone: obj.friendTwophone, //亲友二的手机号
  542. friendTwoweixin: obj.friendTwoweixin, //亲友二的微信号
  543. friendTwoaddress: obj.friendTwoaddress //亲友二的地址
  544. })
  545. .then(e => {
  546. console.log(e,"22222222222222222222222")
  547. if(e.status == 400){
  548. console.log(e.msg);
  549. this.$api.msg("你已报名成功,不可重复报名")
  550. }else {
  551. obj.name = '';
  552. obj.sex = '请选择你的性别';
  553. obj.education = '请选择你的文化程度';
  554. obj.birth = '请选择你的出生年月';
  555. (obj.mz = ''), (obj.phone = '');
  556. obj.address = '';
  557. obj.work = '';
  558. obj.specialty = '';
  559. (obj.cardimg = ''), (obj.card = '');
  560. obj.mail = '';
  561. (obj.weixin = ''), (obj.major = '');
  562. uni.navigateTo({
  563. url: '../joinSuc/joinNow'
  564. });
  565. }
  566. })
  567. .catch(function(e) {
  568. console.log('出错了');
  569. console.log(e);
  570. });
  571. },
  572. imgsub() {
  573. console.log('imgsub');
  574. upload({
  575. filename: ''
  576. }).then(data => {
  577. this.cardimg = data[0].url;
  578. });
  579. },
  580. // 选择性别
  581. bindPickerSex: function(e) {
  582. this.sex = this.array[e.target.value];
  583. this.index = e.target.value + 1;
  584. },
  585. // 选择教育程度
  586. bindPickerEdu: function(e) {
  587. this.education = this.chooseEdu[e.target.value];
  588. // console.log('选择选择教育程度',this.education)
  589. this.index = e.target.value + 1;
  590. },
  591. // 选择日期
  592. bindDateChange: function(e) {
  593. console.log(e);
  594. this.birthday = e.target.value;
  595. console.log(this.birthday);
  596. },
  597. //选择填写日期
  598. fillingDateChange: function(e) {
  599. this.add_time = e.target.value;
  600. },
  601. // 是否参加志愿活动
  602. bindPickerVol: function(e) {
  603. this.is_vol = this.chooseVol[e.target.value];
  604. this.index = e.target.value + 1;
  605. },
  606. // 有无服务经验
  607. bindPickerExp: function(e) {
  608. console.log('有无服务经验', e.target.value);
  609. this.is_experience = this.chooseExp[e.target.value];
  610. this.index = e.target.value + 1;
  611. },
  612. // 选择捐献
  613. radioChange: function(evt) {
  614. console.log('选择捐献', evt);
  615. for (let i = 0; i < this.items.length; i++) {
  616. if (this.items[i].name === evt.detail.value) {
  617. this.type = evt.detail.value;
  618. console.log('this.type', this.type);
  619. this.current = i;
  620. console.log('this.current', this.current);
  621. break;
  622. }
  623. }
  624. if(this.type == '遗体捐献'){
  625. this.remark = '遗体捐献';
  626. this.all = true;
  627. }
  628. },
  629. checkboxChangeAll(e) {
  630. const obj = this;
  631. for (let i = 0; i < obj.apparatus.length; i++) {
  632. obj.apparatus[i].type = false;
  633. }
  634. if (obj.remark != ' ') {
  635. obj.remark = '';
  636. }
  637. console.log(e,"`11111")
  638. obj.remark = e.detail.value.join(',');
  639. console.log(obj.remark);
  640. obj.all = true;
  641. },
  642. //器官捐献时选择要捐献的器官
  643. checkboxChange(e) {
  644. const obj = this;
  645. obj.all = false;
  646. if(obj.remark != ''){
  647. if (obj.remark.indexOf('all') != -1) {
  648. obj.remark = '';
  649. }
  650. }
  651. obj.remark = e.detail.value.join(',');
  652. for (let i = 0; i < obj.apparatus.length; i++) {
  653. if (obj.remark.indexOf(obj.apparatus[i].name) != -1) {
  654. obj.apparatus[i].type = true;
  655. }
  656. }
  657. console.log(obj.remark);
  658. },
  659. Getcheckbox() {
  660. let obj = this;
  661. obj.Getchecked = !obj.Getchecked;
  662. },
  663. Getcheckboxs() {
  664. let obj = this;
  665. obj.Getcheckeds = !obj.Getcheckeds;
  666. },
  667. getDate(type) {
  668. const date = new Date();
  669. let year = date.getFullYear();
  670. let month = date.getMonth() + 1;
  671. let day = date.getDate();
  672. if (type === 'start') {
  673. year = year - 60;
  674. } else if (type === 'end') {
  675. year = year + 2;
  676. }
  677. month = month > 9 ? month : '0' + month;
  678. day = day > 9 ? day : '0' + day;
  679. return `${year}-${month}-${day}`;
  680. },
  681. // 选择可提供时间
  682. // this.quantum = item.detail.value.join(',');
  683. checktime1(e) {
  684. // var items = this.timeList,
  685. // let quantum = [];
  686. this.quantum = e.detail.value.join(',');
  687. console.log(this.quantum);
  688. },
  689. checktime2(e) {
  690. // var items = this.timeList,
  691. let values = e.detail.value;
  692. // let quantum = [];
  693. console.log(values);
  694. },
  695. checktime3(e) {
  696. // var items = this.timeList,
  697. let values = e.detail.value;
  698. // let quantum = [];
  699. console.log(values);
  700. },
  701. //选择有兴趣参与的工作
  702. checkjob(item) {
  703. this.taste = item.detail.value.join(',');
  704. },
  705. // 选择专长checkspeciality
  706. checkspeciality(item) {
  707. this.speciali = item.detail.value.join(',');
  708. }
  709. }
  710. };
  711. </script>
  712. <style lang="scss">
  713. page {
  714. background: #f2f2f2;
  715. }
  716. .content {
  717. background: #f2f2f2;
  718. .top {
  719. margin-top: 16rpx;
  720. background: #ffffff;
  721. position: relative;
  722. .title {
  723. height: 106rpx;
  724. text-align: center;
  725. line-height: 106rpx;
  726. border-bottom: 2rpx #acacac dashed;
  727. font-size: 34rpx;
  728. font-family: PingFang SC;
  729. font-weight: 500;
  730. color: #101010;
  731. }
  732. .info-box {
  733. font-size: 24rpx;
  734. font-family: PingFang SC;
  735. font-weight: 500;
  736. color: #666666;
  737. text-indent: 1em;
  738. padding: 37rpx 60rpx 0rpx 36rpx;
  739. text {
  740. color: #101010;
  741. font-family: PingFang-SC-Medium;
  742. font-weight: bold;
  743. }
  744. // border: 3rpx solid #009100;
  745. }
  746. .uni-list {
  747. padding: 26rpx 34rpx 50rpx 35rpx;
  748. // .radio:first-child {
  749. // margin: -6rpx;
  750. // }
  751. .radio {
  752. margin-left: 50rpx;
  753. flex: 1;
  754. align-items: center;
  755. font-size: 24rpx;
  756. font-family: PingFang SC;
  757. font-weight: 500;
  758. color: #191919;
  759. }
  760. .checkbox {
  761. display: inline-block;
  762. font-size: 24rpx;
  763. font-family: PingFang SC;
  764. font-weight: 500;
  765. color: #191919;
  766. }
  767. .box-2 {
  768. display: flex;
  769. justify-content: space-between;
  770. align-items: center;
  771. width: 100%;
  772. margin-top: 8rpx;
  773. // height: 133rpx;
  774. .box-left {
  775. padding-left: 2rpx;
  776. text-align: left;
  777. width: 62rpx;
  778. font-size: 24rpx;
  779. font-family: PingFang SC;
  780. font-weight: 500;
  781. color: #191919;
  782. }
  783. input {
  784. height: 66rpx;
  785. line-height: 66rpx;
  786. // height: 88rpx;
  787. }
  788. .list-input {
  789. padding-left: 22rpx;
  790. // margin: 12rpx 0 ;
  791. font-size: 28rpx;
  792. display: flex;
  793. justify-content: center;
  794. // line-height: 66rpx;
  795. display: flex;
  796. align-items: center;
  797. flex: 1;
  798. color: #000000;
  799. border: 1px solid #d2d2d2;
  800. text-align: left;
  801. .input-placeholder {
  802. height: 70rpx;
  803. color: #959595;
  804. }
  805. }
  806. .box-right {
  807. display: flex;
  808. padding-left: 22rpx;
  809. height: 66rpx;
  810. line-height: 66rpx;
  811. border: 1px solid #d2d2d2;
  812. // margin: 32rpx 36rpx 0 36rpx;
  813. width: 500rpx;
  814. font-size: 28rpx;
  815. color: #959595;
  816. text-align: left !important;
  817. // line-height: 1;
  818. }
  819. }
  820. .font {
  821. margin-top: 22rpx;
  822. font-size: 24rpx;
  823. font-family: PingFang SC;
  824. font-weight: 500;
  825. color: #666666;
  826. }
  827. }
  828. .agree {
  829. display: flex;
  830. align-items: center;
  831. padding: 37rpx 60rpx 40rpx 36rpx;
  832. font-size: 24rpx;
  833. font-family: PingFang SC;
  834. font-weight: 500;
  835. color: #191919;
  836. }
  837. }
  838. .buttomBox {
  839. height: 100rpx;
  840. // padding-bottom: 40rpx;
  841. }
  842. .buttom {
  843. width: 100%;
  844. height: 100rpx;
  845. background: #f3392c;
  846. font-size: 36rpx;
  847. font-weight: 400;
  848. color: #ffffff;
  849. line-height: 100rpx;
  850. text-align: center;
  851. &.action {
  852. background: #999999;
  853. }
  854. }
  855. .box {
  856. margin-top: 16rpx;
  857. width: 100%;
  858. background-color: #ffffff;
  859. border-radius: 10rpx;
  860. padding: 28rpx 20rpx 32rpx 20rpx;
  861. position: relative;
  862. .red-box {
  863. width: 405rpx;
  864. line-height: 66rpx;
  865. text-align: center;
  866. background: linear-gradient(0deg, #c90f1b, #f14d33);
  867. border-radius: 10rpx;
  868. font-size: 30rpx;
  869. font-weight: 500;
  870. color: #ffffff;
  871. // position: relative;
  872. position: absolute;
  873. top: -36rpx;
  874. left: 50%;
  875. transform: translateX(-50%);
  876. z-index: 1;
  877. }
  878. .box-check {
  879. font-size: 28rpx;
  880. font-weight: 500;
  881. color: #666666;
  882. line-height: 100rpx;
  883. }
  884. .upload-box {
  885. width: 100%;
  886. height: 247rpx;
  887. background: #ffffff;
  888. // border: 1px solid #E63931;
  889. border-radius: 27rpx;
  890. display: flex;
  891. flex-direction: column;
  892. padding: 30rpx 40rpx 30rpx 0;
  893. margin: 42rpx auto 30rpx;
  894. .upload-left {
  895. font-weight: 400;
  896. color: #000000;
  897. }
  898. .upload-right {
  899. flex: 1;
  900. display: flex;
  901. align-items: center;
  902. justify-content: center;
  903. .upload-img {
  904. width: 150rpx;
  905. height: 150rpx;
  906. margin-top: 24rpx;
  907. }
  908. }
  909. }
  910. }
  911. .box-1 {
  912. display: flex;
  913. justify-content: space-between;
  914. align-items: center;
  915. width: 100%;
  916. margin-top: 42rpx;
  917. // height: 133rpx;
  918. .box-left {
  919. padding-left: 2rpx;
  920. width: 184rpx;
  921. text-align: left;
  922. font-size: 28rpx;
  923. font-family: PingFang SC;
  924. font-weight: 500;
  925. color: #191919;
  926. }
  927. input {
  928. height: 66rpx;
  929. line-height: 66rpx;
  930. // height: 88rpx;
  931. }
  932. .list-input {
  933. padding-left: 22rpx;
  934. // margin: 12rpx 0 ;
  935. font-size: 28rpx;
  936. // line-height: 66rpx;
  937. display: flex;
  938. align-items: center;
  939. flex: 1;
  940. color: #000000;
  941. width: 500rpx;
  942. border: 1px solid #d2d2d2;
  943. text-align: left;
  944. .input-placeholder {
  945. height: 70rpx;
  946. color: #959595;
  947. }
  948. }
  949. .box-right {
  950. display: flex;
  951. padding-left: 22rpx;
  952. height: 66rpx;
  953. line-height: 66rpx;
  954. border: 1px solid #d2d2d2;
  955. // margin: 32rpx 36rpx 0 36rpx;
  956. width: 500rpx;
  957. font-size: 28rpx;
  958. color: #959595;
  959. text-align: left !important;
  960. // line-height: 1;
  961. }
  962. }
  963. }
  964. .placeholder {
  965. line-height: 66rpx;
  966. }
  967. </style>