Compare commits
2 Commits
23a7ede76e
...
85b4fa0efb
| Author | SHA1 | Date |
|---|---|---|
|
|
85b4fa0efb | |
|
|
3de45ef2a3 |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
|
@ -6,7 +6,7 @@ import natys from "@/assets/config/directory/antys.json";
|
|||
import psnCertTypes from "@/assets/config/directory/psnCertTypes.json";
|
||||
import insutypes from "@/assets/config/directory/insutypes.json";
|
||||
import {onMounted, onUnmounted, ref} from "vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import type {Request, Response} from "@/utils/ws.ts";
|
||||
import {useWsStore} from "@/stores/wsStore.ts";
|
||||
|
|
@ -67,15 +67,23 @@ const reciceMessage = (response: Response) => {
|
|||
}
|
||||
getInfoFor1101(params)
|
||||
}
|
||||
const emit = defineEmits(['socialCardUpdate'])
|
||||
const loading = ref(false)
|
||||
const emit = defineEmits(['socialCardUpdate', 'close'])
|
||||
const getInfoFor1101 = (params: any) => {
|
||||
loading.value = true
|
||||
post("social/person/getCustomSocialInfo", {data: params}).then((res: any) => {
|
||||
socialCard.value.data = res;
|
||||
socialCard.value.mdtrtCertType = params.mdtrtCertType;
|
||||
socialCard.value.mdtrtCertNo = params.mdtrtCertNo;
|
||||
emit('socialCardUpdate',socialCard.value)
|
||||
ElMessage({
|
||||
message: "读取成功",
|
||||
type: 'success',
|
||||
});
|
||||
emit('socialCardUpdate', socialCard.value)
|
||||
loading.value = false
|
||||
}).finally(() => {
|
||||
isReading.value = false;
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -85,37 +93,32 @@ onMounted(async () => {
|
|||
onUnmounted(() => {
|
||||
wsStore.removeAllMessageCallback()
|
||||
})
|
||||
const close = () => {
|
||||
ElMessageBox.confirm("退出识别", "提示", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
callback: (action: any) => {
|
||||
if (action == "confirm") {
|
||||
socialCard.value.data = null
|
||||
emit('close')
|
||||
}
|
||||
if (action == "cancel") {
|
||||
emit('socialCardUpdate', socialCard.value)
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="card-default">
|
||||
<div class="card-default" style="padding:24px">
|
||||
<div class="info" v-if="socialCard.data">
|
||||
<el-descriptions title="医保卡信息" column="2" border>
|
||||
<el-descriptions-item label="姓名">{{ socialCard.data.baseinfo.psn_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ getKey(gends, socialCard.data.baseinfo.gend) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄">{{ Math.floor(socialCard.data.baseinfo.age) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">{{ getKey(natys, socialCard.data.baseinfo.naty) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="证件类型" span="2">{{
|
||||
getKey(psnCertTypes, socialCard.data.baseinfo.psn_cert_type)
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="证件号码" span="2">{{ socialCard.data.baseinfo.certno }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="btn-wrapper">
|
||||
<el-button text bg @click="socialCard.data = null">退出医保卡</el-button>
|
||||
</div>
|
||||
<div class="insuinfo" v-if="socialCard.data.insuinfo">
|
||||
<el-scrollbar max-height="180">
|
||||
<div class="item" v-for="(item,index) in socialCard.data.insuinfo"><span
|
||||
class="name">账户余额({{ getKey(insutypes, item.insutype) }})</span><span
|
||||
class="value">{{ item.balc.toFixed(2) }}</span></div>
|
||||
</el-scrollbar>
|
||||
<el-button text bg @click="close">退出医保卡</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="empty" v-else>
|
||||
<div class="tip" v-loading="isReading">
|
||||
<img style="width: 100%;height: 226px" src="/static/images/retail/null.png" alt="">
|
||||
</div>
|
||||
<div v-loading="loading" class="empty" v-else>
|
||||
<div class="btn-wrapper">
|
||||
<div class="btn" @click="ReadSocialCard('03')" @keydown.enter.prevent tabindex="-1">医保卡</div>
|
||||
<div class="btn" @click="ReadSocialCard('01')" @keydown.enter.prevent tabindex="-1">电子凭证</div>
|
||||
|
|
@ -149,6 +152,7 @@ onUnmounted(() => {
|
|||
font-size: 14px;
|
||||
color: #666;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.name {
|
||||
flex: 1;
|
||||
|
|
@ -182,16 +186,13 @@ onUnmounted(() => {
|
|||
}
|
||||
|
||||
.btn-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
margin-top: 24px;
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #4D6DE4;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
|
|
@ -199,15 +200,19 @@ onUnmounted(() => {
|
|||
font-style: normal;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
padding: 0 24px;
|
||||
|
||||
&:hover {
|
||||
background: #4D6DE4;
|
||||
color: #FFFFFF;
|
||||
|
||||
}
|
||||
|
||||
&:nth-child(2n) {
|
||||
margin:0 8px;
|
||||
margin: 0 8px;
|
||||
}
|
||||
&:last-child{
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<Mask :is-show="isShow" width="800" title="挂号" @close="close" :show-footer="true">
|
||||
<div style="padding:0 24px 24px">
|
||||
<Mask :is-show="isShow" width="800" :height="500" title="挂号" @close="close" :show-footer="true">
|
||||
|
||||
<div style="padding:0 24px 24px" v-loading="isShowCard">
|
||||
<el-form
|
||||
:model="edit_data"
|
||||
label-width="auto"
|
||||
|
|
@ -14,6 +15,14 @@
|
|||
:column="4"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<!-- <el-descriptions-item label="结算方式">-->
|
||||
<!-- <el-form-item prop="gender">-->
|
||||
<!-- <el-radio-group v-model="edit_data.type">-->
|
||||
<!-- <el-radio value="1">医保</el-radio>-->
|
||||
<!-- <el-radio value="2">自费</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="名称">
|
||||
<el-form-item prop="name">
|
||||
<el-input v-model="edit_data.name" placeholder="请输入名称" clearable></el-input>
|
||||
|
|
@ -29,7 +38,7 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄">
|
||||
<el-form-item prop="age">
|
||||
<el-input v-model="edit_data.age" placeholder="请输入年龄"></el-input>
|
||||
<el-input v-model.number="edit_data.age" placeholder="请输入年龄"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="医生">
|
||||
|
|
@ -83,21 +92,26 @@
|
|||
<el-input v-model="edit_data.memo" placeholder="备注"></el-input>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="content" style="margin-top: 24px">
|
||||
<CardDefault v-model="socialCard" @socialCardUpdate="socialCardUpdate"/>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="bottom_btn">
|
||||
<div class="bottom">
|
||||
<el-dropdown placement="top-start">
|
||||
<el-button type="primary">读卡</el-button>
|
||||
<template #dropdown>
|
||||
<CardDefault v-model="socialCard" @socialCardUpdate="socialCardUpdate"
|
||||
@close="edit_data={}"/>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<div class="bottom-right">
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<el-button @click="close">取消</el-button>
|
||||
<el-button v-if="id" type="danger" @click="deleteDetail">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, ref} from 'vue'
|
||||
|
|
@ -120,7 +134,7 @@ const props = defineProps({
|
|||
default: () => []
|
||||
},
|
||||
id: {
|
||||
type: [String,Number],
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
doctorId: {
|
||||
|
|
@ -128,7 +142,7 @@ const props = defineProps({
|
|||
default: ''
|
||||
}
|
||||
})
|
||||
const certTypeList = ref<any>(Object.entries(psnCertTypes).map(([id, name]) => ({ id, name })));
|
||||
const certTypeList = ref<any>(Object.entries(psnCertTypes).map(([id, name]) => ({id, name})));
|
||||
const edit_data = ref<any>({})
|
||||
const rules = ref<any>({
|
||||
name: [
|
||||
|
|
@ -199,15 +213,12 @@ const save = () => {
|
|||
|
||||
}
|
||||
const deleteDetail = () => {
|
||||
post('registration/delete', {id:id.value}).then(() => {
|
||||
post('registration/delete', {id: id.value}).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
close()
|
||||
})
|
||||
}
|
||||
const socialCardUpdate = (e:any) => {
|
||||
edit_data.value=e.data.baseinfo
|
||||
edit_data.value.gender=e.data.baseinfo.gend
|
||||
}
|
||||
|
||||
const socialCard: any = ref({
|
||||
data: null,
|
||||
payInfo: {},
|
||||
|
|
@ -217,11 +228,28 @@ const init = () => {
|
|||
isShow.value = true
|
||||
edit_data.value.organizationDoctorId = props.doctorId
|
||||
if (id.value) {
|
||||
post('registration/getById', {id:id.value}).then((res: any) => {
|
||||
post('registration/getById', {id: id.value}).then((res: any) => {
|
||||
edit_data.value = res
|
||||
})
|
||||
}
|
||||
}
|
||||
const isShowCard = ref<any>(false)
|
||||
const openCard = () => {
|
||||
isShowCard.value = true
|
||||
}
|
||||
const socialCardUpdate = (e: any) => {
|
||||
isShowCard.value = true
|
||||
if(e){
|
||||
isShowCard.value = false
|
||||
edit_data.value = e.data.baseinfo
|
||||
edit_data.value.gender = e.data.baseinfo.gend
|
||||
edit_data.value.name = e.data.baseinfo.psn_name
|
||||
edit_data.value.certType = e.data.baseinfo.psn_cert_type
|
||||
edit_data.value.certNo = e.data.baseinfo.certno
|
||||
edit_data.value.age = Math.floor(e.data.baseinfo.age)
|
||||
}
|
||||
|
||||
}
|
||||
defineExpose({init})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
@ -233,10 +261,10 @@ defineExpose({init})
|
|||
font-size: 18px;
|
||||
}
|
||||
|
||||
.bottom_btn {
|
||||
.bottom {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue