|
|
@@ -942,7 +942,91 @@ const checkRegisterDatetime = () => {
|
|
|
duration: 2600,
|
|
|
showClose: true,
|
|
|
});
|
|
|
- return
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(patient.value.mdtrtCertType === "sicard"){
|
|
|
+ if(!(patient.value.name && patient.value.readCardResult && patient.value.readCardResult.includes(patient.value.name))) {
|
|
|
+ // 社保卡读卡成功,但姓名不匹配!
|
|
|
+ ElMessage({
|
|
|
+ message: "社保卡读卡成功,但姓名不匹配!",
|
|
|
+ type: "warning",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(!(patient.value.socialNo && patient.value.readCardResult && patient.value.readCardResult.includes(patient.value.socialNo))) {
|
|
|
+ // 社保卡读卡成功,但身份证不匹配!
|
|
|
+ ElMessage({
|
|
|
+ message: "社保卡读卡成功,但身份证不匹配!",
|
|
|
+ type: "warning",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }else if(patient.value.mdtrtCertType === "qrcode"){
|
|
|
+ // 电子凭证读卡逻辑 - JSON格式数据
|
|
|
+ try {
|
|
|
+ const cardData = JSON.parse(patient.value.readCardResult);
|
|
|
+ if (!(patient.value.name && cardData.userName === patient.value.name)) {
|
|
|
+ ElMessage({
|
|
|
+ message: "电子凭证读卡成功,但姓名不匹配!",
|
|
|
+ type: "warning",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!(patient.value.socialNo && cardData.idNo === patient.value.socialNo)) {
|
|
|
+ ElMessage({
|
|
|
+ message: "电子凭证读卡成功,但身份证不匹配!",
|
|
|
+ type: "warning",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ ElMessage({
|
|
|
+ message: "电子凭证读卡数据格式错误!",
|
|
|
+ type: "error",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }else if(patient.value.mdtrtCertType === "face"){
|
|
|
+ // 刷脸读卡逻辑 - JSON格式数据
|
|
|
+ try {
|
|
|
+ const cardData = JSON.parse(patient.value.readCardResult);
|
|
|
+ if (!(patient.value.name && cardData.userName === patient.value.name)) {
|
|
|
+ ElMessage({
|
|
|
+ message: "刷脸读卡成功,但姓名不匹配!",
|
|
|
+ type: "warning",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!(patient.value.socialNo && cardData.idNo === patient.value.socialNo)) {
|
|
|
+ ElMessage({
|
|
|
+ message: "刷脸读卡成功,但身份证不匹配!",
|
|
|
+ type: "warning",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ ElMessage({
|
|
|
+ message: "刷脸读卡数据格式错误!",
|
|
|
+ type: "error",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
patient.value.expContent = JSON.stringify(expContent);
|
|
|
submitSiPatientInfo({
|