移动端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

421 řádky
14 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 #title>
  13. <p style="color:#fff">入户调查</p>
  14. </template>
  15. </van-nav-bar>
  16. </div>
  17. <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">
  18. <van-row>
  19. <van-col span="4" :offset="1" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add'})">
  20. <van-icon :name="require('../../assets/images/housesteadSurvey/zjd'+(active==1?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  21. <p :style="{color:(active==1?'rgb(34, 183, 242)':'#000')}">宅基地</p>
  22. </van-col>
  23. <van-col span="2">
  24. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  25. </van-col>
  26. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add2'})" >
  27. <van-icon :name="require('../../assets/images/housesteadSurvey/nhxx'+(active==2?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  28. <p :style="{color:(active==2?'rgb(34, 183, 242)':'#000')}">农户</p>
  29. </van-col>
  30. <van-col span="2">
  31. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  32. </van-col>
  33. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add3'})" >
  34. <van-icon :name="require('../../assets/images/housesteadSurvey/fwxx'+(active==3?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  35. <p :style="{color:(active==3?'rgb(34, 183, 242)':'#000')}">房屋</p>
  36. </van-col>
  37. <van-col span="2">
  38. <div style="border-top: 2px dashed #b5b4b4;margin-top: 20px;"></div>
  39. </van-col>
  40. <van-col span="4" style="text-align:center;" @click="$router.push({path:'/homesteadSurvey/add4'})">
  41. <van-icon :name="require('../../assets/images/housesteadSurvey/fsss'+(active==4?'A':'D')+'.png')" size="1rem" style="margin-top:0px;"/>
  42. <p :style="{color:(active==4?'rgb(34, 183, 242)':'#000')}">附属物</p>
  43. </van-col>
  44. </van-row>
  45. </div>
  46. </van-sticky>
  47. <van-form ref="form">
  48. <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;">
  49. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">农户信息</p>
  50. <!--<van-field
  51. v-model="form.deptId"
  52. name="行政区划名称"
  53. label="行政区划名称"
  54. placeholder="行政区划名称"
  55. :rules="[{ required: true, message: '' }]"
  56. />-->
  57. <van-field
  58. input-align="right"
  59. v-model="form.xm"
  60. name="姓名"
  61. label="姓名"
  62. placeholder="请输入姓名"
  63. maxlength="50"
  64. autocomplete="off"
  65. :rules="[{ required: true }]"
  66. required
  67. />
  68. <field-select
  69. v-model="form.zjlx"
  70. label="证件类型"
  71. value-key="dictLabel"
  72. data-key="dictValue"
  73. placeholder="请输入使用权人证件类型"
  74. remote-url="/system/dict/data/type/zjlx"
  75. :on-remote-response="'data'"
  76. :rules="[{ required: true }]"
  77. required
  78. />
  79. <van-field
  80. input-align="right"
  81. v-model="form.zjhm"
  82. name="证件号码"
  83. label="证件号码"
  84. placeholder="请输入使用权人证件号码"
  85. maxlength="50"
  86. autocomplete="off"
  87. :rules="[{ required: true }]"
  88. required
  89. />
  90. <field-select
  91. v-model="form.yhzgx"
  92. label="与户主关系"
  93. value-key="dictLabel"
  94. data-key="dictValue"
  95. placeholder="选择与户主关系"
  96. remote-url="/system/dict/data/type/family_status"
  97. :on-remote-response="'data'"
  98. :rules="[{ required: true }]"
  99. required
  100. />
  101. <field-select
  102. v-model="form.xb"
  103. label="性别"
  104. value-key="dictLabel"
  105. data-key="dictValue"
  106. placeholder="选择性别"
  107. remote-url="/system/dict/data/type/sys_user_sex"
  108. :on-remote-response="'data'"
  109. :rules="[{ required: true }]"
  110. required
  111. />
  112. <field-select
  113. v-model="form.hklx"
  114. label="户口类型"
  115. value-key="dictLabel"
  116. data-key="dictValue"
  117. placeholder="选择户口类型"
  118. remote-url="/system/dict/data/type/account_type"
  119. :on-remote-response="'data'"
  120. :rules="[{ required: true }]"
  121. required
  122. />
  123. <van-field
  124. input-align="right"
  125. v-model="form.lxdh"
  126. name="联系电话"
  127. label="联系电话"
  128. placeholder="请输入联系电话"
  129. maxlength="50"
  130. autocomplete="off"
  131. />
  132. <field-select
  133. v-model="form.hyzk"
  134. label="婚姻状况"
  135. value-key="dictLabel"
  136. data-key="dictValue"
  137. placeholder="选择性别"
  138. remote-url="/system/dict/data/type/hyzk"
  139. :on-remote-response="'data'"
  140. />
  141. <van-field
  142. input-align="right"
  143. v-model="form.hkszd"
  144. name="户口所在地"
  145. label="户口所在地"
  146. placeholder="请输入户口所在地"
  147. maxlength="50"
  148. autocomplete="off"
  149. />
  150. <field-select
  151. v-model="form.cybz"
  152. label="成员备注"
  153. value-key="dictLabel"
  154. data-key="dictValue"
  155. placeholder="选择成员备注"
  156. remote-url="/system/dict/data/type/cybz"
  157. :on-remote-response="'data'"
  158. />
  159. <van-field
  160. input-align="right"
  161. v-model="form.cybzsm"
  162. name="备注说明"
  163. label="备注说明"
  164. placeholder="请输入备注说明"
  165. maxlength="50"
  166. autocomplete="off"
  167. />
  168. <field-select
  169. v-model="form.sjly"
  170. label="数据来源"
  171. value-key="dictLabel"
  172. data-key="dictValue"
  173. placeholder="选择数据来源"
  174. remote-url="/system/dict/data/type/sjly"
  175. :on-remote-response="'data'"
  176. />
  177. <FieldRadio
  178. v-model="form.sfbjtjjzzcy"
  179. label="是否本集体经济组织成员"
  180. value-key="dictLabel"
  181. data-key="dictValue"
  182. remote-url="/system/dict/data/type/house_yes_no"
  183. :on-remote-response="'data'"
  184. />
  185. <FieldRadio
  186. v-model="form.sfjbzgq"
  187. label="具备资格权"
  188. value-key="dictLabel"
  189. data-key="dictValue"
  190. remote-url="/system/dict/data/type/house_yes_no"
  191. :on-remote-response="'data'"
  192. />
  193. <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">户主专用信息</p>
  194. <FieldRadio
  195. v-model="form.sfwbh"
  196. label="是否五保户"
  197. value-key="dictLabel"
  198. data-key="dictValue"
  199. remote-url="/system/dict/data/type/house_yes_no"
  200. :on-remote-response="'data'"
  201. />
  202. <FieldRadio
  203. v-model="form.sfpkh"
  204. label="是否贫困户"
  205. value-key="dictLabel"
  206. data-key="dictValue"
  207. remote-url="/system/dict/data/type/house_yes_no"
  208. :on-remote-response="'data'"
  209. />
  210. <FieldRadio
  211. v-model="form.zqtczsfyzf"
  212. label="在其他村庄有住房"
  213. value-key="dictLabel"
  214. data-key="dictValue"
  215. remote-url="/system/dict/data/type/house_yes_no"
  216. :on-remote-response="'data'"
  217. />
  218. <FieldRadio
  219. v-model="form.jzhcssfyzf"
  220. label="在集镇或城市有住房"
  221. value-key="dictLabel"
  222. data-key="dictValue"
  223. remote-url="/system/dict/data/type/house_yes_no"
  224. :on-remote-response="'data'"
  225. />
  226. <FieldRadio
  227. v-model="form.sfbccm"
  228. label="本村村民"
  229. value-key="dictLabel"
  230. data-key="dictValue"
  231. remote-url="/system/dict/data/type/house_yes_no"
  232. :on-remote-response="'data'"
  233. />
  234. <field-select
  235. v-model="form.occupation"
  236. label="职业"
  237. value-key="dictLabel"
  238. data-key="dictValue"
  239. placeholder="选择职业"
  240. remote-url="/system/dict/data/type/occupation"
  241. :on-remote-response="'data'"
  242. />
  243. <field-select
  244. v-model="form.jzqk"
  245. label="居住情况"
  246. value-key="dictLabel"
  247. data-key="dictValue"
  248. placeholder="选择居住情况"
  249. remote-url="/system/dict/data/type/living_condition"
  250. :on-remote-response="'data'"
  251. />
  252. <van-field
  253. input-align="right"
  254. v-model="form.txdz"
  255. name="通讯地址"
  256. label="通讯地址"
  257. placeholder="请输入通讯地址"
  258. maxlength="50"
  259. autocomplete="off"
  260. />
  261. </div>
  262. <div style="margin: 16px;display: flex;justify-content: space-around;">
  263. <van-button v-if="permission == 'true'" round color="#22B7F2" style="width:45%" @click="submitzjd">保存</van-button>
  264. <van-button plain color="#22B7F2" style="width:45%" round type="info" @click="cancel">取消</van-button>
  265. </div>
  266. <div style="height: 50px;"></div>
  267. </van-form>
  268. </div>
  269. </template>
  270. <script>
  271. import FieldSelect from "@/components/form/FieldSelect";
  272. import FieldRadio from "@/components/form/FieldRadio";
  273. import {listNhhncy,addNhhncy,updateNhhncy,delNhhncy} from "@/api/homesteadSurvey/nhhncy";
  274. import { Notify, Dialog, Toast } from 'vant';
  275. import axios from "axios";
  276. export default {
  277. components: {FieldSelect, FieldRadio},
  278. name: "nhAdd",
  279. data() {
  280. return {
  281. active:2,
  282. permission:false,
  283. // 使用权人列表
  284. syqrlist:[
  285. {
  286. shyqrdbxm :'测试测试',
  287. shyqrdbzjhm :'12324648564',
  288. nhdm :'777888999',
  289. }
  290. ],
  291. minDate: new Date(),
  292. maxDate: new Date(2025, 10, 1),
  293. showZgqrzrq:false,
  294. form:{}
  295. };
  296. },
  297. created(){
  298. let data = this.$route.query;
  299. this.permission = localStorage.getItem("executePermission");
  300. this.form = data;
  301. if(this.form.nhdm == null){
  302. this.$set(this.form, 'zjlx', "01");
  303. this.$set(this.form, 'xb', "1");
  304. this.$set(this.form, 'yhzgx', "22");
  305. this.$set(this.form, 'hklx', "01");
  306. this.$set(this.form, 'hyzk', "01");
  307. this.$set(this.form, 'cybz', "9");
  308. this.$set(this.form, 'sjly', "01");
  309. this.$set(this.form, 'sfbjtjjzzcy', "1");
  310. this.$set(this.form, 'sfjbzgq', "1");
  311. this.$set(this.form, 'sfwbh', "0");
  312. this.$set(this.form, 'sfpkh', "0");
  313. this.$set(this.form, 'zqtczsfyzf', "0");
  314. this.$set(this.form, 'jzhcssfyzf', "0");
  315. this.$set(this.form, 'sfbccm', "1");
  316. this.$set(this.form, 'occupation', "1");
  317. this.$set(this.form, 'jzqk', "1");
  318. }else{
  319. this.getList();
  320. }
  321. },
  322. mounted(){
  323. },
  324. methods: {
  325. getList(){
  326. listNhhncy({yhzgx:"02",nhdm:this.form.nhdm}).then(response => {
  327. this.form = response.rows[0];
  328. });
  329. },
  330. submitzjd(){
  331. this.$refs.form.validate().then(() => {
  332. updateNhhncy(this.form).then(response => {
  333. let _this =this
  334. this.$toast({
  335. icon: 'success', // 找到自己需要的图标
  336. message: '保存成功',
  337. duration:"1000",
  338. onClose:function(){
  339. _this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: _this.form.zjddm}});
  340. }
  341. })
  342. });
  343. }).catch((e) => {
  344. Dialog({ type: 'danger', message: '请填写完整的表单项' });
  345. });
  346. },
  347. cancel(){
  348. this.$router.push({path:'/homesteadSurvey/add2',query: {zjddm: this.form.zjddm}});
  349. },
  350. guidProduct(){
  351. return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  352. var r = Math.random() * 16 | 0,
  353. v = c == 'x' ? r : (r & 0x3 | 0x8);
  354. return v.toString(16);
  355. });
  356. },
  357. /** 查找地图中定位点 */
  358. MapTag: function (data) {
  359. this.$refs[this.zjdProductResh].drawingPaceCountryDarw();
  360. },
  361. onConfirmZgqrzrq(data){
  362. this.form.zgqrzrq = this.getNowFormatDate(data).substr(0,10);
  363. this.showZgqrzrq = false;
  364. },
  365. goBack(){
  366. if(this.ztMap && this.enterMap ==1){
  367. if(this.form.id == null){
  368. this.backMap.backMapZjdAData.theGeom= "";
  369. }else{
  370. this.backMap.backMapZjdAData = this.form;
  371. }
  372. this.$cookies.set("search",this.backMap);
  373. } else {
  374. this.$cookies.set("search","");
  375. }
  376. this.$router.push({name: this.$router.back(-1)});
  377. // }
  378. },
  379. }
  380. }
  381. </script>
  382. <style scoped>
  383. >>> .bannerBg{
  384. width: 100%;
  385. color:#fff;
  386. padding:10px;
  387. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  388. }
  389. >>> .van-hairline--bottom::after {
  390. border-bottom-width: 0;
  391. }
  392. >>> .title:before
  393. {
  394. content:"";
  395. width: 6px;
  396. height: 20PX;
  397. background: #7ac943;
  398. border-radius: 3px;
  399. position:absolute;
  400. left:0;
  401. bottom:0;
  402. }
  403. >>> .delete-button {
  404. height: 100%;
  405. }
  406. >>> .van-swipe-cell__wrapper{
  407. margin-right:-3px;
  408. }
  409. >>> .label-class .van-collapse-item__title--expanded{
  410. font-weight: bold;
  411. }
  412. </style>