移动端
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

299 lignes
12 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 #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:30px 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. <p style="display: flex;align-items: center;">
  56. <img src="../../assets/images/housesteadSurvey/list03.png" alt="" style="margin-right: 5px;">
  57. <span style="line-height: 1;font-size: 16px;">{{item.xm}}</span>
  58. </p>
  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'" 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'" 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'" 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'" square text="删除" type="danger" class="delete-button" @click="deletehncy(item.id,index)"/>
  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: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;">
  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. permission:false,
  135. // 使用权人列表
  136. shyqrData:{},
  137. hnnylist:[],
  138. guohuData: {
  139. visible: false,
  140. huzhuList: [],
  141. id: null,
  142. to: null,
  143. },
  144. };
  145. },
  146. created(){
  147. this.shyqrData = this.$route.query;
  148. this.permission = localStorage.getItem("executePermission");
  149. this.getList();
  150. },
  151. mounted(){
  152. },
  153. methods: {
  154. getList(){
  155. listNhhncy({nhdm:this.shyqrData.nhdm }).then(response => {
  156. this.hnnylist = response.rows;
  157. });
  158. },
  159. goBack(){
  160. if(this.ztMap && this.enterMap ==1){
  161. if(this.form.id == null){
  162. this.backMap.backMapZjdAData.theGeom= "";
  163. }else{
  164. this.backMap.backMapZjdAData = this.form;
  165. }
  166. this.$cookies.set("search",this.backMap);
  167. } else {
  168. this.$cookies.set("search","");
  169. }
  170. this.$router.push({name: this.$router.back(-1)});
  171. // }
  172. },
  173. handleToHuzhu(row) {
  174. const ids = row.id || this.ids;
  175. Dialog.confirm({
  176. title: '系统提示',
  177. message: '是否确认将此成员设为本户新的户主?',
  178. confirmButtonText: '确定',
  179. cancelButtonText: '取消'
  180. }).then(function() {
  181. return toHuzhu(ids);
  182. }).then(() => {
  183. this.$notify({ type: 'success' , message: "设为户主成功" });
  184. location.reload(true);
  185. }).catch(() => {});
  186. },
  187. handleFenHu(row) {
  188. const ids = row.id || this.ids;
  189. Dialog.confirm({
  190. title: '系统提示',
  191. message: '是否确认将此成员新立一户并设为户主?',
  192. confirmButtonText: '确定',
  193. cancelButtonText: '取消'
  194. }).then(function() {
  195. return fenhu(ids);
  196. }).then(() => {
  197. this.$notify({ type: 'success' , message: "分户成功" });
  198. location.reload(true);
  199. }).catch(() => {});
  200. },
  201. handleGuohu(row) {
  202. const id = row.id || this.ids
  203. listNhhncy({
  204. deptId: this.$store.state.user.loginDeptId,
  205. yhzgx: '02',
  206. }).then(response => {
  207. this.guohuData.id = id;
  208. this.guohuData.visible = true;
  209. this.guohuData.huzhuList = response.rows.filter((x) => x.nhdm != row.nhdm);
  210. this.guohuData.huzhuList.map(function(item){
  211. item.xm = item.xm+item.nhdm;
  212. })
  213. });
  214. },
  215. onGuohuChanged(val){
  216. this.$set(this.guohuData, 'to',val);
  217. },
  218. guohu() {
  219. this.$refs["guohu_form"].validate(valid => {
  220. if (valid) {
  221. guohu(this.guohuData.id, this.guohuData.to).then(response => {
  222. if(response.code != 200) throw response.msg;
  223. this.$notify({ type: 'success' , message: "移户成功" });
  224. this.closeGuohu();
  225. location.reload(true);
  226. }).catch(() => {});
  227. }
  228. });
  229. },
  230. closeGuohu() {
  231. this.guohuData.visible = false;
  232. this.guohuData.id = this.guohuData.to = null;
  233. this.guohuData.huzhuList = [];
  234. },
  235. showPopupsyqr(val){
  236. this.$router.push({name:'shyqrAdd',query:val});
  237. },
  238. showPopupcy(){
  239. this.$router.push({name:'nhcyAdd',query:{nhdm:this.shyqrData.nhdm,suyqrdm:this.shyqrData.suyqrdm,yhzgxOperate:"false"}});
  240. },
  241. showPopuphncy(val){
  242. this.$router.push({name:'nhcyAdd',query:val});
  243. },
  244. // 删除户内成员
  245. deletehncy(id,index){
  246. Dialog.confirm({
  247. title: '警告',
  248. message: '确认删除户内成员么?',
  249. })
  250. .then(() => {
  251. // on confirm
  252. delNhhncy(id).then(res => {
  253. if(res.code=="200"){
  254. this.hnnylist.splice(index,1);
  255. }
  256. })
  257. })
  258. .catch(() => {
  259. // on cancel
  260. });
  261. },
  262. }
  263. }
  264. </script>
  265. <style scoped>
  266. >>> .bannerBg{
  267. width: 100%;
  268. color:#fff;
  269. padding:10px;
  270. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  271. }
  272. >>> .van-hairline--bottom::after {
  273. border-bottom-width: 0;
  274. }
  275. >>> .title:before
  276. {
  277. content:"";
  278. width: 6px;
  279. height: 20PX;
  280. background: #7ac943;
  281. border-radius: 3px;
  282. position:absolute;
  283. left:0;
  284. bottom:0;
  285. }
  286. >>> .delete-button {
  287. height: 100%;
  288. }
  289. >>> .van-swipe-cell__wrapper{
  290. margin-right:-3px;
  291. }
  292. >>> .label-class .van-collapse-item__title--expanded{
  293. font-weight: bold;
  294. }
  295. </style>