|
@@ -2,10 +2,15 @@
|
|
|
<div class="layout_container">
|
|
|
<header class="round-header">
|
|
|
<el-select v-model="recordType" style="width: 120px">
|
|
|
- <el-option v-for="item in allRecordTypes" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-option v-for="item in allRecordTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
<el-input v-model="psnIdNumber" placeholder="人员身份证号" clearable style="width: 180px"></el-input>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
+ <ReadCard
|
|
|
+ :pat-no="psnIdNumber"
|
|
|
+ biztype="01103"
|
|
|
+ @success="afterReadCard"
|
|
|
+ />
|
|
|
<el-button type="success" @click="queryPsnBaseInfo">参保信息</el-button>
|
|
|
<el-button type="primary" @click="startApplyRecord"> 开始备案 </el-button>
|
|
|
<el-button type="primary" @click="revokeRecord"> 撤销备案 </el-button>
|
|
@@ -340,6 +345,7 @@ import {
|
|
|
} from "@/api/medical-insurance/si-psn-rcd";
|
|
|
import {Export} from "@/utils/ExportExcel";
|
|
|
import {searchData} from "@/api/inpatient/dictionary";
|
|
|
+import ReadCard from "@/components/medical-insurance/readcard/Index.vue";
|
|
|
|
|
|
const allRecordTypes = [
|
|
|
{ value: '2503', label: '慢特病备案' },
|
|
@@ -366,8 +372,51 @@ const allSpecialDiseaseRecords = ref([])
|
|
|
const showApplySpecialDiseaseRecord = ref(false);
|
|
|
const showWsRecord = ref(false);
|
|
|
const tempSpecialDiseaseRecord = reactive({})
|
|
|
-const tempPsAcRecord = reactive({})
|
|
|
-const actPatient = reactive({})
|
|
|
+
|
|
|
+// 读卡成功后的处理函数
|
|
|
+const afterReadCard = result => {
|
|
|
+ // 如果读卡成功,自动填充身份证号
|
|
|
+ if (result && result.readCardResult) {
|
|
|
+ // 根据不同的读卡类型处理
|
|
|
+ if (result.mdtrtCertType === "sicard") {
|
|
|
+ // 社保卡读卡 - 从读卡结果中提取身份证号
|
|
|
+ if (result.readCardResult.includes("身份证号")) {
|
|
|
+ const match = result.readCardResult.match(/身份证号[::]\s*(\d{17}[\dXx])/);
|
|
|
+ if (match) {
|
|
|
+ psnIdNumber.value = match[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (result.mdtrtCertType === "qrcode") {
|
|
|
+ // 电子凭证读卡 - JSON格式数据
|
|
|
+ try {
|
|
|
+ const cardData = JSON.parse(result.readCardResult);
|
|
|
+ if (cardData.idNo) {
|
|
|
+ psnIdNumber.value = cardData.idNo;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("电子凭证读卡数据解析失败:", error);
|
|
|
+ }
|
|
|
+ } else if (result.mdtrtCertType === "face") {
|
|
|
+ // 刷脸读卡 - JSON格式数据
|
|
|
+ try {
|
|
|
+ const cardData = JSON.parse(result.readCardResult);
|
|
|
+ if (cardData.idNo) {
|
|
|
+ psnIdNumber.value = cardData.idNo;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("刷脸读卡数据解析失败:", error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 读卡成功后显示提示
|
|
|
+ ElMessage({
|
|
|
+ message: '读卡成功,已自动填充身份证号',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
|
|
|
const nullIdNumber = () => {
|
|
|
if (!psnIdNumber.value) {
|