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

744 line
31 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. title="农村宅基地申请"
  5. left-arrow
  6. fixed
  7. placeholder
  8. @click-left="$router.back(-1)"
  9. />
  10. <p class="topTit">农村宅基地和建房(规划许可)申请表</p>
  11. <div class="main">
  12. <van-form @submit="onSubmit">
  13. <div v-if="applicationDetail.tHouseApplyProposer">
  14. <p class="main_title">申请户主信息</p>
  15. <div class="main_box">
  16. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposer.memberName" label="姓名" placeholder="姓名" input-align="right"/>
  17. <van-field
  18. readonly
  19. clickable
  20. name="picker"
  21. v-model="sexValue"
  22. label="性别"
  23. placeholder="选择性别"
  24. @click=" auditStatus==true ? '' : showSex = true"
  25. input-align="right"
  26. right-icon="arrow-down"
  27. :rules="[{ required: true }]" required
  28. />
  29. <van-popup v-model="showSex" position="bottom">
  30. <van-picker
  31. show-toolbar
  32. :columns="userSex"
  33. @confirm="onConfirmSex"
  34. @cancel="showSex = false"
  35. :readonly="auditStatus"
  36. />
  37. </van-popup>
  38. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposer.age" label="年龄" placeholder="年龄" input-align="right"/>
  39. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposer.phone" label="联系电话" placeholder="联系电话" input-align="right"/>
  40. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposer.idcard" label="身份证号" placeholder="身份证号" input-align="right"/>
  41. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposer.householdRegister" label="户口所在地" placeholder="户口所在地" input-align="right"/>
  42. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposer.familyAddress" label="家庭住址" placeholder="家庭住址" input-align="right"/>
  43. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposer.members" label="家庭人口数" placeholder="家庭人口数" input-align="right"/>
  44. <van-cell title="是否已有宅基地">
  45. <template #right-icon>
  46. <van-radio-group :rules="[{ required: true }]" required :disabled="auditStatus" @change="existHomesteadChange" v-model="applicationDetail.tHouseApplyProposer.existHomestead" direction="horizontal">
  47. <van-radio name="Y">是</van-radio>
  48. <van-radio name="N">否</van-radio>
  49. </van-radio-group>
  50. </template>
  51. </van-cell>
  52. </div>
  53. </div>
  54. <div v-if="applicationDetail.tHouseApplyFamilyMembers">
  55. <p class="main_title">家庭成员信息<van-button icon="plus" size="mini" type="info" native-type="button" class="addFamily" @click="addFamily" v-if="!auditStatus" /></p>
  56. <van-collapse v-model="activeNames" v-if="auditStatus">
  57. <van-collapse-item class="collapse" v-for="(item , index) in applicationDetail.tHouseApplyFamilyMembers" :key="index" :name="index+1">
  58. <template #title>
  59. <van-row>
  60. <van-col span="8">{{item.memberName}}</van-col>
  61. <van-col span="8">{{item.age}}</van-col>
  62. <van-col span="8">{{item.familyStatusName}}</van-col>
  63. </van-row>
  64. </template>
  65. <van-field :readonly="auditStatus" v-model="item.memberName" label="姓名" placeholder="姓名" input-align="right"/>
  66. <van-field :readonly="auditStatus" v-model="item.age" label="年龄" placeholder="年龄" input-align="right"/>
  67. <van-field :readonly="auditStatus" v-model="item.familyStatusName" label="与户主关系" placeholder="与户主关系" input-align="right"/>
  68. <van-field :readonly="auditStatus" v-model="item.idcard" label="身份证号" placeholder="身份证号" input-align="right"/>
  69. <van-field :readonly="auditStatus" v-model="item.householdRegister" label="户口所在地" placeholder="户口所在地" input-align="right"/>
  70. </van-collapse-item>
  71. </van-collapse>
  72. <div class="familyList" v-if="!auditStatus" v-for="(item , index) in applicationDetail.tHouseApplyFamilyMembers" :key="index">
  73. <div class="main_box" style="margin-bottom: 20px">
  74. <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteFamily(index)" />
  75. <van-field v-model="item.memberName" label="姓名" placeholder="姓名" input-align="right"/>
  76. <van-field v-model="item.age" label="年龄" placeholder="年龄" input-align="right"/>
  77. <van-field v-model="item.familyStatusName" label="与户主关系" placeholder="与户主关系" input-align="right"/>
  78. <van-field v-model="item.idcard" label="身份证号" placeholder="身份证号" input-align="right"/>
  79. <van-field v-model="item.householdRegister" label="户口所在地" placeholder="户口所在地" input-align="right"/>
  80. </div>
  81. </div>
  82. <!-- <div class=" familyList">-->
  83. <!-- <van-button icon="minus" size="mini" type="danger" class="deleteFamily" />-->
  84. <!-- <div class="main_box">-->
  85. <!-- <van-field label="姓名" placeholder="姓名" input-align="right"/>-->
  86. <!-- <van-field label="年龄" placeholder="年龄" input-align="right"/>-->
  87. <!-- <van-field label="与户主关系" placeholder="与户主关系" input-align="right"/>-->
  88. <!-- <van-field label="身份证号" placeholder="身份证号" input-align="right"/>-->
  89. <!-- <van-field label="户口所在地" placeholder="户口所在地" input-align="right"/>-->
  90. <!-- </div>-->
  91. <!-- </div>-->
  92. </div>
  93. <div v-if="CurrentSituation">
  94. <p class="main_title">现宅基地及农房状况</p>
  95. <div class="main_box">
  96. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyCurrentSituation.landArea" label="宅基地面积" placeholder="宅基地面积" input-align="right"/>
  97. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyCurrentSituation.landPerArea" label="人均宅基地面积" placeholder="人均宅基地面积㎡" input-align="right" label-width="auto"/>
  98. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyCurrentSituation.landCertificateNo" label="不动产单元号" placeholder="不动产单元号" input-align="right"/>
  99. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyCurrentSituation.buildingArea" label="建筑面积" placeholder="建筑面积㎡" input-align="right"/>
  100. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyCurrentSituation.buildingPerArea" label="人均建筑面积" placeholder="人均建筑面积㎡" input-align="right"/>
  101. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyCurrentSituation.houseCertificateNo" label="农民房屋幢号" placeholder="户口所在地" input-align="right"/>
  102. <van-field
  103. readonly
  104. clickable
  105. name="picker"
  106. :value="landIsposalValue"
  107. label="处置情况"
  108. placeholder="选择宅基地处置情况"
  109. @click=" auditStatus==true ? '' : showLandIsposal = true"
  110. input-align="right"
  111. right-icon="arrow-down"
  112. :readonly="auditStatus"
  113. :rules="[{ required: true }]" required
  114. />
  115. <van-popup v-model="showLandIsposal" position="bottom">
  116. <van-picker
  117. show-toolbar
  118. :columns="landIsposal"
  119. @confirm="onConfirmLandIsposal"
  120. @cancel="showLandIsposal = false"
  121. :readonly="auditStatus"
  122. />
  123. </van-popup>
  124. <!-- <van-field-->
  125. <!-- readonly-->
  126. <!-- clickable-->
  127. <!-- name="picker"-->
  128. <!-- :value="applicationDetail.tHouseApplyCurrentSituation.buildingType"-->
  129. <!-- label="建房类型"-->
  130. <!-- placeholder="选择建房类型"-->
  131. <!-- @click="showBuildingType = true"-->
  132. <!-- input-align="right"-->
  133. <!-- right-icon="arrow-down"-->
  134. <!-- />-->
  135. <!-- <van-popup v-model="showBuildingType" position="bottom">-->
  136. <!-- <van-picker-->
  137. <!-- show-toolbar-->
  138. <!-- :columns="buildingType"-->
  139. <!-- @confirm="onConfirmBuildingType"-->
  140. <!-- @cancel="showBuildingType = false"-->
  141. <!-- />-->
  142. <!-- </van-popup>-->
  143. </div>
  144. </div>
  145. <div v-if="applicationDetail.tHouseApplyProposedSituation">
  146. <p class="main_title">拟申请宅基地及建房情况</p>
  147. <div class="main_box">
  148. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposedSituation.location" label="拟建位置" placeholder="拟建位置" input-align="right"/>
  149. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposedSituation.landArea" label="宅基地面积" placeholder="宅基地面积" input-align="right"/>
  150. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposedSituation.east" label="东至" placeholder="东至" input-align="right"/>
  151. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposedSituation.west" label="西至" placeholder="西至" input-align="right"/>
  152. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposedSituation.south" label="南至" placeholder="南至" input-align="right"/>
  153. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposedSituation.north" label="北至" placeholder="北至" input-align="right"/>
  154. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposedSituation.buildingArea" label="建筑面积" placeholder="建筑面积" input-align="right"/>
  155. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposedSituation.buildingFloors" label="建筑层数" placeholder="建筑层数" input-align="right"/>
  156. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposedSituation.buildingHight" label="建筑高度" placeholder="建筑高度" input-align="right"/>
  157. <van-cell title="是否征求相邻权利人意见">
  158. <template #right-icon>
  159. <van-radio-group :disabled="auditStatus" v-model="applicationDetail.tHouseApplyProposedSituation.isAdvice" direction="horizontal">
  160. <van-radio name="1">是</van-radio>
  161. <van-radio name="2">否</van-radio>
  162. </van-radio-group>
  163. </template>
  164. </van-cell>
  165. <van-field
  166. readonly
  167. clickable
  168. name="picker"
  169. v-model="housingStructureValue"
  170. label="房屋构造"
  171. placeholder="选择房屋构造"
  172. @click=" auditStatus==true ? '' : showHousingStructure = true"
  173. input-align="right"
  174. right-icon="arrow-down"
  175. :rules="[{ required: true }]" required
  176. />
  177. <van-popup v-model="showHousingStructure" position="bottom">
  178. <van-picker
  179. show-toolbar
  180. :columns="housingStructure"
  181. @confirm="onConfirmHousingStructure"
  182. @cancel="showHousingStructure = false"
  183. :readonly="auditStatus"
  184. />
  185. </van-popup>
  186. <van-field
  187. readonly
  188. clickable
  189. name="picker"
  190. :value="buildingTypeValue"
  191. label="建房类型"
  192. placeholder="选择建房类型"
  193. @click=" auditStatus==true ? '' : showBuildingType = true"
  194. input-align="right"
  195. right-icon="arrow-down"
  196. :rules="[{ required: true }]" required
  197. />
  198. <van-popup v-model="showBuildingType" position="bottom">
  199. <van-picker
  200. show-toolbar
  201. :columns="buildingType"
  202. @confirm="onConfirmBuildingType"
  203. @cancel="showBuildingType = false"
  204. />
  205. </van-popup>
  206. <van-cell title="设计图纸">
  207. <template #right-icon>
  208. <van-radio-group :disabled="auditStatus" @change="designPaperChange" v-model="applicationDetail.tHouseApplyProposedSituation.designPaper" direction="horizontal">
  209. <van-radio name="1">委托设计</van-radio>
  210. <van-radio name="2">选通用图</van-radio>
  211. </van-radio-group>
  212. </template>
  213. </van-cell>
  214. <van-field
  215. readonly
  216. clickable
  217. name="picker"
  218. :value="houseTypeValue"
  219. placeholder="选择户型图"
  220. @click=" auditStatus==true ? '' : showHouseType = true"
  221. input-align="right"
  222. right-icon="arrow-down"
  223. v-if="showHouse"
  224. :rules="[{ required: true }]" required
  225. />
  226. <van-popup v-model="showHouseType" position="bottom">
  227. <van-picker
  228. show-toolbar
  229. :columns="houseType"
  230. @confirm="onConfirmHouseType"
  231. @cancel="showHouseType = false"
  232. />
  233. </van-popup>
  234. </div>
  235. </div>
  236. <div v-if="applicationDetail.tHouseApplyProposer">
  237. <p class="main_title">申请理由</p>
  238. <div class="main_box">
  239. <van-field
  240. rows="3"
  241. autosize
  242. type="textarea"
  243. placeholder="申请理由"
  244. input-align="left"
  245. v-model="applicationDetail.tHouseApplyProposer.applyReasion"
  246. :readonly="auditStatus"
  247. :rules="[{ required: true }]" required
  248. />
  249. <van-row>
  250. <van-col span="12"><van-field :rules="[{ required: true }]" required :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposer.memberName" label="申请人" placeholder="申请人" input-align="left" label-width="auto"/></van-col>
  251. <van-col span="12">
  252. <van-field :rules="[{ required: true }]" required :readonly="auditStatus" clickable v-model="applicationDetail.tHouseApplyProposer.applyTime" label-width="auto" placeholder="选择日期" @click="showApplyTime = true">
  253. <template #label>
  254. <van-icon name="notes-o" size="20"/>
  255. </template>
  256. </van-field>
  257. <van-calendar v-model="showApplyTime" @confirm="onConfirmApplyTime" />
  258. <!-- <van-field :readonly="auditStatus" v-model="applicationDetail.tHouseApplyProposer.applyTime == '' ? nowTime : applicationDetail.tHouseApplyProposer.applyTime" label-width="auto">-->
  259. <!-- <template #label>-->
  260. <!-- <van-icon name="notes-o" size="20"/>-->
  261. <!-- </template>-->
  262. <!-- </van-field>-->
  263. </van-col>
  264. </van-row>
  265. </div>
  266. </div>
  267. <div v-for="(item , index) in fileArray" :key="index">
  268. <p class="main_title">{{item.fileTypeName}}</p><!-- 未对接 -->
  269. <div class="main_box file-box">
  270. <!-- <van-uploader v-if="item.findList" v-model="item.findList" multiple />-->
  271. <van-uploader :after-read="afterRead" :before-delete="deleteFile" v-model="item.findList" multiple />
  272. </div>
  273. </div>
  274. <div v-if="applicationDetail.tHouseApplyProposer" style="margin: 16px;">
  275. <van-row>
  276. <van-col span="12" align="center">
  277. <van-button type="info" native-type="submit" class="submitButton">保存</van-button>
  278. </van-col>
  279. <van-col span="12" align="center">
  280. <van-button type="info" native-type="submit" class="submitButton">保存并提交</van-button>
  281. </van-col>
  282. </van-row>
  283. <div class="clear"></div>
  284. </div>
  285. </van-form>
  286. </div>
  287. </div>
  288. </template>
  289. <script>
  290. import { allInformation , treeSingleProcessView , attachmentFind , saveHouseBaseInfo , houseList , attach , removeFile , getHouseMembers } from "@/api/application/index";
  291. export default {
  292. name: "applicationForm",
  293. data() {
  294. return {
  295. active: 0,
  296. nowTime: '',//当前日期
  297. fileList: [],
  298. fileList2: [],
  299. radio:'1',
  300. value: '',
  301. columns: ['杭州', '宁波', '温州', '嘉兴', '湖州'],
  302. showPicker: false,
  303. showBuildingType: false,
  304. showLandIsposal: false,
  305. showHousingStructure: false,
  306. showStartDate: false,
  307. showEndDate: false,
  308. showApplyTime:false,
  309. showHouseType:false,
  310. showHouse:false,
  311. showSex:false,
  312. id:'',
  313. applicationDetail:{
  314. //上传文件id
  315. fileList: [],
  316. tHouseApplyProposer: {
  317. memberName: '',
  318. farmerCode: "",
  319. sex: "",
  320. age: '',
  321. phone: "",
  322. idcard: "",
  323. householdRegister: "",
  324. familyAddress: "",
  325. members: '',
  326. applyReasion: "",
  327. houseSource: '',
  328. existHomestead: "Y"
  329. },
  330. tHouseApplyFamilyMembers: [
  331. {
  332. memberName: "",
  333. age: '',
  334. idcard: "",
  335. familyStatusName: "",
  336. householdRegister: ""
  337. }
  338. ],
  339. tHouseApplyCurrentSituation: {
  340. landArea: "",
  341. landPerArea: "",
  342. landCertificateNo: "",
  343. buildingPerArea: "",
  344. houseCertificateNo: "",
  345. landIsposal: "",
  346. reservedArea: "",
  347. otherRemark: "",
  348. buildingType: "",
  349. buildingArea: ""
  350. },
  351. tHouseApplyProposedSituation: {
  352. location: "",
  353. landArea: "",
  354. east: "",
  355. west: "",
  356. south: "",
  357. north: "",
  358. geographicType: "",
  359. constructionLandArea: "",
  360. unusedLandArea: "",
  361. agriculturalLandArea: "",
  362. farmLandArea: "",
  363. forestLandArea: "",
  364. buildingArea: "",
  365. buildingFloors: "",
  366. buildingHight: "",
  367. designPaper: "1",
  368. housingStructure: "",
  369. isAdvice: "1",
  370. buildingType: "",
  371. theGeom:''
  372. }
  373. },
  374. //建房类型字典
  375. buildingType:[],
  376. //处置情况字典
  377. landIsposal:[],
  378. //房屋构造字典
  379. housingStructure:[],
  380. //性别字典
  381. userSex:[],
  382. //户型
  383. houseType:[],
  384. //请求参数
  385. parameter:{
  386. businessType: "house",
  387. houseApplyStatus: 1,
  388. processKey: "baseApply",
  389. tableName: "t_house_apply_proposer"
  390. },
  391. //文件配置
  392. fileArray:[],
  393. //获取上传附件
  394. params:{
  395. tableId: '',
  396. tableName: "t_house_apply_proposer",
  397. fileType: ''
  398. },
  399. auditStatus:false,
  400. activeNames:['1'],
  401. housingStructureValue:'',//当前显示房屋构造
  402. buildingTypeValue:'',//当前显示建房类型
  403. landIsposalValue:'',//当前显示处置情况
  404. houseTypeValue:'',//当前显示户型
  405. sexValue:'',//当前显示性别
  406. CurrentSituation:false,
  407. };
  408. },
  409. created() {
  410. this.getDetail()
  411. },
  412. methods: {
  413. afterRead(file) {
  414. this.$forceUpdate();
  415. return;
  416. // 此时可以自行将文件上传至服务器
  417. for ( var i = 0 ; i < this.fileList.length ; i++){
  418. if(this.fileList[i].url == undefined&&this.fileList!='') {
  419. this.fileList[i] = {url:this.fileList[i].content, id: '', isImage: true};
  420. }
  421. }
  422. },
  423. //删除图片
  424. deleteFile(elIndex){
  425. if(elIndex.id != ''){
  426. removeFile(elIndex.id).then(response => {});
  427. }
  428. this.$forceUpdate();
  429. return (file, name) => {
  430. let fileIndex = name.index
  431. this.fileList[elIndex].splice(fileIndex, 1)
  432. this.upLoadList[elIndex].splice(fileIndex, 1)
  433. }
  434. },
  435. //获取数据集合
  436. getDetail(){
  437. //性别字典查询
  438. // this.houseGetDicts("sys_user_sex").then((res) => {
  439. // response.data.tHouseApplyProposer.sex = this.selectDictLabel(res.data, response.data.tHouseApplyProposer.sex);
  440. // });
  441. //建房类型字典查询
  442. this.houseGetDicts("building_type").then((res) => {
  443. res.data.map(item => {
  444. this.buildingType.push({ value:item.dictValue, text: item.dictLabel});
  445. });
  446. });
  447. //房屋构造字典查询
  448. this.houseGetDicts("housing_structure").then((res) => {
  449. res.data.map(item => {
  450. this.housingStructure.push({ value:item.dictValue, text: item.dictLabel});
  451. });
  452. });
  453. //处置情况字典查询
  454. this.CurrentSituation = true ;
  455. this.houseGetDicts("land_isposal").then((res) => {
  456. res.data.map(item => {
  457. this.landIsposal.push({ value:item.dictValue, text: item.dictLabel});
  458. });
  459. });
  460. //户型图查询
  461. houseList().then(res => {
  462. res.rows.map(item => {
  463. this.houseType.push({ value:item.id, text: item.name});
  464. });
  465. });
  466. //获取上传文件列表
  467. treeSingleProcessView(this.parameter).then(res => {
  468. this.fileArray = res.rows
  469. });
  470. //获取上传文件列表
  471. getHouseMembers().then(res => {
  472. this.applicationDetail.tHouseApplyProposer = res.data.tHouseApplyProposer;
  473. this.applicationDetail.tHouseApplyFamilyMembers = res.data.tHouseApplyFamilyMembers;
  474. //性别字典查询
  475. this.houseGetDicts("sys_user_sex").then((res2) => {
  476. res2.data.map(item => {
  477. this.userSex.push({ value:item.dictValue, text: item.dictLabel});
  478. });
  479. this.sexValue = this.selectDictLabel(res2.data, res.data.tHouseApplyProposer.sex);
  480. });
  481. });
  482. },
  483. onConfirmApplyTime(date) {
  484. this.applicationDetail.tHouseApplyProposer.applyTime = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
  485. this.showApplyTime = false;
  486. },
  487. //基地开工时间
  488. onConfirmStartDate(date) {
  489. this.applicationDetail.tHouseApplyStart.startDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
  490. this.showStartDate = false;
  491. },
  492. //基地竣工时间
  493. onConfirmEndDate(date) {
  494. this.applicationDetail.tHouseApplyStart.endDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
  495. this.showEndDate = false;
  496. },
  497. //选择性别
  498. onConfirmSex(data){
  499. this.sexValue = data.text;
  500. this.applicationDetail.tHouseApplyProposer.sex = data.value;
  501. this.showSex = false;
  502. },
  503. //选择建房类型
  504. onConfirmBuildingType(data){
  505. this.buildingTypeValue = data.text;
  506. this.applicationDetail.tHouseApplyProposedSituation.buildingType = data.value;
  507. this.showBuildingType = false;
  508. },
  509. //选择宅基地处置情况
  510. onConfirmLandIsposal(data){
  511. this.landIsposalValue = data.text;
  512. this.applicationDetail.tHouseApplyCurrentSituation.landIsposal = data.value;
  513. this.showLandIsposal = false;
  514. },
  515. //选择房屋构造
  516. onConfirmHousingStructure(data){
  517. this.housingStructureValue = data.text;
  518. this.applicationDetail.tHouseApplyProposedSituation.housingStructure = data.value;
  519. this.showHousingStructure = false;
  520. },
  521. //选择户型
  522. onConfirmHouseType(data){
  523. this.houseTypeValue = data.text;
  524. this.applicationDetail.tHouseApplyProposedSituation.houseTypeId = data.value;
  525. this.showHouseType = false;
  526. },
  527. //添加家庭成员
  528. addFamily(){
  529. this.applicationDetail.tHouseApplyFamilyMembers.push({
  530. applyProposerId:this.applicationDetail.tHouseApplyFamilyMembers[0].applyProposerId,
  531. memberName:'',
  532. age:'',
  533. familyStatusName:'',
  534. idcard :'',
  535. householdRegister:'',
  536. });
  537. },
  538. //删除家庭成员
  539. deleteFamily(index){
  540. this.applicationDetail.tHouseApplyFamilyMembers.splice(index,1)
  541. },
  542. //是否有宅基地选项改变
  543. existHomesteadChange(name){
  544. if (name == 'Y'){
  545. if (this.applicationDetail.tHouseApplyCurrentSituation == null){
  546. //现宅基地情况
  547. this.applicationDetail.tHouseApplyCurrentSituation = {
  548. //宅基地面积
  549. landArea: '',
  550. //人均宅基地面积
  551. landPerArea: '',
  552. //不动产单元号
  553. landCertificateNo: '',
  554. //农民房屋幢号
  555. houseCertificateNo: '',
  556. //建筑面积
  557. buildingArea: '',
  558. //人均建筑面积
  559. buildingPerArea: '',
  560. //现宅基地处置情况 字典 land_isposal
  561. landIsposal: ""
  562. };
  563. this.CurrentSituation = true ;
  564. //处置情况字典查询
  565. this.houseGetDicts("land_isposal").then((res) => {
  566. res.data.map(item => {
  567. this.landIsposal.push({ value:item.dictValue, text: item.dictLabel});
  568. });
  569. this.landIsposalValue= this.selectDictLabel(res.data, this.applicationDetail.tHouseApplyCurrentSituation.landIsposal);
  570. });
  571. }
  572. this.CurrentSituation = true;
  573. }else{
  574. this.CurrentSituation = false;
  575. }
  576. },
  577. //图纸选择改变
  578. designPaperChange(name){
  579. if(name == 2){
  580. this.showHouse = true;
  581. }else{
  582. this.showHouse = false;
  583. }
  584. },
  585. base64toFile(dataurl, filename = "file") {
  586. let arr = dataurl.split(",");
  587. let mime = arr[0].match(/:(.*?);/)[1];
  588. let suffix = mime.split("/")[1];
  589. let bstr = atob(arr[1]);
  590. let n = bstr.length;
  591. let u8arr = new Uint8Array(n);
  592. while (n--) {
  593. u8arr[n] = bstr.charCodeAt(n);
  594. }
  595. return new File([u8arr], `${filename}.${suffix}`, {
  596. type: mime,
  597. });
  598. },
  599. //申请提交
  600. onSubmit(){
  601. var that = this;
  602. let form = {};
  603. form.fileList=[];
  604. const params = new FormData()
  605. params.append('tableId', '')
  606. params.append('tableName', 't_house_apply_proposer')
  607. params.append('bizPath', 't_house_apply_proposer')
  608. for (let i = 0 ; i < this.fileArray.length ; i++){
  609. console.log(this.fileArray[i].fileType)
  610. if (this.fileArray[i].findList == null || this.fileArray[i].findList == undefined || this.fileArray[i].findList == ''){
  611. continue
  612. }
  613. for (let j = 0 ; j < this.fileArray[i].findList.length ; j++){
  614. params.set('fileType', this.fileArray[i].fileType)
  615. if (this.fileArray[i].findList[j].url){
  616. continue;
  617. }
  618. params.set('file', this.base64toFile(this.fileArray[i].findList[j].content))
  619. console.log(params)
  620. attach(params).then(res => {
  621. console.log(res)
  622. form.fileList.push(res.id);
  623. });
  624. }
  625. }
  626. form.tHouseApplyProposer=this.applicationDetail.tHouseApplyProposer;
  627. form.tHouseApplyFamilyMembers=this.applicationDetail.tHouseApplyFamilyMembers;
  628. form.tHouseApproveVillageOptions=this.applicationDetail.tHouseApproveVillageOptions;
  629. form.tHouseApplyCurrentSituation=this.applicationDetail.tHouseApplyCurrentSituation;
  630. form.tHouseApplyProposedSituation=this.applicationDetail.tHouseApplyProposedSituation;
  631. setTimeout(function(){
  632. saveHouseBaseInfo(form).then(res => {
  633. console.log(res)
  634. if(res.code = 200){
  635. that.$toast.success('保存成功');
  636. }
  637. });
  638. },1000)
  639. },
  640. },
  641. }
  642. </script>
  643. <style scoped lang="scss">
  644. .app-container {
  645. }
  646. .van-steps{
  647. padding: 2% 6% 0;
  648. }
  649. .topTit{
  650. margin-top: 0.4rem;
  651. font-size: 0.45rem;
  652. background-color: #1D6FE9;
  653. color: #FFFFFF;
  654. line-height: 58px;
  655. text-align: center;
  656. padding: 15px 0;
  657. box-shadow: 0px 3px 6px 0px rgba(15,67,145,0.40);
  658. }
  659. .main_title{
  660. font-size: 0.4rem;
  661. color: #1D6FE9;
  662. margin: 0.2rem 6%;
  663. position: relative;
  664. }
  665. .main_box{
  666. width: 96%;
  667. margin: 0 auto;
  668. border-radius: 6px;
  669. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  670. overflow: hidden;
  671. background-color: #FFF;
  672. }
  673. .collapse{
  674. width: 96%;
  675. margin: 0 auto;
  676. border-radius: 6px;
  677. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  678. overflow: hidden;
  679. margin-bottom: 15px;
  680. }
  681. /deep/.van-radio--horizontal{
  682. margin-left: 20px;
  683. margin-right: 0;
  684. }
  685. .file-box{
  686. padding: 2% 5% 0;
  687. }
  688. .submitButton{
  689. width: 80%;
  690. margin: 0 auto;
  691. background-color: #1D6FE9;
  692. border-radius: 14px;
  693. }
  694. .timeTit{
  695. text-align: center;
  696. font-size: 16px;
  697. line-height: 27px;
  698. }
  699. .action-box{
  700. padding: 15px 0!important;
  701. margin-top: 0.4rem;
  702. }
  703. .check-box{
  704. margin-top: 0.4rem;
  705. }
  706. .addFamily{
  707. position: absolute;
  708. top: -2px;
  709. right: 0;
  710. border-radius: 50%;
  711. }
  712. .deleteFamily{
  713. position: absolute;
  714. top: -0.3rem;
  715. right: 6%;
  716. z-index: 9;
  717. border-radius: 50%;
  718. }
  719. .familyList{
  720. margin-top: 0.4rem;
  721. position: relative;
  722. }
  723. .noModify{
  724. .topTit{
  725. background-color:#ABABAB ;
  726. box-shadow: 0px 3px 6px 0px rgba(171,171,171,0.40);
  727. }
  728. .van-cell__title{
  729. color: #B4B0B0;
  730. }
  731. }
  732. </style>