1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033 |
- <template>
- <view class="check">
- <uni-forms ref="form" :model="datainfo" :rules="rules">
- <view class="cbox">
- <view class="chmain">
- <picker range-key='dictLabel' :disabled="ptype=='edit'&&datainfo.examine!='3'?true:false" :value="rylxidx" :range="rylxList" @change='bindDateChangee'>
- <uni-forms-item label="人员类型" required name="residentType">
- <view class="flexc mh35">
- <view class="flex1 txr f13 co27" v-if="datainfo.residentType&&!rylx">{{statusFormats(datainfo.residentType,rylxList,'rylx')}}</view>
- <view class="flex1 txr f13" v-else :class="rylx?'co27':'coa'">{{rylx||"请选择人员类型"}}</view>
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </uni-forms-item>
- </picker>
- <uni-forms-item label="姓名" name="residentName">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="datainfo.residentName" :inputBorder='false' placeholder="请输入姓名" />
- </view>
- </uni-forms-item>
- <uni-forms-item label="手机号码" required name="residentPhone">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="datainfo.residentPhone" :inputBorder='false' placeholder="请输入手机号码" />
- </view>
- </uni-forms-item>
- <uni-forms-item label="小区名称" required name="tenantId">
- <w-select
- style="margin-left: 20rpx;"
- v-model="datainfo.tenantId"
- :list='voList'
- width='200rpx'
- valueName='dictLabel'
- keyName="dictValue"
- :valuea="datainfo.tenantId"
- :chosevalue="tenantName?tenantName:statusFormats(datainfo.tenantId,voList,'tenant')"
- :isdisabled="(ptype=='edit'&&datainfo.examine!='3')?true:false"
- :filterable="filterable"
- @change='getchangea'
- >
- </w-select>
- </uni-forms-item>
- <block v-if="datainfo.residentType&&datainfo.residentType!=3">
- <uni-forms-item label="房屋号" required name="houseId" v-if="datainfo.residentType!=3">
- <w-select
- style="margin-left: 20rpx;"
- v-model="datainfo.houseId"
- :list='fwlist'
- valueName='dictLabel'
- keyName="dictValue"
- :valuea="datainfo.houseId"
- :chosevalue="datainfo.detailedAddress"
- :filterable='filterable'
- @change='getchange'
- >
- </w-select>
- </uni-forms-item>
- <block v-if="datainfo.residentType==1">
- <uni-forms-item label="是否户主" required name="isHouseholder">
- <view class="flexc ">
- <view class="flex1"></view>
- <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>
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </uni-forms-item>
- <block v-if="datainfo.isHouseholder!='Y'">
- <picker range-key='dictLabel' :disabled="isdisabled" :value="hzgxidx" :range="hzgxList" @change='bindDateChangea'>
- <uni-forms-item class="isnobor" label="与户主关系" required name="residentRelationship">
- <view class="flexc mh35">
- <view class="flex1 txr f13 co27" v-if="datainfo.residentRelationship&&!hzgx">{{statusFormats(datainfo.residentRelationship,hzgxList,'hzgx')}}</view>
- <view class="flex1 txr f13" v-else :class="hzgx?'co27':'coa'">{{hzgx||"请选择与户主关系"}}</view>
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </uni-forms-item>
- </picker>
- </block>
- </block>
- </block>
- </view>
- <uni-collapse ref="collapse" >
- <block>
- <view class="chtit">人员信息</view>
- <block>
- <uni-collapse-item title-border="none" class="chmain">
- <template v-slot:title>
- <uni-forms-item label="身份证号" required name="residentIdCard">
- <view class="flexc">
- <uni-easyinput disabled v-model="datainfo.residentIdCard" :inputBorder='false' placeholder="自动识别" />
- <image v-if='datainfo.idCardBack' :src="baseUrl+datainfo.idCardBack" class="cmico" @click.stop="getPreview(datainfo.idCardBack)"></image>
- <image :src="cmico" @click.stop="getaddImage('front')" class="cmico"></image>
- </view>
- </uni-forms-item>
- </template>
- <view>
- <uni-forms-item label="性别" required name="residentGender">
- <view class="flexc">
- <view class="flex1"></view>
- <uni-data-checkbox :map="map" :disabled="isdisabled" selectedColor="#0156FE" selectedTextColor="#272727" v-model="datainfo.residentGender" :localdata="xbList" />
- </view>
- </uni-forms-item>
- <uni-forms-item label="家庭地址" required name="idCardAddress">
- <view class="flexc">
- <uni-easyinput disabled v-model="datainfo.idCardAddress" :inputBorder='false' placeholder="自动识别" />
- </view>
- </uni-forms-item>
- <!-- required -->
- <picker range-key='dictLabel' :disabled="isdisabled" :value="rymmidx" :range="rymmList" @change='bindDateChangef'>
- <uni-forms-item label="人员面貌" name="residentAppearance">
- <view class="flexc mh35">
- <view class="flex1 txr f13 co27" v-if="datainfo.residentAppearance&&!rymm">{{statusFormats(datainfo.residentAppearance,rymmList,'rymm')}}</view>
- <view class="flex1 txr f13" v-else :class="rymm?'co27':'coa'">{{rymm||"请选择人员面貌"}}</view>
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </uni-forms-item>
- </picker>
- <picker range-key='dictLabel' :disabled="isdisabled" :value="dslxidx" :range="dslxList" @change='bindDateChangeg'>
- <uni-forms-item label="特殊类型" name="specialType">
- <view class="flexc mh35">
- <view class="flex1 txr f13 co27" v-if="datainfo.specialType&&!dslx">{{statusFormats(datainfo.specialType,dslxList,'dslx')}}</view>
- <view class="flex1 txr f13" v-else :class="dslx?'co27':'coa'">{{dslx||"如有五保户等特殊类型,请选择"}}</view>
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </uni-forms-item>
- </picker>
- <uni-forms-item label="工作单位" name="residentEmployer">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="datainfo.residentEmployer" :inputBorder='false' placeholder="请输入工作单位" />
- </view>
- </uni-forms-item>
- <uni-forms-item label="兴趣爱好" name="residentHobby">
- <view class="flexc ml10">
- <uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.residentHobby" :inputBorder='false' placeholder="请输入兴趣爱好" />
- </view>
- </uni-forms-item>
-
- <uni-forms-item label="上传头像" name="facePhoto">
- <view class="addimgs">
- <block v-if="phofile&&phofile.length">
- <view class="assimg" v-for="(ite,idx) in phofile" :key="idx" @click="getPreviewa(idx,phofile)">
- <image :src="baseUrl+ite" class="img"></image>
- <image :src="rdelimg" class="delimg" @click.stop="getDelFn(idx,'fm')"></image>
- </view>
- </block>
- <view class="addbox" @click="getaddImageava">
- <image :src="aphoto"></image>
- <view>添加图片</view>
- </view>
- </view>
- </uni-forms-item>
- </view>
- </uni-collapse-item>
- </block>
- </block>
- <block v-if="datainfo.residentType==1&&datainfo.isHouseholder=='Y'">
- <view class="chtit">房本信息</view>
- <block>
- <uni-collapse-item title-border="none" class="chmain">
- <template v-slot:title>
- <uni-forms-item label="房屋坐落" required name="location">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="houserinfo.location" :inputBorder='false' placeholder="自动识别" />
- <image v-if='houserinfo.houseImage' :src="baseUrl+houserinfo.houseImage" class="cmico" @click.stop="getPreview(houserinfo.houseImage)"></image>
- <image :src="cmico" @click.stop="getaddImage('fbxx')" class="cmico"></image>
- </view>
- </uni-forms-item>
- </template>
- <view >
- <uni-forms-item label="权利人姓名" name="ownerName">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="houserinfo.ownerName" :inputBorder='false' placeholder="自动识别" />
- <view class="rimg"></view>
- </view>
- </uni-forms-item>
- <uni-forms-item label="权利类型" name="rightType">
- <picker range-key='dictLabel' :disabled="isdisabled" :value="qllxidx" :range="qllxList" @change='bindDateChange'>
- <view class="flexc">
- <view class="flex1 txr f13 co27" v-if="houserinfo.rightType&&!qllx">{{statusFormats(houserinfo.rightType,qllxList,'qllx')}}</view>
- <view class="flex1 txr f13" v-else :class="qllx?'co27':'coa'">{{qllx||"请选择权利类型"}}</view>
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </picker>
- </uni-forms-item>
- <uni-forms-item label="建筑面积" required name="area">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="houserinfo.area" :inputBorder='false' placeholder="自动识别" />
- <view class="tips">m²</view>
- <view class="rimg"></view>
- </view>
- </uni-forms-item>
- <uni-forms-item label="不动产单元号" name="propertyUnitNumber">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="houserinfo.propertyUnitNumber" :inputBorder='false' placeholder="请输入不动产单元号" />
- <view class="rimg"></view>
- </view>
- </uni-forms-item>
- <uni-forms-item label="相关的字第号" name="documentNumber">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="houserinfo.documentNumber" :inputBorder='false' placeholder="请输入相关的字第号" />
- <view class="rimg"></view>
- </view>
- </uni-forms-item>
- <uni-forms-item label="小区名称" name="communityName">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="houserinfo.communityName" :inputBorder='false' placeholder="请输入小区名称" />
- <view class="rimg"></view>
- </view>
- </uni-forms-item>
- <uni-forms-item label="门牌号" required name="detailedAddress">
- <view class="flexc">
- <uni-easyinput disabled v-model="houserinfo.detailedAddress" :inputBorder='false' placeholder="请输入门牌号" />
- <view class="rimg"></view>
- </view>
- </uni-forms-item>
- <uni-forms-item label="使用期限" name="usagePeriod">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="houserinfo.usagePeriod" :inputBorder='false' placeholder="请输入使用期限" />
- <view class="rimg"></view>
- </view>
- </uni-forms-item>
- <uni-forms-item label="登记日期" name="registrationDate">
- <!-- <picker mode="timed" :disabled="isdisabled" @change='bindDateChangea'>
- <view class="flexc">
- <view class="flex1 txr f13" :class="datainfo.registrationDate?'co27':'coa'">{{datainfo.registrationDate||"请选择登记日期"}}</view>
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </picker> -->
- <!-- :hide-second='true' -->
- <view class="flexc">
- <uni-datetime-picker :disabled="isdisabled" :class="houserinfo.registrationDate?'co27':'coa'" type="datetime" placeholder="请选择登记日期" :border="false" v-model="houserinfo.registrationDate" />
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </uni-forms-item>
-
- <uni-forms-item label="共有姓名" name="coOwner">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="houserinfo.coOwner" :inputBorder='false' placeholder="请输入共有姓名" />
- <view class="rimg"></view>
- </view>
- </uni-forms-item>
- <uni-forms-item label="共有情况" name="coOwnership">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="houserinfo.coOwnership" :inputBorder='false' placeholder="请输入共有情况" />
- <view class="rimg"></view>
- </view>
- </uni-forms-item>
- <uni-forms-item label="房屋状态" name="houseStatus">
- <picker range-key='dictLabel' :disabled="isdisabled" :value="fwztidx" :range="fwztList" @change='bindDateChangeb'>
- <view class="flexc">
- <view class="flex1 txr f13 co27" v-if="houserinfo.houseStatus&&!fwzt">{{statusFormats(houserinfo.houseStatus,fwztList,'fwzt')}}</view>
- <view class="flex1 txr f13" v-else :class="fwzt?'co27':'coa'">{{fwzt||"请选择房屋状态"}}</view>
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </picker>
- </uni-forms-item>
- <uni-forms-item label="房屋用途" name="usageType">
- <picker range-key='dictLabel' :disabled="isdisabled" :value="fwytidx" :range="fwytList" @change='bindDateChangec'>
- <view class="flexc">
- <view class="flex1 txr f13 co27" v-if="houserinfo.usageType&&!fwyt">{{statusFormats(houserinfo.usageType,fwytList,'fwyt')}}</view>
- <view class="flex1 txr f13" v-else :class="fwyt?'co27':'coa'">{{fwyt||"请选择房屋用途"}}</view>
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </picker>
- </uni-forms-item>
- <uni-forms-item label="有无车位" name="hasParkingSpace">
- <picker range-key='dictLabel' :disabled="isdisabled" :value="ywcwidx" :range="ywcwList" @change='bindDateChanged'>
- <view class="flexc">
- <view class="flex1 txr f13 co27" v-if="houserinfo.hasParkingSpace&&!ywcw">{{statusFormats(houserinfo.hasParkingSpace,ywcwList,'ywcw')}}</view>
- <view class="flex1 txr f13" v-else :class="ywcw?'co27':'coa'">{{ywcw||"请选择有/无"}}</view>
- <view class="rimg"><image :src="rimg"></image></view>
- </view>
- </picker>
- </uni-forms-item>
- <uni-forms-item label="车位号" name="parkingNumber">
- <view class="flexc">
- <uni-easyinput :disabled="isdisabled" v-model="houserinfo.parkingNumber" :inputBorder='false' placeholder="请输入车位号" />
- <view class="rimg"></view>
- </view>
- </uni-forms-item>
- </view>
- </uni-collapse-item>
- </block>
- </block>
- </uni-collapse>
- <view class="mt12">
- <!-- <view class="hbtns mb10 bgb" @click="getAddfb" v-if="datainfo.residentType==1&&datainfo.isHouseholder=='Y'">添加房屋信息</view> -->
- <view class="hbtns bga" @click="getSubmit">提交</view>
- </view>
- </view>
- </uni-forms>
-
- <loading></loading>
- </view>
- </template>
- <script>
- import config from '@/config'
- import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
- import {uploadIdentify,uploadmore} from '@/utils/common.js'
- import {listNoPageTenant,houseInfoDet} from "@/api/work/work.js"
- import {gettenantList} from "@/api/login.js"
- import {residentInfoAdd,residentInfoPut,authentication,addResidentInfo} from "@/api/work/people.js"
- import {getDictionaryFn} from "@/api/system/user.js"
- import {selectValueKey} from "@/utils/common.js"
- import {getOcrIdCard,getrealEstateCertificatee} from "@/api/system/card.js"
- import wSelect from "@/work/components/w-select/w-select.vue"
- export default {
- components: {wSelect},
- data() {
- return {
- rdelimg: require('@/work/static/service/rdel.png'),
- rimg: require('@/mine/static/house/rimg.png'),
- cmico: require('@/mine/static/house/cmico.png'),
- del: require('@/mine/static/house/del.png'),
- aphoto: require('@/work/static/service/photo.png'),
- baseUrl: config.baseUrl,
- checkflag:true,
- backgroundColor: "transparent",
- datainfo: {
- "tenantId":'',//租户id
- "residentType":null,//人员类型:1:业主 2:租户 3:其他
- "residentName":null,//居住人员姓名
- "residentPhone":null,//人员手机号
- "houseInfoRedidentList":[],//用户房屋信息集合
- "houseId":null,//关联房屋信息表的house_id
- "residentRelationship":null,//居住人员与户主的关系,如父子、夫妻等
- "isHouseholder":null,//是否是户主 N不是 Y是
-
- "residentIdCard":null,//居住人员身份证号码,18位
- // "residentBirthday":null,//居住人员出生日期
- "residentGender":'',//居住人员性别:1-男,2-女
-
- // "isTenant":null,//是否是租户:Y-是,N-否
- "residentEmployer":null,//居住人员工作单位
- "residentAppearance":null,//居住人员面貌,如党员、群众等
- "residentHobby":null,//爱好
- "facePhoto":null,//人脸地址
- "idCardAddress":null,//身份证住址
- "specialType":null,//特殊类型
- "idCardFront":null,//身份证正面
- "idCardBack":null,//身份证反面
- },
- rules:{
- residentType: {rules: [{required: true,errorMessage: '请选择人人员类型' }]},
- // residentIdCard: {rules: [{required: true,errorMessage: '请输入身份证号码' }]},
- // residentName: {rules: [{required: true,errorMessage: '请输入姓名' }]},
- // residentGender: {rules: [{required: true,errorMessage: '请选择性别' }]},
- // houseId: {rules: [{required: true,errorMessage: '请选择房屋号' }]},
- // detailedAddress: {rules: [{required: true,errorMessage: '请输入居住地址' }]},
- // isHouseholder: {rules: [{required: true,errorMessage: '请选择是否户主' }]},
- // residentRelationship: {rules: [{required: true,errorMessage: '请选择与户主关系' }]},
- residentPhone: {rules: [{required: true,errorMessage: '请输入手机号'}, {pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,errorMessage:'请输入正确的手机号码'}]},
- },
- hzgx:"",
- rylx:"",
- hzgxidx:0,
- dslxidx:0,
- rylxidx:0,
- list:[],
- phofile:[],
- fwlist:[],
- rylxList:[],
- fwzt:'',
- qllx:'',
- fwyt:'',
- ywcw:'',
- hzgx:'',
-
- sfhz:"",
- sfzh:"",
- rymm:"",
- dslx:"",
- fwztidx:0,
- qllxidx:0,
- fwytidx:0,
- ywcwidx:0,
- hzgxidx:0,
- sfzhidx:0,
- rymmidx:0,
- sfhzidx:0,
- dslxidx:0,
- fwztList:[],
- qllxList:[],
- fwytList:[],
- hzgxList:[],
- sfList:[],
- rymmList:[],
- dslxList:[],
- xbList:[],
- ywcwList:[{dictLabel:'有',dictValue:'Y'},{dictLabel:'无',dictValue:'N'},],
- isdisabled:false,
- ptype:'add',
- filterable:true,
- chooseValue:'',
- map:{text:'dictLabel',value:'dictValue'},
- userId:this.$store.state.user.userId,
- voList:[],
- tenantName:'',
- houseInfoRedidentList:[],
- fwztList:[],
- qllxList:[],
- fwytList:[],
- sfList:[],
- rzflag:false,
- choseidx:'',
- houserinfo:{
- "houseId":'',
- "tenantId":"",//租户id
- "houseImage":null,//房本照片
- "ownerName":null,//权利人姓名
- "location":null,//房屋坐落位置
- "rightType":null,//权利类型,如所有权、使用权等
- "area":null,//房屋面积,单位为平方米
- "documentNumber":null,//房屋相关的字第号
- "propertyUnitNumber":null,//不动产单元号
- "coOwnership":null,//房屋的共有情况,如共有比例等
- "usageType":null,//房屋用途,如住宅、商业等
- "usagePeriod":null,//房屋使用期限
- "registrationDate":null,//房屋登记日期
- "coOwner":null,//共有人姓名,多个共有人可以用逗号分隔
- "detailedAddress":null,//房屋的详细门牌号
- "hasParkingSpace":null,//是否有车位,Y表示有,N表示无
- "communityName":null,//房屋所在小区名称
- "houseStatus":null,//房屋状态:1-自住,2-出租,3-空闲,4-待售
- "parkingNumber":null,//车位号
- }
- }
- },
- onLoad: function(e) {
- if(e.type){
- this.rztype=e.type
- this.rzflag=true;
- this.datainfo.residentPhone=this.$store.state.user.phonenumber;
- this.datainfo.userId=this.$store.state.user.userId;
- }else{
- // var tenantId=this.$store.state.user.tenantId;
- // this.datainfo.tenantId=tenantId;
- // this.getRoleNopage(tenantId)
- }
- this.gettenantList();
- if(e.id){
- this.id=e.id;
- this.ptype="edit";
- // this.isdisabled=true;
- this.getDetail()
- }
- this.init()
- },
- onPageScroll(e) {
- var scrollTop = Number(e.scrollTop);
- if (scrollTop > 0) {
- this.backgroundColor = '#48CC9A'
- } else {
- this.backgroundColor = 'transparent'
- }
- },
- methods: {
- checkPermi,
- checkRole,
- getEditFn(){
- this.isdisabled=false;
- },
- getSyFn(e){
- this.datainfo.isHouseholder=e
- console.log(this.datainfo.isHouseholder)
- },
- getChose(idx){
- this.choseidx=idx;
- },
- getAddfb(){
- var obj={
- "ownerName":"",//权利人姓名
- "location":"",//房屋坐落位置
- "rightType":"",//权利类型,如所有权、使用权等
- "area":"",//房屋面积,单位为平方米
- "documentNumber":"",//房屋相关的字第号
- "propertyUnitNumber":"",//不动产单元号
- "coOwnership":"",//房屋的共有情况,如共有比例等
- "usageType":"",//房屋用途,如住宅、商业等
- "usagePeriod":"",//房屋使用期限
- "registrationDate":"",//房屋登记日期
- "coOwner":"",//共有人姓名,多个共有人可以用逗号分隔
- "detailedAddress":"",//房屋的详细门牌号
- "hasParkingSpace":"",//是否有车位,Y表示有,N表示无
- "communityName":"",//房屋所在小区名称
- "houseStatus":"",//房屋状态:1-自住,2-出租,3-空闲,4-待售
- "parkingNumber":'',//车位号
- }
- this.houseInfoRedidentList.push(obj)
- },
- getDelfb(idx){
- this.houseInfoRedidentList.splice(idx,1)
- },
- statusFormats(data, list,type) {
- var aite=selectValueKey(list, data);
- if(type=='qllx'){
- this.qllxidx=aite.key;
- }else if(type=='rylx'){
- this.rylxidx=aite.key;
- }else if(type=='hzgx'){
- this.hzgxidx=aite.key;
- }else if(type=='fwzt'){
- this.fwztidx=aite.key;
- }else if(type=='fwyt'){
- this.fwytidx=aite.key;
- }else if(type=='ywcw'){
- this.ywcwidx=aite.key;
- }else if(type=='tenant'){
- this.tenantName=aite.actions;
- }else if(type=='rymm'){
- this.rymmidx=aite.key;
- }else if(type=='dslx'){
- this.dslxidx=aite.key;
- }
- return aite.actions;
- },
- getchangea(e){
- var tenantId=this.datainfo.tenantId;
- this.datainfo.tenantId=e.dictValue;
- this.houserinfo.communityName=e.dictLabel;
- // 业主或租户
- this.listNoPageTenant(e.dictValue)
- },
- getchange(e){
- this.datainfo.houseId=e.dictValue;
- this.datainfo.detailedAddress=e.dictLabel;
- this.houserinfo.detailedAddress=e.dictLabel;
- this.houserinfo.houseId=e.dictValue;
- this.houserinfo.location=e.location;
- },
- // 获取租户列表
- gettenantList(){
- gettenantList().then(res=>{
- if(res.code==200){
- if(res.data.voList&&res.data.voList.length){
- this.voList = res.data.voList.map(v => {
- return {
- dictLabel: v.companyName,
- dictValue: v.tenantId
- }
- })
- }
-
- }else{
- this.$toast(res.msg)
- }
- })
- },
- listNoPageTenant(id){
- var params={
- tenantId:id,
- }
- listNoPageTenant(params).then(res=>{
- if(res.code==200){
- this.fwlist= res.data.map(v => {
- return {
- dictLabel: v.detailedAddress,
- dictValue: v.houseId,
- location: v.location
- }
- })
- // if(res.rows&&res.rows.length<2){
- // var newObj=res.rows[0];
- // this.datainfo.houseId=newObj.houseId;
- // this.datainfo.detailedAddress=newObj.detailedAddress
- // }
- }
- })
- },
- init(){
- // 人员类型
- getDictionaryFn('resident_Type').then(res=>{
- if(res.code==200){
- this.rylxList = res.data.map(v => {
- return {
- dictLabel: v.dictLabel,
- dictValue: v.dictValue
- }
- })
- }
- })
- // 是否
- getDictionaryFn('sys_yes_no').then(res=>{
- if(res.code==200){
- this.sfList = res.data.map(v => {
- return {
- dictLabel: v.dictLabel,
- dictValue: v.dictValue
- }
- })
- }
- })
- //户主关系
- getDictionaryFn('relationship_householder').then(res=>{
- if(res.code==200){
- this.hzgxList = res.data.map(v => {
- return {
- dictLabel: v.dictLabel,
- dictValue: v.dictValue
- }
- })
- }
- })
- // 房屋状态
- getDictionaryFn('house_status').then(res=>{
- if(res.code==200){
- this.fwztList = res.data.map(v => {
- return {
- dictLabel: v.dictLabel,
- dictValue: v.dictValue
- }
- })
- }
- })
- //权利类型
- getDictionaryFn('types_rights').then(res=>{
- if(res.code==200){
- this.qllxList = res.data.map(v => {
- return {
- dictLabel: v.dictLabel,
- dictValue: v.dictValue
- }
- })
- }
- })
- //房屋用途
- getDictionaryFn('use_remises').then(res=>{
- if(res.code==200){
- this.fwytList = res.data.map(v => {
- return {
- dictLabel: v.dictLabel,
- dictValue: v.dictValue
- }
- })
- }
- })
- //人员面貌
- getDictionaryFn('affiliation_personnel').then(res=>{
- if(res.code==200){
- this.rymmList = res.data.map(v => {
- return {
- dictLabel: v.dictLabel,
- dictValue: v.dictValue
- }
- })
- }
- })
- // 特殊类型
-
- getDictionaryFn('special_type').then(res=>{
- if(res.code==200){
- this.dslxList = res.data.map(v => {
- return {
- dictLabel: v.dictLabel,
- dictValue: v.dictValue
- }
- })
- }
- })
- //性别
- getDictionaryFn('gender').then(res=>{
- if(res.code==200){
- this.xbList = res.data.map(v => {
- return {
- dictLabel: v.dictLabel,
- dictValue: Number(v.dictValue)
- }
- })
- }
- })
-
- },
- getBackFn(){
- uni.navigateBack({
- delta:1
- })
- },
- bindDateChange(e){
- var val=e.detail.value;
- this.houserinfo.rightType=this.qllxList[val].dictValue;
- this.qllx=this.qllxList[val].dictLabel;
- },
- bindDateChangea(e){
- var val=e.detail.value;
- this.houserinfo.registrationDate=val;
- },
- bindDateChangeb(e){
- var val=e.detail.value;
- this.houserinfo.houseStatus=this.fwztList[val].dictValue;
- this.fwzt=this.fwztList[val].dictLabel;
- },
- bindDateChangec(e){
- var val=e.detail.value;
- this.houserinfo.usageType=this.fwytList[val].dictValue;
- this.fwyt=this.fwytList[val].dictLabel;
- },
- bindDateChanged(e){
- var val=e.detail.value;
- this.houserinfo.hasParkingSpace=this.ywcwList[val].dictValue;
- this.ywcw=this.ywcwList[val].dictLabel;
- },
- bindDateChangee(e){
- var val=e.detail.value;
- this.datainfo.residentType=this.rylxList[val].dictValue;
- this.rylx=this.rylxList[val].dictLabel;
- },
- bindDateChangef(e){
- var val=e.detail.value;
- this.datainfo.residentAppearance=this.rymmList[val].dictValue;
- this.rymm=this.rymmList[val].dictLabel;
- },
- bindDateChangeg(e){
- var val=e.detail.value;
- this.datainfo.specialType=this.dslxList[val].dictValue;
- this.dslx=this.dslxList[val].dictLabel;
- },
- getDetail(){
- authentication(this.id).then(res=>{
- if(res.code==200){
- this.datainfo=res.data;
- if(res.data.facePhoto){
- this.phofile=res.data.facePhoto.split(',')
- }
- var data=JSON.parse(JSON.stringify(res.data))
- if(data.residentType!=3){
- this.listNoPageTenant(data.tenantId)
- }
- if(res.data.houseInfoRedidentList&&res.data.houseInfoRedidentList.length&&res.data.houseInfoRedidentList[0]){
- var houseinfo=res.data.houseInfoRedidentList[0]
- this.houserinfo=JSON.parse(JSON.stringify(houseinfo))
- }
-
- }
- })
- },
- getSubmit(){
- var that=this;
- this.$refs.form.validate().then(res => {
- var params=JSON.parse(JSON.stringify(this.datainfo))
- var phofile=JSON.parse(JSON.stringify(this.phofile))
- // if(phofile&&phofile.length){
- // params.facePhoto=this.phofile.join(',');
- // }
- params.facePhoto=this.phofile.join(',');
- if(!params.tenantId){
- this.$toast('请选择小区名称')
- return
- }
- if(params.residentType==1&¶ms.isHouseholder=='Y'){
- var houserinfo=JSON.parse(JSON.stringify(this.houserinfo))
- if(!houserinfo.location){
- this.$toast('请输入房屋坐落')
- return
- }
- if(!houserinfo.area){
- this.$toast('请输入房屋面积')
- return
- }
- if(!houserinfo.detailedAddress){
- this.$toast('请输入详细门牌号')
- return
- }
- houserinfo.tenantId=params.tenantId;
- var newarr=[]
- newarr.push(houserinfo)
- params.houseInfoRedidentList=JSON.parse(JSON.stringify(newarr))
- }
- if(params.residentType==2){
- params.isTenant='Y'
- }else{
- params.isTenant=''
- }
- // if(!params.detailedAddress){
- // this.$toast('请选择居住门户')
- // return
- // }
- // let _IDRe18 =
- // /^([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]$/
- // 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}$/
- // // 校验身份证:
- // if (params.residentIdCard&&!_IDRe18.test(params.residentIdCard) && !_IDre15.test(params.residentIdCard)) {
- // this.$toast("请输入正确身份证号")
- // return
- // }
- if(this.ptype=='add'){
- if(this.rzflag){
- residentInfoAdd(params).then(res=>{
- if(res.code==200){
- this.$toast("新增成功")
- setTimeout(function(){
- uni.$emit("residentInfoList")
- var initFace='';
- that.$store.dispatch('checkInitFace', initFace).then(() => {
-
- })
- uni.navigateBack({
- delta:1
- })
- },1500)
- }
- })
- }
- }else{
- if(this.rzflag){
- params.isFilter=true;
- residentInfoPut(params).then(res=>{
- if(res.code==200){
- this.$toast("修改成功")
- setTimeout(function(){
- uni.$emit("residentInfoList")
- var initFace='';
- that.$store.dispatch('checkInitFace', initFace).then(() => {
-
- })
- uni.navigateBack({
- delta:1
- })
- },1500)
- }
- })
- }
-
- }
- })
- },
- getPreviewa(idx,arr) {
- var newArr=[];
- arr.forEach(ite=>{
- var ds=this.baseUrl+ite
- newArr.push(ds)
- })
- uni.previewImage({
- urls: newArr,
- current:idx,
- success: function(data) {},
- fail: function(err) {}
- });
- },
- getPreview(img) {
- var newArr=[];
- var url=this.baseUrl+img
- newArr.push(url)
- uni.previewImage({
- urls: newArr,
- current:0,
- success: function(data) {},
- fail: function(err) {}
- });
- },
- getDelFn(idx,type){
- var that=this;
- uni.showModal({
- title: '确认删除',
- content: "是否确认删除",
- cancelText: '取消',
- confirmText: '确认',
- success: function(res) {
- if (res.confirm) {
- that.phofile.splice(idx,1)
- } else if (res.cancel) {
- }
- }
- });
- },
- getaddImageava(type){
- if(this.isdisabled){
- return
- }
- let that = this;
- let file =[],count=9
- uni.chooseImage({
- success:function(res){
- let img= res.tempFilePaths;
- if(img.length + file.length > count){
- uni.showToast({
- title: '最多上传'+count+'张图片',
- icon: 'none',
- duration: 2000
- })
- }else{
- let imglen = res.tempFilePaths.length;
- var fuwufile = [];
- uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
- that.phofile = that.phofile.concat(rs);
- })
- }
- }
- });
- },
- getaddImage(type){
- if(this.isdisabled){
- return
- }
- let that = this;
- let file =[],count=9
- uni.chooseImage({
- count: 1,
- success:function(res){
- let img= res.tempFilePaths;
- if(img.length + file.length > count){
- uni.showToast({
- title: '最多上传'+count+'张图片',
- icon: 'none',
- duration: 2000
- })
- }else{
- let imglen = res.tempFilePaths.length;
- var fuwufile = [];
- uploadIdentify('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
- var resurl=rs[0];
- if(type=='front'){
- that.datainfo.idCardBack = resurl.fileName;
- if (rs && rs.length > 0) {
- var obj = {
- type:type,
- url: resurl.urlOnline
- }
- that.getOcrIdCard(obj)
- }
- }else{
- that.houserinfo.houseImage=resurl.fileName;
- if(rs&&rs.length>0){
- var obj={
- url:resurl.urlOnline
- }
- that.getOcrIdCardfz(obj)
- }
- }
- })
- }
- }
- });
- },
- getOcrIdCard(obj) {
- var params = {
- image: obj.url,
- idCardSide: obj.type
- }
- getOcrIdCard(params).then(res => {
- if (res.code == 200) {
- var datainfo = res.data;
- if (obj.type == 'front') {
- this.datainfo.residentName = datainfo.realName;
- this.datainfo.residentIdCard = datainfo.idCard;
- this.datainfo.idCardAddress = datainfo.address;
- // } else {
- // this.datainfo.expirationDate = datainfo.expirationDate
- }
- }
- })
- },
- getOcrIdCardfz(obj){
- var params={
- image:obj.url
- }
- getrealEstateCertificatee(params).then(res=>{
- if(res.code==200){
- var datainfo=res.data;
- // var obj=JSON.parse(JSON.stringify(this.houseInfoRedidentList[idx]))
- this.houserinfo.ownerName=datainfo.ownerName;
- this.houserinfo.location=datainfo.location;
- this.houserinfo.rightType=datainfo.rightType;
- this.houserinfo.area=datainfo.area;
- this.houserinfo.documentNumber=datainfo.documentNumber;
- this.houserinfo.propertyUnitNumber=datainfo.propertyUnitNumber;
- this.houserinfo.coOwnership=datainfo.coOwnership;
- this.houserinfo.usageType=datainfo.usageType;
- this.houserinfo.usagePeriod=datainfo.usagePeriod;
- this.houserinfo.registrationDate=datainfo.registrationDate;
- this.houserinfo.coOwner=datainfo.coOwner;
- // this.houseInfoRedidentList.splice(idx,1,obj)
- }
- })
- },
- }
- }
- </script>
- <style>
- page{background: #F3F3F0;}
- </style>
- <style lang="scss" scoped>
- .coa /deep/ .uni-date__x-input{text-align: right;color: #AAAAAA;}
- .check /deep/ .select-wrap{border: none;width: 100%;}
- .mh35{min-height: 70rpx;display: flex;align-items: center;}
- .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;}
- .check .cbox .chmain /deep/ .isnobor{border: none;}
- .check /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;}
- .check /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
- .check /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;}
- .check /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
- .check /deep/ .uni-input-input{font-size: 26rpx;}
- .check /deep/ .uni-textarea-textarea{font-size: 26rpx;}
- .check /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
- .check /deep/ .uni-data-checklist .checklist-group .checklist-box{margin:10rpx 8rpx 10rpx 16rpx;}
- .check /deep/ .uni-data-checklist{flex: 0 0 auto;}
- .check /deep/ .is-required{font-size: 26rpx;color: #F40027;margin-right: 4rpx;}
- .check /deep/ .uni-collapse{background-color: transparent;}
- // .check /deep/ .uni-collapse .chmain{margin-bottom: 24rpx;}
- .check{min-height: 100vh;box-sizing: border-box;padding: 20rpx 18rpx 54rpx;}
- .cbox{
- .chtit{font-weight: 500;font-size: 24rpx;color: #666666;padding:20rpx 14rpx;}
- .chmain{
- padding: 0rpx 28rpx;background: #FFFFFF;border-radius: 20rpx;
- .rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
- image{width: 100%;height: 100%;}
- }
- }
- .hbtns{font-weight: bold;display: flex;align-items: center;justify-content: center;font-size: 26rpx;height: 88rpx;border-radius: 20rpx;box-sizing: border-box;
- &.bga{border: 1px solid #0256FD;color: #FFFFFF;background: #0256FD;}
- &.bgb{border: 1px solid #0256FD;color: #0256FD;background: #CADBFF;}
-
- }
- .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;
- font-size: 26rpx;
- color: #666666;
- &.act{border: 2rpx solid #0256FD;background: #DCE8FF;color: #0256FD;}
- }
- .cmico{width: 48rpx;height: 48rpx;margin-left: 16rpx;}
- .delbox{padding: 12rpx 32rpx;
- image{width: 26rpx;height: 26rpx;margin-right: 14rpx;}
- view{font-weight: 500;font-size: 26rpx;color: #FF6969;}
- }
- }
- .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;
- image{width: 48rpx;height: 42rpx;margin-bottom: 12rpx;}
- view{font-weight: 500;font-size: 24rpx;color: #666666;}
- }
- .addimgs{display: flex;align-items: center;flex-wrap: wrap;justify-content: flex-end;
- .assimg{width: 128rpx;height: 128rpx;position: relative;overflow: hidden;margin: 0 0 20rpx 24rpx;
- .img{width: 100%;height: 100%;}
- .delimg{width: 24rpx;height: 24rpx;position: absolute;right: 0;top: 0;}
- }
- }
- </style>
|