移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

familyMemberDetail.vue 20 KiB

преди 2 години
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. <template>
  2. <div class="app-container">
  3. <!-- <van-nav-bar-->
  4. <!-- left-arrow-->
  5. <!-- fixed-->
  6. <!-- placeholder-->
  7. <!-- @click-left="$router.back(-1)"-->
  8. <!-- >-->
  9. <!-- <template #title>-->
  10. <!-- <p style="font-weight: bold;">有偿退出</p>-->
  11. <!-- </template>-->
  12. <!-- </van-nav-bar>-->
  13. <div class="header_main">
  14. 家庭成员详细信息
  15. <div class="return_btn" @click="onClickLeft"></div>
  16. <!-- <div class="add_btn" @click="goAdd"></div>-->
  17. </div>
  18. <div class="main_box">
  19. <!-- <van-field v-model="circulation.sqrxm" label="申请人姓名" placeholder="申请人姓名" input-align="right" label-width="auto" :rules="[{ required: true }]" required/>-->
  20. <van-field readonly v-model="circulation.memberName" label="姓名" placeholder="姓名" input-align="right" label-width="auto" />
  21. <!-- <van-field-->
  22. <!-- readonly-->
  23. <!-- clickable-->
  24. <!-- v-model="circulation.zjddm"-->
  25. <!-- label="宅基地代码"-->
  26. <!-- placeholder="请选择"-->
  27. <!-- @click="remoteProposerMethod"-->
  28. <!-- input-align="right"-->
  29. <!-- right-icon="arrow-down" :rules="[{ required: true }]" required-->
  30. <!-- />-->
  31. <!-- <van-popup v-model="showzjddm" position="bottom">-->
  32. <!-- <van-picker-->
  33. <!-- show-toolbar-->
  34. <!-- :columns="zjdDictionaries"-->
  35. <!-- value-key="zjddm"-->
  36. <!-- @confirm="onConfirmZjddm"-->
  37. <!-- @cancel="showzjddm = false"-->
  38. <!-- />-->
  39. <!-- </van-popup>-->
  40. <field-select
  41. readonly
  42. v-model="circulation.sex"
  43. label="性別"
  44. value-key="dictLabel"
  45. data-key="dictValue"
  46. placeholder="选择现状"
  47. remote-url="/system/dict/data/type/sys_user_sex"
  48. :on-remote-response="'data'"
  49. />
  50. <van-field readonly v-model="circulation.age" label="年龄" placeholder="年龄" input-align="right" label-width="auto" />
  51. <van-field readonly v-model="circulation.idcard" label="证件号码" placeholder="证件号码" input-align="right" label-width="auto" />
  52. <van-field readonly v-model="circulation.phone" label="联系电话" placeholder="联系电话" input-align="right" label-width="auto"/>
  53. <van-field readonly v-model="circulation.householdRegister" label="户籍" placeholder="户籍" input-align="right" label-width="auto"/>
  54. <field-select
  55. readonly
  56. v-model="circulation.nationality"
  57. label="民族"
  58. value-key="dictLabel"
  59. data-key="dictValue"
  60. placeholder="选择现状"
  61. remote-url="/system/dict/data/type/nationality"
  62. :on-remote-response="'data'"
  63. />
  64. <field-select
  65. readonly
  66. v-model="circulation.politicCountenance"
  67. label="政治面貌"
  68. value-key="dictLabel"
  69. data-key="dictValue"
  70. placeholder="选择政治面貌"
  71. remote-url="/system/dict/data/type/politic_countenance"
  72. :on-remote-response="'data'"
  73. />
  74. <field-select
  75. readonly
  76. v-model="circulation.education"
  77. label="学历"
  78. value-key="dictLabel"
  79. data-key="dictValue"
  80. placeholder="选择学历"
  81. remote-url="/system/dict/data/type/education"
  82. :on-remote-response="'data'"
  83. />
  84. <field-select
  85. readonly
  86. v-model="circulation.accountType"
  87. label="户口类型"
  88. value-key="dictLabel"
  89. data-key="dictValue"
  90. placeholder="选择户口类型"
  91. remote-url="/system/dict/data/type/account_type"
  92. :on-remote-response="'data'"
  93. />
  94. <van-field name="radio" label="是否贫困户" input-align="right" autocomplete="off">
  95. <template #input>
  96. <van-radio-group v-model="circulation.sfpkh" direction="horizontal">
  97. <van-radio name="1">是</van-radio>
  98. <van-radio name="0">否</van-radio>
  99. </van-radio-group>
  100. </template>
  101. </van-field>
  102. <van-field name="radio" label="是否五保户" input-align="right" autocomplete="off">
  103. <template #input>
  104. <van-radio-group v-model="circulation.sfwbh" direction="horizontal">
  105. <van-radio name="1">是</van-radio>
  106. <van-radio name="0">否</van-radio>
  107. </van-radio-group>
  108. </template>
  109. </van-field>
  110. <field-select
  111. readonly
  112. v-model="circulation.isCooperative"
  113. label="社员"
  114. value-key="dictLabel"
  115. data-key="dictValue"
  116. placeholder="社员"
  117. remote-url="/system/dict/data/type/sys_yes_no"
  118. :on-remote-response="'data'"
  119. />
  120. <field-select
  121. readonly
  122. v-model="circulation.isMember"
  123. label="股民"
  124. value-key="dictLabel"
  125. data-key="dictValue"
  126. placeholder="股民"
  127. remote-url="/system/dict/data/type/house_yes_no"
  128. :on-remote-response="'data'"
  129. />
  130. </div>
  131. <!-- 审批 -->
  132. <div style="padding: 16px 0;">
  133. <van-row>
  134. <van-row>
  135. <van-col span="24" align="center">
  136. <van-button type="info" native-type="submit" class="submitButton" @click="goBack">返<i style="margin-right: 1em;"></i>回</van-button>
  137. </van-col>
  138. </van-row>
  139. </van-row>
  140. <div class="clear"></div>
  141. </div>
  142. </div>
  143. </template>
  144. <script>
  145. import { getFamilyMember} from "@/api/sunVillage_info/homestead/familyMember";
  146. import FieldSelect from "@/components/form/FieldSelect";
  147. import FieldDatePicker from "@/components/form/FieldDatePicker";
  148. import {formatDate} from "element-ui/src/utils/date-util.js";
  149. import {Notify} from "vant";
  150. import request from '@/utils/request';
  151. const PROPOSER_VIEW = 1;
  152. // 工作流名称
  153. const PROPOSER_STAGE_BASE_APPLY_ACTIVITY = 'home_usetc';
  154. // 附件表名
  155. const PROPOSER_STAGE_BASE_APPLY_TABLE = 't_homeuse_zyyctc';
  156. // 其他
  157. const PROPOSER_MODULE = 'home';
  158. export default {
  159. name: "familyMemberDetail",
  160. components: {FieldSelect,FieldDatePicker },
  161. data() {
  162. return {
  163. tcqllxDictionaries:[],//退出权利类型
  164. tclxDictionaries:[],//退出类型
  165. tcfsDictionaries:[],//退出方式
  166. xbDictionaries:[],//申请人证件类型
  167. zjlxDictionaries:[],
  168. bcfsDictionaries:[],//补偿方式
  169. zjdDictionaries:[],//宅基地代码
  170. getObligeeOptions:[],//下拉框列表
  171. tcqllx:'',
  172. tclx:'',
  173. tcfs:'',
  174. xb:'',
  175. bcfs:'',
  176. zjddm:'',
  177. landStatus:"1",
  178. nickName:this.$route.query.nickName,
  179. electronicSignature:this.$route.query.electronicSignature,
  180. showtcqllx: false,
  181. showtclx: false,
  182. showtcfs: false,
  183. showxb: false,
  184. showbcfs: false,
  185. showzjddm: false,
  186. showZjsp: false,
  187. showCjt:false,
  188. cjtspOperation:false,
  189. showDropList: false,//是否显示下拉框
  190. mapShow: false,
  191. attachmentVisible:false,
  192. // 家庭成员tab
  193. familyMembersActive: 0,
  194. active: 0,
  195. // 表单意图
  196. proposerStatus: PROPOSER_VIEW,
  197. circulation:{},
  198. // 当前附件tab
  199. attachmentActive: 0,
  200. // 申请附件树
  201. houseApplyUploadComp: {
  202. businessType: PROPOSER_MODULE,
  203. proposerId: this.$route.query.id,
  204. homeApplyStatus: "11",
  205. processKey: PROPOSER_STAGE_BASE_APPLY_ACTIVITY,
  206. tableName: PROPOSER_STAGE_BASE_APPLY_TABLE,
  207. attachmentList: [],
  208. readonly: true,
  209. full: false,
  210. },
  211. approval: {
  212. taskId: null,
  213. instanceId: null,
  214. type: null,
  215. id: null,
  216. comment: '',
  217. },
  218. };
  219. },
  220. created() {
  221. this.approval.id = this.$route.query.id;
  222. this.approval.instanceId = this.$route.query.instanceId;
  223. this.approval.type = this.$route.query.type;
  224. this.approval.taskId = this.$route.query.taskId;
  225. this.getDetail();
  226. },
  227. methods: {
  228. // 获取日期, yyyy-MM-dd
  229. getDate(d) {
  230. return formatDate(d ? d : new Date(), 'yyyy-MM-dd');
  231. },
  232. getDetail(){
  233. getFamilyMember(this.$route.query.id).then(response => {
  234. this.circulation = response.data;
  235. let res = this.parseIDCard( response.data.idcard);
  236. if(res)
  237. {
  238. this.$set(this.circulation, 'age', res[1]);
  239. }
  240. //退出权利类型
  241. this.houseGetDicts("tcqllx").then((res) => {
  242. for (var i = 0; i < res.data.length; i++) {
  243. this.tcqllxDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  244. }
  245. this.tcqllx = this.selectDictLabel(res.data, response.data.tcqllx);
  246. });
  247. //退出方式
  248. this.houseGetDicts("tcfs").then((res) => {
  249. for (var i = 0; i < res.data.length; i++) {
  250. this.tcfsDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  251. }
  252. this.tcfs = this.selectDictLabel(res.data, response.data.tcfs);
  253. });
  254. //审核状态
  255. this.houseGetDicts("audit_status").then((res) => {
  256. this.circulation.auditStatus = this.selectDictLabel(res.data, response.data.auditStatus);
  257. });
  258. });
  259. },
  260. parseIDCard(idcard) {
  261. if(!idcard)
  262. return false;
  263. if(idcard.length !== 18)
  264. return false;
  265. if(!/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(idcard))
  266. return false;
  267. let sex = (parseInt(idcard.substr(16, 1)) % 2) ^ 1;
  268. let now = new Date().getFullYear();
  269. let y = parseInt(idcard.substr(6, 4));
  270. let age = Math.max(now - y, 0);
  271. return [sex, age];
  272. },
  273. updateMemberInfo(index) {
  274. let res = this.parseIDCard(this.circulation.jtcyqkList[index].sfzh);
  275. if(res)
  276. {
  277. this.$set(this.circulation.jtcyqkList[index], 'nl', res[1]);
  278. }
  279. },
  280. updateMemberInfoGy(index) {
  281. let res = this.parseIDCard(this.circulation.gyrqkList[index].sfzh);
  282. if(res)
  283. {
  284. this.$set(this.circulation.gyrqkList[index], 'nl', res[1]);
  285. }
  286. },
  287. remoteProposerMethod() {
  288. this.showzjddm = true;
  289. this.zjdDictionaries = [];
  290. if (this.circulation.sqrxm) {
  291. getShyqrs({shyqrdbxm:this.circulation.sqrxm}).then(response => {
  292. this.zjdDictionaries = response.data.map(item => {
  293. return {
  294. zjddm: item.zjddm,
  295. shyqrdbxm: item.shyqrdbxm,
  296. shyqrdbzjlx: item.shyqrdbzjlx,
  297. shyqrdbzjhm: item.shyqrdbzjhm
  298. }
  299. });
  300. });
  301. } else {
  302. this.zjdDictionaries = [];
  303. }
  304. },
  305. /** 模糊查询人员信息 */
  306. remoteTransfereeMethod(query) {
  307. if (query !== "") {
  308. getShyqrs({shyqrdbxm:query,status:1}).then((response) => {
  309. if (response.code == 200) {
  310. this.getObligeeOptions = response.rows.map(function (item) {
  311. return {
  312. sqrxm:item.shyqrdbxm,
  313. sqrxb:item.xb,
  314. sqrzjhm:item.shyqrdbzjhm,
  315. sqrzjlx:item.shyqrdbzjlx,
  316. sqrdh:item.dh,
  317. gyfs:item.gyfs,
  318. dz:item.dz,
  319. deptId:item.deptId,
  320. deptName:item.deptName,
  321. }
  322. })
  323. //设置模糊查询的下拉框和滚动条
  324. if (this.getObligeeOptions.length > 0) {
  325. this.showDropList = true; // div显示会阻挡下边的选择框和输入框,showDropList控制下拉框是否显示
  326. //设置模糊查询的和滚动条
  327. this.$nextTick(() => {
  328. if (this.getObligeeOptions.length > 4) {
  329. let height = document.getElementById("vanCell").offsetHeight * 4;
  330. document.getElementById("dropList").style.height = height + "px";
  331. document.getElementById("dropList").style.overflow = "scroll";
  332. } else {
  333. document.getElementById("dropList").style.height = "";
  334. document.getElementById("dropList").style.overflow = "visible";
  335. }
  336. });
  337. } else {
  338. this.showDropList = false;
  339. }
  340. }
  341. });
  342. } else {
  343. this.getObligeeOptions = [];
  344. this.showDropList = false;
  345. }
  346. },
  347. shyqrdmxmChange(val){
  348. console.info(val);
  349. this.$set(this.circulation, "sqrxm", val.sqrxm);
  350. this.$set(this.circulation, "deptId", val.deptId);
  351. this.$set(this.circulation, "deptName", val.deptId);
  352. this.$set(this.circulation, "sqrzjhm", val.sqrzjhm);
  353. this.$set(this.circulation, "sqrzjlx", val.sqrzjlx);
  354. this.$set(this.circulation, "gyqk", val.gyfs);
  355. this.$set(this.circulation, "xb", val.sqrxb);
  356. this.$set(this.circulation, "lxdh", val.sqrdh);
  357. this.$set(this.circulation, "hkszd", val.dz);
  358. this.getObligeeOptions=[];
  359. this.showDropList = false;
  360. },
  361. /** 查找地图中宅基地 */
  362. closeMoule: function (data) {
  363. this.circulation.zjddm = data;
  364. let _this = this;
  365. let handlerTime = this.getDate();
  366. this.$set(this.circulation, "sqrq", handlerTime);
  367. this.$set(this.circulation, "pzrq", handlerTime);
  368. this.$set(this.circulation, "barq", handlerTime);
  369. getByLyZjddm(data).then((response) => {
  370. this.$set(this.circulation, "ntcmj", response.data.zdmj);
  371. this.$set(this.circulation, "tcmj", response.data.zdmj);
  372. this.$set(this.circulation, "zjdszd", response.data.zdszd);
  373. this.$set(this.circulation, "zjdszn", response.data.zdszn);
  374. this.$set(this.circulation, "zjdszx", response.data.zdszx);
  375. this.$set(this.circulation, "zjdszb", response.data.zdszb);
  376. this.$set(this.circulation, "theGeomJson", response.data.theGeomJson);
  377. this.$set(this.circulation, "tcqszsh", response.data.zsh);
  378. listHomesteadnmfw({zjddm: data}).then((response) => {
  379. response.rows.map(function(item){
  380. _this.$set(_this.circulation, "jzmj", Number(_this.circulation.jzmj) + Number(item.jzmj));
  381. _this.$set(_this.circulation, "xjzmj", Number(_this.circulation.xjzmj) + Number(item.jzmj));
  382. });
  383. });
  384. // const baseImgUrl = this.$store.getters.baseRoutingUrl;
  385. if(response.rows[0].zdt != null && response.rows[0].zdt !== ""){
  386. this.$set(this.form, "xzzp", response.rows[0].zdt);
  387. }
  388. });
  389. },
  390. mapLook(){
  391. this.mapShow = true;
  392. setTimeout(() => {
  393. this.$refs.zjdProductResh.drawingLyPaceCountryDarw();
  394. },1000);
  395. },
  396. // 打开附件树
  397. openAttachment() {
  398. this.attachmentVisible = true;
  399. if(this.attachmentActive == this.active)
  400. this.$nextTick(() => {
  401. this.$refs.attachmentDialog.scrollTo(this.active);
  402. });
  403. },
  404. //返回上一步操作
  405. goBack(){
  406. this.$router.push({name: this.$router.back(-1)});
  407. },
  408. complete(pass) {
  409. if(this.circulation.auditStatus === "1" || this.circulation.auditStatus === "2"){
  410. this.approval.comment = this.circulation.cjzzscyj;
  411. }else{
  412. this.approval.comment = this.circulation.xzzfshpzyj;
  413. }
  414. if(!this.approval.taskId || !this.approval.instanceId || this.approval.type !== 'todo')
  415. {
  416. console.error("无效操作");
  417. return false;
  418. }
  419. if(!this.approval.comment)
  420. {
  421. this.notify("请填写审批意见", 'danger');
  422. return false;
  423. }
  424. /*let data = {
  425. taskId: this.approval.taskId,
  426. instanceId: this.approval.instanceId,
  427. variables: JSON.stringify({
  428. pass: pass ? "true" : "false",
  429. comment: this.approval.comment ? this.approval.comment : (pass ? '同意' : '驳回'),
  430. }),
  431. };
  432. request({
  433. url: "/activiti/process/complete",
  434. method: "post",
  435. params: data,
  436. }).then((response) => {
  437. this.notify("操作成功", 'success');
  438. this.$router.back();
  439. }).catch(e => {
  440. this.notify("操作失败!", 'danger');
  441. });*/
  442. if (pass) {
  443. let data = {
  444. taskId: this.approval.taskId,
  445. instanceId: this.approval.instanceId,
  446. variables: JSON.stringify({
  447. pass: "true",
  448. comment: this.approval.comment ? this.approval.comment : "同意",
  449. }),
  450. };
  451. zyyctcEdit(this.circulation).then(response => {
  452. request({
  453. url: "/activiti/process/complete",
  454. method: "post",
  455. params: data,
  456. }).then((response) => {
  457. this.notify("操作成功", 'success');
  458. this.$router.back();
  459. }).catch(e => {
  460. this.notify("操作失败!", 'danger');
  461. });
  462. });
  463. } else {
  464. let _this = this;
  465. _this.$dialog.confirm({
  466. message: '是否确认驳回此条申请',
  467. }).then(() => {
  468. let data = {
  469. taskId: _this.approval.taskId,
  470. instanceId: _this.approval.instanceId,
  471. variables: JSON.stringify({
  472. pass: "false",
  473. comment: _this.approval.comment ? _this.approval.comment : "驳回",
  474. }),
  475. };
  476. zyyctcEdit(this.circulation).then(response => {
  477. request({
  478. url: "/activiti/process/complete",
  479. method: "post",
  480. params: data,
  481. }).then((response) => {
  482. _this.notify("操作成功", 'success');
  483. _this.$router.back();
  484. }).catch(e => {
  485. _this.notify("操作失败!", 'danger');
  486. });
  487. });
  488. });
  489. }
  490. return true;
  491. },
  492. notify(message, type) {
  493. Notify.clear();
  494. Notify({ type: type || 'primary', message: message });
  495. },
  496. },
  497. }
  498. </script>
  499. <style scoped lang="scss">
  500. .app-container {
  501. padding-bottom: 2%;
  502. .header_main{
  503. height: 116px;
  504. background: url('../../../assets/images/sunVillage_info/list_head_green.png') no-repeat;
  505. background-size: 100% 100%;
  506. position: fixed;
  507. top: 0;
  508. left: 0;
  509. width: 100%;
  510. font-size: 36px;
  511. line-height: 116px;
  512. text-align: center;
  513. color: #fff;
  514. position: relative;
  515. margin-bottom: 2%;
  516. .return_btn{
  517. width: 24px;
  518. height: 43.2px;
  519. background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  520. background-size: 20px 36px;
  521. position: absolute;
  522. left: 38px;
  523. top: 36px;
  524. }
  525. .add_btn{
  526. width: 56.4px;
  527. height: 40.8px;
  528. background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  529. background-size: 47px 34px;
  530. position: absolute;
  531. right: 38px;
  532. top: 36px;
  533. }
  534. }
  535. }
  536. .main_title{
  537. font-size: 0.4rem;
  538. color: #1D6FE9;
  539. margin: 0.2rem 6%;
  540. position: relative;
  541. }
  542. .main_box{
  543. width: 96%;
  544. margin: 0 auto;
  545. border-radius: 6px;
  546. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  547. overflow: hidden;
  548. background-color: #FFF;
  549. }
  550. .submitButton{
  551. width: 80%;
  552. margin: 0 auto;
  553. background-color: #1D6FE9;
  554. }
  555. .clear{
  556. height: 80px;
  557. }
  558. .examine_box{
  559. background-color: #1D6FE9!important;
  560. padding: 0.18rem!important;
  561. padding-left: 0!important;
  562. border-radius: 0.15rem!important;
  563. margin-top: 0.3rem!important;
  564. .van-col:first-child{
  565. color: #FFF!important;
  566. font-size: 0.45rem!important;
  567. text-align: center!important;
  568. }
  569. .van-col:last-child{
  570. background-color: #FFF!important;
  571. border-radius: 0.15rem!important;
  572. overflow: hidden!important;
  573. .van-radio-group--horizontal{
  574. padding: 0.2rem 0;
  575. border-bottom: 1px solid #eee;
  576. }
  577. }
  578. }
  579. </style>