From 1cbfac109c80cdefab53d573619c2a3c332ddf45 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期三, 30 十月 2024 17:17:44 +0800 Subject: [PATCH] update --- src/views/ecg/appointment/index.vue | 8 ++++---- src/api/ecg/appointment/index.ts | 7 ++++++- src/views/ecg/appointment/AppointmentForm.vue | 28 ++++++++++++++++++++++++---- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/api/ecg/appointment/index.ts b/src/api/ecg/appointment/index.ts index 45283ba..402e9d2 100644 --- a/src/api/ecg/appointment/index.ts +++ b/src/api/ecg/appointment/index.ts @@ -36,11 +36,16 @@ return await request.get({ url: `/ecg/appointment/get?id=` + id }) }, - // 鏌ヨ棰勭害璇︽儏 + // 浠嶩IS鎴栬�匘B鏌ヨ棰勭害璇︽儏 getAppointmentByPatId: async (patId: string) => { return await request.get({ url: `/ecg/appointment/get-by-patient?patId=` + patId }) }, + // 浠嶩IS鏌ヨ棰勭害鎴栧紑鍗曚俊鎭� + queryAppointmentFromHis: async (patId: string) => { + return await request.get({ url: `/ecg/appointment/query-his-by-patient?patId=` + patId }) + }, + // 鏂板棰勭害 createAppointment: async (data: AppointmentVO) => { return await request.post({ url: `/ecg/appointment/create`, data }) diff --git a/src/views/ecg/appointment/AppointmentForm.vue b/src/views/ecg/appointment/AppointmentForm.vue index b66ea7f..71248fe 100644 --- a/src/views/ecg/appointment/AppointmentForm.vue +++ b/src/views/ecg/appointment/AppointmentForm.vue @@ -10,7 +10,7 @@ <el-row :gutter="20"> <el-col :span="12"> <el-form-item label="鎮h�呯紪鍙�" prop="patId"> - <el-input v-model="formData.patId" placeholder="璇疯緭鍏ユ偅鑰呯紪鍙�" /> + <el-input v-model="formData.patId" placeholder="璇疯緭鍏ユ偅鑰呯紪鍙�" clearable @input="searchBookInfo"/> </el-form-item> </el-col> <el-col :span="12"> @@ -65,8 +65,8 @@ </el-row> <el-row :gutter="20"> <el-col :span="12"> - <el-form-item label="棰勭害妫�鏌ョ被鍨�" prop="bookCheckType"> - <el-select v-model="formData.bookCheckType" placeholder="璇烽�夋嫨棰勭害妫�鏌ョ被鍨�"> + <el-form-item label="妫�鏌ョ被鍨�" prop="bookCheckType"> + <el-select v-model="formData.bookCheckType" placeholder="璇烽�夋嫨妫�鏌ョ被鍨�"> <el-option v-for="dict in checkTypeStore.getCheckTypeOptions()" :key="dict.value" @@ -142,7 +142,7 @@ </el-form-item> </el-col> </el-row> - <el-form-item label="宸蹭粯娆炬爣璁�" prop="paid"> + <el-form-item label="浠樻鏍囪" prop="paid"> <el-checkbox v-model="formData.paid" :true-label=1 :false-label=0> 宸蹭粯娆� </el-checkbox> @@ -270,4 +270,24 @@ } formRef.value?.resetFields() } + +const searchBookInfo = async () => { + const tmpPatId = formData.value.patId + if (null === tmpPatId || "" === tmpPatId) + return + + const data = await AppointmentApi.queryAppointmentFromHis( tmpPatId ) // 瀵瑰簲鏁版嵁搴撲腑 pat_id + console.info( data ) + if (null !== data) { + formData.value = data + return + } + + ElNotification({ + title: '娓╅Θ鎻愮ず', + message: "娌℃湁寮�鍗曚俊鎭�", + type: 'warning' + }) +} + </script> diff --git a/src/views/ecg/appointment/index.vue b/src/views/ecg/appointment/index.vue index 0ff69f1..64b9ce7 100644 --- a/src/views/ecg/appointment/index.vue +++ b/src/views/ecg/appointment/index.vue @@ -116,7 +116,7 @@ <!-- 鍒楄〃 --> <ContentWrap> - <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> + <el-table v-loading="loading" :data="appointmentList" :stripe="true" :show-overflow-tooltip="true"> <el-table-column label="缂栧彿" align="center" prop="patId" /> <el-table-column label="缂磋垂" align="center" prop="paid"> <template #default="scope"> @@ -197,7 +197,7 @@ </template> <script setup lang="ts"> -import {DICT_TYPE, getIntDictOptions} from '@/utils/dict' +import {DICT_TYPE} from '@/utils/dict' import { dateFormatter2 } from '@/utils/formatTime' import download from '@/utils/download' import { AppointmentApi, AppointmentVO } from '@/api/ecg/appointment' @@ -211,7 +211,7 @@ const { t } = useI18n() // 鍥介檯鍖� const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑 -const list = ref<AppointmentVO[]>([]) // 鍒楄〃鐨勬暟鎹� +const appointmentList = ref<AppointmentVO[]>([]) // 鍒楄〃鐨勬暟鎹� const total = ref(0) // 鍒楄〃鐨勬�婚〉鏁� const queryParams = reactive({ pageNo: 1, @@ -245,7 +245,7 @@ loading.value = true try { const data = await AppointmentApi.getAppointmentPage(queryParams) - list.value = data.list + appointmentList.value = data.list total.value = data.total } finally { loading.value = false -- Gitblit v1.9.3