|
|
|
@@ -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==""){ |
|
|
|
|