authenadd.vue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  1. <template>
  2. <view class="check">
  3. <uni-forms ref="form" :model="datainfo" :rules="rules">
  4. <view class="cbox">
  5. <view class="chmain">
  6. <picker range-key='dictLabel' :disabled="ptype=='edit'&&datainfo.examine!='3'?true:false" :value="rylxidx" :range="rylxList" @change='bindDateChangee'>
  7. <uni-forms-item label="人员类型" required name="residentType">
  8. <view class="flexc mh35">
  9. <view class="flex1 txr f13 co27" v-if="datainfo.residentType&&!rylx">{{statusFormats(datainfo.residentType,rylxList,'rylx')}}</view>
  10. <view class="flex1 txr f13" v-else :class="rylx?'co27':'coa'">{{rylx||"请选择人员类型"}}</view>
  11. <view class="rimg"><image :src="rimg"></image></view>
  12. </view>
  13. </uni-forms-item>
  14. </picker>
  15. <uni-forms-item label="姓名" name="residentName">
  16. <view class="flexc">
  17. <uni-easyinput :disabled="isdisabled" v-model="datainfo.residentName" :inputBorder='false' placeholder="请输入姓名" />
  18. </view>
  19. </uni-forms-item>
  20. <uni-forms-item label="手机号码" required name="residentPhone">
  21. <view class="flexc">
  22. <uni-easyinput :disabled="isdisabled" v-model="datainfo.residentPhone" :inputBorder='false' placeholder="请输入手机号码" />
  23. </view>
  24. </uni-forms-item>
  25. <uni-forms-item label="小区名称" required name="tenantId">
  26. <w-select
  27. style="margin-left: 20rpx;"
  28. v-model="datainfo.tenantId"
  29. :list='voList'
  30. width='200rpx'
  31. valueName='dictLabel'
  32. keyName="dictValue"
  33. :valuea="datainfo.tenantId"
  34. :chosevalue="tenantName?tenantName:statusFormats(datainfo.tenantId,voList,'tenant')"
  35. :isdisabled="(ptype=='edit'&&datainfo.examine!='3')?true:false"
  36. :filterable="filterable"
  37. @change='getchangea'
  38. >
  39. </w-select>
  40. </uni-forms-item>
  41. <block v-if="datainfo.residentType&&datainfo.residentType!=3">
  42. <uni-forms-item label="房屋号" required name="houseId" v-if="datainfo.residentType!=3">
  43. <w-select
  44. style="margin-left: 20rpx;"
  45. v-model="datainfo.houseId"
  46. :list='fwlist'
  47. valueName='dictLabel'
  48. keyName="dictValue"
  49. :valuea="datainfo.houseId"
  50. :chosevalue="datainfo.detailedAddress"
  51. :filterable='filterable'
  52. @change='getchange'
  53. >
  54. </w-select>
  55. </uni-forms-item>
  56. <block v-if="datainfo.residentType==1">
  57. <uni-forms-item label="是否户主" required name="isHouseholder">
  58. <view class="flexc ">
  59. <view class="flex1"></view>
  60. <view class="sylist flexcc" :class="datainfo.isHouseholder==ite.dictValue?'act':''" v-for="(ite,idx) in sfList" :key="idx" @click="getSyFn(ite.dictValue)">{{ite.dictLabel}}</view>
  61. <view class="rimg"><image :src="rimg"></image></view>
  62. </view>
  63. </uni-forms-item>
  64. <block v-if="datainfo.isHouseholder!='Y'">
  65. <picker range-key='dictLabel' :disabled="isdisabled" :value="hzgxidx" :range="hzgxList" @change='bindDateChangea'>
  66. <uni-forms-item class="isnobor" label="与户主关系" required name="residentRelationship">
  67. <view class="flexc mh35">
  68. <view class="flex1 txr f13 co27" v-if="datainfo.residentRelationship&&!hzgx">{{statusFormats(datainfo.residentRelationship,hzgxList,'hzgx')}}</view>
  69. <view class="flex1 txr f13" v-else :class="hzgx?'co27':'coa'">{{hzgx||"请选择与户主关系"}}</view>
  70. <view class="rimg"><image :src="rimg"></image></view>
  71. </view>
  72. </uni-forms-item>
  73. </picker>
  74. </block>
  75. </block>
  76. </block>
  77. </view>
  78. <uni-collapse ref="collapse" >
  79. <block>
  80. <view class="chtit">人员信息</view>
  81. <block>
  82. <uni-collapse-item title-border="none" class="chmain">
  83. <template v-slot:title>
  84. <uni-forms-item label="身份证号" required name="residentIdCard">
  85. <view class="flexc">
  86. <uni-easyinput disabled v-model="datainfo.residentIdCard" :inputBorder='false' placeholder="自动识别" />
  87. <image v-if='datainfo.idCardBack' :src="baseUrl+datainfo.idCardBack" class="cmico" @click.stop="getPreview(datainfo.idCardBack)"></image>
  88. <image :src="cmico" @click.stop="getaddImage('front')" class="cmico"></image>
  89. </view>
  90. </uni-forms-item>
  91. </template>
  92. <view>
  93. <uni-forms-item label="性别" required name="residentGender">
  94. <view class="flexc">
  95. <view class="flex1"></view>
  96. <uni-data-checkbox :map="map" :disabled="isdisabled" selectedColor="#0156FE" selectedTextColor="#272727" v-model="datainfo.residentGender" :localdata="xbList" />
  97. </view>
  98. </uni-forms-item>
  99. <uni-forms-item label="家庭地址" required name="idCardAddress">
  100. <view class="flexc">
  101. <uni-easyinput disabled v-model="datainfo.idCardAddress" :inputBorder='false' placeholder="自动识别" />
  102. </view>
  103. </uni-forms-item>
  104. <!-- required -->
  105. <picker range-key='dictLabel' :disabled="isdisabled" :value="rymmidx" :range="rymmList" @change='bindDateChangef'>
  106. <uni-forms-item label="人员面貌" name="residentAppearance">
  107. <view class="flexc mh35">
  108. <view class="flex1 txr f13 co27" v-if="datainfo.residentAppearance&&!rymm">{{statusFormats(datainfo.residentAppearance,rymmList,'rymm')}}</view>
  109. <view class="flex1 txr f13" v-else :class="rymm?'co27':'coa'">{{rymm||"请选择人员面貌"}}</view>
  110. <view class="rimg"><image :src="rimg"></image></view>
  111. </view>
  112. </uni-forms-item>
  113. </picker>
  114. <picker range-key='dictLabel' :disabled="isdisabled" :value="dslxidx" :range="dslxList" @change='bindDateChangeg'>
  115. <uni-forms-item label="特殊类型" name="specialType">
  116. <view class="flexc mh35">
  117. <view class="flex1 txr f13 co27" v-if="datainfo.specialType&&!dslx">{{statusFormats(datainfo.specialType,dslxList,'dslx')}}</view>
  118. <view class="flex1 txr f13" v-else :class="dslx?'co27':'coa'">{{dslx||"如有五保户等特殊类型,请选择"}}</view>
  119. <view class="rimg"><image :src="rimg"></image></view>
  120. </view>
  121. </uni-forms-item>
  122. </picker>
  123. <uni-forms-item label="工作单位" name="residentEmployer">
  124. <view class="flexc">
  125. <uni-easyinput :disabled="isdisabled" v-model="datainfo.residentEmployer" :inputBorder='false' placeholder="请输入工作单位" />
  126. </view>
  127. </uni-forms-item>
  128. <uni-forms-item label="兴趣爱好" name="residentHobby">
  129. <view class="flexc ml10">
  130. <uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.residentHobby" :inputBorder='false' placeholder="请输入兴趣爱好" />
  131. </view>
  132. </uni-forms-item>
  133. <uni-forms-item label="上传头像" name="facePhoto">
  134. <view class="addimgs">
  135. <block v-if="phofile&&phofile.length">
  136. <view class="assimg" v-for="(ite,idx) in phofile" :key="idx" @click="getPreviewa(idx,phofile)">
  137. <image :src="baseUrl+ite" class="img"></image>
  138. <image :src="rdelimg" class="delimg" @click.stop="getDelFn(idx,'fm')"></image>
  139. </view>
  140. </block>
  141. <view class="addbox" @click="getaddImageava">
  142. <image :src="aphoto"></image>
  143. <view>添加图片</view>
  144. </view>
  145. </view>
  146. </uni-forms-item>
  147. </view>
  148. </uni-collapse-item>
  149. </block>
  150. </block>
  151. <block v-if="datainfo.residentType==1&&datainfo.isHouseholder=='Y'">
  152. <view class="chtit">房本信息</view>
  153. <block>
  154. <uni-collapse-item title-border="none" class="chmain">
  155. <template v-slot:title>
  156. <uni-forms-item label="房屋坐落" required name="location">
  157. <view class="flexc">
  158. <uni-easyinput :disabled="isdisabled" v-model="houserinfo.location" :inputBorder='false' placeholder="自动识别" />
  159. <image v-if='houserinfo.houseImage' :src="baseUrl+houserinfo.houseImage" class="cmico" @click.stop="getPreview(houserinfo.houseImage)"></image>
  160. <image :src="cmico" @click.stop="getaddImage('fbxx')" class="cmico"></image>
  161. </view>
  162. </uni-forms-item>
  163. </template>
  164. <view >
  165. <uni-forms-item label="权利人姓名" name="ownerName">
  166. <view class="flexc">
  167. <uni-easyinput :disabled="isdisabled" v-model="houserinfo.ownerName" :inputBorder='false' placeholder="自动识别" />
  168. <view class="rimg"></view>
  169. </view>
  170. </uni-forms-item>
  171. <uni-forms-item label="权利类型" name="rightType">
  172. <picker range-key='dictLabel' :disabled="isdisabled" :value="qllxidx" :range="qllxList" @change='bindDateChange'>
  173. <view class="flexc">
  174. <view class="flex1 txr f13 co27" v-if="houserinfo.rightType&&!qllx">{{statusFormats(houserinfo.rightType,qllxList,'qllx')}}</view>
  175. <view class="flex1 txr f13" v-else :class="qllx?'co27':'coa'">{{qllx||"请选择权利类型"}}</view>
  176. <view class="rimg"><image :src="rimg"></image></view>
  177. </view>
  178. </picker>
  179. </uni-forms-item>
  180. <uni-forms-item label="建筑面积" required name="area">
  181. <view class="flexc">
  182. <uni-easyinput :disabled="isdisabled" v-model="houserinfo.area" :inputBorder='false' placeholder="自动识别" />
  183. <view class="tips">m²</view>
  184. <view class="rimg"></view>
  185. </view>
  186. </uni-forms-item>
  187. <uni-forms-item label="不动产单元号" name="propertyUnitNumber">
  188. <view class="flexc">
  189. <uni-easyinput :disabled="isdisabled" v-model="houserinfo.propertyUnitNumber" :inputBorder='false' placeholder="请输入不动产单元号" />
  190. <view class="rimg"></view>
  191. </view>
  192. </uni-forms-item>
  193. <uni-forms-item label="相关的字第号" name="documentNumber">
  194. <view class="flexc">
  195. <uni-easyinput :disabled="isdisabled" v-model="houserinfo.documentNumber" :inputBorder='false' placeholder="请输入相关的字第号" />
  196. <view class="rimg"></view>
  197. </view>
  198. </uni-forms-item>
  199. <uni-forms-item label="小区名称" name="communityName">
  200. <view class="flexc">
  201. <uni-easyinput :disabled="isdisabled" v-model="houserinfo.communityName" :inputBorder='false' placeholder="请输入小区名称" />
  202. <view class="rimg"></view>
  203. </view>
  204. </uni-forms-item>
  205. <uni-forms-item label="门牌号" required name="detailedAddress">
  206. <view class="flexc">
  207. <uni-easyinput disabled v-model="houserinfo.detailedAddress" :inputBorder='false' placeholder="请输入门牌号" />
  208. <view class="rimg"></view>
  209. </view>
  210. </uni-forms-item>
  211. <uni-forms-item label="使用期限" name="usagePeriod">
  212. <view class="flexc">
  213. <uni-easyinput :disabled="isdisabled" v-model="houserinfo.usagePeriod" :inputBorder='false' placeholder="请输入使用期限" />
  214. <view class="rimg"></view>
  215. </view>
  216. </uni-forms-item>
  217. <uni-forms-item label="登记日期" name="registrationDate">
  218. <!-- <picker mode="timed" :disabled="isdisabled" @change='bindDateChangea'>
  219. <view class="flexc">
  220. <view class="flex1 txr f13" :class="datainfo.registrationDate?'co27':'coa'">{{datainfo.registrationDate||"请选择登记日期"}}</view>
  221. <view class="rimg"><image :src="rimg"></image></view>
  222. </view>
  223. </picker> -->
  224. <!-- :hide-second='true' -->
  225. <view class="flexc">
  226. <uni-datetime-picker :disabled="isdisabled" :class="houserinfo.registrationDate?'co27':'coa'" type="datetime" placeholder="请选择登记日期" :border="false" v-model="houserinfo.registrationDate" />
  227. <view class="rimg"><image :src="rimg"></image></view>
  228. </view>
  229. </uni-forms-item>
  230. <uni-forms-item label="共有姓名" name="coOwner">
  231. <view class="flexc">
  232. <uni-easyinput :disabled="isdisabled" v-model="houserinfo.coOwner" :inputBorder='false' placeholder="请输入共有姓名" />
  233. <view class="rimg"></view>
  234. </view>
  235. </uni-forms-item>
  236. <uni-forms-item label="共有情况" name="coOwnership">
  237. <view class="flexc">
  238. <uni-easyinput :disabled="isdisabled" v-model="houserinfo.coOwnership" :inputBorder='false' placeholder="请输入共有情况" />
  239. <view class="rimg"></view>
  240. </view>
  241. </uni-forms-item>
  242. <uni-forms-item label="房屋状态" name="houseStatus">
  243. <picker range-key='dictLabel' :disabled="isdisabled" :value="fwztidx" :range="fwztList" @change='bindDateChangeb'>
  244. <view class="flexc">
  245. <view class="flex1 txr f13 co27" v-if="houserinfo.houseStatus&&!fwzt">{{statusFormats(houserinfo.houseStatus,fwztList,'fwzt')}}</view>
  246. <view class="flex1 txr f13" v-else :class="fwzt?'co27':'coa'">{{fwzt||"请选择房屋状态"}}</view>
  247. <view class="rimg"><image :src="rimg"></image></view>
  248. </view>
  249. </picker>
  250. </uni-forms-item>
  251. <uni-forms-item label="房屋用途" name="usageType">
  252. <picker range-key='dictLabel' :disabled="isdisabled" :value="fwytidx" :range="fwytList" @change='bindDateChangec'>
  253. <view class="flexc">
  254. <view class="flex1 txr f13 co27" v-if="houserinfo.usageType&&!fwyt">{{statusFormats(houserinfo.usageType,fwytList,'fwyt')}}</view>
  255. <view class="flex1 txr f13" v-else :class="fwyt?'co27':'coa'">{{fwyt||"请选择房屋用途"}}</view>
  256. <view class="rimg"><image :src="rimg"></image></view>
  257. </view>
  258. </picker>
  259. </uni-forms-item>
  260. <uni-forms-item label="有无车位" name="hasParkingSpace">
  261. <picker range-key='dictLabel' :disabled="isdisabled" :value="ywcwidx" :range="ywcwList" @change='bindDateChanged'>
  262. <view class="flexc">
  263. <view class="flex1 txr f13 co27" v-if="houserinfo.hasParkingSpace&&!ywcw">{{statusFormats(houserinfo.hasParkingSpace,ywcwList,'ywcw')}}</view>
  264. <view class="flex1 txr f13" v-else :class="ywcw?'co27':'coa'">{{ywcw||"请选择有/无"}}</view>
  265. <view class="rimg"><image :src="rimg"></image></view>
  266. </view>
  267. </picker>
  268. </uni-forms-item>
  269. <uni-forms-item label="车位号" name="parkingNumber">
  270. <view class="flexc">
  271. <uni-easyinput :disabled="isdisabled" v-model="houserinfo.parkingNumber" :inputBorder='false' placeholder="请输入车位号" />
  272. <view class="rimg"></view>
  273. </view>
  274. </uni-forms-item>
  275. </view>
  276. </uni-collapse-item>
  277. </block>
  278. </block>
  279. </uni-collapse>
  280. <view class="mt12">
  281. <!-- <view class="hbtns mb10 bgb" @click="getAddfb" v-if="datainfo.residentType==1&&datainfo.isHouseholder=='Y'">添加房屋信息</view> -->
  282. <view class="hbtns bga" @click="getSubmit">提交</view>
  283. </view>
  284. </view>
  285. </uni-forms>
  286. <loading></loading>
  287. </view>
  288. </template>
  289. <script>
  290. import config from '@/config'
  291. import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
  292. import {uploadIdentify,uploadmore} from '@/utils/common.js'
  293. import {listNoPageTenant,houseInfoDet} from "@/api/work/work.js"
  294. import {gettenantList} from "@/api/login.js"
  295. import {residentInfoAdd,residentInfoPut,authentication,addResidentInfo} from "@/api/work/people.js"
  296. import {getDictionaryFn} from "@/api/system/user.js"
  297. import {selectValueKey} from "@/utils/common.js"
  298. import {getOcrIdCard,getrealEstateCertificatee} from "@/api/system/card.js"
  299. import wSelect from "@/work/components/w-select/w-select.vue"
  300. export default {
  301. components: {wSelect},
  302. data() {
  303. return {
  304. rdelimg: require('@/work/static/service/rdel.png'),
  305. rimg: require('@/mine/static/house/rimg.png'),
  306. cmico: require('@/mine/static/house/cmico.png'),
  307. del: require('@/mine/static/house/del.png'),
  308. aphoto: require('@/work/static/service/photo.png'),
  309. baseUrl: config.baseUrl,
  310. checkflag:true,
  311. backgroundColor: "transparent",
  312. datainfo: {
  313. "tenantId":'',//租户id
  314. "residentType":null,//人员类型:1:业主 2:租户 3:其他
  315. "residentName":null,//居住人员姓名
  316. "residentPhone":null,//人员手机号
  317. "houseInfoRedidentList":[],//用户房屋信息集合
  318. "houseId":null,//关联房屋信息表的house_id
  319. "residentRelationship":null,//居住人员与户主的关系,如父子、夫妻等
  320. "isHouseholder":null,//是否是户主 N不是 Y是
  321. "residentIdCard":null,//居住人员身份证号码,18位
  322. // "residentBirthday":null,//居住人员出生日期
  323. "residentGender":'',//居住人员性别:1-男,2-女
  324. // "isTenant":null,//是否是租户:Y-是,N-否
  325. "residentEmployer":null,//居住人员工作单位
  326. "residentAppearance":null,//居住人员面貌,如党员、群众等
  327. "residentHobby":null,//爱好
  328. "facePhoto":null,//人脸地址
  329. "idCardAddress":null,//身份证住址
  330. "specialType":null,//特殊类型
  331. "idCardFront":null,//身份证正面
  332. "idCardBack":null,//身份证反面
  333. },
  334. rules:{
  335. residentType: {rules: [{required: true,errorMessage: '请选择人人员类型' }]},
  336. // residentIdCard: {rules: [{required: true,errorMessage: '请输入身份证号码' }]},
  337. // residentName: {rules: [{required: true,errorMessage: '请输入姓名' }]},
  338. // residentGender: {rules: [{required: true,errorMessage: '请选择性别' }]},
  339. // houseId: {rules: [{required: true,errorMessage: '请选择房屋号' }]},
  340. // detailedAddress: {rules: [{required: true,errorMessage: '请输入居住地址' }]},
  341. // isHouseholder: {rules: [{required: true,errorMessage: '请选择是否户主' }]},
  342. // residentRelationship: {rules: [{required: true,errorMessage: '请选择与户主关系' }]},
  343. residentPhone: {rules: [{required: true,errorMessage: '请输入手机号'}, {pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,errorMessage:'请输入正确的手机号码'}]},
  344. },
  345. hzgx:"",
  346. rylx:"",
  347. hzgxidx:0,
  348. dslxidx:0,
  349. rylxidx:0,
  350. list:[],
  351. phofile:[],
  352. fwlist:[],
  353. rylxList:[],
  354. fwzt:'',
  355. qllx:'',
  356. fwyt:'',
  357. ywcw:'',
  358. hzgx:'',
  359. sfhz:"",
  360. sfzh:"",
  361. rymm:"",
  362. dslx:"",
  363. fwztidx:0,
  364. qllxidx:0,
  365. fwytidx:0,
  366. ywcwidx:0,
  367. hzgxidx:0,
  368. sfzhidx:0,
  369. rymmidx:0,
  370. sfhzidx:0,
  371. dslxidx:0,
  372. fwztList:[],
  373. qllxList:[],
  374. fwytList:[],
  375. hzgxList:[],
  376. sfList:[],
  377. rymmList:[],
  378. dslxList:[],
  379. xbList:[],
  380. ywcwList:[{dictLabel:'有',dictValue:'Y'},{dictLabel:'无',dictValue:'N'},],
  381. isdisabled:false,
  382. ptype:'add',
  383. filterable:true,
  384. chooseValue:'',
  385. map:{text:'dictLabel',value:'dictValue'},
  386. userId:this.$store.state.user.userId,
  387. voList:[],
  388. tenantName:'',
  389. houseInfoRedidentList:[],
  390. fwztList:[],
  391. qllxList:[],
  392. fwytList:[],
  393. sfList:[],
  394. rzflag:false,
  395. choseidx:'',
  396. houserinfo:{
  397. "houseId":'',
  398. "tenantId":"",//租户id
  399. "houseImage":null,//房本照片
  400. "ownerName":null,//权利人姓名
  401. "location":null,//房屋坐落位置
  402. "rightType":null,//权利类型,如所有权、使用权等
  403. "area":null,//房屋面积,单位为平方米
  404. "documentNumber":null,//房屋相关的字第号
  405. "propertyUnitNumber":null,//不动产单元号
  406. "coOwnership":null,//房屋的共有情况,如共有比例等
  407. "usageType":null,//房屋用途,如住宅、商业等
  408. "usagePeriod":null,//房屋使用期限
  409. "registrationDate":null,//房屋登记日期
  410. "coOwner":null,//共有人姓名,多个共有人可以用逗号分隔
  411. "detailedAddress":null,//房屋的详细门牌号
  412. "hasParkingSpace":null,//是否有车位,Y表示有,N表示无
  413. "communityName":null,//房屋所在小区名称
  414. "houseStatus":null,//房屋状态:1-自住,2-出租,3-空闲,4-待售
  415. "parkingNumber":null,//车位号
  416. }
  417. }
  418. },
  419. onLoad: function(e) {
  420. if(e.type){
  421. this.rztype=e.type
  422. this.rzflag=true;
  423. this.datainfo.residentPhone=this.$store.state.user.phonenumber;
  424. this.datainfo.userId=this.$store.state.user.userId;
  425. }else{
  426. // var tenantId=this.$store.state.user.tenantId;
  427. // this.datainfo.tenantId=tenantId;
  428. // this.getRoleNopage(tenantId)
  429. }
  430. this.gettenantList();
  431. if(e.id){
  432. this.id=e.id;
  433. this.ptype="edit";
  434. // this.isdisabled=true;
  435. this.getDetail()
  436. }
  437. this.init()
  438. },
  439. onPageScroll(e) {
  440. var scrollTop = Number(e.scrollTop);
  441. if (scrollTop > 0) {
  442. this.backgroundColor = '#48CC9A'
  443. } else {
  444. this.backgroundColor = 'transparent'
  445. }
  446. },
  447. methods: {
  448. checkPermi,
  449. checkRole,
  450. getEditFn(){
  451. this.isdisabled=false;
  452. },
  453. getSyFn(e){
  454. this.datainfo.isHouseholder=e
  455. console.log(this.datainfo.isHouseholder)
  456. },
  457. getChose(idx){
  458. this.choseidx=idx;
  459. },
  460. getAddfb(){
  461. var obj={
  462. "ownerName":"",//权利人姓名
  463. "location":"",//房屋坐落位置
  464. "rightType":"",//权利类型,如所有权、使用权等
  465. "area":"",//房屋面积,单位为平方米
  466. "documentNumber":"",//房屋相关的字第号
  467. "propertyUnitNumber":"",//不动产单元号
  468. "coOwnership":"",//房屋的共有情况,如共有比例等
  469. "usageType":"",//房屋用途,如住宅、商业等
  470. "usagePeriod":"",//房屋使用期限
  471. "registrationDate":"",//房屋登记日期
  472. "coOwner":"",//共有人姓名,多个共有人可以用逗号分隔
  473. "detailedAddress":"",//房屋的详细门牌号
  474. "hasParkingSpace":"",//是否有车位,Y表示有,N表示无
  475. "communityName":"",//房屋所在小区名称
  476. "houseStatus":"",//房屋状态:1-自住,2-出租,3-空闲,4-待售
  477. "parkingNumber":'',//车位号
  478. }
  479. this.houseInfoRedidentList.push(obj)
  480. },
  481. getDelfb(idx){
  482. this.houseInfoRedidentList.splice(idx,1)
  483. },
  484. statusFormats(data, list,type) {
  485. var aite=selectValueKey(list, data);
  486. if(type=='qllx'){
  487. this.qllxidx=aite.key;
  488. }else if(type=='rylx'){
  489. this.rylxidx=aite.key;
  490. }else if(type=='hzgx'){
  491. this.hzgxidx=aite.key;
  492. }else if(type=='fwzt'){
  493. this.fwztidx=aite.key;
  494. }else if(type=='fwyt'){
  495. this.fwytidx=aite.key;
  496. }else if(type=='ywcw'){
  497. this.ywcwidx=aite.key;
  498. }else if(type=='tenant'){
  499. this.tenantName=aite.actions;
  500. }else if(type=='rymm'){
  501. this.rymmidx=aite.key;
  502. }else if(type=='dslx'){
  503. this.dslxidx=aite.key;
  504. }
  505. return aite.actions;
  506. },
  507. getchangea(e){
  508. var tenantId=this.datainfo.tenantId;
  509. this.datainfo.tenantId=e.dictValue;
  510. this.houserinfo.communityName=e.dictLabel;
  511. // 业主或租户
  512. if(this.datainfo.residentType!=3){
  513. this.listNoPageTenant(e.dictValue)
  514. }
  515. },
  516. getchange(e){
  517. this.datainfo.houseId=e.dictValue;
  518. this.datainfo.detailedAddress=e.dictLabel;
  519. this.houserinfo.detailedAddress=e.dictLabel;
  520. this.houserinfo.houseId=e.dictValue;
  521. this.houserinfo.location=e.location;
  522. },
  523. // 获取租户列表
  524. gettenantList(){
  525. gettenantList().then(res=>{
  526. if(res.code==200){
  527. if(res.data.voList&&res.data.voList.length){
  528. this.voList = res.data.voList.map(v => {
  529. return {
  530. dictLabel: v.companyName,
  531. dictValue: v.tenantId
  532. }
  533. })
  534. }
  535. }else{
  536. this.$toast(res.msg)
  537. }
  538. })
  539. },
  540. listNoPageTenant(id){
  541. var params={
  542. tenantId:id,
  543. }
  544. listNoPageTenant(params).then(res=>{
  545. if(res.code==200){
  546. this.fwlist= res.data.map(v => {
  547. return {
  548. dictLabel: v.detailedAddress,
  549. dictValue: v.houseId,
  550. location: v.location
  551. }
  552. })
  553. // if(res.rows&&res.rows.length<2){
  554. // var newObj=res.rows[0];
  555. // this.datainfo.houseId=newObj.houseId;
  556. // this.datainfo.detailedAddress=newObj.detailedAddress
  557. // }
  558. }
  559. })
  560. },
  561. init(){
  562. // 人员类型
  563. getDictionaryFn('resident_Type').then(res=>{
  564. if(res.code==200){
  565. this.rylxList = res.data.map(v => {
  566. return {
  567. dictLabel: v.dictLabel,
  568. dictValue: v.dictValue
  569. }
  570. })
  571. }
  572. })
  573. // 是否
  574. getDictionaryFn('sys_yes_no').then(res=>{
  575. if(res.code==200){
  576. this.sfList = res.data.map(v => {
  577. return {
  578. dictLabel: v.dictLabel,
  579. dictValue: v.dictValue
  580. }
  581. })
  582. }
  583. })
  584. //户主关系
  585. getDictionaryFn('relationship_householder').then(res=>{
  586. if(res.code==200){
  587. this.hzgxList = res.data.map(v => {
  588. return {
  589. dictLabel: v.dictLabel,
  590. dictValue: v.dictValue
  591. }
  592. })
  593. }
  594. })
  595. // 房屋状态
  596. getDictionaryFn('house_status').then(res=>{
  597. if(res.code==200){
  598. this.fwztList = res.data.map(v => {
  599. return {
  600. dictLabel: v.dictLabel,
  601. dictValue: v.dictValue
  602. }
  603. })
  604. }
  605. })
  606. //权利类型
  607. getDictionaryFn('types_rights').then(res=>{
  608. if(res.code==200){
  609. this.qllxList = res.data.map(v => {
  610. return {
  611. dictLabel: v.dictLabel,
  612. dictValue: v.dictValue
  613. }
  614. })
  615. }
  616. })
  617. //房屋用途
  618. getDictionaryFn('use_remises').then(res=>{
  619. if(res.code==200){
  620. this.fwytList = res.data.map(v => {
  621. return {
  622. dictLabel: v.dictLabel,
  623. dictValue: v.dictValue
  624. }
  625. })
  626. }
  627. })
  628. //人员面貌
  629. getDictionaryFn('affiliation_personnel').then(res=>{
  630. if(res.code==200){
  631. this.rymmList = res.data.map(v => {
  632. return {
  633. dictLabel: v.dictLabel,
  634. dictValue: v.dictValue
  635. }
  636. })
  637. }
  638. })
  639. // 特殊类型
  640. getDictionaryFn('special_type').then(res=>{
  641. if(res.code==200){
  642. this.dslxList = res.data.map(v => {
  643. return {
  644. dictLabel: v.dictLabel,
  645. dictValue: v.dictValue
  646. }
  647. })
  648. }
  649. })
  650. //性别
  651. getDictionaryFn('gender').then(res=>{
  652. if(res.code==200){
  653. this.xbList = res.data.map(v => {
  654. return {
  655. dictLabel: v.dictLabel,
  656. dictValue: Number(v.dictValue)
  657. }
  658. })
  659. }
  660. })
  661. },
  662. getBackFn(){
  663. uni.navigateBack({
  664. delta:1
  665. })
  666. },
  667. bindDateChange(e){
  668. var val=e.detail.value;
  669. this.houserinfo.rightType=this.qllxList[val].dictValue;
  670. this.qllx=this.qllxList[val].dictLabel;
  671. },
  672. bindDateChangea(e){
  673. var val=e.detail.value;
  674. this.houserinfo.registrationDate=val;
  675. },
  676. bindDateChangeb(e){
  677. var val=e.detail.value;
  678. this.houserinfo.houseStatus=this.fwztList[val].dictValue;
  679. this.fwzt=this.fwztList[val].dictLabel;
  680. },
  681. bindDateChangec(e){
  682. var val=e.detail.value;
  683. this.houserinfo.usageType=this.fwytList[val].dictValue;
  684. this.fwyt=this.fwytList[val].dictLabel;
  685. },
  686. bindDateChanged(e){
  687. var val=e.detail.value;
  688. this.houserinfo.hasParkingSpace=this.ywcwList[val].dictValue;
  689. this.ywcw=this.ywcwList[val].dictLabel;
  690. },
  691. bindDateChangee(e){
  692. var val=e.detail.value;
  693. this.datainfo.residentType=this.rylxList[val].dictValue;
  694. this.rylx=this.rylxList[val].dictLabel;
  695. },
  696. bindDateChangef(e){
  697. var val=e.detail.value;
  698. this.datainfo.residentAppearance=this.rymmList[val].dictValue;
  699. this.rymm=this.rymmList[val].dictLabel;
  700. },
  701. bindDateChangeg(e){
  702. var val=e.detail.value;
  703. this.datainfo.specialType=this.dslxList[val].dictValue;
  704. this.dslx=this.dslxList[val].dictLabel;
  705. },
  706. getDetail(){
  707. authentication(this.id).then(res=>{
  708. if(res.code==200){
  709. this.datainfo=res.data;
  710. if(res.data.facePhoto){
  711. this.phofile=res.data.facePhoto.split(',')
  712. }
  713. var data=JSON.parse(JSON.stringify(res.data))
  714. if(data.residentType!=3){
  715. this.listNoPageTenant(data.tenantId)
  716. }
  717. if(res.data.houseInfoRedidentList&&res.data.houseInfoRedidentList.length&&res.data.houseInfoRedidentList[0]){
  718. var houseinfo=res.data.houseInfoRedidentList[0]
  719. this.houserinfo=JSON.parse(JSON.stringify(houseinfo))
  720. }
  721. }
  722. })
  723. },
  724. getSubmit(){
  725. var that=this;
  726. this.$refs.form.validate().then(res => {
  727. var params=JSON.parse(JSON.stringify(this.datainfo))
  728. var phofile=JSON.parse(JSON.stringify(this.phofile))
  729. // if(phofile&&phofile.length){
  730. // params.facePhoto=this.phofile.join(',');
  731. // }
  732. params.facePhoto=this.phofile.join(',');
  733. if(!params.tenantId){
  734. this.$toast('请选择小区名称')
  735. return
  736. }
  737. if(params.residentType==1&&params.isHouseholder=='Y'){
  738. var houserinfo=JSON.parse(JSON.stringify(this.houserinfo))
  739. if(!houserinfo.location){
  740. this.$toast('请输入房屋坐落')
  741. return
  742. }
  743. if(!houserinfo.area){
  744. this.$toast('请输入房屋面积')
  745. return
  746. }
  747. if(!houserinfo.detailedAddress){
  748. this.$toast('请输入详细门牌号')
  749. return
  750. }
  751. houserinfo.tenantId=params.tenantId;
  752. var newarr=[]
  753. newarr.push(houserinfo)
  754. params.houseInfoRedidentList=JSON.parse(JSON.stringify(newarr))
  755. }
  756. if(params.residentType==2){
  757. params.isTenant='Y'
  758. }else{
  759. params.isTenant=''
  760. }
  761. // if(!params.detailedAddress){
  762. // this.$toast('请选择居住门户')
  763. // return
  764. // }
  765. // let _IDRe18 =
  766. // /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
  767. // let _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
  768. // // 校验身份证:
  769. // if (params.residentIdCard&&!_IDRe18.test(params.residentIdCard) && !_IDre15.test(params.residentIdCard)) {
  770. // this.$toast("请输入正确身份证号")
  771. // return
  772. // }
  773. if(this.ptype=='add'){
  774. if(this.rzflag){
  775. residentInfoAdd(params).then(res=>{
  776. if(res.code==200){
  777. this.$toast("新增成功")
  778. setTimeout(function(){
  779. uni.$emit("residentInfoList")
  780. var initFace='';
  781. that.$store.dispatch('checkInitFace', initFace).then(() => {
  782. })
  783. uni.navigateBack({
  784. delta:1
  785. })
  786. },1500)
  787. }
  788. })
  789. }
  790. }else{
  791. if(this.rzflag){
  792. params.isFilter=true;
  793. residentInfoPut(params).then(res=>{
  794. if(res.code==200){
  795. this.$toast("修改成功")
  796. setTimeout(function(){
  797. uni.$emit("residentInfoList")
  798. var initFace='';
  799. that.$store.dispatch('checkInitFace', initFace).then(() => {
  800. })
  801. uni.navigateBack({
  802. delta:1
  803. })
  804. },1500)
  805. }
  806. })
  807. }
  808. }
  809. })
  810. },
  811. getPreviewa(idx,arr) {
  812. var newArr=[];
  813. arr.forEach(ite=>{
  814. var ds=this.baseUrl+ite
  815. newArr.push(ds)
  816. })
  817. uni.previewImage({
  818. urls: newArr,
  819. current:idx,
  820. success: function(data) {},
  821. fail: function(err) {}
  822. });
  823. },
  824. getPreview(img) {
  825. var newArr=[];
  826. var url=this.baseUrl+img
  827. newArr.push(url)
  828. uni.previewImage({
  829. urls: newArr,
  830. current:0,
  831. success: function(data) {},
  832. fail: function(err) {}
  833. });
  834. },
  835. getDelFn(idx,type){
  836. var that=this;
  837. uni.showModal({
  838. title: '确认删除',
  839. content: "是否确认删除",
  840. cancelText: '取消',
  841. confirmText: '确认',
  842. success: function(res) {
  843. if (res.confirm) {
  844. that.phofile.splice(idx,1)
  845. } else if (res.cancel) {
  846. }
  847. }
  848. });
  849. },
  850. getaddImageava(type){
  851. if(this.isdisabled){
  852. return
  853. }
  854. let that = this;
  855. let file =[],count=9
  856. uni.chooseImage({
  857. success:function(res){
  858. let img= res.tempFilePaths;
  859. if(img.length + file.length > count){
  860. uni.showToast({
  861. title: '最多上传'+count+'张图片',
  862. icon: 'none',
  863. duration: 2000
  864. })
  865. }else{
  866. let imglen = res.tempFilePaths.length;
  867. var fuwufile = [];
  868. uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
  869. that.phofile = that.phofile.concat(rs);
  870. })
  871. }
  872. }
  873. });
  874. },
  875. getaddImage(type){
  876. if(this.isdisabled){
  877. return
  878. }
  879. let that = this;
  880. let file =[],count=9
  881. uni.chooseImage({
  882. count: 1,
  883. success:function(res){
  884. let img= res.tempFilePaths;
  885. if(img.length + file.length > count){
  886. uni.showToast({
  887. title: '最多上传'+count+'张图片',
  888. icon: 'none',
  889. duration: 2000
  890. })
  891. }else{
  892. let imglen = res.tempFilePaths.length;
  893. var fuwufile = [];
  894. uploadIdentify('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
  895. var resurl=rs[0];
  896. if(type=='front'){
  897. that.datainfo.idCardBack = resurl.fileName;
  898. if (rs && rs.length > 0) {
  899. var obj = {
  900. type:type,
  901. url: resurl.urlOnline
  902. }
  903. that.getOcrIdCard(obj)
  904. }
  905. }else{
  906. that.houserinfo.houseImage=resurl.fileName;
  907. if(rs&&rs.length>0){
  908. var obj={
  909. url:resurl.urlOnline
  910. }
  911. that.getOcrIdCardfz(obj)
  912. }
  913. }
  914. })
  915. }
  916. }
  917. });
  918. },
  919. getOcrIdCard(obj) {
  920. var params = {
  921. image: obj.url,
  922. idCardSide: obj.type
  923. }
  924. getOcrIdCard(params).then(res => {
  925. if (res.code == 200) {
  926. var datainfo = res.data;
  927. if (obj.type == 'front') {
  928. this.datainfo.residentName = datainfo.realName;
  929. this.datainfo.residentIdCard = datainfo.idCard;
  930. this.datainfo.idCardAddress = datainfo.address;
  931. // } else {
  932. // this.datainfo.expirationDate = datainfo.expirationDate
  933. }
  934. }
  935. })
  936. },
  937. getOcrIdCardfz(obj){
  938. var params={
  939. image:obj.url
  940. }
  941. getrealEstateCertificatee(params).then(res=>{
  942. if(res.code==200){
  943. var datainfo=res.data;
  944. // var obj=JSON.parse(JSON.stringify(this.houseInfoRedidentList[idx]))
  945. this.houserinfo.ownerName=datainfo.ownerName;
  946. this.houserinfo.location=datainfo.location;
  947. this.houserinfo.rightType=datainfo.rightType;
  948. this.houserinfo.area=datainfo.area;
  949. this.houserinfo.documentNumber=datainfo.documentNumber;
  950. this.houserinfo.propertyUnitNumber=datainfo.propertyUnitNumber;
  951. this.houserinfo.coOwnership=datainfo.coOwnership;
  952. this.houserinfo.usageType=datainfo.usageType;
  953. this.houserinfo.usagePeriod=datainfo.usagePeriod;
  954. this.houserinfo.registrationDate=datainfo.registrationDate;
  955. this.houserinfo.coOwner=datainfo.coOwner;
  956. // this.houseInfoRedidentList.splice(idx,1,obj)
  957. }
  958. })
  959. },
  960. }
  961. }
  962. </script>
  963. <style>
  964. page{background: #F3F3F0;}
  965. </style>
  966. <style lang="scss" scoped>
  967. .coa /deep/ .uni-date__x-input{text-align: right;color: #AAAAAA;}
  968. .check /deep/ .select-wrap{border: none;width: 100%;}
  969. .mh35{min-height: 70rpx;display: flex;align-items: center;}
  970. .check /deep/ .uni-forms-item{min-height: 106rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:10rpx 0;}
  971. .check .cbox .chmain /deep/ .isnobor{border: none;}
  972. .check /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;}
  973. .check /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
  974. .check /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;}
  975. .check /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
  976. .check /deep/ .uni-input-input{font-size: 26rpx;}
  977. .check /deep/ .uni-textarea-textarea{font-size: 26rpx;}
  978. .check /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
  979. .check /deep/ .uni-data-checklist .checklist-group .checklist-box{margin:10rpx 8rpx 10rpx 16rpx;}
  980. .check /deep/ .uni-data-checklist{flex: 0 0 auto;}
  981. .check /deep/ .is-required{font-size: 26rpx;color: #F40027;margin-right: 4rpx;}
  982. .check /deep/ .uni-collapse{background-color: transparent;}
  983. // .check /deep/ .uni-collapse .chmain{margin-bottom: 24rpx;}
  984. .check{min-height: 100vh;box-sizing: border-box;padding: 20rpx 18rpx 54rpx;}
  985. .cbox{
  986. .chtit{font-weight: 500;font-size: 24rpx;color: #666666;padding:20rpx 14rpx;}
  987. .chmain{
  988. padding: 0rpx 28rpx;background: #FFFFFF;border-radius: 20rpx;
  989. .rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
  990. image{width: 100%;height: 100%;}
  991. }
  992. }
  993. .hbtns{font-weight: bold;display: flex;align-items: center;justify-content: center;font-size: 26rpx;height: 88rpx;border-radius: 20rpx;box-sizing: border-box;
  994. &.bga{border: 1px solid #0256FD;color: #FFFFFF;background: #0256FD;}
  995. &.bgb{border: 1px solid #0256FD;color: #0256FD;background: #CADBFF;}
  996. }
  997. .sylist{background: #F0F0F0;border-radius: 26rpx;border:2rpx solid #DADADA;margin-left: 26rpx;font-weight: 500;min-width:112rpx;height: 54rpx;box-sizing: border-box;
  998. font-size: 26rpx;
  999. color: #666666;
  1000. &.act{border: 2rpx solid #0256FD;background: #DCE8FF;color: #0256FD;}
  1001. }
  1002. .cmico{width: 48rpx;height: 48rpx;margin-left: 16rpx;}
  1003. .delbox{padding: 12rpx 32rpx;
  1004. image{width: 26rpx;height: 26rpx;margin-right: 14rpx;}
  1005. view{font-weight: 500;font-size: 26rpx;color: #FF6969;}
  1006. }
  1007. }
  1008. .addbox{width: 160rpx;height: 128rpx;background: #F0F0F0;border-radius: 20rpx;display: flex;flex-direction: column;align-items: center;justify-content: center;margin-left: 24rpx;margin-bottom: 20rpx;flex: 0 0 auto;
  1009. image{width: 48rpx;height: 42rpx;margin-bottom: 12rpx;}
  1010. view{font-weight: 500;font-size: 24rpx;color: #666666;}
  1011. }
  1012. .addimgs{display: flex;align-items: center;flex-wrap: wrap;justify-content: flex-end;
  1013. .assimg{width: 128rpx;height: 128rpx;position: relative;overflow: hidden;margin: 0 0 20rpx 24rpx;
  1014. .img{width: 100%;height: 100%;}
  1015. .delimg{width: 24rpx;height: 24rpx;position: absolute;right: 0;top: 0;}
  1016. }
  1017. }
  1018. </style>