|
- <template>
- <div class="app-container">
- <van-sticky style="position:relative;">
- <div class="bannerBg">
- <van-nav-bar
- style="background:transparent;border-bottom-width:0;height:2rem;margin-bottom:.5rem;"
- @click-left="goBack()"
- >
- <template #left>
- <van-icon name="arrow-left" size="18" color="#fff" />
- </template>
- <template #title>
- <p style="color:#fff">入户调查</p>
- </template>
- </van-nav-bar>
- </div>
- <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">
- <van-row>
- <van-col span="4" :offset="1" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add'})">
- <van-icon :name="require('../../assets/images/housesteadSurvey/zjd'+(active==1?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
- <p :style="{color:(active==1?'rgb(34, 183, 242)':'#000')}">宅基地</p>
- </van-col>
- <van-col span="2">
- <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
- </van-col>
- <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add2'})" >
- <van-icon :name="require('../../assets/images/housesteadSurvey/nhxx'+(active==2?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
- <p :style="{color:(active==2?'rgb(34, 183, 242)':'#000')}">农户</p>
- </van-col>
- <van-col span="2">
- <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
- </van-col>
- <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add3'})" >
- <van-icon :name="require('../../assets/images/housesteadSurvey/fwxx'+(active==3?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
- <p :style="{color:(active==3?'rgb(34, 183, 242)':'#000')}">房屋</p>
- </van-col>
- <van-col span="2">
- <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
- </van-col>
- <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add4'})">
- <van-icon :name="require('../../assets/images/housesteadSurvey/fsss'+(active==4?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
- <p :style="{color:(active==4?'rgb(34, 183, 242)':'#000')}">附属物</p>
- </van-col>
- </van-row>
- </div>
- </van-sticky>
- <van-form ref = "form">
- <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;">
- <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">使用权人信息</p>
- <!--<van-field
- v-model="form.deptId"
- name="行政区划名称"
- label="行政区划名称"
- placeholder="行政区划名称"
- :rules="[{ required: true, message: '' }]"
- />-->
-
- <van-field v-model="form.nhdm" label="农户代码" placeholder="农户代码" input-align="right" label-width="auto" :rules="[{ required: true }]" required @input="remoteTransfereeMethod" />
- <div id="dropList" v-show="showDropList" style="width: 92vw; position: absolute; z-index: 99; left: 50%; margin-left: -46vw; border: 1px solid #E2E0E0;" >
- <van-cell id="vanCell" v-for="(item, index) in nhdmDictionaries" :key="index" @click="shyqrdmxmChange(item)" style="position: relative; z-index: 999;">
- {{item.hzxm}}-{{item.nhdm}}
- </van-cell>
- </div>
- <van-field
- v-model="form.zjddm"
- label="宅基地代码"
- placeholder="宅基地代码"
- input-align="right"
- :rules="[{ required: true }]"
- required
- />
- <van-field
- readonly
- clickable
- label="农民房屋代码"
- placeholder="请选择"
- v-model="form.nmfwdm"
- @click="shownmfwdm = true"
- input-align="right"
- right-icon="arrow-down"
- />
- <van-popup v-model="shownmfwdm" position="bottom">
- <van-picker
- show-toolbar
- :columns="nmfwDictionaries"
- value-key="nmfwdm"
- @confirm="onConfirmnmfwdm"
- @cancel="shownmfwdm = false"
- />
- </van-popup>
- <van-field
- autocomplete="off"
- input-align="right"
- v-model="form.bdcdyh"
- name="不动产单元号"
- label="不动产单元号"
- placeholder="不动产单元号"
- />
- <van-field
- autocomplete="off"
- input-align="right"
- v-model="form.bdcqzh"
- name="不动产权证号"
- label="不动产权证号"
- placeholder="不动产权证号"
- />
- <van-field
- autocomplete="off"
- input-align="right"
- v-model="form.qzysxlh"
- name="权证印刷号"
- label="权证印刷号"
- placeholder="权证印刷序列号"
- />
- <van-field
- autocomplete="off"
- input-align="right"
- v-model="form.fzjg"
- name="发证机关"
- label="发证机关"
- placeholder="发证机关"
- />
-
- <van-field
- input-align="right"
- v-model="form.shyqrdbxm"
- name="代表姓名"
- label="代表姓名"
- placeholder="请输入使用权人代表姓名"
- maxlength="50"
- autocomplete="off"
- :rules="[{ required: true }]"
- required
- />
- <field-select
- v-model="form.shyqrdbzjlx"
- label="证件类型"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="请输入使用权人证件类型"
- remote-url="/open/zdzh/list/zjlx"
- :on-remote-response="'data'"
- :rules="[{ required: true }]"
- required
- />
- <van-field
- input-align="right"
- v-model="form.shyqrdbzjhm"
- name="证件号码"
- label="证件号码"
- placeholder="请输入使用权人证件号码"
- maxlength="50"
- autocomplete="off"
- :rules="[{ required: true }]"
- readonly
- required
- />
- <field-select
- v-model="form.xb"
- label="性别"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择性别"
- remote-url="/open/zdzh/list/sys_user_sex"
- :on-remote-response="'data'"
- :rules="[{ required: true }]"
- required
- />
- <van-field
- input-align="right"
- v-model="form.dh"
- name="联系电话"
- label="联系电话"
- placeholder="请输入联系电话"
- maxlength="50"
- autocomplete="off"
- />
- <FieldRadio
- v-model="form.sfbncjtjjzzcy"
- label="是否本集体经济组织成员"
- value-key="dictLabel"
- data-key="dictValue"
- remote-url="/open/zdzh/list/house_yes_no"
- :on-remote-response="'data'"
- />
- <field-select
- v-model="form.hklx"
- label="户口类型"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择性别"
- remote-url="/open/zdzh/list/account_type"
- :on-remote-response="'data'"
- />
- <van-field
- input-align="right"
- v-model="form.dz"
- name="地址"
- label="地址"
- placeholder="请输入地址"
- maxlength="50"
- autocomplete="off"
- />
- <field-select
- v-model="form.qlrlx"
- label="权利人类型"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择权利人类型"
- remote-url="/open/zdzh/list/obligee_type"
- :on-remote-response="'data'"
- :rules="[{ required: true }]"
- required
- />
- <field-select
- v-model="form.sshy"
- label="所属行业"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="请选择所属行业"
- remote-url="/open/zdzh/list/gmjjhy"
- :on-remote-response="'data'"
- />
- <field-select
- v-model="form.gj"
- label="国家/地区"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="请选择国家/地区"
- remote-url="/open/zdzh/list/country_or_region"
- :on-remote-response="'data'"
- :rules="[{ required: true }]"
- required
- />
- <field-select
- v-model="form.hjszss"
- label="户籍所在省市"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="请选择户籍所在省市"
- remote-url="/open/zdzh/list/province_code"
- :on-remote-response="'data'"
- />
- <FieldRadio
- v-model="form.sfsyqrzjgy"
- label="使用权人之间共有"
- value-key="dictLabel"
- data-key="dictValue"
- remote-url="/open/zdzh/list/house_yes_no"
- :on-remote-response="'data'"
- />
- <field-select
- v-model="form.gyfs"
- label="共有方式"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="请选择共有方式"
- remote-url="/open/zdzh/list/common_mode"
- :on-remote-response="'data'"
- />
- <FieldRadio
- v-model="form.sfczr"
- label="持证人"
- value-key="dictLabel"
- data-key="dictValue"
- remote-url="/open/zdzh/list/house_yes_no"
- :on-remote-response="'data'"
- />
- <van-field
- input-align="right"
- v-model="form.qlbl"
- name="权利比例(%)"
- label="权利比例(%)"
- placeholder="请输入权利比例(%)"
- maxlength="50"
- autocomplete="off"
- />
- <van-field
- input-align="right"
- v-model="form.bz"
- name="备注"
- label="备注"
- placeholder="请输入备注"
- maxlength="50"
- autocomplete="off"
- />
- <van-dialog v-model="mapShow" show-cancel-button>
- <MapGisObtainTc ref="zjdProductResh" :shqrxm="hzxm" :landStatus="landStatus" :deptId="deptId" @closeMoule="closeMoule"></MapGisObtainTc>
- </van-dialog>
- </div>
- <div style="margin: 16px;display: flex;justify-content: space-around;">
- <van-button v-if="permission == 'true'" round color="#22B7F2" style="width:45%" @click="submitzjd">保存</van-button>
- <van-button plain color="#22B7F2" style="width:45%" round type="info" @click="cancel">取消</van-button>
- </div>
- <div style="height: 50px;"></div>
- </van-form>
- </div>
- </template>
-
- <script>
- import {listShyqr,addShyqr,updateShyqr,delShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr";
- import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd";
- import FieldSelect from "@/components/form/FieldSelect";
- import FieldRadio from "@/components/form/FieldRadio";
- import MapGisObtainTc from "@/components/Map/MapGisObtainTc";
- import {listZrz,addZrz,updateZrz,getZrzZjdDmList,delZrz,updateZrzStatus} from "@/api/homesteadSurvey/zrz";
- import {listNmfw,addNmfw,updateNmfw,delNmfw} from "@/api/homesteadSurvey/nmfw";
- import {listSuyqr,addSuyqr,updateSuyqr} from "@/api/homesteadSurvey/suyqr";
- import {listNhhncy,addNhhncy,updateNhhncy,delNhhncy} from "@/api/homesteadSurvey/nhhncy";
- import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh";
- import {listFsss,addFsss,updateFsss,delFsss,getFsssZjdDmList,updateFsssStatus} from "@/api/homesteadSurvey/fsss";
- import { listTown, getTown } from "@/api/homesteadSurvey/town";
- import { listVillage} from "@/api/homesteadSurvey/village";
- import { sysConfig} from "@/api/homesteadSurvey/index";
- import { Notify, Dialog, Toast } from 'vant';
- import axios from "axios";
- export default {
- components: {FieldSelect, FieldRadio,MapGisObtainTc},
- name: "shyqrAdd",
- data() {
- return {
- active:2,
- // 使用权人列表
- syqrlist:[
- {
- shyqrdbxm :'测试测试',
- shyqrdbzjhm :'12324648564',
- nhdm :'777888999',
- }
- ],
- permission:false,
- shownhdm:false,
- showDropList:false,
- shownmfwdm:false,
- hzxm:null,
- landStatus:"1",
- deptId:JSON.parse(localStorage.getItem("surveyItem")).deptId,
- nhdmDictionaries:[],
- nmfwDictionaries:[],
- mapShow: false,
- form:{}
- };
- },
- created(){
- let data = this.$route.query;
- this.zjdzdxx = JSON.parse(localStorage.getItem("zjdzdxxItem"));
- this.form = data;
- this.permission = localStorage.getItem("executePermission");
- if(this.form.id == null){
- this.$set(this.form, 'shyqrdbzjlx', "01");
- this.$set(this.form, 'xb', "1");
- this.$set(this.form, 'sfbncjtjjzzcy', "1");
- this.$set(this.form, 'hklx', "01");
- this.$set(this.form, 'qlrlx', "10");
- this.$set(this.form, 'sshy', "A");
- this.$set(this.form, 'gj', "1");
- this.$set(this.form, 'hjszss', "110000");
- this.$set(this.form, 'sfsyqrzjgy', "1");
- this.$set(this.form, 'gyfs', "1");
- this.$set(this.form, 'sfczr', "1");
-
- }
- this.$set(this.form, 'zjddm', this.zjdzdxx.zjddm);
- listZjdzd({zjddm:this.zjdzdxx.zjddm}).then(response => {
- this.form.bdcdyh = response.rows[0].bdcdyh;
- });
- listNmfw({zjddm:this.zjdzdxx.zjddm}).then(response => {
- this.nmfwDictionaries = response.rows;
- });
- // this.getList();
- },
- mounted(){
-
- },
- methods: {
- getList(){
- listNh({}).then(response => {
- this.nhdmDictionaries = response.rows;
- });
- },
- /** 模糊查询人员信息 */
- remoteTransfereeMethod(query) {
- if (query !== "") {
- listNh({hzxm:query}).then((response) => {
- if (response.code == 200) {
- this.nhdmDictionaries = response.rows.map(function (item) {
- return {
- hzxm:item.hzxm,
- sqrxb:item.xb,
- hzzjhm:item.hzzjhm,
- nhdm:item.nhdm,
- hzzjlx:item.hzzjlx,
- lxdh:item.lxdh,
- deptId:item.deptId,
- deptName:item.deptName,
- }
- })
- //设置模糊查询的下拉框和滚动条
- if (this.nhdmDictionaries.length > 0) {
- this.showDropList = true; // div显示会阻挡下边的选择框和输入框,showDropList控制下拉框是否显示
- //设置模糊查询的和滚动条
- this.$nextTick(() => {
- if (this.nhdmDictionaries.length > 4) {
- let height = document.getElementById("vanCell").offsetHeight * 4;
- document.getElementById("dropList").style.height = height + "px";
- document.getElementById("dropList").style.overflow = "scroll";
- } else {
- document.getElementById("dropList").style.height = "";
- document.getElementById("dropList").style.overflow = "visible";
- }
- });
- } else {
- this.showDropList = false;
- }
- }
- });
- } else {
- this.nhdmDictionaries = [];
- this.showDropList = false;
- }
- },
- shyqrdmxmChange(val){
- this.$set(this.form, "nhdm", val.nhdm);
- this.$set(this.form, "shyqrdbzjhm", val.hzzjhm);
- this.showDropList = false;
- },
- submitzjd(){
- this.$refs.form.validate().then(() => {
- if(this.form.id == null){
- addShyqr(this.form).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: _this.form.zjddm}});
- }
- })
- });
- }else{
- updateShyqr(this.form).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: _this.form.zjddm}});
- }
- })
- });
- }
- }).catch((e) => {
- Dialog({ type: 'danger', message: '请填写完整的表单项' });
- });
- },
- mapLook(){
- this.mapShow = true;
- setTimeout(() => {
- this.$refs.zjdProductResh.drawingLyPaceCountryDarw();
- },1000);
- },
- /** 查找地图中宅基地 */
- closeMoule: function (data) {
- this.form.zjddm = data;
- },
- cancel(){
- this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: this.form.zjddm}});
- },
- onConfirmnhdm(val){
- this.form.nhdm = val.nhdm;
- this.hzxm = val.hzxm;
- this.shownhdm =false;
- },
- onConfirmnmfwdm(val){
- this.form.nmfwdm = val.nmfwdm;
- this.shownmfwdm = false;
- },
- guidProduct(){
- return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
- var r = Math.random() * 16 | 0,
- v = c == 'x' ? r : (r & 0x3 | 0x8);
- return v.toString(16);
- });
- },
- /** 查找地图中定位点 */
- MapTag: function (data) {
- this.$refs[this.zjdProductResh].drawingPaceCountryDarw();
- },
- goBack(){
- if(this.ztMap && this.enterMap ==1){
- if(this.form.id == null){
- this.backMap.backMapZjdAData.theGeom= "";
- }else{
- this.backMap.backMapZjdAData = this.form;
- }
- this.$cookies.set("search",this.backMap);
- } else {
- this.$cookies.set("search","");
- }
- this.$router.push({name: this.$router.back(-1)});
- // }
- },
- }
- }
- </script>
-
- <style scoped>
- >>> .bannerBg{
- width: 100%;
- color:#fff;
- padding:10px;
- background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
- }
- >>> .van-hairline--bottom::after {
- border-bottom-width: 0;
- }
- >>> .title:before
- {
- content:"";
- width: 6px;
- height: 20PX;
- background: #7ac943;
- border-radius: 3px;
- position:absolute;
- left:0;
- bottom:0;
- }
- >>> .delete-button {
- height: 100%;
- }
- >>> .van-swipe-cell__wrapper{
- margin-right:-3px;
- }
- >>> .label-class .van-collapse-item__title--expanded{
- font-weight: bold;
- }
- </style>
|