移动端
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.

540 lines
18 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-sticky style="position:relative;">
  4. <div class="bannerBg">
  5. <van-nav-bar
  6. style="background:transparent;border-bottom-width:0;height:2rem;margin-bottom:.5rem;"
  7. @click-left="goBack()"
  8. >
  9. <template #left>
  10. <van-icon name="arrow-left" size="18" color="#fff" />
  11. </template>
  12. <template #title>
  13. <p style="color:#fff">入户调查</p>
  14. </template>
  15. </van-nav-bar>
  16. </div>
  17. <div style="width:95%;left:2.5%;position:absolute;background:#fff;border-radius:15px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);padding: .3rem;top:1.2rem">
  18. <van-row>
  19. <van-col span="4" :offset="1" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add'})">
  20. <van-icon :name="require('../../assets/images/housesteadSurvey/zjd'+(active==1?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  21. <p :style="{color:(active==1?'rgb(34, 183, 242)':'#000')}">宅基地</p>
  22. </van-col>
  23. <van-col span="2">
  24. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  25. </van-col>
  26. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add2'})" >
  27. <van-icon :name="require('../../assets/images/housesteadSurvey/nhxx'+(active==2?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  28. <p :style="{color:(active==2?'rgb(34, 183, 242)':'#000')}">农户</p>
  29. </van-col>
  30. <van-col span="2">
  31. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  32. </van-col>
  33. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add3'})" >
  34. <van-icon :name="require('../../assets/images/housesteadSurvey/fwxx'+(active==3?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  35. <p :style="{color:(active==3?'rgb(34, 183, 242)':'#000')}">房屋</p>
  36. </van-col>
  37. <van-col span="2">
  38. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  39. </van-col>
  40. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add4'})">
  41. <van-icon :name="require('../../assets/images/housesteadSurvey/fsss'+(active==4?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  42. <p :style="{color:(active==4?'rgb(34, 183, 242)':'#000')}">附属物</p>
  43. </van-col>
  44. </van-row>
  45. </div>
  46. </van-sticky>
  47. <van-form ref = "form">
  48. <div style="margin:30px auto;background: #ffffff;width: 95%;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);border-radius:15px;padding-top: 20px;">
  49. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">使用权人信息</p>
  50. <!--<van-field
  51. v-model="form.deptId"
  52. name="行政区划名称"
  53. label="行政区划名称"
  54. placeholder="行政区划名称"
  55. :rules="[{ required: true, message: '' }]"
  56. />-->
  57. <van-field v-model="form.nhdm" label="农户代码" placeholder="农户代码" input-align="right" label-width="auto" :rules="[{ required: true }]" required @input="remoteTransfereeMethod" />
  58. <div id="dropList" v-show="showDropList" style="width: 92vw; position: absolute; z-index: 99; left: 50%; margin-left: -46vw; border: 1px solid #E2E0E0;" >
  59. <van-cell id="vanCell" v-for="(item, index) in nhdmDictionaries" :key="index" @click="shyqrdmxmChange(item)" style="position: relative; z-index: 999;">
  60. {{item.hzxm}}-{{item.nhdm}}
  61. </van-cell>
  62. </div>
  63. <van-field
  64. v-model="form.zjddm"
  65. label="宅基地代码"
  66. placeholder="宅基地代码"
  67. input-align="right"
  68. :rules="[{ required: true }]"
  69. required
  70. />
  71. <van-field
  72. readonly
  73. clickable
  74. label="农民房屋代码"
  75. placeholder="请选择"
  76. v-model="form.nmfwdm"
  77. @click="shownmfwdm = true"
  78. input-align="right"
  79. right-icon="arrow-down"
  80. />
  81. <van-popup v-model="shownmfwdm" position="bottom">
  82. <van-picker
  83. show-toolbar
  84. :columns="nmfwDictionaries"
  85. value-key="nmfwdm"
  86. @confirm="onConfirmnmfwdm"
  87. @cancel="shownmfwdm = false"
  88. />
  89. </van-popup>
  90. <van-field
  91. autocomplete="off"
  92. input-align="right"
  93. v-model="form.bdcdyh"
  94. name="不动产单元号"
  95. label="不动产单元号"
  96. placeholder="不动产单元号"
  97. />
  98. <van-field
  99. autocomplete="off"
  100. input-align="right"
  101. v-model="form.bdcqzh"
  102. name="不动产权证号"
  103. label="不动产权证号"
  104. placeholder="不动产权证号"
  105. />
  106. <van-field
  107. autocomplete="off"
  108. input-align="right"
  109. v-model="form.qzysxlh"
  110. name="权证印刷号"
  111. label="权证印刷号"
  112. placeholder="权证印刷序列号"
  113. />
  114. <van-field
  115. autocomplete="off"
  116. input-align="right"
  117. v-model="form.fzjg"
  118. name="发证机关"
  119. label="发证机关"
  120. placeholder="发证机关"
  121. />
  122. <van-field
  123. input-align="right"
  124. v-model="form.shyqrdbxm"
  125. name="代表姓名"
  126. label="代表姓名"
  127. placeholder="请输入使用权人代表姓名"
  128. maxlength="50"
  129. autocomplete="off"
  130. :rules="[{ required: true }]"
  131. required
  132. />
  133. <field-select
  134. v-model="form.shyqrdbzjlx"
  135. label="证件类型"
  136. value-key="dictLabel"
  137. data-key="dictValue"
  138. placeholder="请输入使用权人证件类型"
  139. remote-url="/open/zdzh/list/zjlx"
  140. :on-remote-response="'data'"
  141. :rules="[{ required: true }]"
  142. required
  143. />
  144. <van-field
  145. input-align="right"
  146. v-model="form.shyqrdbzjhm"
  147. name="证件号码"
  148. label="证件号码"
  149. placeholder="请输入使用权人证件号码"
  150. maxlength="50"
  151. autocomplete="off"
  152. :rules="[{ required: true }]"
  153. readonly
  154. required
  155. />
  156. <field-select
  157. v-model="form.xb"
  158. label="性别"
  159. value-key="dictLabel"
  160. data-key="dictValue"
  161. placeholder="选择性别"
  162. remote-url="/open/zdzh/list/sys_user_sex"
  163. :on-remote-response="'data'"
  164. :rules="[{ required: true }]"
  165. required
  166. />
  167. <van-field
  168. input-align="right"
  169. v-model="form.dh"
  170. name="联系电话"
  171. label="联系电话"
  172. placeholder="请输入联系电话"
  173. maxlength="50"
  174. autocomplete="off"
  175. />
  176. <FieldRadio
  177. v-model="form.sfbncjtjjzzcy"
  178. label="是否本集体经济组织成员"
  179. value-key="dictLabel"
  180. data-key="dictValue"
  181. remote-url="/open/zdzh/list/house_yes_no"
  182. :on-remote-response="'data'"
  183. />
  184. <field-select
  185. v-model="form.hklx"
  186. label="户口类型"
  187. value-key="dictLabel"
  188. data-key="dictValue"
  189. placeholder="选择性别"
  190. remote-url="/open/zdzh/list/account_type"
  191. :on-remote-response="'data'"
  192. />
  193. <van-field
  194. input-align="right"
  195. v-model="form.dz"
  196. name="地址"
  197. label="地址"
  198. placeholder="请输入地址"
  199. maxlength="50"
  200. autocomplete="off"
  201. />
  202. <field-select
  203. v-model="form.qlrlx"
  204. label="权利人类型"
  205. value-key="dictLabel"
  206. data-key="dictValue"
  207. placeholder="选择权利人类型"
  208. remote-url="/open/zdzh/list/obligee_type"
  209. :on-remote-response="'data'"
  210. :rules="[{ required: true }]"
  211. required
  212. />
  213. <field-select
  214. v-model="form.sshy"
  215. label="所属行业"
  216. value-key="dictLabel"
  217. data-key="dictValue"
  218. placeholder="请选择所属行业"
  219. remote-url="/open/zdzh/list/gmjjhy"
  220. :on-remote-response="'data'"
  221. />
  222. <field-select
  223. v-model="form.gj"
  224. label="国家/地区"
  225. value-key="dictLabel"
  226. data-key="dictValue"
  227. placeholder="请选择国家/地区"
  228. remote-url="/open/zdzh/list/country_or_region"
  229. :on-remote-response="'data'"
  230. :rules="[{ required: true }]"
  231. required
  232. />
  233. <field-select
  234. v-model="form.hjszss"
  235. label="户籍所在省市"
  236. value-key="dictLabel"
  237. data-key="dictValue"
  238. placeholder="请选择户籍所在省市"
  239. remote-url="/open/zdzh/list/province_code"
  240. :on-remote-response="'data'"
  241. />
  242. <FieldRadio
  243. v-model="form.sfsyqrzjgy"
  244. label="使用权人之间共有"
  245. value-key="dictLabel"
  246. data-key="dictValue"
  247. remote-url="/open/zdzh/list/house_yes_no"
  248. :on-remote-response="'data'"
  249. />
  250. <field-select
  251. v-model="form.gyfs"
  252. label="共有方式"
  253. value-key="dictLabel"
  254. data-key="dictValue"
  255. placeholder="请选择共有方式"
  256. remote-url="/open/zdzh/list/common_mode"
  257. :on-remote-response="'data'"
  258. />
  259. <FieldRadio
  260. v-model="form.sfczr"
  261. label="持证人"
  262. value-key="dictLabel"
  263. data-key="dictValue"
  264. remote-url="/open/zdzh/list/house_yes_no"
  265. :on-remote-response="'data'"
  266. />
  267. <van-field
  268. input-align="right"
  269. v-model="form.qlbl"
  270. name="权利比例(%)"
  271. label="权利比例(%)"
  272. placeholder="请输入权利比例(%)"
  273. maxlength="50"
  274. autocomplete="off"
  275. />
  276. <van-field
  277. input-align="right"
  278. v-model="form.bz"
  279. name="备注"
  280. label="备注"
  281. placeholder="请输入备注"
  282. maxlength="50"
  283. autocomplete="off"
  284. />
  285. <van-dialog v-model="mapShow" show-cancel-button>
  286. <MapGisObtainTc ref="zjdProductResh" :shqrxm="hzxm" :landStatus="landStatus" :deptId="deptId" @closeMoule="closeMoule"></MapGisObtainTc>
  287. </van-dialog>
  288. </div>
  289. <div style="margin: 16px;display: flex;justify-content: space-around;">
  290. <van-button v-if="permission == 'true'" round color="#22B7F2" style="width:45%" @click="submitzjd">保存</van-button>
  291. <van-button plain color="#22B7F2" style="width:45%" round type="info" @click="cancel">取消</van-button>
  292. </div>
  293. <div style="height: 50px;"></div>
  294. </van-form>
  295. </div>
  296. </template>
  297. <script>
  298. import {listShyqr,addShyqr,updateShyqr,delShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr";
  299. import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd";
  300. import FieldSelect from "@/components/form/FieldSelect";
  301. import FieldRadio from "@/components/form/FieldRadio";
  302. import MapGisObtainTc from "@/components/Map/MapGisObtainTc";
  303. import {listZrz,addZrz,updateZrz,getZrzZjdDmList,delZrz,updateZrzStatus} from "@/api/homesteadSurvey/zrz";
  304. import {listNmfw,addNmfw,updateNmfw,delNmfw} from "@/api/homesteadSurvey/nmfw";
  305. import {listSuyqr,addSuyqr,updateSuyqr} from "@/api/homesteadSurvey/suyqr";
  306. import {listNhhncy,addNhhncy,updateNhhncy,delNhhncy} from "@/api/homesteadSurvey/nhhncy";
  307. import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh";
  308. import {listFsss,addFsss,updateFsss,delFsss,getFsssZjdDmList,updateFsssStatus} from "@/api/homesteadSurvey/fsss";
  309. import { listTown, getTown } from "@/api/homesteadSurvey/town";
  310. import { listVillage} from "@/api/homesteadSurvey/village";
  311. import { sysConfig} from "@/api/homesteadSurvey/index";
  312. import { Notify, Dialog, Toast } from 'vant';
  313. import axios from "axios";
  314. export default {
  315. components: {FieldSelect, FieldRadio,MapGisObtainTc},
  316. name: "shyqrAdd",
  317. data() {
  318. return {
  319. active:2,
  320. // 使用权人列表
  321. syqrlist:[
  322. {
  323. shyqrdbxm :'测试测试',
  324. shyqrdbzjhm :'12324648564',
  325. nhdm :'777888999',
  326. }
  327. ],
  328. permission:false,
  329. shownhdm:false,
  330. showDropList:false,
  331. shownmfwdm:false,
  332. hzxm:null,
  333. landStatus:"1",
  334. deptId:JSON.parse(localStorage.getItem("surveyItem")).deptId,
  335. nhdmDictionaries:[],
  336. nmfwDictionaries:[],
  337. mapShow: false,
  338. form:{}
  339. };
  340. },
  341. created(){
  342. let data = this.$route.query;
  343. this.zjdzdxx = JSON.parse(localStorage.getItem("zjdzdxxItem"));
  344. this.form = data;
  345. this.permission = localStorage.getItem("executePermission");
  346. if(this.form.id == null){
  347. this.$set(this.form, 'shyqrdbzjlx', "01");
  348. this.$set(this.form, 'xb', "1");
  349. this.$set(this.form, 'sfbncjtjjzzcy', "1");
  350. this.$set(this.form, 'hklx', "01");
  351. this.$set(this.form, 'qlrlx', "10");
  352. this.$set(this.form, 'sshy', "A");
  353. this.$set(this.form, 'gj', "1");
  354. this.$set(this.form, 'hjszss', "110000");
  355. this.$set(this.form, 'sfsyqrzjgy', "1");
  356. this.$set(this.form, 'gyfs', "1");
  357. this.$set(this.form, 'sfczr', "1");
  358. }
  359. this.$set(this.form, 'zjddm', this.zjdzdxx.zjddm);
  360. listZjdzd({zjddm:this.zjdzdxx.zjddm}).then(response => {
  361. this.form.bdcdyh = response.rows[0].bdcdyh;
  362. });
  363. listNmfw({zjddm:this.zjdzdxx.zjddm}).then(response => {
  364. this.nmfwDictionaries = response.rows;
  365. });
  366. // this.getList();
  367. },
  368. mounted(){
  369. },
  370. methods: {
  371. getList(){
  372. listNh({}).then(response => {
  373. this.nhdmDictionaries = response.rows;
  374. });
  375. },
  376. /** 模糊查询人员信息 */
  377. remoteTransfereeMethod(query) {
  378. if (query !== "") {
  379. listNh({hzxm:query}).then((response) => {
  380. if (response.code == 200) {
  381. this.nhdmDictionaries = response.rows.map(function (item) {
  382. return {
  383. hzxm:item.hzxm,
  384. sqrxb:item.xb,
  385. hzzjhm:item.hzzjhm,
  386. nhdm:item.nhdm,
  387. hzzjlx:item.hzzjlx,
  388. lxdh:item.lxdh,
  389. deptId:item.deptId,
  390. deptName:item.deptName,
  391. }
  392. })
  393. //设置模糊查询的下拉框和滚动条
  394. if (this.nhdmDictionaries.length > 0) {
  395. this.showDropList = true; // div显示会阻挡下边的选择框和输入框,showDropList控制下拉框是否显示
  396. //设置模糊查询的和滚动条
  397. this.$nextTick(() => {
  398. if (this.nhdmDictionaries.length > 4) {
  399. let height = document.getElementById("vanCell").offsetHeight * 4;
  400. document.getElementById("dropList").style.height = height + "px";
  401. document.getElementById("dropList").style.overflow = "scroll";
  402. } else {
  403. document.getElementById("dropList").style.height = "";
  404. document.getElementById("dropList").style.overflow = "visible";
  405. }
  406. });
  407. } else {
  408. this.showDropList = false;
  409. }
  410. }
  411. });
  412. } else {
  413. this.nhdmDictionaries = [];
  414. this.showDropList = false;
  415. }
  416. },
  417. shyqrdmxmChange(val){
  418. this.$set(this.form, "nhdm", val.nhdm);
  419. this.$set(this.form, "shyqrdbzjhm", val.hzzjhm);
  420. this.showDropList = false;
  421. },
  422. submitzjd(){
  423. this.$refs.form.validate().then(() => {
  424. if(this.form.id == null){
  425. addShyqr(this.form).then(response => {
  426. let _this =this
  427. this.$toast({
  428. icon: 'success', // 找到自己需要的图标
  429. message: '保存成功',
  430. duration:"1000",
  431. onClose:function(){
  432. _this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: _this.form.zjddm}});
  433. }
  434. })
  435. });
  436. }else{
  437. updateShyqr(this.form).then(response => {
  438. let _this =this
  439. this.$toast({
  440. icon: 'success', // 找到自己需要的图标
  441. message: '保存成功',
  442. duration:"1000",
  443. onClose:function(){
  444. _this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: _this.form.zjddm}});
  445. }
  446. })
  447. });
  448. }
  449. }).catch((e) => {
  450. Dialog({ type: 'danger', message: '请填写完整的表单项' });
  451. });
  452. },
  453. mapLook(){
  454. this.mapShow = true;
  455. setTimeout(() => {
  456. this.$refs.zjdProductResh.drawingLyPaceCountryDarw();
  457. },1000);
  458. },
  459. /** 查找地图中宅基地 */
  460. closeMoule: function (data) {
  461. this.form.zjddm = data;
  462. },
  463. cancel(){
  464. this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: this.form.zjddm}});
  465. },
  466. onConfirmnhdm(val){
  467. this.form.nhdm = val.nhdm;
  468. this.hzxm = val.hzxm;
  469. this.shownhdm =false;
  470. },
  471. onConfirmnmfwdm(val){
  472. this.form.nmfwdm = val.nmfwdm;
  473. this.shownmfwdm = false;
  474. },
  475. guidProduct(){
  476. return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  477. var r = Math.random() * 16 | 0,
  478. v = c == 'x' ? r : (r & 0x3 | 0x8);
  479. return v.toString(16);
  480. });
  481. },
  482. /** 查找地图中定位点 */
  483. MapTag: function (data) {
  484. this.$refs[this.zjdProductResh].drawingPaceCountryDarw();
  485. },
  486. goBack(){
  487. if(this.ztMap && this.enterMap ==1){
  488. if(this.form.id == null){
  489. this.backMap.backMapZjdAData.theGeom= "";
  490. }else{
  491. this.backMap.backMapZjdAData = this.form;
  492. }
  493. this.$cookies.set("search",this.backMap);
  494. } else {
  495. this.$cookies.set("search","");
  496. }
  497. this.$router.push({name: this.$router.back(-1)});
  498. // }
  499. },
  500. }
  501. }
  502. </script>
  503. <style scoped>
  504. >>> .bannerBg{
  505. width: 100%;
  506. color:#fff;
  507. padding:10px;
  508. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  509. }
  510. >>> .van-hairline--bottom::after {
  511. border-bottom-width: 0;
  512. }
  513. >>> .title:before
  514. {
  515. content:"";
  516. width: 6px;
  517. height: 20PX;
  518. background: #7ac943;
  519. border-radius: 3px;
  520. position:absolute;
  521. left:0;
  522. bottom:0;
  523. }
  524. >>> .delete-button {
  525. height: 100%;
  526. }
  527. >>> .van-swipe-cell__wrapper{
  528. margin-right:-3px;
  529. }
  530. >>> .label-class .van-collapse-item__title--expanded{
  531. font-weight: bold;
  532. }
  533. </style>