@@ -34,7 +34,32 @@ export function addNhhncy(data) { | |||
data: data | |||
}) | |||
} | |||
// 过户 | |||
export function guohu(id, to, data) { | |||
return request({ | |||
url: `/home/homesteadnhhncy/guohu/${id}/to/${to}`, | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 分户 | |||
export function fenhu(id, data) { | |||
return request({ | |||
url: '/home/homesteadnhhncy/fenhu/' + id, | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 设为户主 | |||
export function toHuzhu(id, data) { | |||
return request({ | |||
url: '/home/homesteadnhhncy/toHuzhu/' + id, | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 新增数据调查-户主信息 | |||
export function nhhncyConnectTask(data) { | |||
return request({ | |||
@@ -54,18 +54,22 @@ | |||
</div> | |||
</van-sticky> | |||
<!--<van-pull-refresh v-model="isLoadingnh" @refresh="onRefreshnh">--> | |||
<div style="margin:13px auto 0;width: 95%;"> | |||
<div style="margin:10px auto 0;width: 95%;"> | |||
<p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-bottom: 5px;">户内成员</p> | |||
</div> | |||
<van-cell v-for="(item,index) in hncylist" :key="index" size="small" style="border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:15px auto 0;"> | |||
<van-cell v-for="(item,index) in hncylist" :key="index" size="small" style="border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:10px auto 0;"> | |||
<template #title> | |||
<div style="display: flex;align-items: center;"> | |||
<p style="display: flex;align-items: center;"> | |||
<img src="../../assets/images/housesteadSurvey/list03.png" alt="" style="margin-right: 5px;"> | |||
<span style="line-height: 1;">{{item.xm}}</span> | |||
</p> | |||
<p style="display: flex;align-items: center;color:#22B7F2;font-size:12px;margin-left: auto;margin-right: 10px;border-bottom: 1px dashed #22B7F2;" @click="showPopuphncylist(item)"><img src="../../assets/images/housesteadSurvey/list09.png" alt="" style="margin-right: 3px;">成员详情</p> | |||
<p style="display: flex;align-items: center;color:#FA5353;font-size:12px;border-bottom: 1px dashed #FA5353;" @click="deletenh(item,index)"><img src="../../assets/images/housesteadSurvey/list08.png" alt="" style="margin-right: 3px;">删除</p> | |||
<p v-if="item.yhzgx != '02'" style="display: flex;align-items: center;color:#22B7F2;font-size:12px;margin-left: auto;margin-right: 10px;border-bottom: 1px dashed #22B7F2;" @click="handleFenHu(item)"><img src="../../assets/images/housesteadSurvey/list09.png" alt="" style="margin-right: 3px;">分户</p> | |||
<p v-if="item.yhzgx != '02'" style="display: flex;align-items: center;color:#22B7F2;font-size:12px;border-bottom: 1px dashed #22B7F2;" @click="handleGuohu(item,index)"><img src="../../assets/images/housesteadSurvey/add03.png" alt="" style="margin-right: 3px;">移户</p> | |||
<p v-if="item.yhzgx != '02'" style="display: flex;align-items: center;color:#22B7F2;font-size:12px;border-bottom: 1px dashed #22B7F2;" @click="handleToHuzhu(item,index)"><img src="../../assets/images/housesteadSurvey/list03.png" alt="" style="margin-right: 3px;">设为户主</p> | |||
<p style="display: flex;align-items: center;color:#22B7F2;font-size:12px;margin-left: auto;margin-right: 10px;border-bottom: 1px dashed #22B7F2;" @click="showPopuphncylist(item)"><img src="../../assets/images/housesteadSurvey/add02.png" alt="" style="margin-right: 3px;">成员详情</p> | |||
<p style="display: flex;align-items: center;color:#FA5353;font-size:12px;border-bottom: 1px dashed #FA5353;" @click="deletenh(item,index)"><img src="../../assets/images/housesteadSurvey/list08.png" alt="" style="margin-right: 3px;">删除</p> | |||
</div> | |||
</template> | |||
<template #label> | |||
@@ -74,6 +78,22 @@ | |||
<p style="display: flex;align-items: center;margin-top: 5px;"><img src="../../assets/images/housesteadSurvey/list05.png" alt="" style="margin-right: 5px;">农户代码:<span style="margin-left: auto;">{{item.nhdm}}</span></p> | |||
</template> | |||
</van-cell> | |||
<van-dialog v-model="guohuData.visible" title="成员移户" show-cancel-button confirmButtonText="确认" cancelButtonText="关闭" @confirm="guohu" @cancel="show=false"> | |||
<van-form ref="guohu_form" style="height: 200px;" label-width="180px"> | |||
<field-select | |||
v-model="guohuData.to" | |||
label="指定新户主" | |||
value-key="xm" | |||
data-key="nhdm" | |||
placeholder="请选择农户代码" | |||
:columns = "guohuData.huzhuList" | |||
:on-remote-response="'data'" | |||
@confirm="onGuohuChanged" | |||
:rules="[{ required: true }]" | |||
required | |||
/> | |||
</van-form> | |||
</van-dialog> | |||
<!-- </van-pull-refresh>--> | |||
<div style=" width:95%;margin:20px auto;display: flex;justify-content: space-between;"> | |||
<div style="width:49%;text-align:center;overflow:auto;border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);padding: 15px 0px;background: #ffffff;color: #22B7F2;"> | |||
@@ -86,7 +106,7 @@ | |||
<script> | |||
import {getQueryLand,getZjdzd,delZjdzdInfo,uploadFile,submitUploadImageList} from "@/api/homesteadSurvey/zjdzd"; | |||
import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh"; | |||
import {addNhhncy, delNhhncy, exportNhhncy, getNhhncy, listNhhncy, updateNhhncy} from "@/api/homesteadSurvey/nhhncy"; | |||
import {addNhhncy, delNhhncy, exportNhhncy, getNhhncy, listNhhncy, updateNhhncy,toHuzhu,fenhu,guohu} from "@/api/homesteadSurvey/nhhncy"; | |||
import {listShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr"; | |||
import {listSuyqr,updateSuyqr,addSuyqr} from "@/api/homesteadSurvey/suyqr"; | |||
import {listZrz,getZrzZjdDmList,getZrz} from "@/api/homesteadSurvey/zrz"; | |||
@@ -95,12 +115,14 @@ | |||
import { listTown, getTown } from "@/api/homesteadSurvey/town"; | |||
import { listVillage} from "@/api/homesteadSurvey/village"; | |||
import {deptGetId,} from "@/api/homestead/index"; | |||
import FieldSelect from "@/components/form/FieldSelect"; | |||
import $ from "jquery"; | |||
import {Dialog} from "vant"; | |||
import {ref} from "vue"; | |||
import axios from "axios"; | |||
export default { | |||
name: "hncyList2", | |||
components: {FieldSelect}, | |||
data() { | |||
return { | |||
loading1:false, | |||
@@ -255,6 +277,12 @@ | |||
dataForm: { | |||
imageUrl: [] | |||
}, | |||
guohuData: { | |||
visible: false, | |||
huzhuList: [], | |||
id: null, | |||
to: null, | |||
}, | |||
dataList: [["fsssSx"],["zjdSx"],["zrzSx"]], //地图使用 --end | |||
checkBoxAll:[], | |||
//地图跳转存之 | |||
@@ -1236,6 +1264,68 @@ | |||
}) | |||
} | |||
}, | |||
handleToHuzhu(row) { | |||
const ids = row.id || this.ids; | |||
Dialog.confirm({ | |||
title: '系统提示', | |||
message: '是否确认将此成员设为本户新的户主?', | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消' | |||
}).then(function() { | |||
return toHuzhu(ids); | |||
}).then(() => { | |||
this.$notify({ type: 'success' , message: "设为户主成功" }); | |||
location.reload(true); | |||
}).catch(() => {}); | |||
}, | |||
handleFenHu(row) { | |||
const ids = row.id || this.ids; | |||
Dialog.confirm({ | |||
title: '系统提示', | |||
message: '是否确认将此成员新立一户并设为户主?', | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消' | |||
}).then(function() { | |||
return fenhu(ids); | |||
}).then(() => { | |||
this.$notify({ type: 'success' , message: "分户成功" }); | |||
location.reload(true); | |||
}).catch(() => {}); | |||
}, | |||
handleGuohu(row) { | |||
const id = row.id || this.ids | |||
listNhhncy({ | |||
deptId: this.$store.state.user.loginDeptId, | |||
yhzgx: '02', | |||
}).then(response => { | |||
this.guohuData.id = id; | |||
this.guohuData.visible = true; | |||
this.guohuData.huzhuList = response.rows.filter((x) => x.nhdm != row.nhdm); | |||
this.guohuData.huzhuList.map(function(item){ | |||
item.xm = item.xm+item.nhdm; | |||
}) | |||
}); | |||
}, | |||
guohu() { | |||
this.$refs["guohu_form"].validate(valid => { | |||
if (valid) { | |||
guohu(this.guohuData.id, this.guohuData.to).then(response => { | |||
if(response.code != 200) throw response.msg; | |||
this.$notify({ type: 'success' , message: "移户成功" }); | |||
this.closeGuohu(); | |||
location.reload(true); | |||
}).catch(() => {}); | |||
} | |||
}); | |||
}, | |||
onGuohuChanged(val){ | |||
this.$set(this.guohuData, 'to',val); | |||
}, | |||
closeGuohu() { | |||
this.guohuData.visible = false; | |||
this.guohuData.id = this.guohuData.to = null; | |||
this.guohuData.huzhuList = []; | |||
}, | |||
// 户内成员列表 | |||
showPopuphncylist(item){ | |||
if(item.nhdm==null||item.nhdm==""){ | |||
@@ -508,7 +508,7 @@ | |||
placeholder="请输入宗地或权利人信息" | |||
> | |||
<template #action> | |||
<van-icon name="../../../static/images/onlineHome/home6.png" color="rgba(122,201,67,1)" size=".8rem" id="query" style="vertical-align:middle;"/> | |||
<van-icon :name="require('../../assets/images/housesteadSurvey/add02.png')" color="rgba(122,201,67,1)" size=".8rem" id="query" style="vertical-align:middle;"/> | |||
</template> | |||
</van-search> | |||
<div class="searchBox" style="display: none;"> | |||
@@ -65,17 +65,44 @@ | |||
<p style="flex:1;text-align:right;">{{item.nhdm}}</p> | |||
</div> | |||
<div style="text-align:center;overflow:auto;display: flex;justify-content: space-between;margin-top: 10px;"> | |||
<p style="width:32%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showPopuphncy(item)"> | |||
<p style="width:25%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showPopuphncy(item)"> | |||
<img src="../../assets/images/housesteadSurvey/add02.png" alt=""> | |||
<span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">详情</span> | |||
</p> | |||
<p v-if="item.yhzgx != '02'" style="width:25%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="handleFenHu(item)"> | |||
<img src="../../assets/images/housesteadSurvey/list09.png" alt=""> | |||
<span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">分户</span> | |||
</p> | |||
<p v-if="item.yhzgx != '02'" style="width:25%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="handleGuohu(item)"> | |||
<img src="../../assets/images/housesteadSurvey/add03.png" alt=""> | |||
<span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">移户</span> | |||
</p> | |||
<p v-if="item.yhzgx != '02'" style="width:25%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="handleToHuzhu(item)"> | |||
<img src="../../assets/images/housesteadSurvey/list03.png" alt=""> | |||
<span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">设为户主</span> | |||
</p> | |||
</div> | |||
</div> | |||
<template #right> | |||
<van-button v-if="permission == 'true'" square text="删除" type="danger" class="delete-button" @click="deletehncy(item.id,index)"/> | |||
</template> | |||
</van-swipe-cell> | |||
<van-dialog v-model="guohuData.visible" title="成员移户" show-cancel-button confirmButtonText="确认" cancelButtonText="关闭" @confirm="guohu" @cancel="show=false"> | |||
<van-form ref="guohu_form" style="height: 200px;" label-width="180px"> | |||
<field-select | |||
v-model="guohuData.to" | |||
label="指定新户主" | |||
value-key="xm" | |||
data-key="nhdm" | |||
placeholder="请选择农户代码" | |||
:columns = "guohuData.huzhuList" | |||
:on-remote-response="'data'" | |||
@confirm="onGuohuChanged" | |||
:rules="[{ required: true }]" | |||
required | |||
/> | |||
</van-form> | |||
</van-dialog> | |||
<div v-if="permission == 'true'" style=" width:95%;margin:20px auto;display: flex;justify-content: space-between;"> | |||
<div style="width:49%;text-align:center;overflow:auto;border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);padding: 15px 0px;background: #ffffff;color: #22B7F2;"> | |||
<p style="font-size: 16px;" @click="showPopupcy()">+ 添加成员信息</p> | |||
@@ -90,17 +117,18 @@ import MapGisDrawing from "@/components/Map/MapGisDrawing"; | |||
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 {listNhhncy,addNhhncy,updateNhhncy,delNhhncy,toHuzhu,fenhu,guohu} 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 FieldSelect from "@/components/form/FieldSelect"; | |||
import { Notify, Dialog, Toast } from 'vant'; | |||
import axios from "axios"; | |||
export default { | |||
name: "nhcyList", | |||
components: { MapGisDrawing,}, | |||
components: { MapGisDrawing,FieldSelect}, | |||
data() { | |||
return { | |||
active:2, | |||
@@ -108,6 +136,12 @@ export default { | |||
// 使用权人列表 | |||
shyqrData:{}, | |||
hnnylist:[], | |||
guohuData: { | |||
visible: false, | |||
huzhuList: [], | |||
id: null, | |||
to: null, | |||
}, | |||
}; | |||
}, | |||
created(){ | |||
@@ -138,6 +172,68 @@ export default { | |||
this.$router.push({name: this.$router.back(-1)}); | |||
// } | |||
}, | |||
handleToHuzhu(row) { | |||
const ids = row.id || this.ids; | |||
Dialog.confirm({ | |||
title: '系统提示', | |||
message: '是否确认将此成员设为本户新的户主?', | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消' | |||
}).then(function() { | |||
return toHuzhu(ids); | |||
}).then(() => { | |||
this.$notify({ type: 'success' , message: "设为户主成功" }); | |||
location.reload(true); | |||
}).catch(() => {}); | |||
}, | |||
handleFenHu(row) { | |||
const ids = row.id || this.ids; | |||
Dialog.confirm({ | |||
title: '系统提示', | |||
message: '是否确认将此成员新立一户并设为户主?', | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消' | |||
}).then(function() { | |||
return fenhu(ids); | |||
}).then(() => { | |||
this.$notify({ type: 'success' , message: "分户成功" }); | |||
location.reload(true); | |||
}).catch(() => {}); | |||
}, | |||
handleGuohu(row) { | |||
const id = row.id || this.ids | |||
listNhhncy({ | |||
deptId: this.$store.state.user.loginDeptId, | |||
yhzgx: '02', | |||
}).then(response => { | |||
this.guohuData.id = id; | |||
this.guohuData.visible = true; | |||
this.guohuData.huzhuList = response.rows.filter((x) => x.nhdm != row.nhdm); | |||
this.guohuData.huzhuList.map(function(item){ | |||
item.xm = item.xm+item.nhdm; | |||
}) | |||
}); | |||
}, | |||
onGuohuChanged(val){ | |||
this.$set(this.guohuData, 'to',val); | |||
}, | |||
guohu() { | |||
this.$refs["guohu_form"].validate(valid => { | |||
if (valid) { | |||
guohu(this.guohuData.id, this.guohuData.to).then(response => { | |||
if(response.code != 200) throw response.msg; | |||
this.$notify({ type: 'success' , message: "移户成功" }); | |||
this.closeGuohu(); | |||
location.reload(true); | |||
}).catch(() => {}); | |||
} | |||
}); | |||
}, | |||
closeGuohu() { | |||
this.guohuData.visible = false; | |||
this.guohuData.id = this.guohuData.to = null; | |||
this.guohuData.huzhuList = []; | |||
}, | |||
showPopupsyqr(val){ | |||
this.$router.push({name:'shyqrAdd',query:val}); | |||
}, | |||