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

'授权书上传'

parent 66e22bb1
......@@ -48,8 +48,8 @@
<input slot="content" v-model="baseInfo.marital_status_n" readonly>
</item>
</list-item>
<div class="equipment-list">配偶信息</div>
<list-item :item-height="44" class="second-part">
<div class="equipment-list" v-if="baseInfo.marital_status == 'MARRIED'">配偶信息</div>
<list-item :item-height="44" class="second-part" v-if="baseInfo.marital_status == 'MARRIED'">
<item>
<div slot="name" class="font-color">姓名</div>
<input slot="content" v-model="baseInfo.bp_name_sp" readonly>
......
......@@ -53,8 +53,8 @@
<div v-if="idCardFront && !isApproved" @click="ocrShow('idCard', 'front')">
<img :src="idCardFront" style="width: 100%;height: 100%;margin: 0" >
</div>
<div v-if="idCardFront && isApproved">
<img :src="idCardFront" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(idCardFront)">
<div v-if="isApproved">
<img v-if="idCardFront" :src="idCardFront" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(idCardFront)">
</div>
<div v-if="!idCardBack" @click="ocrShow('idCard', 'back')">
<img src="@/assets/userBind/back.png" >
......@@ -63,8 +63,8 @@
<div v-if="idCardBack && !isApproved" @click="ocrShow('idCard', 'back')">
<img :src="idCardBack" style="width: 100%;height: 100%;margin: 0" >
</div>
<div v-if="idCardBack && isApproved">
<img :src="idCardBack" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(idCardBack)">
<div v-if="isApproved">
<img v-if="idCardBack" :src="idCardBack" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(idCardBack)">
</div>
</div>
</div>
......@@ -260,12 +260,17 @@
@click="ocrShow('bankCard', '')"
>
<img
v-if="bankImg && !isApproved"
v-if="bankImg"
:src="bankImg"
class="addBack"
style="height: 38%;"
@click="ocrShow('bankCard', '')"
>
<img
v-if="isApproved"
src="@/assets/userBind/addBack.png"
class="addBack"
>
<list-item :item-height="44" class="card-Info">
<item>
<div slot="name">银行卡卡号</div>
......@@ -483,8 +488,13 @@ export default {
})
switch (cdd_item) {
case 'NP_ID_CARD':
vm.idCardBack = res.lists[0].url
vm.idCardFront = res.lists[1].url
res.lists.forEach(item => {
if (item.file_name === 'front.jpg') {
vm.idCardFront = item.url
} else {
vm.idCardBack = item.url
}
})
break
default:
vm.dowload_list.push(res.lists)
......@@ -496,8 +506,9 @@ export default {
},
async verified () {
this.dowload_list = [] // 保存之前将图片下载列表清空,防止出现重复的图片
let bpId = await this.saveWord()
this.getBankInfo()
this.upload_list = [] // 保存之前将待上传列表清空,防止出现重复的图片
let bpId = await this.saveWord()
this.getBankInfo()
// 查询资料清单
this.loadItemList()
},
......@@ -522,6 +533,9 @@ export default {
switch (item.cdd_item) {
case 'NP_ID_CARD':
vm.idCardCheck_id = item.check_id
break
case 'BANK_CARD':
break
default:
vm.cddItemList.push(item)
......@@ -833,7 +847,7 @@ export default {
maxCount: 1,
}
let success = function (imgUrl) {
if (!imgUrl) {
if (imgUrl.length === 0) {
hlsPopup.showLongCenter('请选择一张图片')
} else {
if (ocrType === 'idCard') {
......@@ -1228,6 +1242,7 @@ export default {
let vm = this
vm.hlsPopup.showBigPicture({
imgUrl: pic,
width: '100%',
})
},
},
......
......@@ -49,8 +49,8 @@
<div v-if="licenseImg && !isApproved" style="width: 100%;height: 100%" @click="ocrShow('license', '')">
<img :src="licenseImg" style="width: 100%;height: 100%;margin: 0" >
</div>
<div v-if="licenseImg && isApproved">
<img :src="licenseImg" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(licenseImg)">
<div v-if="isApproved"><!--v-if="licenseImg && isApproved"-->
<img v-if="licenseImg" :src="licenseImg" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(licenseImg)">
</div>
</div>
</div>
......@@ -196,8 +196,8 @@
<div v-if="idCardFront && !isApproved" @click="ocrShow('idCard', 'front')">
<img :src="idCardFront" style="width: 100%;height: 100%;margin: 0" >
</div>
<div v-if="idCardFront && isApproved">
<img :src="idCardFront" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(idCardFront)">
<div v-if="isApproved">
<img v-if="idCardFront" :src="idCardFront" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(idCardFront)">
</div>
<div v-if="!idCardBack" @click="ocrShow('idCard', 'back')">
<img src="@/assets/userBind/org/back.png" >
......@@ -206,8 +206,8 @@
<div v-if="idCardBack && !isApproved" @click="ocrShow('idCard', 'back')">
<img :src="idCardBack" style="width: 100%;height: 100%;margin: 0" >
</div>
<div v-if="idCardBack && isApproved">
<img :src="idCardBack" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(idCardBack)">
<div v-if="isApproved">
<img v-if="idCardBack" :src="idCardBack" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(idCardBack)">
</div>
</div>
</div>
......@@ -288,9 +288,15 @@
<div v-if="!flag" class="upload-id-card">
<span>授权书证件上传</span>
<div class="upload-box1">
<!-- <div> -->
<img src="@/assets/userBind/camera.png" >
<!-- </div> -->
<div v-if="!laImg" @click="LaUpload()">
<img src="@/assets/userBind/camera.png" >
</div>
<div v-if="laImg && !isApproved" style="width: 100%;height: 100%" @click="LaUpload('')">
<img :src="laImg" style="width: 100%;height: 100%;margin: 0" >
</div>
<div v-if="isApproved"><!--v-if="licenseImg && isApproved"-->
<img v-if="laImg" :src="laImg" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(laImg)">
</div>
</div>
</div>
......@@ -358,12 +364,17 @@
@click="ocrShow('bankCard', '')"
>
<img
v-if="bankImg && !isApproved"
v-if="bankImg"
:src="bankImg"
class="addBack"
style="height: 38%;"
@click="ocrShow('bankCard', '')"
>
<img
v-if="isApproved"
src="@/assets/userBind/addBack.png"
class="addBack"
>
<list-item :item-height="44" class="card-Info">
<item>
<div slot="name">银行卡卡号</div>
......@@ -489,16 +500,19 @@ export default {
idCardBack: '', // 身份证反面图片
licenseImg: '', // 营业执照照片
bankImg: '', // 银行卡图片
laImg: '', // 授权书图片
upload_list: [], // 上传图片列表
dowload_list: [], // 下载图片列表
cddItemList: [], // 资料清单列表
idCardCheck_id: '', // 身份证check_id
bankCardCheck_id: '', // 银行卡check_id
licenseCheck_id: '', // 营业执照check_id
laCheck_id: '', // 授权书check_id
idCardImgList: [], // 存身份证图片列表
bankCardImgList: [], // 存上传银行卡图片列表
idCardEditFlag: false, // 身份证修改标识,为true则标识已修改,后续需要重新上传此照片
licenseEditFlag: false, // 营业执照照片修改标识,为true则标识已修改,后续需要重新上传此照片
LaEditFlag: false, // 授权书图片修改标识,为true则标识已修改,后续需要重新上传此照片
}
},
computed: {},
......@@ -644,7 +658,7 @@ export default {
if (res.result === 'S') {
vm.hlsPopup.showSuccess('提交成功')
vm.$router.push({
name: 'Home',
name: 'HomePage',
})
}
})
......@@ -722,6 +736,7 @@ export default {
verified () {
this.dowload_list = [] // 保存之前将图片下载列表清空,防止出现重复的图片
this.upload_list = [] // 保存之前将待上传列表清空,防止出现重复的图片
if (this.flag) {
// this.flag = false
for (let i in this.authMsg) {
......@@ -933,7 +948,7 @@ export default {
vm.bp_id = res.bp_id
vm.getBankInfo()
// 查询资料清单
vm.loadItemList()
vm.loadItemList()
}
})
}
......@@ -1204,7 +1219,7 @@ export default {
maxCount: 1,
}
let success = function (imgUrl) {
if (!imgUrl) {
if (imgUrl.length === 0) {
hlsPopup.showLongCenter('请选择一张图片')
} else {
if (ocrType === 'idCard') {
......@@ -1288,12 +1303,20 @@ export default {
})
switch (cdd_item) {
case 'NP_ID_CARD':
vm.idCardBack = res.lists[0].url
vm.idCardFront = res.lists[1].url
res.lists.forEach(item => {
if (item.file_name === 'front.jpg') {
vm.idCardFront = item.url
} else {
vm.idCardBack = item.url
}
})
break
case 'ORG_CODE':
vm.licenseImg = res.lists[0].url
break
case 'L/A':
vm.laImg = res.lists[0].url
break
default:
vm.dowload_list.push(res.lists)
}
......@@ -1327,6 +1350,12 @@ export default {
case 'ORG_CODE':
vm.licenseCheck_id = item.check_id
break
case 'BANK_CARD':
break
case 'L/A':
vm.laCheck_id = item.check_id
break
default:
vm.cddItemList.push(item)
}
......@@ -1354,17 +1383,32 @@ export default {
}
if (vm.licenseEditFlag) { // 营业执照图片已修改,重新上传
var list = []
let obj = {
'pkvalue': vm.licenseCheck_id,
'source_type': 'PRJ_CDD_ITEM_CHECK',
'picture': '',
'check_id': vm.licenseCheck_id,
'filePath': vm.licenseImg,
'attachment_id': '',
'user_id': 1,
'fileName': '',
}
list.push(obj)
let obj = {
'pkvalue': vm.licenseCheck_id,
'source_type': 'PRJ_CDD_ITEM_CHECK',
'picture': '',
'check_id': vm.licenseCheck_id,
'filePath': vm.licenseImg,
'attachment_id': '',
'user_id': 1,
'fileName': '',
}
list.push(obj)
vm.save_picture(list)
}
if (vm.LaEditFlag) { // 授权书图片已修改,重新上传
var list = []
let obj = {
'pkvalue': vm.LaCheck_id,
'source_type': 'PRJ_CDD_ITEM_CHECK',
'picture': '',
'check_id': vm.LaCheck_id,
'filePath': vm.laImg,
'attachment_id': '',
'user_id': 1,
'fileName': '',
}
list.push(obj)
vm.save_picture(list)
}
}
......@@ -1431,6 +1475,47 @@ export default {
}
vm.dowload_list.sort()
},
// 授权书上传入口
LaUpload () {
let vm = this
hlsPopup.showActionSheet({
titleText: '请选择照片',
buttonArray: ['拍照', '从相册取'],
callback: index => {
if (index === 0) {
vm.LaUploadOpenCamera()
} else {
vm.LaUploadTakePicture()
}
},
})
},
LaUploadOpenCamera () {
let vm = this
let cameraoptions = {
quality: 100,
}
let success = function (imgdata) {
vm.LaEditFlag = true
vm.laImg = imgdata
}
let error = function () {
}
hlsUtil.openCamera(cameraoptions, success, error)
},
LaUploadTakePicture () {
let vm = this
let cameraoptions = {
quality: 100,
}
let success = function (imgUrl) {
vm.LaEditFlag = true
vm.laImg = imgUrl[0]
}
let error = function () {
}
vm.hlsUtil.takePicture(cameraoptions, success, error)
},
// 图片上传入口
imgUploadShow (check_id) {
let vm = this
......@@ -1546,6 +1631,7 @@ export default {
let vm = this
vm.hlsPopup.showBigPicture({
imgUrl: pic,
width:'100%'
})
},
},
......
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