From 563952b6d7c953ab7888512ea6c78d9cad0f80b6 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期二, 15 四月 2025 13:26:50 +0800 Subject: [PATCH] update --- src/views/ecg/doctor/components/DevReadyPanel.vue | 42 ++++++++++++++++++++---------------------- 1 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/views/ecg/doctor/components/DevReadyPanel.vue b/src/views/ecg/doctor/components/DevReadyPanel.vue index 8c190ff..de29af4 100644 --- a/src/views/ecg/doctor/components/DevReadyPanel.vue +++ b/src/views/ecg/doctor/components/DevReadyPanel.vue @@ -11,7 +11,7 @@ v-loading="formLoading" > <el-form-item label="妫�鏌ラ」鐩�" prop=""> - {{formData?.checkType && getCheckTypeName(formData?.checkType)}} + {{getCheckTypeName(formData.checkType)}} </el-form-item> <el-form-item label="鎮h�呯紪鍙�" prop="patId"> <el-input v-model="formData.patId" placeholder="璇疯緭鍏ユ偅鑰呯紪鍙�" @input="getRentInfoByPatId" /> @@ -149,7 +149,7 @@ import {calGender, getBookBeginTime} from "@/utils"; import {DICT_TYPE} from "@/utils/dict"; import {tranlateDevState} from "@/utils/statusFormatter"; -import {getCheckTypeName} from "../../../../utils/checkTypeFormatter"; +import {getCheckTypeName, needAutoFeeConfirm} from "../../../../utils/checkTypeFormatter"; /** 璁惧棰嗙敤 琛ㄥ崟 */ defineComponent({ name: 'DevReadyPanel' }) @@ -166,15 +166,13 @@ const { t } = useI18n() // 鍥介檯鍖� const message = useMessage() // 娑堟伅寮圭獥 -const dialogVisible = ref(false) // 寮圭獥鐨勬槸鍚﹀睍绀� - const formLoading = ref(false) // 琛ㄥ崟鐨勫姞杞戒腑锛�1锛変慨鏀规椂鐨勬暟鎹姞杞斤紱2锛夋彁浜ょ殑鎸夐挳绂佺敤 const autoPrint = ref<boolean>(true); const checkTypeStore = useCheckTypeStore() -const formData = ref<Partial<DevRentVO>>({ +const formData = ref<DevRentVO>({ id: undefined, devId: undefined, patId: undefined, @@ -204,13 +202,6 @@ const displayBarCode = ref<string> () -const needAutoFeeConfirm = (checkType: number | null | undefined) => { - if (checkType == null) - return false - - return checkTypeStore.getExpenseRecognition(checkType) -} - const getRentInfoByPatId = () => { const tempPatId = formData.value.patId; resetForm() @@ -224,6 +215,9 @@ // 鏍规嵁鎮h�呮垨璁惧, 鑾峰彇 Free鐨勭璧� const getFreeRentInfo = async (devRentVO) => { + if ((devRentVO.devId == null || devRentVO.devId === '') && (devRentVO.patId == null || devRentVO.patId === '') ) + return + const data = await DevRentApi.getFreeRent(devRentVO) if (null === data) return @@ -255,12 +249,11 @@ feeConfirm() } - dialogVisible.value = false - // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢 - emit('event_dev_ready') resetForm() getList() + // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢 + emit('event_dev_ready') message.success(t('鎿嶄綔瀹屾垚')) } finally { formLoading.value = false @@ -312,7 +305,7 @@ formData.value.patId = queueVO?.patId formData.value.patName = queueVO?.patName formData.value.checkType = queueVO?.bookCheckType - getFreeRentInfo(formData.value) + getFreeRentInfo(formData.value) // 寰呮鏌ョ殑淇℃伅 @ dev_rent 琛� copyBarcode() } defineExpose({ setPatient }) // 鎻愪緵 setPatient 鏂规硶锛岀敤浜庤缃偅鑰� @@ -367,7 +360,7 @@ const printBill = async (patId: string, checkType: number, printMode?: number) => { const curAppointment: AppointmentVO = await AppointmentApi.getCurAppointmentByPatIdAndCheckType( patId, checkType ) - console.info( curAppointment ) + //console.info( curAppointment ) // 寮曞叆鍚庝娇鐢ㄧず渚� hiprint.init({ @@ -473,19 +466,24 @@ } const getDisplayBarcode = (): string => { - if (!formData.value.checkType) + if (formData.value.checkType == null) return "" - const displayBarcode: number[] = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType!) - if (formData.value.patDetails == null || formData.value.patDetails.source == null || - !displayBarcode.includes( formData.value.patDetails.source )) + if (formData.value.patDetails?.source == null) + return "" + + const displayBarcode: number[] = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType) + if (displayBarcode == null || displayBarcode.length === 0) + return "" + + if (!displayBarcode.includes( formData.value.patDetails.source )) return "" return getBarcode() } const getBarcode = (): string => { - if (!formData.value.checkType) + if (formData.value.checkType == null) return "" const patSource = formData.value.patDetails?.source -- Gitblit v1.9.3