123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035 |
- <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;
- // 业主或租户
- if(this.datainfo.residentType!=3){
- 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>
|