|
@@ -1,16 +1,18 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
- <uni-card>
|
|
|
+ <view class="content">
|
|
|
+ <uni-card class="card">
|
|
|
<uni-section title="基本信息" type="line">
|
|
|
|
|
|
<view>
|
|
|
<view class="lzcOCR">
|
|
|
- <view class="box">
|
|
|
- <image :src="zjcaijianSrc" mode="widthFix" @click="paizhao('front')"></image>
|
|
|
+ <view class="imgBox">
|
|
|
+ <image :src="zjcaijianSrc" style="width: 40vw;" mode="widthFix" @click="paizhao('front')">
|
|
|
+ </image>
|
|
|
<view class="text">拍摄人像面</view>
|
|
|
</view>
|
|
|
- <view class="box">
|
|
|
- <image :src="zjcaijianSrcFan" mode="widthFix" @click="paizhao('back')"></image>
|
|
|
+ <view class="imgBox">
|
|
|
+ <image :src="zjcaijianSrcFan" style="width: 40vw;" mode="widthFix" @click="paizhao('back')">
|
|
|
+ </image>
|
|
|
<view class="text">拍摄国徽面</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -48,7 +50,7 @@
|
|
|
</uni-forms-item>
|
|
|
|
|
|
<uni-forms-item label="特困证明" v-if="baseFormData.istk == 1">
|
|
|
- <myfile :zczmList="tkzmList"></myfile>
|
|
|
+ <myfile :zczmList="tkzmList" @recordsChange="tkChange"></myfile>
|
|
|
</uni-forms-item>
|
|
|
|
|
|
<uni-forms-item label="是否低保">
|
|
@@ -56,7 +58,7 @@
|
|
|
</uni-forms-item>
|
|
|
|
|
|
<uni-forms-item label="低保证明" v-if="baseFormData.isdb == 1">
|
|
|
- <myfile :zczmList="dbzmList"></myfile>
|
|
|
+ <myfile :zczmList="dbzmList" @recordsChange="dbChange"></myfile>
|
|
|
</uni-forms-item>
|
|
|
|
|
|
<uni-forms-item label="是否重残">
|
|
@@ -65,7 +67,7 @@
|
|
|
|
|
|
<uni-forms-item label="重残证明" v-if="baseFormData.iszc == 1">
|
|
|
<!-- <uni-file-picker v-model="zczm" @select="imgSelect3" @delete="imgDelete3"></uni-file-picker> -->
|
|
|
- <myfile :zczmList="zczmList"></myfile>
|
|
|
+ <myfile :zczmList="zczmList" @recordsChange="zcChange"></myfile>
|
|
|
</uni-forms-item>
|
|
|
|
|
|
<view v-if="show">
|
|
@@ -242,6 +244,7 @@
|
|
|
istk: "0",
|
|
|
isdb: "0",
|
|
|
iszc: "0",
|
|
|
+ lzzt: 0,
|
|
|
},
|
|
|
rules: {
|
|
|
jzdz: {
|
|
@@ -301,7 +304,6 @@
|
|
|
title: '正在识别中...'
|
|
|
})
|
|
|
}, 100);
|
|
|
-
|
|
|
// 压缩
|
|
|
translateAll(base64ToUrl(e.data.data.arg.base64), (base64, blobUrl) => {
|
|
|
idcard(base64, this.token, this.cardType, this.callbackIdcard)
|
|
@@ -346,6 +348,15 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ tkChange(e) {
|
|
|
+ this.tkzmList = e
|
|
|
+ },
|
|
|
+ dbChange(e) {
|
|
|
+ this.dbzmList = e
|
|
|
+ },
|
|
|
+ zcChange(e) {
|
|
|
+ this.zczmList = e
|
|
|
+ },
|
|
|
getAddressList(code) {
|
|
|
GetChildListByCode({
|
|
|
code: code
|
|
@@ -393,7 +404,7 @@
|
|
|
|
|
|
} else {
|
|
|
showConfirm(res.data.error_msg)
|
|
|
-
|
|
|
+ this.faceBase64 = ''
|
|
|
}
|
|
|
},
|
|
|
callbackToken(e) {
|
|
@@ -401,7 +412,14 @@
|
|
|
},
|
|
|
callbackIdcard(words) {
|
|
|
uni.hideLoading()
|
|
|
+ if (!this.cardType) {
|
|
|
+ this.cardType = uni.getStorageSync("cardType")
|
|
|
+ }
|
|
|
if (this.cardType == 'front') {
|
|
|
+ if (!words) {
|
|
|
+ showConfirm('请上传正确的身份证人像面')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (words.image_status == "other_type_card") {
|
|
|
showConfirm('请上传正确的身份证人像面')
|
|
|
return
|
|
@@ -522,7 +540,11 @@
|
|
|
// }
|
|
|
// })
|
|
|
// }
|
|
|
- } else {
|
|
|
+ } else if (this.cardType == 'back') {
|
|
|
+ if (!words) {
|
|
|
+ showConfirm('请上传正确的身份证国徽面')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (words.image_status == "other_type_card") {
|
|
|
showConfirm('请上传正确的身份证国徽面')
|
|
|
return
|
|
@@ -535,11 +557,14 @@
|
|
|
// words.words_result['失效日期'].words
|
|
|
// words.words_result['签发日期'].words
|
|
|
// words.words_result['签发机关'].words
|
|
|
- this.baseFormData.sfzqfjg = words.words_result['签发机关'].words
|
|
|
- this.baseFormData.sfzyxqxs = words.words_result['签发日期'].words
|
|
|
- this.baseFormData.sfzyxqxz = words.words_result['失效日期'].words
|
|
|
- this.backBase64 = words.card_image
|
|
|
- this.zjcaijianSrcFan = 'data:image/jpeg;base64,' + words.card_image
|
|
|
+ if (words && words.words_result) {
|
|
|
+ this.baseFormData.sfzqfjg = words.words_result['签发机关'].words
|
|
|
+ this.baseFormData.sfzyxqxs = words.words_result['签发日期'].words
|
|
|
+ this.baseFormData.sfzyxqxz = words.words_result['失效日期'].words
|
|
|
+ this.backBase64 = words.card_image
|
|
|
+ this.zjcaijianSrcFan = 'data:image/jpeg;base64,' + words.card_image
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
toggle(type) {
|
|
@@ -604,6 +629,10 @@
|
|
|
},
|
|
|
|
|
|
preSave() {
|
|
|
+ if (this.baseFormData.lzzt != 0 && this.baseFormData.lzzt != 3 && this.baseFormData.lzzt != 6) {
|
|
|
+ showConfirm('信息正在审核,请审核后重试')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.ocrXm) {
|
|
|
showConfirm('请先拍摄身份证人像面')
|
|
|
return
|
|
@@ -647,16 +676,25 @@
|
|
|
if (this.backBase64) paramFiles.push('data:image/jpeg;base64,' + this.backBase64)
|
|
|
paramFiles.push(this.src)
|
|
|
if (this.baseFormData.istk == 1 && this.tkzmList.length == 1 && this.tkzmList[0].indexOf(
|
|
|
- 'data:image') > 0) {
|
|
|
+ 'data:image') > -1) {
|
|
|
paramFiles.push(this.tkzmList[0])
|
|
|
+ // 特殊材料待审核
|
|
|
+ this.baseFormData.lzzt = 5
|
|
|
+ this.baseFormData.lrSpyj = '同意'
|
|
|
}
|
|
|
if (this.baseFormData.isdb == 1 && this.dbzmList.length == 1 && this.dbzmList[0].indexOf(
|
|
|
- 'data:image') > 0) {
|
|
|
+ 'data:image') > -1) {
|
|
|
paramFiles.push(this.dbzmList[0])
|
|
|
+ // 特殊材料待审核
|
|
|
+ this.baseFormData.lzzt = 5
|
|
|
+ this.baseFormData.lrSpyj = '同意'
|
|
|
}
|
|
|
if (this.baseFormData.iszc == 1 && this.zczmList.length == 1 && this.zczmList[0].indexOf(
|
|
|
- 'data:image') > 0) {
|
|
|
+ 'data:image') > -1) {
|
|
|
paramFiles.push(this.zczmList[0])
|
|
|
+ // 特殊材料待审核
|
|
|
+ this.baseFormData.lzzt = 5
|
|
|
+ this.baseFormData.lrSpyj = '同意'
|
|
|
}
|
|
|
|
|
|
UploadSome({
|
|
@@ -730,71 +768,36 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
- },
|
|
|
- setSrc(e, blobUrl) {
|
|
|
- uni.getFileInfo({
|
|
|
- filePath: blobUrl,
|
|
|
- success: (res) => {
|
|
|
- let size = res.size
|
|
|
- let scale = 1
|
|
|
- if (size / 1024 / 1024 > 0.12) {
|
|
|
- scale = 0.6
|
|
|
- translate(this.src, scale, 'blob', this.setSrc)
|
|
|
- } else {
|
|
|
- idcard(e, this.token, this.cardType, this.callbackIdcard)
|
|
|
- }
|
|
|
- },
|
|
|
- fail: (err) => {
|
|
|
- console.log("err:", err);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- setFaceSrc(e, blobUrl) {
|
|
|
- // this.src = blobUrl
|
|
|
- this.src = e
|
|
|
- uni.getFileInfo({
|
|
|
- filePath: blobUrl,
|
|
|
- success: (res) => {
|
|
|
- let size = res.size
|
|
|
- let scale = 1
|
|
|
- if (size / 1024 / 1024 > 0.1) {
|
|
|
- scale = 0.6
|
|
|
- translate(blobUrl, scale, 'blob', this.setFaceSrc)
|
|
|
- } else {
|
|
|
- // idcard(e, this.token, this.cardType, this.callbackIdcard)
|
|
|
- match(this.token, e.split(",")[1], this.idcardFace, this.callbackFace)
|
|
|
- }
|
|
|
- },
|
|
|
- fail: (err) => {
|
|
|
- console.log("err:", err);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style scoped>
|
|
|
+ .content {
|
|
|
+ padding: 1vh;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
.lzcOCR {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
margin-top: 5vh;
|
|
|
|
|
|
- .box {
|
|
|
- width: 47%;
|
|
|
- text-align: center;
|
|
|
+ }
|
|
|
|
|
|
- image {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
+ .imgBox {
|
|
|
+ width: 47%;
|
|
|
+ text-align: center;
|
|
|
|
|
|
- .text {
|
|
|
- width: 100%;
|
|
|
- /* background-color: red; */
|
|
|
- }
|
|
|
+ image {
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ .text {
|
|
|
+ width: 100%;
|
|
|
+ /* background-color: red; */
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.miaoshu {
|