index.vue 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016
  1. <template>
  2. <view class="cantent">
  3. <view class="tit-tip">
  4. 基本信息
  5. </view>
  6. <view class="content_box">
  7. <view class="row b-b">
  8. <text class="tit">姓名</text>
  9. <input class="input" type="text" :disabled="disabled" v-model="full_name" placeholder="请填写您的姓名"
  10. placeholder-class="placeholder" />
  11. </view>
  12. <view class="row b-b">
  13. <text class="tit">性别</text>
  14. <picker mode="selector" :range="sexList" @change="changeSex" style="flex-grow: 1;">
  15. <input class="input" type="text" :disabled="disabled" v-model="sex" placeholder="请选择您的性别"
  16. placeholder-class="placeholder" />
  17. </picker>
  18. </view>
  19. </view>
  20. <view class="content_box">
  21. <view class="row b-b">
  22. <text class="tit">政治面貌</text>
  23. <picker mode="selector" :range="checkedList" @change="changeChecked" style="flex-grow: 1;">
  24. <input class="input" disabled v-model="checked" placeholder="请选择政治面貌"
  25. placeholder-class="placeholder" />
  26. </picker>
  27. </view>
  28. <view class="row" @click="selectDatePicker(type)">
  29. <text class="tit">出生日期:</text>
  30. <input class="input" type="text" v-model="birthday" disabled="true" placeholder-class="placeholder" />
  31. <datetime ref='date-time' :type='type' :datestring='dateString' @change='dateTimeChange'>
  32. </datetime>
  33. </view>
  34. <view class="row b-b">
  35. <text class="tit">身份证号</text>
  36. <input class="input" type="text" :disabled="disabled" v-model="id_card" placeholder="请填写身份证号"
  37. placeholder-class="placeholder" />
  38. </view>
  39. <view class="row b-b">
  40. <text class="tit">申请标题</text>
  41. <input class="input" type="text" v-model="title" placeholder="请填写申请标题"
  42. placeholder-class="placeholder" />
  43. </view>
  44. <view class="row b-b">
  45. <text class="tit">帮扶金额</text>
  46. <input class="input" type="number" :disabled="disabled" v-model="amount" placeholder="请填写帮扶金额"
  47. placeholder-class="placeholder" />
  48. </view>
  49. <view class="row b-b">
  50. <text class="tit">家庭住址</text>
  51. <input class="input" v-model="address" :disabled="disabled" placeholder="请填写详细地址"
  52. placeholder-class="placeholder" />
  53. </view>
  54. <view class="row b-b">
  55. <text class="tit">联系电话</text>
  56. <input class="input" type="text" :disabled="disabled" v-model="phone" placeholder="请填写联系电话"
  57. placeholder-class="placeholder" />
  58. </view>
  59. <view class="row b-b">
  60. <text class="tit">工作单位</text>
  61. <input class="input" type="text" :disabled="disabled" v-model="work" placeholder="请填写工作单位"
  62. placeholder-class="placeholder" />
  63. </view>
  64. <view class="row b-b">
  65. <text class="tit">单位性质</text>
  66. <picker mode="selector" :range="checkedtList" @change="changeCheckedt" style="flex-grow: 1;">
  67. <input class="input" disabled v-model="checked1" placeholder="请选择单位性质"
  68. placeholder-class="placeholder" />
  69. </picker>
  70. </view>
  71. </view>
  72. <view class="tit-tip">
  73. 信息选择
  74. </view>
  75. <view class="content_box">
  76. <view class="row b-b">
  77. <text class="tit">身份</text>
  78. <picker mode="selector" :range="identityList" @change="changeidentity" style="flex-grow: 1;">
  79. <input class="input" disabled v-model="identity" placeholder="请选择身份"
  80. placeholder-class="placeholder" />
  81. </picker>
  82. </view>
  83. <view class="row b-b">
  84. <text class="tit">婚姻状态</text>
  85. <picker mode="selector" :range="maritalList" @change="changeMarital" style="flex-grow: 1;">
  86. <input class="input" disabled v-model="marital" placeholder="请选择婚姻状态"
  87. placeholder-class="placeholder" />
  88. </picker>
  89. </view>
  90. <view class="row b-b">
  91. <text class="tit">是否医保</text>
  92. <picker mode="selector" :range="insuranceList" @change="changeInsurance" style="flex-grow: 1;">
  93. <input class="input" disabled v-model="insurance" placeholder="请选择是否医保"
  94. placeholder-class="placeholder" />
  95. </picker>
  96. </view>
  97. <view class="row b-b">
  98. <text class="tit">对象特征</text>
  99. <picker mode="selector" :range="characteristicsList" @change="changeCharacteristics"
  100. style="flex-grow: 1;">
  101. <input class="input" disabled v-model="characteristics" placeholder="请选择对象特征"
  102. placeholder-class="placeholder" />
  103. </picker>
  104. </view>
  105. <view class="row b-b" style="border-bottom: none;">
  106. <text class="tit" style="width: 400rpx;">制困原因(最多选三项)</text>
  107. </view>
  108. <view class="" style="padding-left: 50rpx;border-bottom: 1rpx solid #f8f6f6;" v-if="ready">
  109. <checkbox-group style="display: inline-block;" @change="checkMaleLikes">
  110. <label class="checkbox" v-for="item in maleLikeList" :key="item.name">
  111. <checkbox :checked="item.cheched" color="#E62129"
  112. style="transform:scale(0.6);margin: 0;padding: 0;" :value="item.name" />{{ item.name }}
  113. </label>
  114. </checkbox-group>
  115. </view>
  116. </view>
  117. <!-- 基本信息家庭成员情况 -->
  118. <view class="tit-tip">
  119. 基本信息家庭成员情况
  120. </view>
  121. <view v-for="(ls,findex) in datalist" :key="">
  122. <view class="flex item-list">
  123. <view class="list-name">家庭成员({{findex+1}})</view>
  124. <view class="flex">
  125. <view class="add-tip" @click="addlist(findex)" v-if="findex == (datalist.length -1)">新增</view>
  126. <view class="add-tip" @click="dellist(findex)" style="margin-left: 20rpx;" v-if="findex != 0">删除
  127. </view>
  128. </view>
  129. </view>
  130. <view class="content_box" style="padding-left: 40rpx;margin-bottom: 10rpx;">
  131. <view class="row b-b">
  132. <text class="tit">姓名</text>
  133. <input class="input" type="text" v-model="ls.full_name" :disabled="disabled" placeholder="请填写成员姓名"
  134. placeholder-class="placeholder" />
  135. </view>
  136. <view class="row b-b">
  137. <text class="tit">与本人关系</text>
  138. <input class="input" type="text" v-model="ls.relation" :disabled="disabled" placeholder="请填写与本人关系"
  139. placeholder-class="placeholder" />
  140. </view>
  141. <view class="row b-b">
  142. <text class="tit">身份证号</text>
  143. <input class="input" type="text" v-model="ls.id_card" :disabled="disabled" placeholder="请填写身份证号"
  144. placeholder-class="placeholder" />
  145. </view>
  146. <view class="row b-b">
  147. <text class="tit">工作单位或就读学校</text>
  148. <input class="input" type="text" v-model="ls.work_unit" :disabled="disabled"
  149. placeholder="请填写工作单位或就读学校" placeholder-class="placeholder" />
  150. </view>
  151. <view class="row b-b">
  152. <text class="tit">健康状况</text>
  153. <input class="input" type="text" v-model="ls.healthy" :disabled="disabled" placeholder="请填写健康状况"
  154. placeholder-class="placeholder" />
  155. </view>
  156. <view class="row b-b">
  157. <text class="tit">月收入(元)</text>
  158. <input class="input" type="number" v-model="ls.monthly_income" :disabled="disabled"
  159. placeholder="请填写月收入(元)" placeholder-class="placeholder" />
  160. </view>
  161. </view>
  162. </view>
  163. <!-- 详细情况 -->
  164. <view class="tit-tip">
  165. 详细情况
  166. </view>
  167. <view class="item-list">
  168. <view class="list-name">经济状况</view>
  169. </view>
  170. <view class="content_box">
  171. <view class="row b-b">
  172. <text class="tit">本人月收入(元)</text>
  173. <input class="input" type="number" v-model="yue" :disabled="disabled" placeholder="请填写本人月收入(元)"
  174. placeholder-class="placeholder" />
  175. </view>
  176. <view class="row b-b">
  177. <text class="tit">家庭年度总收入(元)</text>
  178. <input class="input" type="number" v-model="nian" :disabled="disabled" placeholder="请填写家庭年度总收入(元)"
  179. placeholder-class="placeholder" />
  180. </view>
  181. <view class="row b-b">
  182. <text class="tit">家庭年人均收入(元)</text>
  183. <input class="input" type="number" v-model="all" :disabled="disabled" placeholder="请填写家庭年人均收入(元)"
  184. placeholder-class="placeholder" />
  185. </view>
  186. </view>
  187. <view class="content_box">
  188. <view class="examine_list">
  189. <view class="examine_name">申请帮扶类型</view>
  190. <picker mode="selector" :range="hpleTypeList" @change="changehpleType" style="flex-grow: 1;">
  191. <input class="input" v-model="hpleType" type="text" placeholder="请选择您的申请帮扶类型"
  192. placeholder-class="placeholder" style="padding-left: 20rpx;" />
  193. </picker>
  194. </view>
  195. </view>
  196. <lb-picker ref="picker" mode="selector" :list="list" @change="handleChange" @touchmove.prevent
  197. @confirm="handleConfirm" @cancel="handleCancel">
  198. </lb-picker>
  199. <view class="content_box">
  200. <view class="examine_list">
  201. <view class="examine_name">帮扶说明</view>
  202. <view class="textarea-box">
  203. <textarea class="textarea" v-model="info" maxlength="-1" placeholder-style="color:#999999"
  204. placeholder="如:关爱父母敬老爱幼等" auto-height />
  205. </view>
  206. </view>
  207. </view>
  208. <view class="content_box">
  209. <view class="examine_list">
  210. <view class="examine_name">帮扶情况描述</view>
  211. <view class="textarea-box">
  212. <textarea class="textarea" v-model="content" maxlength="-1" placeholder-style="color:#999999"
  213. placeholder="注:1.为了更加详细了解您的困难情况,请您陈述材料完整详细不少于500字。2.请您附上相关证明材料,如医疗材料:入院病案首页、出入院记录、检查报告、医疗票据选取三种以上,其他证明材料。"
  214. auto-height />
  215. </view>
  216. </view>
  217. </view>
  218. <view class="content_box">
  219. <view class="examine_list">
  220. <view class="examine_name">上传申请封面<text></text></view>
  221. <view class="examine_img">
  222. <view class="add-img-box flex_item">
  223. <view class="add-img-item" v-if="userimage">
  224. <image class="add-img" :src="baseURL + userimage" mode="aspectFill">
  225. </image>
  226. <image class="add-img-del" @click.stop="delImgt()" src="/static/img/delete.png"></image>
  227. </view>
  228. <view v-if="userimage == ''" class="add-img-item" @click.stop="scImgt()">
  229. <image class="add-img" src="/static/img/add.png"></image>
  230. </view>
  231. </view>
  232. </view>
  233. </view>
  234. </view>
  235. <view class="content_box mar-b">
  236. <view class="examine_list">
  237. <view class="examine_name">上传凭证<text>(请您上传相关证明材料)</text></view>
  238. <view class="examine_img">
  239. <view class="add-img-box flex_item">
  240. <view class="add-img-item" v-for="(item, index) in imgList">
  241. <image class="add-img" :src="item.fullurl" mode="aspectFill">
  242. </image>
  243. <image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image>
  244. </view>
  245. <view class="add-img-item" @click.stop="scImg()">
  246. <image class="add-img" src="/static/img/add.png"></image>
  247. </view>
  248. </view>
  249. </view>
  250. </view>
  251. </view>
  252. <view class="add-btn" @click="apply()">
  253. 申请帮扶
  254. </view>
  255. </view>
  256. </template>
  257. <script>
  258. import uniList from '@/components/uni-list/uni-list.vue';
  259. import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
  260. import {
  261. upload,
  262. add_help
  263. } from '@/api/index.js';
  264. import {
  265. getList,
  266. helpdetail
  267. } from '@/api/applyHelp.js';
  268. import {
  269. getHelpIfy,
  270. apply
  271. } from '@/api/help.js'
  272. import datetime from '@/components/DateTimePicker/DateTimePicker.vue'
  273. import pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
  274. import LbPicker from '@/components/lb-picker/index.vue';
  275. import {
  276. mapState,
  277. mapMutations
  278. } from 'vuex';
  279. export default {
  280. components: {
  281. uniList,
  282. uniListItem,
  283. pickerAddress,
  284. datetime,
  285. LbPicker
  286. },
  287. computed: {
  288. ...mapState(['baseURL'])
  289. },
  290. data() {
  291. return {
  292. ready: true,
  293. id: '',
  294. full_name: '', //姓名
  295. age: '', //年龄
  296. sex: '', //性别
  297. id_card: '', //身份证号
  298. phone: '', //电话
  299. address: '', //家庭住址
  300. addr: '',
  301. work: '', //工作单位
  302. sexList: ['男', '女'],
  303. checkedList: ['群众', '团员', '党员'], //政治面貌列表
  304. politics: '', //政治面貌
  305. checkedtList: ['国有企业', '私营企业', '外资企业', '事业单位', '个位经营', '无'], //单位性质列表
  306. identityList: ['居民', '村民', '农民工', '在岗', '下岗', '离退休', '病退病休'], //身份列表
  307. maritalList: ['未婚', '已婚'], //婚姻状况列表
  308. insuranceList: ['否', '是'], //是否医保列表
  309. characteristicsList: ['低保对象', '重度残疾', '低保边缘对象', '孤儿、孤寡老人', '因灾、因病致穷家庭', '其它'], //对象特征列表
  310. maleLikeList: [{ //致困原因(最多选三项)
  311. cheched: false,
  312. name: '意外灾害',
  313. }, {
  314. vcheched: false,
  315. name: '本人大病',
  316. }, {
  317. cheched: false,
  318. name: '子女上学',
  319. }, {
  320. cheched: false,
  321. name: '收入低无法维持基本生活',
  322. }, {
  323. cheched: false,
  324. name: '残疾',
  325. }, {
  326. cheched: false,
  327. name: '供养直系亲属大病',
  328. }, {
  329. cheched: false,
  330. name: '下岗失业',
  331. }, {
  332. cheched: false,
  333. name: '其它',
  334. }],
  335. datalist: [{
  336. full_name: "", //姓名
  337. relation: '', //关系
  338. id_card: '', //身份证
  339. work_unit: '', //单位
  340. healthy: '', //健康状态
  341. monthly_income: "", //月收入
  342. }], //家庭成员情况列表
  343. maleLike: '', // 制困原因
  344. maleLikeListt: [],
  345. characteristics: '', //对象特征
  346. insurance: '', //是否医保
  347. marital: '', //婚姻状况
  348. identity: '', //身份
  349. current: '',
  350. checked: '',
  351. current1: '',
  352. checked1: '',
  353. dateString: '',
  354. birthday: '请选择出生日期', //出生日期
  355. type: 'date',
  356. status: '', //审核通过
  357. disabled: false,
  358. yue: '',
  359. nian: '',
  360. all: '',
  361. cid: '',
  362. hpleType: '',
  363. hpleTypeList: [], //帮扶分类列表
  364. hpleTypeFullList: [], //帮扶分类完整列表
  365. explain: '',
  366. content: '', //孝善情况
  367. imgList: [],
  368. cloudimgList: [],
  369. imgCount: 9, //最多支持6张上传,可以修改
  370. id: '',
  371. list: [], //筹款类型
  372. hpleTypeid: '', //帮扶分类id
  373. title: '', //标题
  374. info: '',
  375. amount: '', //帮扶金额
  376. userimage: '', //封面
  377. };
  378. },
  379. onLoad(option) {
  380. if (option.id) {
  381. this.id = option.id;
  382. this.helpDetail();
  383. }
  384. if (option.status) {
  385. this.status = option.status;
  386. this.disabled = true;
  387. }
  388. this.getHelpIfy()
  389. },
  390. onUnload() {
  391. uni.navigateTo({
  392. url: '/pages/applyHelp/cation'
  393. });
  394. },
  395. methods: {
  396. changehpleType(e) {
  397. this.hpleType = this.hpleTypeList[e.detail.value]
  398. this.hpleTypeid = this.hpleTypeFullList[e.detail.value].id
  399. },
  400. getHelpIfy() {
  401. getHelpIfy().then(({
  402. data
  403. }) => {
  404. this.hpleTypeFullList = data
  405. data.forEach(item => {
  406. this.hpleTypeList.push(item.name)
  407. })
  408. })
  409. },
  410. // 选择政治面貌
  411. changeChecked(e) {
  412. console.log(e)
  413. this.checked = this.checkedList[e.detail.value]
  414. },
  415. // 选择单位性质
  416. changeCheckedt(e) {
  417. console.log(e)
  418. this.checked1 = this.checkedtList[e.detail.value]
  419. },
  420. // 选择身份
  421. changeidentity(e) {
  422. console.log(e)
  423. this.identity = this.identityList[e.detail.value]
  424. },
  425. // 选择婚姻状态
  426. changeMarital(e) {
  427. this.marital = this.maritalList[e.detail.value]
  428. },
  429. // 选择是否医保
  430. changeInsurance(e) {
  431. this.insurance = this.insuranceList[e.detail.value]
  432. },
  433. // 选择对象特征
  434. changeCharacteristics(e) {
  435. this.characteristics = this.characteristicsList[e.detail.value]
  436. },
  437. changeSex(e) {
  438. this.sex = this.sexList[e.detail.value]
  439. },
  440. // 制困原因选择限制
  441. checkMaleLikes(e) {
  442. let arr = e.detail.value
  443. let len = arr.length
  444. let obj = this
  445. console.log(e)
  446. if (len <= 3) {
  447. obj.maleLike = e.detail.value.join(',');
  448. this.maleLikeListt = e.detail.value
  449. } else {
  450. obj.$api.msg('最多选择三个')
  451. // let arr2 = e.detail.value.slice(0, 3)
  452. // console.log(arr2, 'arr2')
  453. obj.maleLike = this.maleLikeListt.join(',');
  454. }
  455. for (let i = 0; i < obj.maleLikeList.length; i++) {
  456. if (obj.maleLike.indexOf(obj.maleLikeList[i].name) != -1) {
  457. obj.maleLikeList[i].cheched = true;
  458. } else {
  459. obj.maleLikeList[i].cheched = false;
  460. }
  461. }
  462. console.log(obj.maleLike, 'obj.maleLike++++++++')
  463. obj.reload()
  464. },
  465. // 表单刷新
  466. reload() {
  467. this.ready = false
  468. this.$nextTick(function() {
  469. this.ready = true
  470. })
  471. },
  472. //增加家庭成员
  473. addlist(index) {
  474. let obj = this
  475. let addobj = {
  476. full_name: "", //姓名
  477. relation: '', //关系
  478. id_card: '', //身份证
  479. work_unit: '', //单位
  480. healthy: '', //健康状态
  481. monthly_income: "", //月收入
  482. }
  483. obj.datalist.push(addobj)
  484. },
  485. // 删除成员
  486. dellist(index) {
  487. this.datalist.splice(index, 1)
  488. },
  489. //多张上传图片
  490. scImg() {
  491. let obj = this;
  492. upload({
  493. file: ''
  494. })
  495. .then(e => {
  496. obj.imgList = [...obj.imgList, ...e];
  497. console.log(obj.imgList, 'imgList')
  498. obj.imgCount = 6 - obj.imgList.length;
  499. })
  500. .catch(e => {});
  501. },
  502. // 上传封面
  503. scImgt() {
  504. let obj = this;
  505. upload({
  506. file: ''
  507. })
  508. .then(e => {
  509. console.log(e)
  510. obj.userimage = e[0].url
  511. console.log(obj.userimage, e.url, 'obj.userimage')
  512. })
  513. .catch(e => {});
  514. },
  515. //点击图片显示大图
  516. imgInfo(i) {
  517. let tempList = [];
  518. this.imgList.forEach(e => {
  519. tempList.push(e.url);
  520. });
  521. //显示图片
  522. uni.previewImage({
  523. current: i,
  524. loop: false,
  525. urls: tempList,
  526. indicator: 'default'
  527. });
  528. },
  529. // 删除图片
  530. delImg(i) {
  531. uni.showModal({
  532. content: '确定删除这张吗',
  533. success: res => {
  534. if (res.confirm) {
  535. this.imgList.splice(i, 1);
  536. this.imgCount++;
  537. } else if (res.cancel) {}
  538. }
  539. });
  540. },
  541. delImgt() {
  542. uni.showModal({
  543. content: '确定删除这张吗',
  544. success: res => {
  545. if (res.confirm) {
  546. this.userimage = '';
  547. } else if (res.cancel) {}
  548. }
  549. });
  550. },
  551. // 显示日期选择器
  552. selectDatePicker(type, index) {
  553. this.type = type;
  554. this.index = index;
  555. this.$refs['date-time'].show();
  556. },
  557. dateTimeChange(value) {
  558. this.birthday = value;
  559. console.log(value)
  560. },
  561. // 选中城市切换
  562. onCityClick(res) {
  563. let obj = this;
  564. let province = res.data[0];
  565. let city = res.data[1];
  566. let district = res.data[2];
  567. obj.address = province + city + district;
  568. console.log(obj.address, '城市');
  569. },
  570. // 提交申请
  571. apply() {
  572. let obj = this
  573. if (obj.hpleTypeid == '') {
  574. return obj.$api.msg('请选择帮扶类型')
  575. }
  576. if (obj.full_name == '') {
  577. return obj.$api.msg('请输入姓名')
  578. }
  579. if (obj.phone == '') {
  580. return obj.$api.msg('请输入联系方式')
  581. }
  582. if (obj.id_card == '') {
  583. return obj.$api.msg('请输入身份证')
  584. }
  585. if (obj.title == '') {
  586. return obj.$api.msg('请输入申请标题')
  587. }
  588. if (obj.info == '') {
  589. return obj.$api.msg('请输入申请简介')
  590. }
  591. if (obj.sex == '') {
  592. return obj.$api.msg('请选择您的性别')
  593. }
  594. if (obj.politics == '') {
  595. return obj.$api.msg('请选择您的政治面貌')
  596. }
  597. if (obj.birthday == '') {
  598. return obj.$api.msg('请选择您的出生日期')
  599. }
  600. if (obj.address == '') {
  601. return obj.$api.msg('请填写您的详细地址')
  602. }
  603. if (obj.company == '') {
  604. return obj.$api.msg('请填写您的工作单位')
  605. }
  606. if (obj.unit_nature == '') {
  607. return obj.$api.msg('请填写您的单位性质')
  608. }
  609. if (obj.yue == '') {
  610. return obj.$api.msg('请填写您的月收入')
  611. }
  612. if (obj.nian == '') {
  613. return obj.$api.msg('请填写您的家庭年收入')
  614. }
  615. if (obj.all == '') {
  616. return obj.$api.msg('请填写您的家庭年人均收入')
  617. }
  618. if (obj.identity == '') {
  619. return obj.$api.msg('请填写您的身份')
  620. }
  621. if (obj.marital == '') {
  622. return obj.$api.msg('请选择您的婚姻状况')
  623. }
  624. if (obj.insurance == '') {
  625. return obj.$api.msg('请选择您的医保情况')
  626. }
  627. if (obj.characteristics == '') {
  628. return obj.$api.msg('请选择您的对象特征')
  629. }
  630. if (obj.maleLike == '') {
  631. return obj.$api.msg('请选择您的制困原因')
  632. }
  633. let ok = 0
  634. for (let i = 0; i < obj.datalist.length; i++) {
  635. if (obj.datalist[i].full_name != '' && obj.datalist[i].relation != '' && obj.datalist[i].id_card != '' &&
  636. obj.datalist[i].work_unit != '' && obj.datalist[i].healthy != '' && obj.datalist[i].monthly_income != '') {
  637. ok = 1;
  638. }else {
  639. ok = 0
  640. }
  641. }
  642. if(ok == 0) {
  643. return obj.$api.msg('请请填写完整的家庭成员信息')
  644. }
  645. apply({
  646. category_id: obj.hpleTypeid, //帮扶类型
  647. full_name: obj.full_name,
  648. contact: obj.phone,
  649. id_card: obj.id_card,
  650. title: obj.title,
  651. info: obj.info,
  652. sex: obj.sex == '男' ? '0' : '1',
  653. politics: obj.checkedList.indexOf(obj.checked) + '',
  654. birthday: obj.birthday,
  655. address: obj.address,
  656. company: obj.work,
  657. unit_nature: obj.checked1,
  658. monthly_income: obj.yue, //本人月收入
  659. annual_household_income: obj.nian, //家庭年收入
  660. annual_household_income_average: obj.all, //家庭年人均收入
  661. identity: obj.identity, //身份
  662. marriage: obj.maritalList.indexOf(obj.marital), //婚姻状况:0=未婚,1=已婚
  663. medical_insurance: obj.insuranceList.indexOf(obj.insurance), //是否医保:0=否,1=是
  664. object_features: obj.characteristics, //对象特征
  665. reason: obj.maleLike, // 制困原因
  666. family: obj.datalist //家庭成员
  667. }).then(({
  668. data
  669. }) => {
  670. console.log(data)
  671. uni.showToast({
  672. title: '提交成功',
  673. duration: 2000
  674. });
  675. setTimeout(function(){
  676. uni.navigateTo({
  677. url:'/pages/applyHelp/cation'
  678. })
  679. }, 2000);
  680. })
  681. },
  682. //申请详情
  683. helpDetail() {
  684. let obj = this;
  685. helpdetail({
  686. id: obj.id
  687. }).then(({
  688. data
  689. }) => {
  690. obj.name = data.name;
  691. obj.sex = data.sex;
  692. obj.card = data.card;
  693. obj.phone = data.phone;
  694. obj.work = data.work;
  695. obj.birthday = data.birthday;
  696. obj.age = data.age;
  697. console.log(data.address)
  698. let addressDateil = data.address.split(',');
  699. console.log(addressDateil)
  700. obj.address = addressDateil[0];
  701. obj.addr = addressDateil[1];
  702. obj.checked = data.politic;
  703. if (obj.checked == '团员') {
  704. obj.current = 0;
  705. }
  706. if (obj.checked == '预备党员') {
  707. obj.current = 1;
  708. }
  709. if (obj.checked == '党员') {
  710. obj.current = 2;
  711. }
  712. if (obj.checked == '群众') {
  713. obj.current = 3;
  714. }
  715. obj.checked1 = data.properties;
  716. if (obj.checked1 == '国有企业') {
  717. obj.current1 = 0;
  718. }
  719. if (obj.checked1 == '私营企业') {
  720. obj.current1 = 1;
  721. }
  722. if (obj.checked1 == '外资企业') {
  723. obj.current1 = 2;
  724. }
  725. if (obj.checked1 == '事业单位') {
  726. obj.current1 = 3;
  727. }
  728. if (obj.checked1 == '个位经营') {
  729. obj.current1 = 4;
  730. }
  731. if (obj.checked1 == '无') {
  732. obj.current1 = 5;
  733. }
  734. })
  735. .catch(err => {
  736. console.log(err);
  737. });
  738. },
  739. navTo(url) {
  740. uni.navigateTo({
  741. url
  742. });
  743. }
  744. }
  745. };
  746. </script>
  747. <style lang="scss">
  748. page {
  749. background: $page-color-base;
  750. min-height: 100%;
  751. }
  752. .cantent {
  753. padding-bottom: 110rpx;
  754. }
  755. .tip {
  756. color: #DE2412;
  757. background-color: #FEE2E3;
  758. font-size: 24rpx;
  759. padding: 25rpx 35rpx;
  760. }
  761. .til-list {
  762. padding: 35rpx 50rpx;
  763. font-size: 28rpx;
  764. color: #666666;
  765. .red {
  766. color: #E62129 !important;
  767. }
  768. }
  769. .name {
  770. padding: 0rpx 35rpx;
  771. padding-bottom: 15rpx !important;
  772. font-size: 36rpx;
  773. font-weight: 500;
  774. }
  775. .content_box {
  776. background-color: #ffffff;
  777. padding: 0rpx 25rpx;
  778. .list-name {
  779. padding-top: 25rpx;
  780. font-size: 35rpx;
  781. padding-left: 15rpx;
  782. padding-bottom: 10rpx;
  783. }
  784. .examine_list {
  785. width: 100%;
  786. .textarea-box {
  787. width: 100%;
  788. padding-bottom: 25rpx;
  789. padding-left: 25rpx;
  790. .textarea {
  791. width: 100%;
  792. font-size: 28rpx;
  793. min-height: 150rpx;
  794. }
  795. input {
  796. font-size: 28rpx;
  797. }
  798. }
  799. }
  800. }
  801. .radio-list {
  802. display: flex;
  803. flex-wrap: wrap;
  804. font-size: 28rpx;
  805. padding-top: 30rpx;
  806. .uni-label-pointer {
  807. padding-right: 25rpx;
  808. padding-bottom: 30rpx;
  809. }
  810. }
  811. .mar-b {
  812. margin-bottom: 120rpx;
  813. }
  814. .row {
  815. display: flex;
  816. align-items: center;
  817. // position: relative;
  818. padding: 0 30rpx;
  819. height: 110rpx;
  820. background: #fff;
  821. border-bottom: 1rpx solid #f8f6f6;
  822. .tit {
  823. flex-shrink: 0;
  824. width: 180rpx;
  825. font-size: 30rpx;
  826. color: $font-color-dark;
  827. }
  828. .value {
  829. width: 100%;
  830. text-align: right;
  831. }
  832. .input {
  833. flex: 1;
  834. font-size: 30rpx;
  835. color: $font-color-dark;
  836. text-align: right;
  837. }
  838. .iconlocation {
  839. font-size: 36rpx;
  840. color: $font-color-light;
  841. }
  842. }
  843. .examine_name {
  844. color: #171717;
  845. font-size: 28rpx;
  846. padding: 25rpx 25rpx;
  847. }
  848. .examine_img {
  849. width: 100%;
  850. text-align: center;
  851. .image {
  852. width: 150rpx;
  853. height: 150rpx;
  854. }
  855. .image1 {
  856. min-width: 150rpx;
  857. max-width: 100%;
  858. min-height: 150rpx;
  859. }
  860. }
  861. .add-img-box {
  862. width: 100%;
  863. flex-direction: row;
  864. flex-wrap: wrap;
  865. margin-top: 50rpx;
  866. }
  867. .add-img-item {
  868. margin-bottom: 25rpx;
  869. width: 100%;
  870. .add-img {
  871. min-width: 150rpx;
  872. max-width: 100%;
  873. height: 400rpx;
  874. }
  875. }
  876. .add-img-del {
  877. position: absolute;
  878. width: 40rpx;
  879. height: 40rpx;
  880. right: 60rpx;
  881. // bottom: 155rpx;
  882. //background-color: rgba(238, 0, 0, 1);
  883. border-radius: 20rpx;
  884. }
  885. .default-row {
  886. margin-top: 16rpx;
  887. .tit {
  888. flex: 1;
  889. }
  890. switch {
  891. transform: translateX(16rpx) scale(0.9);
  892. }
  893. }
  894. .add-btn {
  895. // position: fixed;
  896. // bottom: 0rpx;
  897. // left: 0rpx;
  898. width: 600rpx;
  899. border-radius: 50rpx;
  900. margin: auto;
  901. height: 100rpx;
  902. font-size: 28rpx;
  903. color: #FFFFFF;
  904. background-color: #FF727E;
  905. line-height: 100rpx;
  906. text-align: center;
  907. }
  908. .img_box {
  909. padding: 35rpx 35rpx;
  910. width: 250rpx;
  911. height: 250rpx;
  912. }
  913. .img_box image {
  914. width: 100%;
  915. height: 100%;
  916. }
  917. .alert-box {
  918. background-color: #ffffff;
  919. }
  920. .b-b:after {
  921. position: relative !important;
  922. }
  923. .check_box {
  924. padding: 25rpx 25rpx;
  925. font-size: 20rpx;
  926. padding-bottom: 150rpx;
  927. text {
  928. color: #6786FB;
  929. }
  930. }
  931. .tit-tip {
  932. color: #ff727e;
  933. font-size: 36rpx;
  934. padding: 10rpx 0 10rpx 20rpx;
  935. }
  936. .checkbox {
  937. display: inline-block;
  938. font-size: 24rpx;
  939. font-family: PingFang SC;
  940. font-weight: 500;
  941. color: #191919;
  942. padding-right: 30rpx;
  943. padding-bottom: 10rpx;
  944. }
  945. .item-list {
  946. padding: 25rpx 45rpx;
  947. color: rgba(34, 34, 34, 1);
  948. font-weight: 400;
  949. font-size: 35rpx;
  950. display: flex;
  951. justify-content: space-between;
  952. background-color: #fff;
  953. .list-name {}
  954. .add-tip {
  955. color: #E62129 !important;
  956. }
  957. }
  958. .add-img-item {
  959. margin-bottom: 25rpx;
  960. width: 33.33%;
  961. position: relative;
  962. .add-img {
  963. padding: 0rpx 10rpx;
  964. width: 100%;
  965. height: 214rpx;
  966. }
  967. }
  968. </style>