|
@@ -6,39 +6,138 @@
|
|
|
<view>房屋信息</view>
|
|
|
</view>
|
|
|
<view class="chmain">
|
|
|
- <uni-forms ref="form" :model="datainfo">
|
|
|
+ <uni-forms ref="form" :model="datainfo" :rules="rules">
|
|
|
<view class="upbox" @click="getaddImage">
|
|
|
<image :src="baseUrl+datainfo.front" class="img" v-if="datainfo.front"></image>
|
|
|
<image :src="cmico" class="addimg"></image>
|
|
|
<view>扫描房产证自动填写</view>
|
|
|
</view>
|
|
|
- <uni-forms-item label="房屋坐落" name="realName">
|
|
|
+ <uni-forms-item label="房屋坐落" required name="location">
|
|
|
<view class="flexc">
|
|
|
- <uni-easyinput v-model="datainfo.realName" disabled :inputBorder='false' placeholder="自动识别" />
|
|
|
+ <uni-easyinput :disabled="isdisabled" v-model="datainfo.location" :inputBorder='false' placeholder="自动识别" />
|
|
|
<view class="rimg"></view>
|
|
|
</view>
|
|
|
</uni-forms-item>
|
|
|
- <uni-forms-item label="房屋所属" name="phonenumber">
|
|
|
+ <uni-forms-item label="权利人姓名" name="ownerName">
|
|
|
<view class="flexc">
|
|
|
- <uni-easyinput v-model="datainfo.phonenumber" disabled :inputBorder='false' placeholder="自动识别" />
|
|
|
+ <uni-easyinput :disabled="isdisabled" v-model="datainfo.ownerName" :inputBorder='false' placeholder="自动识别" />
|
|
|
<view class="rimg"></view>
|
|
|
</view>
|
|
|
</uni-forms-item>
|
|
|
- <uni-forms-item label="建筑面积" name="phonenumber">
|
|
|
+ <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="datainfo.rightType&&!qllx">{{statusFormats(datainfo.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="datainfo.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="datainfo.propertyUnitNumber" :inputBorder='false' placeholder="请输入不动产单元号" />
|
|
|
+ <view class="rimg"></view>
|
|
|
+ </view>
|
|
|
+ </uni-forms-item>
|
|
|
+ <uni-forms-item label="相关的字第号" name="documentNumber">
|
|
|
<view class="flexc">
|
|
|
- <uni-easyinput v-model="datainfo.phonenumber" disabled :inputBorder='false' placeholder="自动识别" />
|
|
|
+ <uni-easyinput :disabled="isdisabled" v-model="datainfo.documentNumber" :inputBorder='false' placeholder="请输入相关的字第号" />
|
|
|
<view class="rimg"></view>
|
|
|
</view>
|
|
|
</uni-forms-item>
|
|
|
- <uni-forms-item label="房型" name="realName">
|
|
|
+ <uni-forms-item label="小区名称" name="communityName">
|
|
|
+ <view class="flexc">
|
|
|
+ <uni-easyinput :disabled="isdisabled" v-model="datainfo.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="isdisabled" v-model="datainfo.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="datainfo.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="datainfo.registrationDate?'co27':'coa'" type="datetime" placeholder="请选择登记日期" :border="false" v-model="datainfo.registrationDate" @change="changeLog" />
|
|
|
+ <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="datainfo.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="datainfo.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="datainfo.houseStatus&&!fwzt">{{statusFormats(datainfo.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="datainfo.usageType&&!fwyt">{{statusFormats(datainfo.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="datainfo.hasParkingSpace&&!ywcw">{{statusFormats(datainfo.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="phonenumber">
|
|
|
+ <view class="flexc">
|
|
|
+ <uni-easyinput :disabled="isdisabled" v-model="datainfo.phonenumber" :inputBorder='false' placeholder="请输入车位号" />
|
|
|
+ <view class="rimg"></view>
|
|
|
+ </view>
|
|
|
+ </uni-forms-item>
|
|
|
+ <!-- <uni-forms-item label="房型" name="realName">
|
|
|
<view class="flexjd">
|
|
|
- <picker range-key='text' :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
+ <picker range-key='dictLabel' :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
<view class="flexc ml10">
|
|
|
<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择'}}</view>
|
|
|
<view class="tips">室</view>
|
|
|
</view>
|
|
|
</picker>
|
|
|
- <picker range-key='text' :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
+ <picker range-key='dictLabel' :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
<view class="flexc ml10">
|
|
|
<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择'}}</view>
|
|
|
<view class="tips">厅</view>
|
|
@@ -46,29 +145,23 @@
|
|
|
</picker>
|
|
|
<view class="rimg"></view>
|
|
|
</view>
|
|
|
- </uni-forms-item>
|
|
|
- <uni-forms-item label="姓名" name="phonenumber">
|
|
|
- <view class="flexc">
|
|
|
- <uni-easyinput v-model="datainfo.phonenumber" :inputBorder='false' placeholder="请输入姓名" />
|
|
|
- <view class="rimg"></view>
|
|
|
- </view>
|
|
|
- </uni-forms-item>
|
|
|
- <uni-forms-item label="住户类型" name="realName">
|
|
|
- <picker range-key='text' :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
+ </uni-forms-item> -->
|
|
|
+ <!-- <uni-forms-item label="住户类型" name="realName">
|
|
|
+ <picker range-key='dictLabel' :disabled="isdisabled" :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
<view class="flexc">
|
|
|
<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择住户类型'}}</view>
|
|
|
<view class="rimg"><image :src="rimg"></image></view>
|
|
|
</view>
|
|
|
</picker>
|
|
|
- </uni-forms-item>
|
|
|
- <uni-forms-item label="是否户主" name="phonenumber">
|
|
|
+ </uni-forms-item> -->
|
|
|
+ <!-- <uni-forms-item label="是否户主" name="phonenumber">
|
|
|
<view class="flexc">
|
|
|
- <uni-easyinput v-model="datainfo.phonenumber" disabled :inputBorder='false' placeholder="自动识别" />
|
|
|
+ <uni-easyinput :disabled="isdisabled" v-model="datainfo.phonenumber" disabled :inputBorder='false' placeholder="自动识别" />
|
|
|
<view class="rimg"></view>
|
|
|
</view>
|
|
|
</uni-forms-item>
|
|
|
- <uni-forms-item label="与户主关系" name="realName">
|
|
|
- <picker range-key='text' :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
+ <uni-forms-item label="与户主关系" :disabled="isdisabled" name="realName">
|
|
|
+ <picker range-key='dictLabel' :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
<view class="flexc">
|
|
|
<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择与户主关系'}}</view>
|
|
|
<view class="rimg"><image :src="rimg"></image></view>
|
|
@@ -76,23 +169,17 @@
|
|
|
</picker>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="居住人口" name="realName">
|
|
|
- <picker range-key='text' :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
+ <picker range-key='dictLabel' :disabled="isdisabled" :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
<view class="flexc">
|
|
|
<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择居住人口'}}</view>
|
|
|
<view class="rimg"><image :src="rimg"></image></view>
|
|
|
</view>
|
|
|
</picker>
|
|
|
- </uni-forms-item>
|
|
|
- <uni-forms-item label="有无车位" name="realName">
|
|
|
- <picker range-key='text' :value="syqxidx" :range="sexs" @change='bindDateChange'>
|
|
|
- <view class="flexc">
|
|
|
- <view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择有/无'}}</view>
|
|
|
- <view class="rimg"><image :src="rimg"></image></view>
|
|
|
- </view>
|
|
|
- </picker>
|
|
|
- </uni-forms-item>
|
|
|
+ </uni-forms-item> -->
|
|
|
+
|
|
|
</uni-forms>
|
|
|
- <view class="rhbtn mt30" @click="getNext">确定添加</view>
|
|
|
+ <view class="rhbtn mt30" @click="getEditFn" v-if="isdisabled">修改</view>
|
|
|
+ <view class="rhbtn mt30" @click="getSubmit" v-else>确定添加</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<loading></loading>
|
|
@@ -102,7 +189,19 @@
|
|
|
<script>
|
|
|
import config from '@/config'
|
|
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
|
|
- import {uploadIdentify} from '@/utils/common.js'
|
|
|
+ import {uploadIdentify,selectValueKey,geocodeAddress} from '@/utils/common.js'
|
|
|
+ import {getDictionaryFn} from "@/api/system/user.js"
|
|
|
+ import {houseInfoAdd,houseInfoPut,houseInfoDet} from "@/api/work/work.js"
|
|
|
+ var key='';
|
|
|
+ // #ifdef H5
|
|
|
+ key='8de52b560193f01932ad997dba3e76c0'
|
|
|
+ // #endif
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ key='ccbe52b1ec5f66295fa4609c90a819b7'
|
|
|
+ // #endif
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ key='ccbe52b1ec5f66295fa4609c90a819b7'
|
|
|
+ // #endif
|
|
|
export default{
|
|
|
components:{},
|
|
|
data(){
|
|
@@ -111,41 +210,206 @@
|
|
|
cmico:require('@/mine/static/house/cmico.png'),
|
|
|
baseUrl:config.baseUrl,
|
|
|
datainfo:{
|
|
|
- realName:'',
|
|
|
- idCard:'',
|
|
|
- address:'',
|
|
|
- expirationDate:'',
|
|
|
- phonenumber:'',
|
|
|
- front:'',
|
|
|
- back:'',
|
|
|
+ // "houseId":"",//房屋信息主键
|
|
|
+ "ownerName":"",//权利人姓名
|
|
|
+ "location":"",//房屋坐落位置
|
|
|
+ "rightType":"",//权利类型,如所有权、使用权等
|
|
|
+ "area":"",//房屋面积,单位为平方米
|
|
|
+ "documentNumber":"",//房屋相关的字第号
|
|
|
+ "propertyUnitNumber":"",//不动产单元号
|
|
|
+ "coOwnership":"",//房屋的共有情况,如共有比例等
|
|
|
+ "usageType":"",//房屋用途,如住宅、商业等
|
|
|
+ "usagePeriod":"",//房屋使用期限
|
|
|
+ "registrationDate":"",//房屋登记日期
|
|
|
+ "coOwner":"",//共有人姓名,多个共有人可以用逗号分隔
|
|
|
+ "detailedAddress":"",//房屋的详细门牌号
|
|
|
+ "hasParkingSpace":"",//是否有车位,Y表示有,N表示无
|
|
|
+ "communityName":"",//房屋所在小区名称
|
|
|
+ "houseStatus":""//房屋状态:1-自住,2-出租,3-空闲,4-待售
|
|
|
},
|
|
|
- syqxidx:'',
|
|
|
- sexs: [{
|
|
|
- text: '男',
|
|
|
- value: 0
|
|
|
- }, {
|
|
|
- text: '女',
|
|
|
- value: 1
|
|
|
- }],
|
|
|
+ rules: {
|
|
|
+ location: {rules: [{required: true,errorMessage: '请输入房屋坐落位置' }]},
|
|
|
+ detailedAddress: {rules: [{required: true,errorMessage: '请输入详细门牌号' }]},
|
|
|
+ area: {rules: [{required: true,errorMessage: '请输入面积' }]},
|
|
|
+ },
|
|
|
+ id:'',
|
|
|
+ ptype:'add',
|
|
|
+ fwzt:'',
|
|
|
+ qllx:'',
|
|
|
+ fwyt:'',
|
|
|
+ ywcw:'',
|
|
|
+ fwztidx:'',
|
|
|
+ qllxidx:'',
|
|
|
+ fwytidx:'',
|
|
|
+ ywcwidx:'',
|
|
|
+ fwztList:[],
|
|
|
+ qllxList:[],
|
|
|
+ fwytList:[],
|
|
|
+ ywcwList:[{dictLabel:'有',dictValue:'Y'},{dictLabel:'无',dictValue:'N'},],
|
|
|
+ isdisabled:false,
|
|
|
+ latitude:'',
|
|
|
+ longitude:"",
|
|
|
}
|
|
|
},
|
|
|
- onLoad: function() {
|
|
|
-
|
|
|
+ onLoad: function(e) {
|
|
|
+ if(e.id){
|
|
|
+ this.id=e.id;
|
|
|
+ this.ptype="edit";
|
|
|
+ this.isdisabled=true;
|
|
|
+ this.getDetail()
|
|
|
+ }
|
|
|
+ this.init()
|
|
|
},
|
|
|
methods:{
|
|
|
checkPermi, checkRole,
|
|
|
+ getEditFn(){
|
|
|
+ this.isdisabled=false;
|
|
|
+ },
|
|
|
+ statusFormats(data, list,type) {
|
|
|
+ var aite=selectValueKey(list, data);
|
|
|
+ if(type=='qllx'){
|
|
|
+ this.qllxidx=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;
|
|
|
+ }
|
|
|
+ return aite.actions;
|
|
|
+ },
|
|
|
+ init(){
|
|
|
+ // 房屋状态
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ bindDateChange(e){
|
|
|
+ var val=e.detail.value;
|
|
|
+ this.datainfo.rightType=this.qllxList[val].dictValue;
|
|
|
+ this.qllx=this.qllxList[val].dictLabel;
|
|
|
+ },
|
|
|
+ bindDateChangea(e){
|
|
|
+ var val=e.detail.value;
|
|
|
+ this.datainfo.registrationDate=val;
|
|
|
+ },
|
|
|
+ bindDateChangeb(e){
|
|
|
+ var val=e.detail.value;
|
|
|
+ this.datainfo.houseStatus=this.fwztList[val].dictValue;
|
|
|
+ this.fwzt=this.fwztList[val].dictLabel;
|
|
|
+ },
|
|
|
+ bindDateChangec(e){
|
|
|
+ var val=e.detail.value;
|
|
|
+ this.datainfo.usageType=this.fwytList[val].dictValue;
|
|
|
+ this.fwyt=this.fwytList[val].dictLabel;
|
|
|
+ },
|
|
|
+ bindDateChanged(e){
|
|
|
+ var val=e.detail.value;
|
|
|
+ this.datainfo.hasParkingSpace=this.ywcwList[val].dictValue;
|
|
|
+ this.ywcw=this.ywcwList[val].dictLabel;
|
|
|
+ },
|
|
|
+ getDetail(){
|
|
|
+ houseInfoDet(this.id).then(res=>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.datainfo=res.data;
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async getLocation(address) {
|
|
|
+ if (!address) {
|
|
|
+ uni.showToast({ title: '请输入地址', icon: 'none' });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ const { latitude, longitude } = await geocodeAddress(address, key);
|
|
|
+ this.latitude = latitude;
|
|
|
+ this.longitude = longitude;
|
|
|
+ } catch (error) {
|
|
|
+ uni.showToast({ title: '获取经纬度失败', icon: 'none' });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getSubmit(){
|
|
|
+ this.$refs.form.validate().then(res => {
|
|
|
+ var params=JSON.parse(JSON.stringify(this.datainfo))
|
|
|
+ // if(!params.portalId){
|
|
|
+ // this.$toast("请选择来访门户")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if(params.isCar=='Y'&&!params.plateNumber){
|
|
|
+ // this.$toast("请输入车牌号")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if(!params.visitorTime){
|
|
|
+ // this.$toast("请选择来访时间")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if(params.location){
|
|
|
+ // var pobj=this.getLocation(params.location)
|
|
|
+ // console.log(pobj)
|
|
|
+ // params.lgt=longitude;
|
|
|
+ // params.lat=latitude;
|
|
|
+
|
|
|
+ // }
|
|
|
+ if(this.ptype=='add'){
|
|
|
+ houseInfoAdd(params).then(res=>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.$toast("新增成功")
|
|
|
+ setTimeout(function(){
|
|
|
+ uni.$emit("refHouseList")
|
|
|
+ uni.navigateBack({
|
|
|
+ delta:1
|
|
|
+ })
|
|
|
+ },1500)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ houseInfoPut(params).then(res=>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.$toast("修改成功")
|
|
|
+ setTimeout(function(){
|
|
|
+ uni.$emit("refHouseList")
|
|
|
+ uni.navigateBack({
|
|
|
+ delta:1
|
|
|
+ })
|
|
|
+ },1500)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getaddImage(e){
|
|
|
let that = this;
|
|
|
- // var rs=['D:\\idcard.png']
|
|
|
- // if(rs&&rs.length>0){
|
|
|
- // var obj={
|
|
|
- // type:e,
|
|
|
- // // url:baseUrl+rs.join(',')
|
|
|
- // url:rs.join(',')
|
|
|
- // }
|
|
|
- // that.getOcrIdCard(obj)
|
|
|
- // }
|
|
|
- // return
|
|
|
let file =[],count=9
|
|
|
uni.chooseImage({
|
|
|
count: 1,
|
|
@@ -161,19 +425,19 @@
|
|
|
let imglen = res.tempFilePaths.length;
|
|
|
var fuwufile = [];
|
|
|
uploadIdentify('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
|
|
|
- var resurl=rs[0];
|
|
|
- if(e=='front'){
|
|
|
- that.datainfo.front=resurl.fileName;
|
|
|
- }else{
|
|
|
- that.datainfo.back=resurl.fileName;
|
|
|
- }
|
|
|
- if(rs&&rs.length>0){
|
|
|
- var obj={
|
|
|
- type:e,
|
|
|
- url:resurl.urlOnline
|
|
|
- }
|
|
|
- that.getOcrIdCard(obj)
|
|
|
- }
|
|
|
+ // var resurl=rs[0];
|
|
|
+ // if(e=='front'){
|
|
|
+ // that.datainfo.front=resurl.fileName;
|
|
|
+ // }else{
|
|
|
+ // that.datainfo.back=resurl.fileName;
|
|
|
+ // }
|
|
|
+ // if(rs&&rs.length>0){
|
|
|
+ // var obj={
|
|
|
+ // type:e,
|
|
|
+ // url:resurl.urlOnline
|
|
|
+ // }
|
|
|
+ // that.getOcrIdCard(obj)
|
|
|
+ // }
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -196,7 +460,7 @@
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -204,6 +468,8 @@
|
|
|
page{background: #F3F3F0;}
|
|
|
</style>
|
|
|
<style lang="scss" scoped>
|
|
|
+.coa /deep/ .uni-date__x-input{text-align: right;color: #AAAAAA;}
|
|
|
+.check /deep/ .uni-date-editor--x__disabled{opacity: 1;}
|
|
|
.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 /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;}
|
|
@@ -212,6 +478,7 @@
|
|
|
.check /deep/ .uni-input-input{font-size: 26rpx;}
|
|
|
.check /deep/ .uni-textarea-textarea{font-size: 26rpx;}
|
|
|
.check /deep/ .uni-forms-item__label text{width: 110rpx;text-align-last: justify;}
|
|
|
+.check /deep/ .uni-forms-item__label .is-required{width: auto;}
|
|
|
.check /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
|
|
|
.check{min-height: 100vh;padding: 20rpx 18rpx 22rpx;box-sizing: border-box;display: flex;box-sizing: border-box;}
|
|
|
.cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;padding-bottom: 28rpx;
|