react_hsbc_teller 2.0.57 → 2.0.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/demo/demo.js +2 -1
- package/packages/pages/components/step/step.jsx +5 -11
- package/packages/pages/video/video.jsx +240 -226
- package/packages/pages/video/video.less +3 -0
|
@@ -5,6 +5,24 @@ import React, { Component, useState } from 'react';
|
|
|
5
5
|
import QRCode from 'qrcode.react';
|
|
6
6
|
import API from '../../api/api';
|
|
7
7
|
import { BoardOperate } from '../../common/index.esm.js';
|
|
8
|
+
|
|
9
|
+
import Modal from "antd/lib/modal";
|
|
10
|
+
import 'antd/lib/modal/style'
|
|
11
|
+
import message from "antd/lib/message";
|
|
12
|
+
import 'antd/lib/message/style'
|
|
13
|
+
import Spin from "antd/lib/spin";
|
|
14
|
+
import 'antd/lib/spin/style'
|
|
15
|
+
import Select from "antd/lib/select";
|
|
16
|
+
import 'antd/lib/select/style'
|
|
17
|
+
import Radio from "antd/lib/radio";
|
|
18
|
+
import 'antd/lib/radio/style'
|
|
19
|
+
import Space from "antd/lib/space";
|
|
20
|
+
import 'antd/lib/space/style'
|
|
21
|
+
import { Collapse } from 'antd';
|
|
22
|
+
import 'antd/lib/collapse/style'
|
|
23
|
+
const { Panel } = Collapse;
|
|
24
|
+
import { Button } from '../../../node_modules/antd/lib/index';
|
|
25
|
+
|
|
8
26
|
import './video.less'
|
|
9
27
|
import { compressImage, isLight, saveBase64Image, combineBase64Images } from '../../utils/utils'
|
|
10
28
|
import Recorder from "js-audio-recorder";
|
|
@@ -35,35 +53,15 @@ import networkWeakAudio from '../../assets/mp3/networkweak.mp3'
|
|
|
35
53
|
import PIPictureClosedAudio from '../../assets/mp3/pip_close.mp3'
|
|
36
54
|
import screenSharedIntervalAudio from '../../assets/mp3/share_stop_audio.mp3'
|
|
37
55
|
import errorPng from '../../assets/img/tooltips2_fail.png'
|
|
38
|
-
import Modal from "antd/lib/modal";
|
|
39
|
-
import 'antd/lib/modal/style'
|
|
40
|
-
import message from "antd/lib/message";
|
|
41
|
-
import 'antd/lib/message/style'
|
|
42
|
-
import Spin from "antd/lib/spin";
|
|
43
|
-
import 'antd/lib/spin/style'
|
|
44
|
-
import Select from "antd/lib/select";
|
|
45
|
-
import 'antd/lib/select/style'
|
|
46
|
-
|
|
47
|
-
import Radio from "antd/lib/radio";
|
|
48
|
-
import 'antd/lib/radio/style'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
import Space from "antd/lib/space";
|
|
52
|
-
import 'antd/lib/space/style'
|
|
53
|
-
import { Collapse } from 'antd';
|
|
54
|
-
import 'antd/lib/collapse/style'
|
|
55
|
-
const { Panel } = Collapse;
|
|
56
|
-
|
|
57
|
-
|
|
58
56
|
import styled from 'styled-components';
|
|
59
|
-
|
|
57
|
+
|
|
60
58
|
import SignMy from '../sign/signMy.jsx'
|
|
61
59
|
import Step from '../components/step/step.jsx'
|
|
62
60
|
import MultiModule from '../multiModule/multiModule'//签字、抄录
|
|
63
61
|
import axios from 'axios';
|
|
64
62
|
import CryptoJS from "crypto-js";
|
|
65
63
|
|
|
66
|
-
const SDK_VERISON = '2.0.
|
|
64
|
+
const SDK_VERISON = '2.0.59'
|
|
67
65
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
68
66
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
69
67
|
const { Option } = Select;
|
|
@@ -318,10 +316,11 @@ class Video extends Component {
|
|
|
318
316
|
},
|
|
319
317
|
zIndexNum: -1,
|
|
320
318
|
selectSpan: 'pen',
|
|
321
|
-
isModalVisibleCustomer: false,
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
319
|
+
isModalVisibleCustomer: false, // 证件识别弹窗
|
|
320
|
+
stepIndex: 0, // 证件识别步骤
|
|
321
|
+
customerSelectType: 1, // 选择客户类型
|
|
322
|
+
customerSelect: '', // 选择客户
|
|
323
|
+
documentType: '', // 选择证件类型
|
|
325
324
|
documentError: '',
|
|
326
325
|
customerTitleName: '客户证件识别',
|
|
327
326
|
certificateType: 'ID_CARD',
|
|
@@ -1023,13 +1022,13 @@ class Video extends Component {
|
|
|
1023
1022
|
customerList: list
|
|
1024
1023
|
})
|
|
1025
1024
|
if (list.length > 0) {
|
|
1026
|
-
if (val
|
|
1025
|
+
if (val === 'ocr') {
|
|
1027
1026
|
console.log('this.state.customerList.length',list.length)
|
|
1028
1027
|
this.setState({
|
|
1028
|
+
stepIndex: 0,
|
|
1029
1029
|
documentType: '',
|
|
1030
|
-
|
|
1031
|
-
customerSelect: list.length
|
|
1032
|
-
|
|
1030
|
+
customerSelectType: '',
|
|
1031
|
+
customerSelect: list.length === 1 ? 1 : '',
|
|
1033
1032
|
customerTitleName: '客户证件识别'
|
|
1034
1033
|
},()=>{
|
|
1035
1034
|
console.log(this.state.customerSelect)
|
|
@@ -1037,7 +1036,7 @@ class Video extends Component {
|
|
|
1037
1036
|
isModalVisibleCustomer: true,
|
|
1038
1037
|
})
|
|
1039
1038
|
})
|
|
1040
|
-
} else if (val
|
|
1039
|
+
} else if (val === 'facial') {
|
|
1041
1040
|
this.setState({
|
|
1042
1041
|
clickedFacial: true
|
|
1043
1042
|
})
|
|
@@ -4827,76 +4826,52 @@ class Video extends Component {
|
|
|
4827
4826
|
})
|
|
4828
4827
|
}
|
|
4829
4828
|
handleFinishOcr = async (type) => {
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4829
|
+
await this.handleConfirmCallback();
|
|
4830
|
+
if (type === 'noFace') {
|
|
4831
|
+
this.setState({
|
|
4832
|
+
isModalVisibleFacial: false,
|
|
4833
|
+
cardResuly: '',
|
|
4834
|
+
idCardNumber: '',
|
|
4835
|
+
idCardName: '',
|
|
4836
|
+
certificateValidity: '',
|
|
4837
|
+
resultIdCardName: '',
|
|
4838
|
+
resultIdCardNumber: '',
|
|
4839
|
+
resultCertificateDate: '',
|
|
4840
|
+
authorizeStaffId: ''
|
|
4841
|
+
})
|
|
4842
|
+
} else {
|
|
4843
|
+
console.log('身份证ocr');
|
|
4844
|
+
// 保存身份证,进行人脸识别
|
|
4845
|
+
this.state.userIdCardResults[this.state.faceCustomerUid] = {
|
|
4846
|
+
idCardName: this.state.idCardName,
|
|
4847
|
+
idCardNumber: this.state.idCardNumber,
|
|
4848
|
+
customerName: this.state.customerName,
|
|
4849
|
+
certificateValidity: this.state.certificateValidity,
|
|
4850
|
+
resultIdCardName: this.state.resultIdCardName,
|
|
4851
|
+
resultIdCardNumber: this.state.resultIdCardNumber,
|
|
4852
|
+
resultCertificateDate: this.state.resultCertificateDate,
|
|
4853
|
+
authorizeStaffId: this.state.authorizeStaffId,
|
|
4854
|
+
}
|
|
4855
|
+
console.log(this.state.userIdCardResults)
|
|
4838
4856
|
this.setState({
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4857
|
+
idCardNameFace: this.state.idCardName,
|
|
4858
|
+
idCardNumberFace: this.state.idCardNumber,
|
|
4859
|
+
certificateValidityFace: this.state.certificateValidity,
|
|
4860
|
+
userIdCardResults: this.state.userIdCardResults
|
|
4861
|
+
},()=>{
|
|
4862
|
+
this.setState({
|
|
4863
|
+
isModalVisibleFacial: false,
|
|
4864
|
+
cardResuly: '',
|
|
4865
|
+
certificateValidity: '',
|
|
4866
|
+
idCardNumber: '',
|
|
4867
|
+
idCardName: '',
|
|
4868
|
+
resultIdCardName: '',
|
|
4869
|
+
resultIdCardNumber: '',
|
|
4870
|
+
resultCertificateDate: '',
|
|
4871
|
+
authorizeStaffId: '',
|
|
4872
|
+
})
|
|
4848
4873
|
})
|
|
4849
|
-
|
|
4850
|
-
// } else {
|
|
4851
|
-
// console.log('身份证ocr')
|
|
4852
|
-
// const idCardName = this.state.idCardName
|
|
4853
|
-
// const documentType = this.state.documentType
|
|
4854
|
-
// // 身份证,进行人脸识别后再入库
|
|
4855
|
-
// this.state.userIdCardResults[this.state.faceCustomerUid] = {
|
|
4856
|
-
// idCardName: this.state.idCardName,
|
|
4857
|
-
// idCardNumber: this.state.idCardNumber,
|
|
4858
|
-
// customerName: this.state.customerName,
|
|
4859
|
-
// certificateValidity: this.state.certificateValidity,
|
|
4860
|
-
// resultIdCardName: this.state.resultIdCardName,
|
|
4861
|
-
// resultIdCardNumber: this.state.resultIdCardNumber,
|
|
4862
|
-
// resultCertificateDate: this.state.resultCertificateDate,
|
|
4863
|
-
// authorizeStaffId: this.state.authorizeStaffId,
|
|
4864
|
-
// }
|
|
4865
|
-
// console.log(this.state.userIdCardResults)
|
|
4866
|
-
// this.setState({
|
|
4867
|
-
// idCardNameFace: this.state.idCardName,
|
|
4868
|
-
// idCardNumberFace: this.state.idCardNumber,
|
|
4869
|
-
// certificateValidityFace: this.state.certificateValidity,
|
|
4870
|
-
// userIdCardResults: this.state.userIdCardResults
|
|
4871
|
-
// },()=>{
|
|
4872
|
-
// this.state.faceCustomerType = 1
|
|
4873
|
-
// this.setState({
|
|
4874
|
-
// cardResuly: '',
|
|
4875
|
-
// certificateValidity: '',
|
|
4876
|
-
// idCardNumber: '',
|
|
4877
|
-
// idCardName: '',
|
|
4878
|
-
// resultIdCardName: '',
|
|
4879
|
-
// resultIdCardNumber: '',
|
|
4880
|
-
// resultCertificateDate: '',
|
|
4881
|
-
// authorizeStaffId: '',
|
|
4882
|
-
// titleModal: '身份验证',
|
|
4883
|
-
// // clickedFacial: true,
|
|
4884
|
-
// facialImg: faceImage,
|
|
4885
|
-
// isFaceImage: false
|
|
4886
|
-
// })
|
|
4887
|
-
// })
|
|
4888
|
-
// setTimeout(() => {
|
|
4889
|
-
// this.publishVideoTwo()
|
|
4890
|
-
// }, 0);
|
|
4891
|
-
//
|
|
4892
|
-
// // 保存图片到本地
|
|
4893
|
-
// setTimeout(() => {
|
|
4894
|
-
// combineBase64Images(this.state.facialImgFront, this.state.facialImgBack, (base64Image)=>{
|
|
4895
|
-
// saveBase64Image(base64Image, `${idCardName}-${documentType}`)
|
|
4896
|
-
// })
|
|
4897
|
-
// }, 100);
|
|
4898
|
-
//
|
|
4899
|
-
// }
|
|
4874
|
+
}
|
|
4900
4875
|
}
|
|
4901
4876
|
// ocr结果入库
|
|
4902
4877
|
handleConfirmCallback = async () => {
|
|
@@ -5160,7 +5135,22 @@ class Video extends Component {
|
|
|
5160
5135
|
handleOkFacial = () => {
|
|
5161
5136
|
if (this.state.faceCustomerType == 2) {
|
|
5162
5137
|
if (this.state.IDtypeFrontOrBack == IDtypeFront) {
|
|
5163
|
-
if(this.state.documentType
|
|
5138
|
+
if (this.state.documentType === 'OTHER_CARD') {
|
|
5139
|
+
// 证件类型为其他时不需要OCR,直接截图保存本地
|
|
5140
|
+
saveBase64Image(this.state.facialImgFront, `其他证件-${new Date().getTime()}`)
|
|
5141
|
+
this.setState({
|
|
5142
|
+
isModalVisibleFacial: false,
|
|
5143
|
+
facialImg: '',
|
|
5144
|
+
isFaceImage: false,
|
|
5145
|
+
facialImgFront: '',
|
|
5146
|
+
})
|
|
5147
|
+
this.sendMessage({
|
|
5148
|
+
'typeId': 1020,
|
|
5149
|
+
'sessionId': this.state.sessionId,
|
|
5150
|
+
'cameraState': 1,
|
|
5151
|
+
"userId": this.state.faceCustomerUid
|
|
5152
|
+
})
|
|
5153
|
+
} else if(this.state.documentType == 'PASSPORT_CARD' || this.state.documentType == 'TW_PASS_CARD' || this.state.documentType == 'HK_MO_PASS_CARD') {
|
|
5164
5154
|
this.setState({
|
|
5165
5155
|
loadingFace: true
|
|
5166
5156
|
})
|
|
@@ -5201,59 +5191,59 @@ class Video extends Component {
|
|
|
5201
5191
|
return
|
|
5202
5192
|
}
|
|
5203
5193
|
this.handleCancelFacial();
|
|
5204
|
-
try {
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
} catch (err) {
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
}
|
|
5194
|
+
// try {
|
|
5195
|
+
// // 原始证件参数
|
|
5196
|
+
// let data = {
|
|
5197
|
+
// idCardName: userInfo.resultIdCardName,
|
|
5198
|
+
// staffId: this.props.tellerAccount,
|
|
5199
|
+
// activityId: this.props.businessNumber,
|
|
5200
|
+
// appAccount: this.state.faceCustomerUid,
|
|
5201
|
+
// idCardNumber: userInfo.resultIdCardNumber,
|
|
5202
|
+
// sessionId: this.state.sessionId,
|
|
5203
|
+
// certificateType: 'ID_CARD',
|
|
5204
|
+
// customerName: userInfo.customerName,
|
|
5205
|
+
// startDate: userInfo.resultCertificateDate ? userInfo.resultCertificateDate.split('-')[0] : '',
|
|
5206
|
+
// endDate: userInfo.resultCertificateDate ? userInfo.resultCertificateDate.split('-')[1] : '',
|
|
5207
|
+
// }
|
|
5208
|
+
// // 添加修改后的证件参数
|
|
5209
|
+
// if (userInfo.authorizeStaffId) {
|
|
5210
|
+
// data.authorizeStaffId = userInfo.authorizeStaffId
|
|
5211
|
+
// }
|
|
5212
|
+
// if (userInfo.idCardName != userInfo.resultIdCardName) {
|
|
5213
|
+
// data.reviseIdCardName = userInfo.idCardName
|
|
5214
|
+
// }
|
|
5215
|
+
// if (userInfo.idCardNumber != userInfo.resultIdCardNumber) {
|
|
5216
|
+
// data.reviseIdCardNumber = userInfo.idCardNumber
|
|
5217
|
+
// }
|
|
5218
|
+
// let reviseCertificateStartDate = userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[0] : '';
|
|
5219
|
+
// let reviseCertificateEndDate = userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[1] : '';
|
|
5220
|
+
// if (reviseCertificateStartDate != data.startDate) {
|
|
5221
|
+
// data.reviseCertificateStartDate = reviseCertificateStartDate
|
|
5222
|
+
// }
|
|
5223
|
+
// if (reviseCertificateEndDate != data.endDate) {
|
|
5224
|
+
// data.reviseCertificateEndDate = reviseCertificateEndDate
|
|
5225
|
+
// }
|
|
5226
|
+
// let result = await API.confirmCallback(data);
|
|
5227
|
+
// console.log('confirmCallback', result)
|
|
5228
|
+
// if (result.code == 200) {
|
|
5229
|
+
// // console.log(data)
|
|
5230
|
+
// let item = this.state.videoList.find(el => el.userId == this.state.faceCustomerUid )
|
|
5231
|
+
// item.hasOcr = 2; // 身份证ocr
|
|
5232
|
+
// // this.setState({
|
|
5233
|
+
// // videoList: this.state.videoList
|
|
5234
|
+
// // })
|
|
5235
|
+
// this.videoListSort();
|
|
5236
|
+
// if (this.state.isPictureInPicture) {
|
|
5237
|
+
// this.pictureInPicture('Refresh')
|
|
5238
|
+
// }
|
|
5239
|
+
// } else {
|
|
5240
|
+
// console.log('1')
|
|
5241
|
+
// this.messageClick('保持信息失败', 'error')
|
|
5242
|
+
// }
|
|
5243
|
+
// } catch (err) {
|
|
5244
|
+
// console.log('2',err)
|
|
5245
|
+
// this.messageClick('保持信息失败', 'error')
|
|
5246
|
+
// }
|
|
5257
5247
|
};
|
|
5258
5248
|
handleCancelFacial = () => {
|
|
5259
5249
|
this.sendMessage({
|
|
@@ -5267,6 +5257,7 @@ class Video extends Component {
|
|
|
5267
5257
|
})
|
|
5268
5258
|
};
|
|
5269
5259
|
publishVideoTwo=()=>{
|
|
5260
|
+
console.log('publishVideoTwo', document.getElementById('publish_video_2'))
|
|
5270
5261
|
const videoMedia = document.getElementById('publish_video_2');
|
|
5271
5262
|
videoMedia.srcObject = document.getElementById(videoName).srcObject
|
|
5272
5263
|
clearTime = setTimeout(() => {
|
|
@@ -5447,15 +5438,15 @@ class Video extends Component {
|
|
|
5447
5438
|
sid = document.getElementById('video12').name;
|
|
5448
5439
|
videoName = 'video12'
|
|
5449
5440
|
}
|
|
5450
|
-
console.log(sid)
|
|
5451
|
-
this.state.customOcrSid = sid
|
|
5452
|
-
this.state.faceCustomerUid = item.customId
|
|
5453
|
-
|
|
5441
|
+
console.log('sid-videoName', sid, videoName)
|
|
5442
|
+
this.state.customOcrSid = sid;
|
|
5443
|
+
this.state.faceCustomerUid = item.customId;
|
|
5444
|
+
this.state.customerName = item.name;
|
|
5454
5445
|
this.setState({
|
|
5455
5446
|
clickedFacial: false,
|
|
5456
5447
|
clickedOcr: false,
|
|
5457
5448
|
isFaceImage: false,
|
|
5458
|
-
facialImg: this.state.titleModal
|
|
5449
|
+
facialImg: this.state.titleModal === '身份验证' ? faceImage : ocrImage,
|
|
5459
5450
|
disabledIdCard: true,
|
|
5460
5451
|
IDtypeFrontOrBack: IDtypeFront,
|
|
5461
5452
|
facialImgFront: '',
|
|
@@ -5465,16 +5456,13 @@ class Video extends Component {
|
|
|
5465
5456
|
idCardName: '',
|
|
5466
5457
|
cardFailReason: '',
|
|
5467
5458
|
cardResuly: '',
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
this.setState({
|
|
5473
|
-
isModalVisibleFacial: true,
|
|
5474
|
-
}, () => {
|
|
5475
|
-
this.publishVideoTwo()
|
|
5476
|
-
})
|
|
5459
|
+
videoType: '',
|
|
5460
|
+
certificateValidityType: true,
|
|
5461
|
+
isModalVisibleFacial: true,
|
|
5477
5462
|
})
|
|
5463
|
+
setTimeout(()=> {
|
|
5464
|
+
this.publishVideoTwo()
|
|
5465
|
+
},0)
|
|
5478
5466
|
}
|
|
5479
5467
|
}
|
|
5480
5468
|
sgsinImage = () => {
|
|
@@ -6510,46 +6498,70 @@ class Video extends Component {
|
|
|
6510
6498
|
this.changePdfRendering()
|
|
6511
6499
|
}
|
|
6512
6500
|
}
|
|
6501
|
+
onChangeOCRCustomerType = (e) => {
|
|
6502
|
+
this.setState({
|
|
6503
|
+
customerSelectType: e.target.value
|
|
6504
|
+
})
|
|
6505
|
+
}
|
|
6513
6506
|
onChangeOCRCustomer = (e) => {
|
|
6514
6507
|
console.log(e)
|
|
6515
6508
|
this.setState({
|
|
6516
6509
|
customerSelect: e.target.value
|
|
6517
6510
|
})
|
|
6518
6511
|
}
|
|
6512
|
+
|
|
6513
|
+
// 证件识别取消
|
|
6519
6514
|
handleCancelCustomer = () => {
|
|
6520
6515
|
this.setState({
|
|
6521
6516
|
isModalVisibleCustomer: false
|
|
6522
6517
|
})
|
|
6523
6518
|
}
|
|
6519
|
+
// 证件识别上一步(客户选择、证件类型)
|
|
6524
6520
|
goBackSelectCustomer=()=>{
|
|
6525
|
-
this.
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6521
|
+
if (this.state.stepIndex === 2) {
|
|
6522
|
+
this.setState((preState)=> ({
|
|
6523
|
+
stepIndex: preState.stepIndex - 1,
|
|
6524
|
+
customerSelect: this.state.customerList.length === 1 ? 1 : '',
|
|
6525
|
+
customerTitleName: '客户证件识别'
|
|
6526
|
+
}))
|
|
6527
|
+
} else {
|
|
6528
|
+
this.setState((preState)=> ({
|
|
6529
|
+
stepIndex: preState.stepIndex - 1,
|
|
6530
|
+
customerSelectType: '',
|
|
6531
|
+
}))
|
|
6532
|
+
}
|
|
6531
6533
|
}
|
|
6534
|
+
// 证件识别下一步
|
|
6532
6535
|
handleOkCustomer = () => {
|
|
6533
|
-
if (this.state.
|
|
6536
|
+
if (this.state.stepIndex === 0) {
|
|
6537
|
+
// 选择客户类型
|
|
6538
|
+
this.setState((preState)=> ({
|
|
6539
|
+
stepIndex: preState.stepIndex + 1,
|
|
6540
|
+
customerSelect: this.state.customerList.length === 1 ? 1 : '',
|
|
6541
|
+
}))
|
|
6542
|
+
} else if (this.state.stepIndex === 1) {
|
|
6543
|
+
// 选择客户
|
|
6534
6544
|
if (this.state.customerList[this.state.customerSelect - 1].tourist) {
|
|
6535
6545
|
this.customerFaceClick(this.state.customerList[this.state.customerSelect - 1])
|
|
6536
6546
|
} else {
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
} else {
|
|
6547
|
+
this.setState((preState)=> ({
|
|
6548
|
+
stepIndex: preState.stepIndex + 1,
|
|
6549
|
+
documentError: '',
|
|
6550
|
+
documentType: '',
|
|
6551
|
+
customerTitleName: this.state.customerList[this.state.customerSelect - 1].name
|
|
6552
|
+
}))
|
|
6553
|
+
}
|
|
6554
|
+
} else if (this.state.stepIndex === 2) {
|
|
6555
|
+
// 选择证件类型
|
|
6545
6556
|
this.getAuthorizeResult(this.state.customerList[this.state.customerSelect - 1].customId).then((res) => {
|
|
6546
|
-
if (res) {
|
|
6557
|
+
if (res || this.state.customerSelectType === 1 || this.state.documentType === 'OTHER_CARD') {
|
|
6558
|
+
// 客户类型为保险、或者证件类型为其他时不需要授权
|
|
6547
6559
|
this.customerFaceClick(this.state.customerList[this.state.customerSelect - 1])
|
|
6548
6560
|
this.setState({
|
|
6549
6561
|
isModalVisibleCustomer: false,
|
|
6550
6562
|
})
|
|
6551
6563
|
} else {
|
|
6552
|
-
if (this.state.documentType
|
|
6564
|
+
if (this.state.documentType === 'ID_CARD') {
|
|
6553
6565
|
this.test_controller.SendTextMsg(JSON.stringify({
|
|
6554
6566
|
'typeId': 3300,
|
|
6555
6567
|
"data": {
|
|
@@ -6579,7 +6591,6 @@ class Video extends Component {
|
|
|
6579
6591
|
}
|
|
6580
6592
|
]
|
|
6581
6593
|
}
|
|
6582
|
-
|
|
6583
6594
|
}))
|
|
6584
6595
|
} else {
|
|
6585
6596
|
this.test_controller.SendTextMsg(JSON.stringify({
|
|
@@ -6606,7 +6617,6 @@ class Video extends Component {
|
|
|
6606
6617
|
}
|
|
6607
6618
|
]
|
|
6608
6619
|
}
|
|
6609
|
-
|
|
6610
6620
|
}))
|
|
6611
6621
|
}
|
|
6612
6622
|
this.setState({
|
|
@@ -6615,10 +6625,9 @@ class Video extends Component {
|
|
|
6615
6625
|
})
|
|
6616
6626
|
}
|
|
6617
6627
|
})
|
|
6618
|
-
// this.customerFaceClick(this.state.customerList[this.state.customerSelect])
|
|
6619
6628
|
}
|
|
6620
|
-
|
|
6621
6629
|
}
|
|
6630
|
+
|
|
6622
6631
|
onChangeDocumentType = (e) => {
|
|
6623
6632
|
this.setState({
|
|
6624
6633
|
documentType: e.target.value,
|
|
@@ -7256,13 +7265,14 @@ class Video extends Component {
|
|
|
7256
7265
|
<Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
|
|
7257
7266
|
<Button className="modelButtonCancel" onClick={this.sgsinImage}>拍照</Button>
|
|
7258
7267
|
{/* 再截图后按钮高亮 */}
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7268
|
+
<Button
|
|
7269
|
+
className={this.state.isFaceImage ? 'modelButtonOk' : 'modelButtonNo'}
|
|
7270
|
+
type="primary"
|
|
7271
|
+
danger
|
|
7272
|
+
onClick={this.handleOkFacial}
|
|
7273
|
+
>
|
|
7274
|
+
{this.state.documentType === 'OTHER_CARD' ? '确认' : '下一步'}
|
|
7275
|
+
</Button>
|
|
7266
7276
|
</div>,
|
|
7267
7277
|
// 人脸识别后的结果界面的按钮
|
|
7268
7278
|
this.state.cardResuly == '' && this.state.faceResuly != '' &&<div key='facial'>
|
|
@@ -7309,7 +7319,7 @@ class Video extends Component {
|
|
|
7309
7319
|
]}>
|
|
7310
7320
|
<Spin spinning={this.state.loadingFace} tip="识别中...">
|
|
7311
7321
|
<div style={{display: 'flex', padding: '10px 20px'}}>
|
|
7312
|
-
<Step style={{marginTop: '10px'}} current={this.state.titleModal
|
|
7322
|
+
<Step style={{marginTop: '10px'}} current={this.state.titleModal === '身份验证'? 4 : 3} />
|
|
7313
7323
|
<div className="faceBody">
|
|
7314
7324
|
{this.state.cardResuly == '' && <div className='faceCardImg'>
|
|
7315
7325
|
|
|
@@ -7424,44 +7434,49 @@ class Video extends Component {
|
|
|
7424
7434
|
</div>
|
|
7425
7435
|
</Spin>
|
|
7426
7436
|
</Modal>
|
|
7437
|
+
{/*证件识别弹窗*/}
|
|
7427
7438
|
<Modal width={650} title={this.state.customerTitleName} closable={false} centered={true} visible={this.state.isModalVisibleCustomer} maskClosable={false}
|
|
7428
7439
|
footer={[
|
|
7429
7440
|
<div key='end'>
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
7441
|
{
|
|
7433
|
-
|
|
7442
|
+
this.state.stepIndex !== 0 && <Button className="modelButtonCancel" onClick={this.goBackSelectCustomer}>上一步</Button>
|
|
7434
7443
|
}
|
|
7435
7444
|
<Button className="modelButtonCancel" onClick={this.handleCancelCustomer}>取消</Button>
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
this.state.
|
|
7445
|
+
<Button
|
|
7446
|
+
className={
|
|
7447
|
+
(this.state.stepIndex === 0 && this.state.customerSelectType) ||
|
|
7448
|
+
(this.state.stepIndex === 1 && this.state.customerSelect) ||
|
|
7449
|
+
(this.state.stepIndex === 2 && this.state.documentType) ? 'modelButtonOk' : 'modelButtonNo modelNoButton'
|
|
7440
7450
|
}
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
}
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
!this.state.isCustomerSelect&& <span>
|
|
7448
|
-
{
|
|
7449
|
-
this.state.documentType == '' && <Button className="modelButtonNo modelNoButton" type="primary" danger>下一步</Button>
|
|
7450
|
-
}
|
|
7451
|
-
{
|
|
7452
|
-
this.state.documentType != '' &&<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkCustomer}>下一步</Button>
|
|
7453
|
-
}
|
|
7454
|
-
</span>
|
|
7455
|
-
}
|
|
7456
|
-
|
|
7451
|
+
type="primary"
|
|
7452
|
+
danger
|
|
7453
|
+
onClick={this.handleOkCustomer}
|
|
7454
|
+
>
|
|
7455
|
+
下一步
|
|
7456
|
+
</Button>
|
|
7457
7457
|
</div>
|
|
7458
7458
|
]}>
|
|
7459
7459
|
<div style={{display: 'flex', padding: '10px 20px'}}>
|
|
7460
|
-
<Step current={this.state.
|
|
7460
|
+
<Step current={this.state.stepIndex} />
|
|
7461
7461
|
<div>
|
|
7462
7462
|
{
|
|
7463
|
-
this.state.
|
|
7463
|
+
this.state.stepIndex === 0 && <div>
|
|
7464
7464
|
<div className='CustomerSelectTitle'>
|
|
7465
|
+
请选择客户类型
|
|
7466
|
+
</div>
|
|
7467
|
+
<div>
|
|
7468
|
+
<Radio.Group onChange={this.onChangeOCRCustomerType} value={this.state.customerSelectType}>
|
|
7469
|
+
<Space direction="vertical">
|
|
7470
|
+
<Radio value={1}>保险</Radio>
|
|
7471
|
+
<Radio value={2}>ECN陪同者</Radio>
|
|
7472
|
+
</Space>
|
|
7473
|
+
</Radio.Group>
|
|
7474
|
+
</div>
|
|
7475
|
+
</div>
|
|
7476
|
+
}
|
|
7477
|
+
{
|
|
7478
|
+
this.state.stepIndex === 1 && <div>
|
|
7479
|
+
<div className='CustomerSelectTitle'>
|
|
7465
7480
|
请选择客户
|
|
7466
7481
|
</div>
|
|
7467
7482
|
<div>
|
|
@@ -7469,9 +7484,7 @@ class Video extends Component {
|
|
|
7469
7484
|
<Space direction="vertical">
|
|
7470
7485
|
{
|
|
7471
7486
|
this.state.customerList.map((item, index) => {
|
|
7472
|
-
|
|
7473
|
-
return <Radio value={index + 1}>{item.name}</Radio>
|
|
7474
|
-
// }
|
|
7487
|
+
return <Radio value={index + 1}>{item.name}</Radio>
|
|
7475
7488
|
})
|
|
7476
7489
|
}
|
|
7477
7490
|
</Space>
|
|
@@ -7481,9 +7494,9 @@ class Video extends Component {
|
|
|
7481
7494
|
</div>
|
|
7482
7495
|
}
|
|
7483
7496
|
{
|
|
7484
|
-
|
|
7497
|
+
this.state.stepIndex === 2 && <div>
|
|
7485
7498
|
{
|
|
7486
|
-
this.state.documentError
|
|
7499
|
+
this.state.documentError !== '' && <div className='errorClassFace'>
|
|
7487
7500
|
<img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>{this.state.documentError}</div>
|
|
7488
7501
|
}
|
|
7489
7502
|
<div className='CustomerSelectTitle'>
|
|
@@ -7498,6 +7511,7 @@ class Video extends Component {
|
|
|
7498
7511
|
<Radio value={'HK_MO_PASS_CARD'}>港澳来往大陆通行证</Radio>
|
|
7499
7512
|
<Radio value={'HK_MO_RESIDENCE_CARD'}>港澳居民居住证</Radio>
|
|
7500
7513
|
<Radio value={'TW_RESIDENCE_CARD'}>台湾居民居住证</Radio>
|
|
7514
|
+
<Radio value={'OTHER_CARD'}>其他证件</Radio>
|
|
7501
7515
|
{/* <Radio value={'FOREIGNER_RESIDENCE_CARD'}>外国人永久居住证</Radio> */}
|
|
7502
7516
|
</Space>
|
|
7503
7517
|
</Radio.Group>
|