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

306 regels
13 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;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 #right>
  13. <van-icon name="map-marked" size="18" color="#fff" />
  14. </template>-->
  15. <template #title>
  16. <p style="color:#fff">入户调查</p>
  17. </template>
  18. </van-nav-bar>
  19. </div>
  20. <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">
  21. <van-row>
  22. <van-col span="4" :offset="1" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add'})">
  23. <van-icon :name="require('../../assets/images/housesteadSurvey/zjd'+(active==1?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  24. <p :style="{color:(active==1?'rgb(34, 183, 242)':'#000')}">宅基地</p>
  25. </van-col>
  26. <van-col span="2">
  27. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  28. </van-col>
  29. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add2'})" >
  30. <van-icon :name="require('../../assets/images/housesteadSurvey/nhxx'+(active==2?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  31. <p :style="{color:(active==2?'rgb(34, 183, 242)':'#000')}">农户</p>
  32. </van-col>
  33. <van-col span="2">
  34. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  35. </van-col>
  36. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add3'})" >
  37. <van-icon :name="require('../../assets/images/housesteadSurvey/fwxx'+(active==3?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  38. <p :style="{color:(active==3?'rgb(34, 183, 242)':'#000')}">房屋</p>
  39. </van-col>
  40. <van-col span="2">
  41. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  42. </van-col>
  43. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add4'})">
  44. <van-icon :name="require('../../assets/images/housesteadSurvey/fsss'+(active==4?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  45. <p :style="{color:(active==4?'rgb(34, 183, 242)':'#000')}">附属物</p>
  46. </van-col>
  47. </van-row>
  48. </div>
  49. </van-sticky>
  50. <div style="margin:1.6rem auto 0;width: 95%;">
  51. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-bottom: 5px;">户内成员</p>
  52. </div>
  53. <van-swipe-cell v-for="(item,index) in hnnylist" :key="'syqr'+index" style="border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:15px auto 0;background:#fff;">
  54. <div style="padding:15px;">
  55. <div style="display: flex;align-items: center;">
  56. <p style="flex:1;line-height: 1;font-size: 16px;"><img src="../../assets/images/housesteadSurvey/list03.png" alt="" style="margin-right: 5px;">{{item.xm}}</p>
  57. <p style="flex:1;line-height: 1;font-size: 16px; text-align:right;">{{formatDict(yhzgxList,item.yhzgx)}}</p>
  58. </div>
  59. <div style="display:flex;line-height:20px;margin-top: 15px;font-size: 14px;color: #999999;">
  60. <p style="flex:1;text-align:left;">证件号码:</p>
  61. <p style="flex:1;text-align:right;">{{item.zjhm}}</p>
  62. </div>
  63. <div style="display:flex;line-height:20px;margin-top: 5px;font-size: 14px;color: #999999;">
  64. <p style="flex:1;text-align:left;">农户代码:</p>
  65. <p style="flex:1;text-align:right;">{{item.nhdm}}</p>
  66. </div>
  67. <div style="text-align:center;overflow:auto;display: flex;justify-content: space-between;margin-top: 10px;">
  68. <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)">
  69. <img src="../../assets/images/housesteadSurvey/add02.png" alt="">
  70. <span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">详情</span>
  71. </p>
  72. <p v-if="item.yhzgx != '02' && permission == 'true'" style="width:25%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="handleFenHu(item)">
  73. <img src="../../assets/images/housesteadSurvey/list09.png" alt="">
  74. <span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">分户</span>
  75. </p>
  76. <p v-if="item.yhzgx != '02' && permission == 'true'" style="width:25%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="handleGuohu(item)">
  77. <img src="../../assets/images/housesteadSurvey/add03.png" alt="">
  78. <span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">移户</span>
  79. </p>
  80. <p v-if="item.yhzgx != '02' && permission == 'true'" style="width:25%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="handleToHuzhu(item)">
  81. <img src="../../assets/images/housesteadSurvey/list03.png" alt="">
  82. <span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">设为户主</span>
  83. </p>
  84. </div>
  85. </div>
  86. <template #right>
  87. <van-button v-if="permission == 'true' && item.yhzgx != '02'" square text="删除" type="danger" class="delete-button" @click="deletehncy(item.id,index)"><img width="10px" src="../../assets/images/sunVillage_info/list_icon_7.png" alt="">删除</van-button>
  88. </template>
  89. </van-swipe-cell>
  90. <van-dialog v-model="guohuData.visible" title="成员移户" show-cancel-button confirmButtonText="确认" cancelButtonText="关闭" @confirm="guohu" @cancel="show=false">
  91. <van-form ref="guohu_form" style="height: 200px;" label-width="180px">
  92. <field-select
  93. v-model="guohuData.to"
  94. label="指定新户主"
  95. value-key="xm"
  96. data-key="nhdm"
  97. placeholder="请选择农户代码"
  98. :columns = "guohuData.huzhuList"
  99. :on-remote-response="'data'"
  100. @confirm="onGuohuChanged"
  101. :rules="[{ required: true }]"
  102. required
  103. />
  104. </van-form>
  105. </van-dialog>
  106. <div v-if="permission == 'true'" style=" width:95%;margin:20px auto;display: flex;justify-content: space-between;">
  107. <div style="width:100%;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;">
  108. <p style="font-size: 16px;" @click="showPopupcy()">+ 添加成员信息</p>
  109. </div>
  110. </div>
  111. </div>
  112. </template>
  113. <script>
  114. import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd";
  115. import MapGisDrawing from "@/components/Map/MapGisDrawing";
  116. import {listZrz,addZrz,updateZrz,getZrzZjdDmList,delZrz,updateZrzStatus} from "@/api/homesteadSurvey/zrz";
  117. import {listNmfw,addNmfw,updateNmfw,delNmfw} from "@/api/homesteadSurvey/nmfw";
  118. import {listSuyqr,addSuyqr,updateSuyqr} from "@/api/homesteadSurvey/suyqr";
  119. import {listNhhncy,addNhhncy,updateNhhncy,delNhhncy,toHuzhu,fenhu,guohu} from "@/api/homesteadSurvey/nhhncy";
  120. import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh";
  121. import {listFsss,addFsss,updateFsss,delFsss,getFsssZjdDmList,updateFsssStatus} from "@/api/homesteadSurvey/fsss";
  122. import { listTown, getTown } from "@/api/homesteadSurvey/town";
  123. import { listVillage} from "@/api/homesteadSurvey/village";
  124. import { sysConfig} from "@/api/homesteadSurvey/index";
  125. import FieldSelect from "@/components/form/FieldSelect";
  126. import { Notify, Dialog, Toast } from 'vant';
  127. import axios from "axios";
  128. export default {
  129. name: "nhcyList",
  130. components: { MapGisDrawing,FieldSelect},
  131. data() {
  132. return {
  133. active:2,
  134. // 使用权人列表
  135. shyqrData:{},
  136. hnnylist:[],
  137. yhzgxList:[],
  138. permission:false,
  139. guohuData: {
  140. visible: false,
  141. huzhuList: [],
  142. id: null,
  143. to: null,
  144. },
  145. };
  146. },
  147. created(){
  148. this.houseGetDicts("family_status").then((response) => {
  149. this.yhzgxList = response.data;
  150. });
  151. this.shyqrData = this.$route.query;
  152. this.permission = localStorage.getItem("executePermission");
  153. this.getList();
  154. },
  155. mounted(){
  156. },
  157. methods: {
  158. getList(){
  159. listNhhncy({nhdm:this.shyqrData.nhdm }).then(response => {
  160. this.hnnylist = response.rows;
  161. });
  162. },
  163. goBack(){
  164. if(this.ztMap && this.enterMap ==1){
  165. if(this.form.id == null){
  166. this.backMap.backMapZjdAData.theGeom= "";
  167. }else{
  168. this.backMap.backMapZjdAData = this.form;
  169. }
  170. this.$cookies.set("search",this.backMap);
  171. } else {
  172. this.$cookies.set("search","");
  173. }
  174. this.$router.push({name: this.$router.back(-1)});
  175. // }
  176. },
  177. formatDict(dict, value) {
  178. return this.selectDictLabel(dict, value);
  179. },
  180. handleToHuzhu(row) {
  181. const ids = row.id || this.ids;
  182. Dialog.confirm({
  183. title: '系统提示',
  184. message: '是否确认将此成员设为本户新的户主?',
  185. confirmButtonText: '确定',
  186. cancelButtonText: '取消'
  187. }).then(function() {
  188. return toHuzhu(ids);
  189. }).then(() => {
  190. this.$notify({ type: 'success' , message: "设为户主成功" });
  191. location.reload(true);
  192. }).catch(() => {});
  193. },
  194. handleFenHu(row) {
  195. const ids = row.id || this.ids;
  196. Dialog.confirm({
  197. title: '系统提示',
  198. message: '是否确认将此成员新立一户并设为户主?',
  199. confirmButtonText: '确定',
  200. cancelButtonText: '取消'
  201. }).then(function() {
  202. return fenhu(ids);
  203. }).then(() => {
  204. this.$notify({ type: 'success' , message: "分户成功" });
  205. location.reload(true);
  206. }).catch(() => {});
  207. },
  208. handleGuohu(row) {
  209. const id = row.id || this.ids
  210. listNhhncy({
  211. deptId: this.$store.state.user.loginDeptId,
  212. yhzgx: '02',
  213. }).then(response => {
  214. this.guohuData.id = id;
  215. this.guohuData.visible = true;
  216. this.guohuData.huzhuList = response.rows.filter((x) => x.nhdm != row.nhdm);
  217. this.guohuData.huzhuList.map(function(item){
  218. item.xm = item.xm+item.nhdm;
  219. })
  220. });
  221. },
  222. onGuohuChanged(val){
  223. this.$set(this.guohuData, 'to',val);
  224. },
  225. guohu() {
  226. this.$refs["guohu_form"].validate(valid => {
  227. if (valid) {
  228. guohu(this.guohuData.id, this.guohuData.to).then(response => {
  229. if(response.code != 200) throw response.msg;
  230. this.$notify({ type: 'success' , message: "移户成功" });
  231. this.closeGuohu();
  232. location.reload(true);
  233. }).catch(() => {});
  234. }
  235. });
  236. },
  237. closeGuohu() {
  238. this.guohuData.visible = false;
  239. this.guohuData.id = this.guohuData.to = null;
  240. this.guohuData.huzhuList = [];
  241. },
  242. showPopupsyqr(val){
  243. this.$router.push({name:'shyqrAdd',query:val});
  244. },
  245. showPopupcy(){
  246. this.$router.push({name:'nhcyAdd',query:{nhdm:this.shyqrData.nhdm,suyqrdm:this.shyqrData.suyqrdm,yhzgxOperate:"false"}});
  247. },
  248. showPopuphncy(val){
  249. this.$router.push({name:'nhcyAdd',query:val});
  250. },
  251. // 删除户内成员
  252. deletehncy(id,index){
  253. Dialog.confirm({
  254. title: '警告',
  255. message: '确认删除户内成员么?',
  256. })
  257. .then(() => {
  258. // on confirm
  259. delNhhncy(id).then(res => {
  260. if(res.code=="200"){
  261. this.hnnylist.splice(index,1);
  262. }
  263. })
  264. })
  265. .catch(() => {
  266. // on cancel
  267. });
  268. },
  269. }
  270. }
  271. </script>
  272. <style scoped>
  273. >>> .bannerBg{
  274. width: 100%;
  275. color:#fff;
  276. padding:10px;
  277. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  278. }
  279. >>> .van-hairline--bottom::after {
  280. border-bottom-width: 0;
  281. }
  282. >>> .title:before
  283. {
  284. content:"";
  285. width: 6px;
  286. height: 20PX;
  287. background: #7ac943;
  288. border-radius: 3px;
  289. position:absolute;
  290. left:0;
  291. bottom:0;
  292. }
  293. >>> .delete-button {
  294. height: 100%;
  295. }
  296. >>> .van-swipe-cell__wrapper{
  297. margin-right:-3px;
  298. }
  299. >>> .label-class .van-collapse-item__title--expanded{
  300. font-weight: bold;
  301. }
  302. </style>