Commit 7a7ed1d0 authored by 李晓兵's avatar 李晓兵

'法人绑定修改'

parent 8521f639
...@@ -175,17 +175,8 @@ ...@@ -175,17 +175,8 @@
<input slot="content" v-model="baseInfo.phone" placeholder="请输入固定电话" > <input slot="content" v-model="baseInfo.phone" placeholder="请输入固定电话" >
</item> </item>
</list-item> </list-item>
<!-- 法定代表人信息-->
<!-- 授权切换 --> <div class="userInfo types">法定代表人</div>
<div class="authorize">
<p class="authorize-select font-color">是否授权</p>
<div class="authorize-checklist" @click="authorizeChange">
<div v-if="flag" />
<img v-if="!flag" src="@/assets/userBind/org/checklist.png" alt >
</div>
</div>
<div class="userInfo types">{{ text }}</div>
<div class="upload-id-cards"> <div class="upload-id-cards">
<span>身份证照片上传</span> <span>身份证照片上传</span>
<div class="upload-box"> <div class="upload-box">
...@@ -211,15 +202,12 @@ ...@@ -211,15 +202,12 @@
</div> </div>
</div> </div>
</div> </div>
<list-item :item-height="44" class="second-part">
<!-- 已授权 -->
<list-item v-if="!flag" :item-height="44" class="second-part">
<item> <item>
<div slot="name" class="font-color required">姓名</div> <div slot="name" class="font-color required">姓名</div>
<input <input
slot="content" slot="content"
v-model="authMsg.auth_person_name" v-model="baseInfo.legal_person"
readonly readonly
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
...@@ -229,7 +217,7 @@ ...@@ -229,7 +217,7 @@
<div slot="name" class="font-color required">身份证号</div> <div slot="name" class="font-color required">身份证号</div>
<input <input
slot="content" slot="content"
v-model="authMsg.auth_person_id_card" v-model="legal_personMsg.id_card_no"
readonly readonly
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
...@@ -239,7 +227,7 @@ ...@@ -239,7 +227,7 @@
<div slot="name" class="required">身份证有效期从</div> <div slot="name" class="required">身份证有效期从</div>
<input <input
slot="content" slot="content"
v-model="authMsg.auth_id_card_date_from" v-model="legal_personMsg.id_card_date_from"
readonly readonly
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
...@@ -249,30 +237,71 @@ ...@@ -249,30 +237,71 @@
<div slot="name" class="required">身份证有效期到</div> <div slot="name" class="required">身份证有效期到</div>
<input <input
slot="content" slot="content"
v-model="authMsg.auth_id_card_date_to" v-model="legal_personMsg.id_card_date_to"
readonly readonly
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
> >
</item> </item>
<item> <item>
<div slot="name" class="font-color required">公司职务</div> <div slot="name" class="font-color required">手机号</div>
<input slot="content" v-model="authMsg.auth_person_position" placeholder="请输入公司职务" > <input slot="content" v-model="legal_personMsg.cell_phone" placeholder="请输入手机号" @blur="phoneCheck(legal_personMsg.cell_phone)">
</item> </item>
<item> <item>
<div slot="name" class="font-color required">授权事项</div> <div slot="name" class="font-color required">联系地址</div>
<input slot="content" v-model="authMsg.auth_person_matter" placeholder="请输入授权事项" > <textarea
ref="address"
slot="content"
v-model="legal_personMsg.living_address"
cols="30"
rows="1"
placeholder="请输入联系地址"
@input="addAddressRows(legal_personMsg.living_address)"
/>
</item> </item>
</list-item> </list-item>
<!-- 授权切换 -->
<!-- 未授权 --> <div class="authorize">
<p class="authorize-select font-color">是否授权</p>
<list-item v-if="flag" :item-height="44" class="second-part"> <div class="authorize-checklist" @click="authorizeChange">
<div v-if="flag" />
<img v-if="!flag" src="@/assets/userBind/org/checklist.png" alt >
</div>
</div>
<div class="userInfo types" v-if="!flag">授权人信息</div>
<div class="upload-id-cards" v-if="!flag">
<span>身份证照片上传</span>
<div class="upload-box">
<div v-if="!authidCardFront" @click="ocrShow('authidCard', 'front')">
<img src="@/assets/userBind/org/front.png" >
<p>正面</p>
</div>
<div v-if="authidCardFront && !isApproved" @click="ocrShow('authidCard', 'front')">
<img :src="authidCardFront" style="width: 100%;height: 100%;margin: 0" >
</div>
<div v-if="isApproved && authidCardFront">
<img v-if="authidCardFront" :src="authidCardFront" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(authidCardFront)">
</div>
<div v-if="!authidCardBack" @click="ocrShow('authidCard', 'back')">
<img src="@/assets/userBind/org/back.png" >
<p>反面</p>
</div>
<div v-if="authidCardBack && !isApproved" @click="ocrShow('authidCard', 'back')">
<img :src="authidCardBack" style="width: 100%;height: 100%;margin: 0" >
</div>
<div v-if="isApproved && authidCardBack">
<img v-if="authidCardBack" :src="authidCardBack" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(authidCardBack)">
</div>
</div>
</div>
<!-- 已授权 -->
<list-item v-if="!flag" :item-height="44" class="second-part">
<item> <item>
<div slot="name" class="font-color required">姓名</div> <div slot="name" class="font-color required">姓名</div>
<input <input
slot="content" slot="content"
v-model="baseInfo.legal_person" v-model="authMsg.auth_person_name"
readonly readonly
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
...@@ -282,7 +311,7 @@ ...@@ -282,7 +311,7 @@
<div slot="name" class="font-color required">身份证号</div> <div slot="name" class="font-color required">身份证号</div>
<input <input
slot="content" slot="content"
v-model="legal_personMsg.id_card_no" v-model="authMsg.auth_person_id_card"
readonly readonly
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
...@@ -292,7 +321,7 @@ ...@@ -292,7 +321,7 @@
<div slot="name" class="required">身份证有效期从</div> <div slot="name" class="required">身份证有效期从</div>
<input <input
slot="content" slot="content"
v-model="legal_personMsg.id_card_date_from" v-model="authMsg.auth_id_card_date_from"
readonly readonly
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
...@@ -302,7 +331,7 @@ ...@@ -302,7 +331,7 @@
<div slot="name" class="required">身份证有效期到</div> <div slot="name" class="required">身份证有效期到</div>
<input <input
slot="content" slot="content"
v-model="legal_personMsg.id_card_date_to" v-model="authMsg.auth_id_card_date_to"
readonly readonly
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
...@@ -310,21 +339,18 @@ ...@@ -310,21 +339,18 @@
</item> </item>
<item> <item>
<div slot="name" class="font-color required">手机号</div> <div slot="name" class="font-color required">手机号</div>
<input slot="content" v-model="legal_personMsg.cell_phone" placeholder="请输入手机号" > <input slot="content" v-model="authMsg.auth_cell_phone" placeholder="请输入手机号" @blur="phoneCheck(authMsg.auth_cell_phone)">
</item> </item>
<item> <item>
<div slot="name" class="font-color required">联系地址</div> <div slot="name" class="font-color required">公司职务</div>
<textarea <input slot="content" v-model="authMsg.auth_person_position" placeholder="请输入公司职务" >
ref="address" </item>
slot="content" <item>
v-model="legal_personMsg.living_address" <div slot="name" class="font-color required">授权事项</div>
cols="30" <input slot="content" v-model="authMsg.auth_person_matter" placeholder="请输入授权事项" >
rows="1"
placeholder="请输入联系地址"
@input="addAddressRows(legal_personMsg.living_address)"
/>
</item> </item>
</list-item> </list-item>
<div v-if="!flag" class="upload-id-card"> <div v-if="!flag" class="upload-id-card">
<span>授权书证件上传</span> <span>授权书证件上传</span>
<div class="upload-box1"> <div class="upload-box1">
...@@ -495,7 +521,7 @@ export default { ...@@ -495,7 +521,7 @@ export default {
districtList: [], districtList: [],
academic_bg_n: '', academic_bg_n: '',
bpClass_flag: false, bpClass_flag: false,
text: '法人代表信息', // text: '法人代表信息',
bp_type_flag: false, bp_type_flag: false,
typeName: '', typeName: '',
marital_status_n: '', marital_status_n: '',
...@@ -521,7 +547,7 @@ export default { ...@@ -521,7 +547,7 @@ export default {
bp_type_n: '', bp_type_n: '',
bp_name: '', bp_name: '',
phone: '', phone: '',
auth_flag: '', auth_flag: 'N',
user_phone: window.localStorage.user_phone, user_phone: window.localStorage.user_phone,
legal_person: '', legal_person: '',
agent_username: '', agent_username: '',
...@@ -544,12 +570,15 @@ export default { ...@@ -544,12 +570,15 @@ export default {
auth_person_name: '', auth_person_name: '',
auth_person_matter: '', auth_person_matter: '',
auth_person_id_card: '', auth_person_id_card: '',
auth_cell_phone: '',
auth_person_position: '', auth_person_position: '',
auth_id_card_date_from: '', // 授权人身份证有效期从 auth_id_card_date_from: '', // 授权人身份证有效期从
auth_id_card_date_to: '', // 授权人身份证有效期到 auth_id_card_date_to: '', // 授权人身份证有效期到
}, },
idCardFront: '', // 身份证正面图片 idCardFront: '', // 身份证正面图片
idCardBack: '', // 身份证反面图片 idCardBack: '', // 身份证反面图片
authidCardFront: '', // 授权人身份证正面图片
authidCardBack: '', // 授权人身份证反面图片
licenseImg: '', // 营业执照照片 licenseImg: '', // 营业执照照片
bankImg: '', // 银行卡图片 bankImg: '', // 银行卡图片
laImg: '', // 授权书图片 laImg: '', // 授权书图片
...@@ -558,13 +587,16 @@ export default { ...@@ -558,13 +587,16 @@ export default {
cddItemList: [], // 资料清单列表 cddItemList: [], // 资料清单列表
idCardFrontCheck_id: '', // 身份证正面check_id idCardFrontCheck_id: '', // 身份证正面check_id
idCardBackCheck_id: '', // 身份证背面check_id idCardBackCheck_id: '', // 身份证背面check_id
authidCardFrontCheck_id: '', // 授权人身份证正面check_id
authidCardBackCheck_id: '', // 授权人身份证背面check_id
bankCardCheck_id: '', // 银行卡check_id bankCardCheck_id: '', // 银行卡check_id
licenseCheck_id: '', // 营业执照check_id licenseCheck_id: '', // 营业执照check_id
laCheck_id: '', // 授权书check_id laCheck_id: '', // 授权书check_id
idCardImgList: [], // 存身份证图片列表
bankCardImgList: [], // 存上传银行卡图片列表 bankCardImgList: [], // 存上传银行卡图片列表
idCardFrontEditFlag: false, // 身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片 idCardFrontEditFlag: false, // 身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片
idCardBackEditFlag: false, // 身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片 idCardBackEditFlag: false, // 身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片
authidCardFrontEditFlag: false, // 授权人身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片
authidCardBackEditFlag: false, // 授权人身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片
licenseEditFlag: false, // 营业执照照片修改标识,为true则标识已修改,后续需要重新上传此照片 licenseEditFlag: false, // 营业执照照片修改标识,为true则标识已修改,后续需要重新上传此照片
LaEditFlag: false, // 授权书图片修改标识,为true则标识已修改,后续需要重新上传此照片 LaEditFlag: false, // 授权书图片修改标识,为true则标识已修改,后续需要重新上传此照片
isClear: false, isClear: false,
...@@ -593,13 +625,13 @@ export default { ...@@ -593,13 +625,13 @@ export default {
vm.bp_type_flag = false vm.bp_type_flag = false
} }
}, },
flag () { /* flag () {
if (this.flag) { if (this.flag) {
this.text = '法人代表信息' this.text = '法人代表信息'
} else { } else {
this.text = '授权信息' this.text = '授权信息'
} }
}, },*/
typeName () { typeName () {
if (this.typeName === '业务经办人') { if (this.typeName === '业务经办人') {
this.bpClass = this.baseInfo.agent_username this.bpClass = this.baseInfo.agent_username
...@@ -777,29 +809,36 @@ export default { ...@@ -777,29 +809,36 @@ export default {
}, },
}) })
}, },
// 校验手机号
phoneCheck(phone){
if(!hlsUtil.phoneNumber(phone) && !hlsUtil.phoneNumber86(phone)) {
hlsPopup.showLongCenter('请输入正确的手机号')
}
},
verified () { verified () {
this.dowload_list = [] // 保存之前将图片下载列表清空,防止出现重复的图片 this.dowload_list = [] // 保存之前将图片下载列表清空,防止出现重复的图片
this.upload_list = [] // 保存之前将待上传列表清空,防止出现重复的图片 this.upload_list = [] // 保存之前将待上传列表清空,防止出现重复的图片
if (this.flag) { /*if (this.flag) { // 未授权
// this.flag = false // this.flag = false
for (let i in this.authMsg) { for (let i in this.authMsg) {
this.authMsg[i] = '' this.authMsg[i] = ''
} }
this.baseInfo.auth_flag = 'N' //this.baseInfo.auth_flag = 'N'
this.lastInfo = { ...this.baseInfo, ...this.legal_personMsg } this.lastInfo = { ...this.baseInfo, ...this.legal_personMsg }
this.saveInfo = { this.saveInfo = {
...this.lastInfo, ...this.lastInfo,
...this.authMsg, ...this.authMsg,
...this.invoiceInfo, ...this.invoiceInfo,
} }
this.saveInfo.auth_flag = 'N' //this.saveInfo.auth_flag = 'N'
} else { } */
if(!this.flag) { // 已授权
// this.flag = false // this.flag = false
for (let i in this.legal_personMsg) { /* for (let i in this.legal_personMsg) {
this.legal_personMsg[i] = '' this.legal_personMsg[i] = ''
} }*/
this.baseInfo.auth_flag = 'Y' this.baseInfo.auth_flag = 'Y'
this.lastInfo = { ...this.baseInfo, ...this.authMsg } this.lastInfo = { ...this.baseInfo, ...this.authMsg }
...@@ -808,12 +847,19 @@ export default { ...@@ -808,12 +847,19 @@ export default {
...this.legal_personMsg, ...this.legal_personMsg,
...this.invoiceInfo, ...this.invoiceInfo,
} }
this.saveInfo.auth_flag = 'Y' }
else{ // 未授权
this.lastInfo = { ...this.baseInfo, ...this.authMsg }
this.saveInfo = {
...this.lastInfo,
...this.legal_personMsg,
...this.invoiceInfo,
}
} }
let vm = this let vm = this
// 校验基本信息 // 校验基本信息
if (this.bpClass_flag) { if (this.bpClass_flag) { // 业务经办人
delete this.lastInfo.business_license_num delete this.lastInfo.business_license_num
delete this.lastInfo.id_card_name delete this.lastInfo.id_card_name
for (var key in vm.lastInfo) { for (var key in vm.lastInfo) {
...@@ -868,13 +914,16 @@ export default { ...@@ -868,13 +914,16 @@ export default {
vm.hlsPopup.showLongCenter('授权人姓名未填写') vm.hlsPopup.showLongCenter('授权人姓名未填写')
break break
case 'auth_person_id_card': case 'auth_person_id_card':
vm.hlsPopup.showLongCenter('身份证号未填写') vm.hlsPopup.showLongCenter('授权人身份证号未填写')
break
case 'auth_cell_phone':
vm.hlsPopup.showLongCenter('授权人手机号未填写')
break break
case 'auth_id_card_date_from': case 'auth_id_card_date_from':
vm.hlsPopup.showLongCenter('身份证有效期从未填写') vm.hlsPopup.showLongCenter('授权人身份证有效期从未填写')
break break
case 'auth_id_card_date_to': case 'auth_id_card_date_to':
vm.hlsPopup.showLongCenter('身份证有效期到未填写') vm.hlsPopup.showLongCenter('授权人身份证有效期到未填写')
break break
case 'user_phone': case 'user_phone':
vm.hlsPopup.showLongCenter('您还未登录') vm.hlsPopup.showLongCenter('您还未登录')
...@@ -895,7 +944,7 @@ export default { ...@@ -895,7 +944,7 @@ export default {
} }
this.lastInfo.business_license_num = '' this.lastInfo.business_license_num = ''
this.lastInfo.id_card_name = '' this.lastInfo.id_card_name = ''
} else { } else { // 非业务经办人
delete this.lastInfo.agent_username delete this.lastInfo.agent_username
delete this.lastInfo.id_card_name delete this.lastInfo.id_card_name
for (var key1 in vm.lastInfo) { for (var key1 in vm.lastInfo) {
...@@ -943,7 +992,16 @@ export default { ...@@ -943,7 +992,16 @@ export default {
vm.hlsPopup.showLongCenter('授权人姓名未填写') vm.hlsPopup.showLongCenter('授权人姓名未填写')
break break
case 'auth_person_id_card': case 'auth_person_id_card':
vm.hlsPopup.showLongCenter('身份证号未填写') vm.hlsPopup.showLongCenter('授权人身份证号未填写')
break
case 'auth_cell_phone':
vm.hlsPopup.showLongCenter('授权人手机号未填写')
break
case 'auth_id_card_date_from':
vm.hlsPopup.showLongCenter('授权人身份证有效期从未填写')
break
case 'auth_id_card_date_to':
vm.hlsPopup.showLongCenter('授权人身份证有效期到未填写')
break break
case 'user_phone': case 'user_phone':
vm.hlsPopup.showLongCenter('您还未登录') vm.hlsPopup.showLongCenter('您还未登录')
...@@ -965,22 +1023,22 @@ export default { ...@@ -965,22 +1023,22 @@ export default {
this.lastInfo.agent_username = '' this.lastInfo.agent_username = ''
this.lastInfo.id_card_name = '' this.lastInfo.id_card_name = ''
} }
// 校验电话号 /* // 校验电话号
let re = this.hlsUtil.phoneNumber(this.saveInfo.cell_phone) let re = this.hlsUtil.phoneNumber(this.saveInfo.cell_phone)
if (!re && this.baseInfo.auth_flag === 'N') { if (!re && this.baseInfo.auth_flag === 'N') {
vm.msg_flag = false vm.msg_flag = false
vm.hlsPopup.showLongCenter('请输入正确手机号') vm.hlsPopup.showLongCenter('请输入正确手机号')
} }*/
// 校验身份证号vm.hlsUtil.isCardID(vm.baseInfo.id_card_no) // 校验身份证号vm.hlsUtil.isCardID(vm.baseInfo.id_card_no)
if (vm.flag) {
if (vm.hlsUtil.isCardID(vm.saveInfo.id_card_no)) { if (vm.hlsUtil.isCardID(vm.saveInfo.id_card_no)) {
vm.msg_flag = false vm.msg_flag = false
vm.hlsPopup.showLongCenter('身份证不正确') vm.hlsPopup.showLongCenter('身份证不正确')
} }
} else { if (!vm.flag) {
if (vm.hlsUtil.isCardID(vm.saveInfo.auth_person_id_card)) { if (vm.hlsUtil.isCardID(vm.saveInfo.auth_person_id_card)) {
vm.msg_flag = false vm.msg_flag = false
vm.hlsPopup.showLongCenter('身份证不正确') vm.hlsPopup.showLongCenter('授权人身份证不正确')
} }
} }
...@@ -1259,7 +1317,9 @@ export default { ...@@ -1259,7 +1317,9 @@ export default {
hlsPopup.showLongCenter('请拍照') hlsPopup.showLongCenter('请拍照')
} else { } else {
if (ocrType === 'idCard') { if (ocrType === 'idCard') {
type === 'front' ? (vm.idCardFront = imgdata, vm.idCardIdentify(imgdata), vm.idCardFrontEditFlag = true) : (vm.idCardBack = imgdata, vm.idCardBackIdentify(imgdata), vm.idCardBackEditFlag = true) type === 'front' ? (vm.idCardFront = imgdata, vm.idCardIdentify(imgdata,'idCard'), vm.idCardFrontEditFlag = true) : (vm.idCardBack = imgdata, vm.idCardBackIdentify(imgdata,'idCard'), vm.idCardBackEditFlag = true)
} else if (ocrType === 'authidCard') {
type === 'front' ? (vm.authidCardFront = imgdata, vm.idCardIdentify(imgdata,'authidCard'), vm.authidCardFrontEditFlag = true) : (vm.authidCardBack = imgdata, vm.idCardBackIdentify(imgdata,'authidCard'), vm.authidCardBackEditFlag = true)
} else if (ocrType === 'bankCard') { } else if (ocrType === 'bankCard') {
vm.bankImg = imgdata vm.bankImg = imgdata
vm.bankCardIdentify(imgdata) vm.bankCardIdentify(imgdata)
...@@ -1288,7 +1348,9 @@ export default { ...@@ -1288,7 +1348,9 @@ export default {
hlsPopup.showLongCenter('请选择一张图片') hlsPopup.showLongCenter('请选择一张图片')
} else { } else {
if (ocrType === 'idCard') { if (ocrType === 'idCard') {
type === 'front' ? (vm.idCardFront = imgUrl[0], vm.idCardIdentify(imgUrl[0]), vm.idCardFrontEditFlag = true) : (vm.idCardBack = imgUrl[0], vm.idCardBackIdentify(imgUrl[0]), vm.idCardBackEditFlag = true) type === 'front' ? (vm.idCardFront = imgUrl[0], vm.idCardIdentify(imgUrl[0],'idCard'), vm.idCardFrontEditFlag = true) : (vm.idCardBack = imgUrl[0], vm.idCardBackIdentify(imgUrl[0],'idCard'), vm.idCardBackEditFlag = true)
} else if (ocrType === 'authidCard') {
type === 'front' ? (vm.authidCardFront = imgUrl[0], vm.idCardIdentify(imgUrl[0],'authidCard'), vm.authidCardFrontEditFlag = true) : (vm.authidCardBack = imgUrl[0], vm.idCardBackIdentify(imgUrl[0],'authidCard'), vm.authidCardBackEditFlag = true)
} else if (ocrType === 'bankCard') { } else if (ocrType === 'bankCard') {
vm.bankImg = imgUrl[0] vm.bankImg = imgUrl[0]
vm.bankCardIdentify(imgUrl[0]) vm.bankCardIdentify(imgUrl[0])
...@@ -1305,18 +1367,18 @@ export default { ...@@ -1305,18 +1367,18 @@ export default {
vm.hlsUtil.takePicture(cameraoptions, success, error) vm.hlsUtil.takePicture(cameraoptions, success, error)
}, },
// 身份证识别 // 身份证识别
idCardIdentify (fileUrl) { idCardIdentify (fileUrl,cardType) {
let vm = this let vm = this
hlsPopup.showLoading('正在识别') hlsPopup.showLoading('正在识别')
let url = process.env.ocrPath + '/baidu/ocr/idCard' let url = process.env.ocrPath + '/baidu/ocr/idCard'
hlsUtil.baiduOcr(fileUrl, url, function (res) { hlsUtil.baiduOcr(fileUrl, url, function (res) {
hlsPopup.hideLoading() hlsPopup.hideLoading()
let result = res.result.words_result let result = res.result.words_result
if (vm.flag) { if (cardType === 'idCard') { // 法定代表人
// 未授权 姓名,身份证号 // 未授权 姓名,身份证号
vm.baseInfo.legal_person = result.姓名.words vm.baseInfo.legal_person = result.姓名.words
vm.legal_personMsg.id_card_no = result.公民身份号码.words vm.legal_personMsg.id_card_no = result.公民身份号码.words
} else { } else { // 授权人
// 已授权 姓名,身份证号 // 已授权 姓名,身份证号
vm.authMsg.auth_person_name = result.姓名.words vm.authMsg.auth_person_name = result.姓名.words
vm.authMsg.auth_person_id_card = result.公民身份号码.words vm.authMsg.auth_person_id_card = result.公民身份号码.words
...@@ -1324,14 +1386,14 @@ export default { ...@@ -1324,14 +1386,14 @@ export default {
}) })
}, },
// 身份证背面识别 // 身份证背面识别
idCardBackIdentify (fileUrl) { idCardBackIdentify (fileUrl,cardType) {
let vm = this let vm = this
hlsPopup.showLoading('正在识别') hlsPopup.showLoading('正在识别')
let url = process.env.ocrPath + '/baidu/ocr/idCardBack' let url = process.env.ocrPath + '/baidu/ocr/idCardBack'
hlsUtil.baiduOcr(fileUrl, url, function (res) { hlsUtil.baiduOcr(fileUrl, url, function (res) {
hlsPopup.hideLoading() hlsPopup.hideLoading()
let result = res.result.words_result let result = res.result.words_result
if (vm.flag) { if (cardType === 'idCard') { // 法定代表人
// 未授权 身份证有效期从,身份证有效期到 // 未授权 身份证有效期从,身份证有效期到
vm.legal_personMsg.id_card_date_from = result.签发日期.words vm.legal_personMsg.id_card_date_from = result.签发日期.words
vm.legal_personMsg.id_card_date_to = result.失效日期.words vm.legal_personMsg.id_card_date_to = result.失效日期.words
...@@ -1385,12 +1447,18 @@ export default { ...@@ -1385,12 +1447,18 @@ export default {
item['url'] = process.env.filePath + 'attachment_id=' + item.attachment_id + '&access_token=' + window.localStorage.access_token item['url'] = process.env.filePath + 'attachment_id=' + item.attachment_id + '&access_token=' + window.localStorage.access_token
}) })
switch (cdd_item) { switch (cdd_item) {
case 'NP_ID_CARD_F': // 身份证正面 case 'LEGAL_ID_CARD_F': // 法定代表人身份证正面
vm.idCardFront = res.lists[0].url vm.idCardFront = res.lists[0].url
break break
case 'NP_ID_CARD_B': // 身份证背面 case 'LEGAL_ID_CARD_B': // 法定代表人身份证背面
vm.idCardBack = res.lists[0].url vm.idCardBack = res.lists[0].url
break break
case 'AUTHOR_ID_CARD_F': // 授权人身份证正面
vm.authidCardFront = res.lists[0].url
break
case 'AUTHOR_ID_CARD_B': // 授权人身份证背面
vm.authidCardBack = res.lists[0].url
break
case 'ORG_CODE': case 'ORG_CODE':
vm.licenseImg = res.lists[0].url vm.licenseImg = res.lists[0].url
break break
...@@ -1424,12 +1492,18 @@ export default { ...@@ -1424,12 +1492,18 @@ export default {
var listTemp = [...res.lists] var listTemp = [...res.lists]
listTemp.forEach(item => { listTemp.forEach(item => {
switch (item.cdd_item) { switch (item.cdd_item) {
case 'NP_ID_CARD_F': // 身份证正面 case 'LEGAL_ID_CARD_F': // 法定代表人身份证正面
vm.idCardFrontCheck_id = item.check_id vm.idCardFrontCheck_id = item.check_id
break break
case 'NP_ID_CARD_B': // 身份证背面 case 'LEGAL_ID_CARD_B': // 法定代表人身份证背面
vm.idCardBackCheck_id = item.check_id vm.idCardBackCheck_id = item.check_id
break break
case 'AUTHOR_ID_CARD_F': // 授权人身份证正面
vm.authidCardFrontCheck_id = item.check_id
break
case 'AUTHOR_ID_CARD_B': // 授权人身份证背面
vm.authidCardBackCheck_id = item.check_id
break
case 'ORG_CODE': case 'ORG_CODE':
vm.licenseCheck_id = item.check_id vm.licenseCheck_id = item.check_id
break break
...@@ -1447,7 +1521,7 @@ export default { ...@@ -1447,7 +1521,7 @@ export default {
listTemp.forEach((item, index) => { listTemp.forEach((item, index) => {
vm.load_picture(item.check_id, index, item.cdd_item) vm.load_picture(item.check_id, index, item.cdd_item)
}) })
if (vm.idCardFrontEditFlag) { // 身份证正面图片已修改,重新上传 if (vm.idCardFrontEditFlag) { // 法定代表人身份证正面图片已修改,重新上传
var list = [] var list = []
let obj = { let obj = {
'pkvalue': vm.idCardFrontCheck_id, 'pkvalue': vm.idCardFrontCheck_id,
...@@ -1462,7 +1536,7 @@ export default { ...@@ -1462,7 +1536,7 @@ export default {
list.push(obj) list.push(obj)
vm.save_picture(list) vm.save_picture(list)
} }
if (vm.idCardBackEditFlag) { // 身份证背面图片已修改,重新上传 if (vm.idCardBackEditFlag) { // 法定代表人身份证背面图片已修改,重新上传
var list = [] var list = []
let obj = { let obj = {
'pkvalue': vm.idCardBackCheck_id, 'pkvalue': vm.idCardBackCheck_id,
...@@ -1477,6 +1551,36 @@ export default { ...@@ -1477,6 +1551,36 @@ export default {
list.push(obj) list.push(obj)
vm.save_picture(list) vm.save_picture(list)
} }
if (vm.authidCardFrontEditFlag) { // 授权人身份证正面图片已修改,重新上传
var list = []
let obj = {
'pkvalue': vm.authidCardFrontCheck_id,
'source_type': 'PRJ_CDD_ITEM_CHECK',
'picture': '',
'check_id': vm.authidCardFrontCheck_id,
'filePath': vm.authidCardFront,
'attachment_id': '',
'user_id': 1,
'fileName': 'back',
}
list.push(obj)
vm.save_picture(list)
}
if (vm.authidCardBackEditFlag) { // 授权人身份证背面图片已修改,重新上传
var list = []
let obj = {
'pkvalue': vm.authidCardBackCheck_id,
'source_type': 'PRJ_CDD_ITEM_CHECK',
'picture': '',
'check_id': vm.authidCardBackCheck_id,
'filePath': vm.authidCardBack,
'attachment_id': '',
'user_id': 1,
'fileName': 'back',
}
list.push(obj)
vm.save_picture(list)
}
if (vm.licenseEditFlag) { // 营业执照图片已修改,重新上传 if (vm.licenseEditFlag) { // 营业执照图片已修改,重新上传
var list = [] var list = []
let obj = { let obj = {
...@@ -1791,7 +1895,7 @@ export default { ...@@ -1791,7 +1895,7 @@ export default {
.content { .content {
margin-top: 3px; margin-top: 3px;
height: 76%; height: 76%;
padding-bottom: 20px;
.font-color { .font-color {
color: #656464; color: #656464;
} }
......
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