Commit 699ceba9 authored by linxin's avatar linxin

不动产权证

parent 6b0f5b03
......@@ -13,7 +13,9 @@
</div>
<div class="pwd">
<div class="pwd-input">
<input id="passwordInput" v-model="password" :type="pwdType" placeholder="请输入密码" >
<input
id="passwordInput" v-model="password" :type="pwdType" placeholder="请输入密码"
oninput="value=value.replace(/[^\w\.\&\/\|\,\\_\-\+\=\[\]\{\}\'\^\%\$\@\!\~\`\*\《\》\<\>\/\;\:\,\,\。\【\】\?\?\、\;\:\‘\“\(\#)]/i,'')" >
</div>
<div v-if="password" class="delete" @click="changeType">
<img :src="openEye" >
......
......@@ -28,13 +28,14 @@
<div slot="name" class="required">设置密码</div>
<input
slot="content" v-model="user_password" type="text" placeholder="请输入6~20位密码"
maxlength="20" @blur="passwordCheck">
maxlength="20" oninput="value=value.replace(/[^\w\.\/\|\,\\_\-\+\=\[\]\{\}\'\^\%\$\@\!\~\`\*\《\》\<\>\/\;\:\,\,\。\【\】\?\?\、\;\:\‘\“\(\#)]/i,'')" @blur="passwordCheck">
</item>
<item :proportion="[2,2]">
<img slot="left-icon" src="../assets/login/passwordConfirm.png" class="left-icon">
<div slot="name" class="required">重新输入密码</div>
<input
slot="content" v-model="confirm" type="text" placeholder="请重新输入密码"
slot="content" v-model="confirm" oninput="value=value.replace(/[^\w\.\/\|\,\\_\-\+\=\[\]\{\}\'\^\%\$\@\!\~\`\*\《\》\<\>\/\;\:\,\,\。\【\】\?\?\、\;\:\‘\“\(\#)]/i,'')" type="text"
placeholder="请重新输入密码"
@blur="confirmCheck">
</item>
</list-item>
......
......@@ -33,13 +33,16 @@
:type="pwdType"
placeholder="请输入6~20位密码"
maxlength="20"
oninput="value=value.replace(/[^\w\.\/\|\,\\_\-\+\=\[\]\{\}\'\&\^\%\$\@\!\~\`\*\《\》\<\>\/\;\:\,\,\。\【\】\?\?\、\;\:\‘\“\(\#)]/i,'')"
@blur="passwordCheck"
>
<img v-if="user_password" :src="openEye" class="right-icon" @click="changeType" >
</div>
<div class="reg-item">
<img src="../assets/login/pass.png" class="left-icon" >
<input v-model="confirm" :type="pwdType" placeholder="请重新输入密码" @blur="confirmCheck" >
<input
v-model="confirm" :type="pwdType" oninput="value=value.replace(/[^\w\.\&\/\|\,\\_\-\+\=\[\]\{\}\'\^\%\$\@\!\~\`\*\《\》\<\>\/\;\:\,\,\。\【\】\?\?\、\;\:\‘\“\(\#)]/i,'')" placeholder="请重新输入密码"
@blur="confirmCheck" >
<img v-if="confirm" :src="openEye" class="right-icon" @click="changeType" >
</div>
<div class="button submit" @click="submit">注册</div>
......@@ -48,7 +51,6 @@
</h-content>
</h-view>
</template>
<script>
var CryptoJS = require('crypto-js')
export default {
......
......@@ -175,8 +175,23 @@
</item>
</list-item>
</div>
<!-- <div v-if="list.cdd_item==='REAL_EST_CERTIFICATE'"> -->
<!-- <list-item :item-height="44" class="card-Info">
<div v-if="list.cdd_item==='REAL_EST_CERTIFICATE'">
<div v-if="list.cdd_item==='REAL_EST_CERTIFICATE'">
<div v-if="!estateImg" class="card-upload plus" @click="ocrShow(list.cdd_item, '')">
<img src="@/assets/userBind/camera.png" class="upload-btn" >
</div>
<div
v-if="estateImg&&!isApproved"
class="card-upload plus"
@click="ocrShow(list.cdd_item, '')"
>
<img :src="estateImg" style="width:100%;height:100%" >
</div>
<div v-if="estateImg&&isApproved" class="card-upload plus" @click="showBigPicture(estateImg)">
<img :src="estateImg" style="width:100%;height:100%" >
</div>
</div>
<list-item :item-height="44" class="card-Info">
<item>
<div slot="name">权利人</div>
<input
......@@ -222,7 +237,7 @@
<input slot="content" v-model="propertyInfo.right_others" placeholder="识别不动产权证自动填充" >
</item>
</list-item>
</div> -->
</div>
</div>
</div>
</h-content>
......@@ -239,12 +254,17 @@ export default {
list: {},
houseImg: '',
carImg: '',
estateImg: '',
house_id: '',
car_id: '',
estate_id: '',
houseFlag: false, // 房产证查看标识,为false则用查询出来的,为true则用拍照出来的
carFlag: false, // 行驶证查看标识,为false则用查询出来的,为true则用拍照出来的
estateFlag: false, // 不动产权证查看标识,为false则用查询出来的,为true则用拍照出来的
isUploadHouse: false, // 房产证修改标识
isUploadCar: false, // 行驶证修改标识
isUploadEstate: false, // 不动产权证修改标识
estateAttachmentId: '',
houseAttachmentId: '',
carAttachmentId: '',
propertyInfo: {
......@@ -308,10 +328,26 @@ export default {
vm.loadItemList()
vm.getCarInfo()
vm.getHouseInfo()
vm.getEstateInfo()
}
})
},
methods: {
async saveEstateInfo () {
let vm = this
let url = process.env.basePath + 'bp_real_estate_save'
let param = {
master: vm.propertyInfo,
}
hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param)
if (res.result === 'S') {
vm.hlsPopup.hideLoading()
return true
} else {
hlsPopup.showLongCenter(res.message)
}
},
async saveCarInfo () {
let vm = this
let url = process.env.basePath + 'bp_vehicleLicense_save'
......@@ -343,15 +379,32 @@ export default {
}
})
},
getEstateInfo () {
let vm = this
let url = process.env.basePath + 'bp_real_estate_query'
let param = {
bp_id: window.localStorage.getItem('bp_id'),
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
Object.assign(vm.propertyInfo, res.info)
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
async saveHouseInfo () {
let vm = this
let url = process.env.basePath + 'bp_house_info_save'
let isSaveCar = await vm.saveCarInfo()
let isSaveEstate = await vm.saveEstateInfo()
let param = {
master: vm.hauseInfo,
}
hlsPopup.showLoading('请稍候')
if (isSaveCar) {
if (isSaveCar && isSaveEstate) {
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
......@@ -400,6 +453,24 @@ export default {
vm.save_picture(list)
vm.isUploadHouse = false // 置为false,防止再次保存重复上传,只有重新识别才会重新上传
}
if (vm.isUploadEstate) {
vm.estateFlag = true
vm.delete_pic_to_ocr(vm.estateAttachmentId) // 房产证修改,重新上传
let list = []
let obj = {
pkvalue: vm.estate_id,
source_type: 'PRJ_CDD_ITEM_CHECK',
picture: '',
check_id: vm.estate_id,
filePath: vm.estateImg,
attachment_id: '',
user_id: 1,
fileName: '不动产权证',
}
list.push(obj)
vm.save_picture(list)
vm.isUploadEstate = false // 置为false,防止再次保存重复上传,只有重新识别才会重新上传
}
if (vm.isUploadCar) {
vm.carFlag = true
vm.delete_pic_to_ocr(vm.carAttachmentId) // 房产证修改,重新上传
......@@ -453,6 +524,10 @@ export default {
vm.isUploadCar = true
vm.carImg = imgdata
vm.carIdentify(imgdata)
} else if (ocrType === 'REAL_EST_CERTIFICATE') {
vm.isUploadEstate = true
vm.estateImg = imgdata
vm.estateIdentify(imgdata)
}
}
}
......@@ -503,6 +578,25 @@ export default {
vm.carInfo.success = res.success
})
},
estateIdentify (fileUrl) {
let vm = this
hlsPopup.showLoading('正在识别')
let url = process.env.ocrPath + '/baidu/ocr/houseRight'
hlsUtil.baiduOcr(fileUrl, url, function (res) {
hlsPopup.hideLoading()
let result = res.result.data
vm.propertyInfo.right_person = result.right_property.word
vm.propertyInfo.public_situation = result.public_situation.word
vm.propertyInfo.house_located = result.house_located.word
vm.propertyInfo.real_unit_number = result.real_unit_number.word
vm.propertyInfo.right_type = result.right_type.word
vm.propertyInfo.right_property = result.right_property.word
vm.propertyInfo.house_purpose = result.house_purpose.word
vm.propertyInfo.house_area = result.house_area.word
vm.propertyInfo.land_use_limit = result.land_use_limit.word
vm.propertyInfo.right_others = result.right_others.word
})
},
takePicture (ocrType, type) {
let vm = this
var cameraoptions = {
......@@ -523,6 +617,10 @@ export default {
vm.carImg = imgUrl[0]
vm.isUploadCar = true
vm.carIdentify(imgUrl[0])
} else if (ocrType === 'REAL_EST_CERTIFICATE') {
vm.isUploadEstate = true
vm.estateImg = imgUrl[0]
vm.estateIdentify(imgUrl[0])
}
}
}
......@@ -721,6 +819,9 @@ export default {
case 'CAR_CARD': // 承租人身份证背面
vm.car_id = item.check_id
break
case 'REAL_EST_CERTIFICATE': // 承租人身份证背面
vm.estate_id = item.check_id
break
default:
break
}
......@@ -784,6 +885,12 @@ export default {
}
vm.carAttachmentId = res.lists[0].attachment_id
break
case 'REAL_EST_CERTIFICATE': // 行驶证
if (!vm.estateFlag) {
vm.estateImg = res.lists[0].url
}
vm.estateAttachmentId = res.lists[0].attachment_id
break
default:
vm.dowload_list.push(res.lists)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment