This commit is contained in:
ChenQiuYu 2025-05-21 17:22:55 +08:00
parent c05230c28f
commit 330f626672
5 changed files with 166 additions and 17 deletions

View File

@ -99,7 +99,7 @@ const ChargeQueueList = ref<any>([]);
const editRef = ref() const editRef = ref()
const addChargeOrder = () => { const addChargeOrder = () => {
nextTick(() => { nextTick(() => {
editRef.value?.init(null, null) editRef.value?.init(null, null, true)
}) })
} }
const clickFirst = () => { const clickFirst = () => {
@ -278,6 +278,7 @@ const selected = ref(false)
width: 26px; width: 26px;
height: 100%; height: 100%;
margin-right: 10px; margin-right: 10px;
.avatar { .avatar {
margin-top: 11px; margin-top: 11px;
width: 26px; width: 26px;
@ -297,7 +298,8 @@ const selected = ref(false)
.item-time { .item-time {
width: 80px; width: 80px;
} }
.item-status{
.item-status {
width: 40px; width: 40px;
} }

View File

@ -0,0 +1,136 @@
<template>
<Mask :is-show="is_show" :width="450" :height="250" :show-footer="true" @close="close" title="诊断">
<template #default>
<div class="wrapper">
<span>诊断</span>
<DiagnosisSearchInput
ref="diagnosisSearchRef"
:request-api="diagnosisSearchApi"
:show-config="diagnosisShowConfig"
@selectedCallBack="diagnosisSelect"
style="height: 100%;width: 100%"
>
</DiagnosisSearchInput>
</div>
</template>
<template #footer>
<div class="footer">
<div class="default-btn" @click="close">取消</div>
<div class="default-btn" @click="save">确定</div>
</div>
</template>
</Mask>
</template>
<script setup lang="ts">
import {ref} from "vue";
import Mask from "@/components/common/Mask.vue";
import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.vue";
import {apiConfig} from "@/assets/config/apiConfig.ts";
import {getEndOfDay} from "@/utils/dateUtils.ts";
import {post} from "@/utils/request.ts";
import {ElMessage} from "element-plus";
const is_show = ref(false);
const init = async () => {
is_show.value = true
try {
let data: any = await post(apiConfig.RegistrationList, {
query: {
status: 1,
beginTime: new Date(),
endTime: getEndOfDay(new Date())
}
}, {catch_error: true});
post('registration/changeStatus', {id: data.list[0].id, status: 2}).then((res: any) => {
registerId.value = res.id
patientId.value = res.patientInfoId
})
} catch (e) {
is_show.value = false
}
}
const diagnosisSearchApi = "social/diagnose/search"
interface ShowConfig {
label: string;
prop: string;
}
const diagnosisShowConfig: ShowConfig[] = [
{
label: "诊断名称",
prop: "name",
},
{
label: "诊断编码",
prop: "code",
}
]
const medicalRecord = ref<any>({})
const registerId = ref<any>(null)
const patientId = ref<any>(null)
const diagnosisSelect = (list: any) => {
const diagnosisNames = list.map((item: any) => item.name).join(',')
medicalRecord.value.diagnosisDetail = JSON.stringify(list)
medicalRecord.value.diagnosisSummary = diagnosisNames
}
const emit = defineEmits(['close'])
const save = () => {
const data = {
registrationId: registerId.value,
patientId: patientId.value,
diagnosisMedicalRecord: medicalRecord.value,
itemList: [],
goodsList: [],
}
post('medical/record/save', {data: data}).then((res: any) => {
ElMessage.success("快速接诊成功")
is_show.value = false
emit('close')
})
}
const close = () => {
medicalRecord.value = {}
registerId.value = null
patientId.value = null
is_show.value = false
}
defineExpose({init})
</script>
<style scoped lang="scss">
.wrapper {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 24px;
span{
width: 60px;
}
}
:deep(.el-input__wrapper) {
height: 42px;
flex: 1;
min-width: 0;
}
.footer {
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0 24px;
.default-btn {
margin-left: 24px;
&:first-child {
margin-left: 0;
}
}
}
</style>

View File

@ -7,8 +7,8 @@ let _height = ref(0);
let _isShow = ref(false); let _isShow = ref(false);
let _close = ref(true); let _close = ref(true);
let _showFooter = ref(false); let _showFooter = ref(false);
const width_rem=ref<any>(); const width_rem = ref<any>();
const height_rem=ref<any>(); const height_rem = ref<any>();
const { const {
width, width,
height, height,
@ -35,11 +35,11 @@ watch(
() => height, () => height,
(newVal) => { (newVal) => {
_height.value = newVal == null ? 800 : Number(newVal); _height.value = newVal == null ? 800 : Number(newVal);
height_rem.value =(_height.value/16).toFixed(2); height_rem.value = (_height.value / 16).toFixed(2);
},{deep:true} }, {deep: true}
); );
width_rem.value=(_width.value/16).toFixed(2); width_rem.value = (_width.value / 16).toFixed(2);
height_rem.value=(_height.value/16).toFixed(2); height_rem.value = (_height.value / 16).toFixed(2);
</script> </script>
<template> <template>
@ -55,7 +55,7 @@ height_rem.value=(_height.value/16).toFixed(2);
</el-icon> </el-icon>
</div> </div>
</div> </div>
<div class="content" > <div class="content">
<slot></slot> <slot></slot>
</div> </div>
<div class="footer" v-if="_showFooter"> <div class="footer" v-if="_showFooter">

View File

@ -177,7 +177,7 @@
</div> </div>
</template> </template>
</Mask> </Mask>
<Quick ref="quickRef" @close="close"></Quick>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {nextTick, onMounted, ref, watch} from 'vue' import {nextTick, onMounted, ref, watch} from 'vue'
@ -188,8 +188,8 @@ import Mask from "@/components/common/Mask.vue";
import psnCertTypes from "@/assets/config/directory/psnCertTypes.json" import psnCertTypes from "@/assets/config/directory/psnCertTypes.json"
import {getKey} from "@/utils/discrotyUtil.ts"; import {getKey} from "@/utils/discrotyUtil.ts";
import insutypes from "@/assets/config/directory/insutypes.json" import insutypes from "@/assets/config/directory/insutypes.json"
import depts from "@/assets/config/directory/depts.json";
import {apiConfig} from "@/assets/config/apiConfig.ts"; import {apiConfig} from "@/assets/config/apiConfig.ts";
import Quick from "@/components/charge/RecordsLog/Quick.vue";
const height = ref(470) const height = ref(470)
const certTypeList = ref<any>( const certTypeList = ref<any>(
@ -244,6 +244,7 @@ const close = () => {
emit('close') emit('close')
} }
const form = ref() const form = ref()
const quickRef = ref()
const save = () => { const save = () => {
let data = { let data = {
...edit_data.value, ...edit_data.value,
@ -269,7 +270,14 @@ const save = () => {
mdtrtCertType: socialCard.value?.mdtrtCertType mdtrtCertType: socialCard.value?.mdtrtCertType
}).then(() => { }).then(() => {
ElMessage.success('挂号成功') ElMessage.success('挂号成功')
if (quickShow.value) {
nextTick(() => {
quickRef.value?.init()
})
return
} else {
close() close()
}
}) })
} }
} }
@ -298,9 +306,12 @@ const socialCard: any = ref({
payInfo: {}, payInfo: {},
lastUse: null lastUse: null
}) })
const init = (doctorId: any, id: any) => { const quickShow = ref<any>(false)
const init = (doctorId: any = "", id: any = null, show: any = false) => {
isShow.value = true isShow.value = true
edit_data.value.organizationDoctorId = doctorId quickShow.value = show
console.log("doctorId", quickShow.value)
edit_data.value.organizationDoctorId = doctorId || ""
if (id) { if (id) {
post('registration/getById', {id: id}).then((res: any) => { post('registration/getById', {id: id}).then((res: any) => {
edit_data.value = res edit_data.value = res
@ -374,7 +385,7 @@ const hide = () => {
} }
const sectionList = ref<any>([]) const sectionList = ref<any>([])
const getSectionList = () => { const getSectionList = () => {
if(!edit_data.value.organizationDoctorId)return if (!edit_data.value.organizationDoctorId) return
post(apiConfig.OrganizationSectionListByMemberId, {memberId: edit_data.value.organizationDoctorId}).then((res: any) => { post(apiConfig.OrganizationSectionListByMemberId, {memberId: edit_data.value.organizationDoctorId}).then((res: any) => {
sectionList.value = res sectionList.value = res
if (res.length > 0) { if (res.length > 0) {

View File

@ -147,7 +147,7 @@ const editRef = ref<any>('')
const openDialog = (item: any, index: any) => { const openDialog = (item: any, index: any) => {
isShowNum.value = index isShowNum.value = index
nextTick(() => { nextTick(() => {
editRef.value?.init(item.id, null) editRef.value?.init(item.id)
}) })
} }
const close = () => { const close = () => {